OSDN Git Service

t#30322:create provider license import func
[pettanr/pettanr.git] / config / application.rb
index 683056d..346daee 100644 (file)
@@ -17,7 +17,7 @@ if defined?(Bundler)
 end
 
 module Pettanr
-  VERSION = '0.4'
+  VERSION = '0.5.1'
   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"
@@ -63,24 +63,16 @@ config.assets.initialize_on_precompile = false
     def self.licenses
       @@licenses
     end
-    
-    def self.test_layout=(arg)
-      @@test_layout = arg
-    end
-    
-    def self.test_layout
-      @@test_layout
-    end
   end
 end
   
-if File.exist? Rails.root + 'config/test_layout'
-  Pettanr::Application.test_layout = 'test'
-else
-  Pettanr::Application.test_layout = false
-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"]