Sha256: 7b6751d0032a8c752c2cb948a9753fdf764334ef076387f8bfbd08f44b926c7c
Contents?: true
Size: 736 Bytes
Versions: 43
Compression:
Stored size: 736 Bytes
Contents
require 'travis/cli' module Travis module CLI class Console < ApiCommand description "interactive shell" on '-x', '--eval LINE', 'run line of ruby' do |c, line| c.instance_eval(line) exit end def run return unless pry_installed? Object.send(:include, Client::Namespace.new(session)) hooks = defined?(Pry::Hooks) ? Pry::Hooks.new : {} binding.pry(:quiet => true, :prompt => Pry::SIMPLE_PROMPT, :output => $stdout, :hooks => hooks) end private def pry_installed? require 'pry' true rescue LoadError $stderr.puts 'You need to install pry to use Travis CLI console.' false end end end end
Version data entries
43 entries across 43 versions & 2 rubygems