42 lines
970 B
Ruby
42 lines
970 B
Ruby
# frozen_string_literal: true
|
|
|
|
module HitobitoLit
|
|
class Wagon < Rails::Engine
|
|
include Wagons::Wagon
|
|
|
|
# Set the required application version.
|
|
app_requirement '>= 0'
|
|
|
|
# Add a load path for this specific wagon
|
|
config.autoload_paths += %W[
|
|
#{config.root}/app/abilities
|
|
#{config.root}/app/domain
|
|
#{config.root}/app/jobs
|
|
]
|
|
|
|
config.to_prepare do
|
|
# extend application classes here
|
|
Group.include Lit::Group
|
|
end
|
|
|
|
initializer 'lit.add_settings' do |_app|
|
|
Settings.add_source!(File.join(paths['config'].existent, 'settings.yml'))
|
|
Settings.reload!
|
|
end
|
|
|
|
initializer 'lit.add_inflections' do |_app|
|
|
ActiveSupport::Inflector.inflections do |inflect|
|
|
# inflect.irregular 'census', 'censuses'
|
|
end
|
|
end
|
|
|
|
private
|
|
|
|
def seed_fixtures
|
|
fixtures = root.join('db', 'seeds')
|
|
ENV['NO_ENV'] ? [fixtures] : [fixtures, File.join(fixtures, Rails.env)]
|
|
end
|
|
|
|
end
|
|
end
|