Sha256: e3c12069a8d422d8ecc20718ec8b622f86560339381bc2812d0f1360f40a3f79
Contents?: true
Size: 533 Bytes
Versions: 1
Compression:
Stored size: 533 Bytes
Contents
#!/usr/bin/env ruby def find_project_root current = Dir.pwd until (File.exists? 'Capfile') Dir.chdir '..' return nil if current == Dir.pwd current = Dir.pwd end current end begin stage = ARGV.shift root = find_project_root or raise 'Call me from inside a Rails project!' if File.exists? "#{root}/script/console" exec "shell-for #{stage} script/console #{stage}" else exec "shell-for #{stage} bundle exec rails console #{stage}" end rescue Exception => e $stderr.puts e.message exit 1 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
geordi-0.4.0 | bin/console-for |