X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;ds=sidebyside;f=config%2Fapplication.rb;h=c31348bdca97b943a566a327d1238e490858aef8;hb=32011a831d9b226af0ee586c91ca5c5225048976;hp=dee52ea7f71a9bddcca72f47d315105fe1a01b3a;hpb=26f1bb0f8cf40ebd82495945236f83542dfe21ed;p=pettanr%2Fpettanr.git diff --git a/config/application.rb b/config/application.rb index dee52ea7..c31348bd 100644 --- a/config/application.rb +++ b/config/application.rb @@ -56,43 +56,9 @@ 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 - end - - def self.licenses - @@licenses || {} - end - - def self.speech_balloons=(ary) - @@speech_balloons = ary - end - - def self.speech_balloons - @@speech_balloons || {} - end - - def self.writing_formats=(ary) - @@writing_formats = ary - end - - def self.writing_formats - @@writing_formats || {} - end - - def self.elements=(ary) - @@elements = ary - end - - def self.elements - @@elements || {} - end -=end def self.manifest=(arg) - @@manifest = Pettanr::Manifest.new arg + @@manifest = arg end def self.manifest @@ -106,13 +72,7 @@ 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) -=end -Pettanr::Application.manifest = JSON.parse(open(Rails.root + 'public/manifest.json').read) +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'