X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=config%2Fapplication.rb;h=56dcdc59d29ad4a78b6ff500a19d5a154bc34f76;hb=3a75b9b19a06a2812f9232ee373e2fbba7a2394f;hp=00a00f710f5d05f481d06f56dd2ce2c4d1ea456a;hpb=f20b5ab5b092b656b2993aa68d8d6ec2b9cc4b3f;p=pettanr%2Fpettanr.git diff --git a/config/application.rb b/config/application.rb index 00a00f71..56dcdc59 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,7 +17,7 @@ if defined?(Bundler) end module Pettanr - VERSION = '0.4' + VERSION = '0.5.2' class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers @@ -39,8 +39,8 @@ config.assets.initialize_on_precompile = false # config.time_zone = 'Central Time (US & Canada)' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de + config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s] + config.i18n.default_locale = :ja # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" @@ -55,14 +55,31 @@ config.assets.initialize_on_precompile = false config.assets.version = '1.0' 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"] PictureIO.setup do |config| config.original_picture_io = pio.new y[Rails.env]["original_picture"] config.resource_picture_io = pio.new y[Rails.env]["resource_picture"] + config.picture_io = pio.new y[Rails.env]["picture"] config.system_picture_io = pio.new y[Rails.env]["system_picture"] end module ActiveRecord @@ -70,3 +87,7 @@ module ActiveRecord end end +module Pettanr + TestLayout = false +end +