Sha256: c5412042374d3eeafd2556029b7128157a34ebee847d6f371a428769d99c0378

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

module GoGamification
  class Engine < ::Rails::Engine
    isolate_namespace GoGamification
        initializer :append_migrations do |app|
      # This prevents migrations from being loaded twice from the inside of the
      # gem itself (dummy test app)
      if app.root.to_s !~ /#{root}/
        config.paths['db/migrate'].expanded.each do |migration_path|
          app.config.paths['db/migrate'] << migration_path
        end
      end
    end

    initializer 'go_gamification.action_controller' do |app|
      ActiveSupport.on_load :action_controller do
        helper GoGamification::ApplicationHelper
      end
    end

    initializer 'go_gamification.factories', after: 'factory_girl.set_factory_paths' do
      FactoryGirl.definition_file_paths << File.expand_path('../../../spec/factories', __FILE__) if defined?(FactoryGirl)
    end

    config.generators do |g|
      g.test_framework :rspec, fixture: false
      g.fixture_replacement :factory_girl, dir: 'spec/factories'
      g.assets false
      g.helper false
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
go_gamification-0.0.7 lib/go_gamification/engine.rb
go_gamification-0.0.6 lib/go_gamification/engine.rb