Sha256: dfa8702484bec563eba104ed0d43e27a69d51be92c9a835759f45b4522aff7ca

Contents?: true

Size: 887 Bytes

Versions: 5

Compression:

Stored size: 887 Bytes

Contents

# encoding: UTF-8

require 'rails/railtie'

module Keynote
  # @private
  class Railtie < Rails::Railtie
    config.after_initialize do |app|
      app.config.paths.add 'app/presenters', :eager_load => true

      if defined?(RSpec::Rails) && RSpec.respond_to?(:configure)
        require 'keynote/testing/rspec'
      end

      if defined?(MiniTest::Rails)
        require 'keynote/testing/minitest_rails'
      end

      require "keynote/testing/test_unit"
    end

    ActiveSupport.on_load(:action_view) do
      include Keynote::Helper
    end

    ActiveSupport.on_load(:action_controller) do
      include Keynote::Controller
    end

    ActiveSupport.on_load(:action_mailer) do
      include Keynote::Controller
    end

    rake_tasks do
      if defined?(MiniTest::Rails)
        load File.expand_path("../testing/minitest_rails.rake", __FILE__)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
keynote-0.1.3 lib/keynote/railtie.rb
keynote-0.1.2 lib/keynote/railtie.rb
keynote-0.1.1 lib/keynote/railtie.rb
keynote-0.1.0 lib/keynote/railtie.rb
keynote-0.0.1 lib/keynote/railtie.rb