X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=config%2Fapplication.rb;h=346cb0d35571eb488353fb7126bbde47a868fab0;hb=484dc90099faa5c61c4467583423349cd7df29fb;hp=2b7bcb8fd44a5fc4f0023f39d995401e23e6a254;hpb=aec34f8b39f39ec0794d39c878659487909f0136;p=pettanr%2Fpettanr.git diff --git a/config/application.rb b/config/application.rb index 2b7bcb8f..346cb0d3 100644 --- a/config/application.rb +++ b/config/application.rb @@ -15,8 +15,10 @@ 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' class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers @@ -38,8 +40,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" @@ -53,11 +55,32 @@ 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) + end + +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"] +PictureIO.setup do |config| + config.original_picture_io = pio.new y[Rails.env]["original_picture"] + config.resource_picture_io = pio.new y[Rails.env]["resource_picture"] + config.picture_io = pio.new y[Rails.env]["picture"] + config.system_picture_io = pio.new y[Rails.env]["system_picture"] end module ActiveRecord class Forbidden < ActiveRecordError end end +module Pettanr + TestLayout = false + class BadRequest < StandardError + end + class NotWork < StandardError + end +end +