Sha256: 9739bfdc91ba47ff2ec955888fccb3907c7d24f302ad1badc3d2bb1a2a2d1211

Contents?: true

Size: 682 Bytes

Versions: 6

Compression:

Stored size: 682 Bytes

Contents

# Begin a new Capybara session, by default connecting to localhost on port
# 3000.
def session
  Capybara.app_host ||= "http://localhost:3000"
  @session ||= Capybara::Session.new(:Akephalos)
end
alias page session

module Akephalos
  # Simple class for starting an IRB session.
  class Console

    # Start an IRB session. Tries to load irb/completion, and also loads a
    # .irbrc file if it exists.
    def self.start
      require 'irb'

      begin
        require 'irb/completion'
      rescue Exception
        # No readline available, proceed anyway.
      end

      if ::File.exists? ".irbrc"
        ENV['IRBRC'] = ".irbrc"
      end

      IRB.start
    end

  end
end

Version data entries

6 entries across 6 versions & 4 rubygems

Version Path
akephalos-0.2.5-java lib/akephalos/console.rb
akephalos-0.2.5 lib/akephalos/console.rb
akephalos-nerian-0.2.4-java lib/akephalos/console.rb
akephalos-nerian-0.2.4 lib/akephalos/console.rb
akephalos-2s-0.2.4 lib/akephalos/console.rb
brentgreeff_akephalos-0.2.4 lib/akephalos/console.rb