Sha256: 7e82ab1aec5661261f371b3b2f806f26832775ea43b61cd236f2f058c919e0cd

Contents?: true

Size: 765 Bytes

Versions: 5

Compression:

Stored size: 765 Bytes

Contents

# encoding: UTF-8

module PryRails
  class Railtie < Rails::Railtie
    console do
      require 'pry'
      require 'pry-rails/commands'

      if Rails::VERSION::MAJOR == 3
        Rails::Console::IRB = Pry

        unless defined? Pry::ExtendCommandBundle
          Pry::ExtendCommandBundle = Module.new
        end
      end

      if Rails::VERSION::MAJOR == 4 || Rails::VERSION::MAJOR == 5
        Rails.application.config.console = Pry
      end

      if (Rails::VERSION::MAJOR == 3 && Rails::VERSION::MINOR >= 2) ||
          Rails::VERSION::MAJOR == 4 || Rails::VERSION::MAJOR == 5
        require "rails/console/app"
        require "rails/console/helpers"
        TOPLEVEL_BINDING.eval('self').extend ::Rails::ConsoleMethods
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
pry-rails-0.3.6 lib/pry-rails/railtie.rb
pry-rails-0.3.5 lib/pry-rails/railtie.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/pry-rails-0.3.4/lib/pry-rails/railtie.rb
pry-rails-0.3.4 lib/pry-rails/railtie.rb
pry-rails-0.3.3 lib/pry-rails/railtie.rb