Created
July 12, 2012 07:00
-
-
Save eriksk/3096376 to your computer and use it in GitHub Desktop.
Simple script for running gem commands in ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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