OSDN Git Service

fix bucket
[pettanr/pettanr.git] / config / application.rb
index 39f4d58..346cb0d 100644 (file)
@@ -15,6 +15,7 @@ if defined?(Bundler)
   # If you want your assets lazily compiled in production, use this line
   # Bundler.require(:default, :assets, Rails.env)
 end
+require 'manifest'
 
 module Pettanr
   VERSION = '0.6.2'
@@ -54,68 +55,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
-    
-    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
-    
-    def self.manifest=(arg)
-      @@manifest = Manifest.new arg
-    end
-    
-    def self.manifest
-      @@manifest
-    end
-  end
-  
-  def manifest
-    Application::manifest
   end
   
 end
   
-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)
-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"]
 pio = PictureIO.const_get y[Rails.env]["io"]