OSDN Git Service

temp
[pettanr/pettanr.git] / config / application.rb
index 4b9d94c..dee52ea 100644 (file)
@@ -56,6 +56,7 @@ config.assets.initialize_on_precompile = false
     config.assets.version = '1.0'
     
     config.autoload_paths += %W(#{config.root}/lib/validators)
+=begin 
     
     def self.licenses=(ary)
       @@licenses = ary
@@ -88,6 +89,7 @@ config.assets.initialize_on_precompile = false
     def self.elements
       @@elements || {}
     end
+=end
     
     def self.manifest=(arg)
       @@manifest = Pettanr::Manifest.new arg
@@ -104,18 +106,20 @@ config.assets.initialize_on_precompile = false
   
 end
   
+=begin 
 Pettanr::Application.licenses = YAML.load(open(Rails.root + 'config/license.yml').read)
 Pettanr::Application.speech_balloons = YAML.load(open(Rails.root + 'config/speech_balloon.yml').read)
 Pettanr::Application.writing_formats = YAML.load(open(Rails.root + 'config/writing_format.yml').read)
 Pettanr::Application.elements = YAML.load(open(Rails.root + 'config/element.yml').read)
-MagicNumber = YAML.load(open(Rails.root + 'config/magic_number.yml').read)
+=end
+Pettanr::Application.manifest = 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
-MagicNumber['profile'] = JSON.parse(open(Rails.root + 'config/profile.json').read).first[1] #strip profile body
-Pettanr::Application.manifest = JSON.parse(open(Rails.root + 'public/manifest.json').read)
 
 y = YAML.load(open(Rails.root + 'config/picture_io.yml').read)
 require y[Rails.env]["adapter"]