Sha256: 91306fdfd6bedc6e7e21bbcf3861b17a5cc1a7e23fcc970a9eeb50959c814655

Contents?: true

Size: 414 Bytes

Versions: 1

Compression:

Stored size: 414 Bytes

Contents

#!/usr/bin/env ruby

require 'rack'
require 'pry'
require 'rash/shell'

ENV['RACK_ENV'] ||= 'development'
config_ru_path = ENV.fetch('CONFIG_RU_PATH', 'config.ru')
Rack::Builder.parse_file(config_ru_path)

if ARGV.empty?
  Pry.start
else
  Pry.prompt = Pry::NO_PROMPT
  Pry.hooks.delete_hook(:before_session, :welcome)

  puts
  cmd = ARGV.join(' ').concat("\n exit")
  Pry::CLI.parse_options(['--exec', cmd])
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rash-shell-0.1.1 bin/rash