X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=config%2Fapplication.rb;h=1fe4db4c70894bf53c3b74402f94464a7f8d0ad0;hb=03f41cad6ca10529eca98a34dcda6a69964390e3;hp=56dcdc59d29ad4a78b6ff500a19d5a154bc34f76;hpb=339d45c101d93bf611299e3c90f3883f28937c2b;p=pettanr%2Fpettanr.git diff --git a/config/application.rb b/config/application.rb index 56dcdc59..1fe4db4c 100644 --- a/config/application.rb +++ b/config/application.rb @@ -8,7 +8,7 @@ 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))) @@ -17,7 +17,7 @@ if defined?(Bundler) end module Pettanr - VERSION = '0.5.2' + VERSION = '0.6.2' class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers @@ -54,25 +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.licenses=(ary) - @@licenses = ary - end - - def self.licenses - @@licenses - end end -end -Pettanr::Application.licenses = YAML.load(open(Rails.root + 'config/license.yml').read) -MagicNumber = YAML.load(open(Rails.root + 'config/magic_number.yml').read) -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"] @@ -89,5 +77,9 @@ end module Pettanr TestLayout = false + class BadRequest < StandardError + end + class NotWork < StandardError + end end