X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=config%2Fapplication.rb;h=346cb0d35571eb488353fb7126bbde47a868fab0;hb=5d4a84528ce84792699f6987262d3b8ac5453b52;hp=6a815d6b093703c41a28345a777472d461e974ec;hpb=579786aaf9b4b639fcd050e05dffde253fbee523;p=pettanr%2Fpettanr.git diff --git a/config/application.rb b/config/application.rb index 6a815d6b..346cb0d3 100644 --- a/config/application.rb +++ b/config/application.rb @@ -15,7 +15,7 @@ if defined?(Bundler) # If you want your assets lazily compiled in production, use this line # Bundler.require(:default, :assets, Rails.env) end -require "manifest" +require 'manifest' module Pettanr VERSION = '0.6.2' @@ -58,30 +58,10 @@ config.assets.initialize_on_precompile = false #config.autoload_paths += Dir["#{config.root}/lib/validators/*", "#{config.root}/lib/editor/*", "#{config.root}/lib/manifest/*"] config.autoload_paths += %W(#{config.root}/lib/validators) - def self.manifest=(arg) - @@manifest = arg - end - - def self.manifest - @@manifest - end - end - - def manifest - Application::manifest end end -Pettanr::Application.manifest = Pettanr::Manifest.new JSON.parse(open(Rails.root + 'public/manifest.json').read) -MagicNumber = Pettanr::Application.manifest.magic_numbers -MagicNumber.merge! Pettanr::Application.manifest.select_items -MagicNumber['test_layout'] = if File.exist? Rails.root + 'config/test_layout' - 'test' -else - false -end - y = YAML.load(open(Rails.root + 'config/picture_io.yml').read) require y[Rails.env]["adapter"] pio = PictureIO.const_get y[Rails.env]["io"]