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)))
end
module Pettanr
- VERSION = '0.6.0'
+ 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
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ I18n.enforce_available_locales = false
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s]
config.i18n.default_locale = :ja
# 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
- end
-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)
-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
+
y = YAML.load(open(Rails.root + 'config/picture_io.yml').read)
require y[Rails.env]["adapter"]
pio = PictureIO.const_get y[Rails.env]["io"]
TestLayout = false
class BadRequest < StandardError
end
+ class NotWork < StandardError
+ end
end