Sha256: 90a2d37169f439ee550fccd6ccd0fd043e39959319c41469ea9fd386bb308456

Contents?: true

Size: 888 Bytes

Versions: 6

Compression:

Stored size: 888 Bytes

Contents

require 'rails'

module Abtest
  class Railtie < ::Rails::Railtie
    rake_tasks do |app|
      require 'abtest/asset_task'
      Abtest::AssetTask.new(app)
    end

    rake_tasks do
      Dir[File.join(File.dirname(__FILE__),'tasks/*.rake')].each { |f| load f }
    end

    initializer "abtest.set_config", :after => 'bootstrap_hook' do
      config.abtest                   = ActiveSupport::OrderedOptions.new
      config.abtest.registered_tests  = Set.new
      config.abtest.precompile_assets = Array.new
    end

    initializer "abtest.set_filter" do
      ActiveSupport.on_load(:action_controller) do
        ActionController::Base.send(:include, Abtest::Filters)
      end

      module ActionView
  module Rendering
    module ClassMethods
      def view_context
        view_context_class.new(view_renderer, view_assigns, self)
      end
    end
  end
end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
abtest-1.0.1 lib/abtest/railtie.rb
abtest-1.0.0 lib/abtest/railtie.rb
abtest-0.1.2 lib/abtest/railtie.rb
abtest-0.1.1 lib/abtest/railtie.rb
abtest-0.1.0 lib/abtest/railtie.rb
abtest-0.0.7 lib/abtest/railtie.rb