OSDN Git Service

fix panel viewer
[pettanr/pettanr.git] / config / application.rb
index c31348b..1fe4db4 100644 (file)
@@ -8,14 +8,13 @@ require "active_resource/railtie"
 require "sprockets/railtie"
 # require "rails/test_unit/railtie"
 require 'digest/md5'
-
+$: << './lib'
 if defined?(Bundler)
   # If you precompile assets before deploying to production, use this line
   Bundler.require(*Rails.groups(:assets => %w(development test)))
   # 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'
@@ -55,32 +54,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.manifest=(arg)
-      @@manifest = arg
-    end
-    
-    def self.manifest
-      @@manifest
-    end
-  end
-  
-  def manifest
-    Application::manifest
   end
   
 end
   
-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'
-  '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"]