Skip to content

Instantly share code, notes, and snippets.

@eriksk
Created July 12, 2012 07:00
Show Gist options
  • Save eriksk/3096376 to your computer and use it in GitHub Desktop.
Save eriksk/3096376 to your computer and use it in GitHub Desktop.
Simple script for running gem commands in ruby
#!/usr/bin/env ruby
lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
$LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
require 'my_gem'
require 'my_gem/command'
args = ARGV.dup
ARGV.clear
command = args.shift.strip rescue 'help'
MyGem::Command.run(command, args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment