Skip to content

Instantly share code, notes, and snippets.

@IanVaughan
Created May 26, 2015 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IanVaughan/49f01e6d5c55a0eb7c43 to your computer and use it in GitHub Desktop.
Save IanVaughan/49f01e6d5c55a0eb7c43 to your computer and use it in GitHub Desktop.
zeus bin stubs
#!/usr/bin/env ruby
args = *ARGV
if File.exists?('.zeus.sock')
puts "=> Using Zeus..."
exec "zeus cucumber #{args.join(' ')}"
else
puts "=> NOT Using Zeus..."
exec "bundle exec cucumber #{args.join(' ')}"
end
#!/usr/bin/env ruby
args = *ARGV
if File.exists?('.zeus.sock')
puts "=> Using Zeus..."
case args.first
when 's' then system "zeus server"
when 'server' then system "zeus server"
when 'c' then system "zeus console"
when 'console' then system "zeus console"
when 'g' then system "zeus #{args.join(' ')}"
when 'generate' then system "zeus #{args.join(' ')}"
when 'r' then system "zeus runner"
when 'runner' then system "zeus runner"
else system "script/rails #{args.join(' ')}"
end
else
puts "=> NOT Using Zeus..."
system "bundle exec rails #{args.join(' ')}"
end
#!/usr/bin/env ruby
args = *ARGV
if File.exists?('.zeus.sock')
puts "=> Using Zeus..."
exec "zeus rake #{args.join(' ')}"
else
puts "=> NOT Using Zeus..."
exec "bundle exec rake #{args.join(' ')}"
end
#!/usr/bin/env ruby
args = *ARGV
if File.exists?('.zeus.sock')
puts "=> Using Zeus..."
exec "zeus rspec #{args.join(' ')}"
else
puts "=> NOT Using Zeus..."
exec "bundle exec rspec #{args.join(' ')}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment