X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=config%2Fapplication.rb;h=1fe4db4c70894bf53c3b74402f94464a7f8d0ad0;hb=03f41cad6ca10529eca98a34dcda6a69964390e3;hp=c31348bdca97b943a566a327d1238e490858aef8;hpb=32011a831d9b226af0ee586c91ca5c5225048976;p=pettanr%2Fpettanr.git diff --git a/config/application.rb b/config/application.rb index c31348bd..1fe4db4c 100644 --- a/config/application.rb +++ b/config/application.rb @@ -8,14 +8,13 @@ require "active_resource/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie" require 'digest/md5' - +$: << './lib' if defined?(Bundler) # If you precompile assets before deploying to production, use this line Bundler.require(*Rails.groups(:assets => %w(development test))) # If you want your assets lazily compiled in production, use this line # Bundler.require(:default, :assets, Rails.env) end -require "manifest" module Pettanr VERSION = '0.6.2' @@ -55,32 +54,13 @@ config.assets.initialize_on_precompile = false # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' + #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"]