Sha256: 679215304af7bae80e3583845a246a4f73cb5320a5d42c2fa05752396aecef18
Contents?: true
Size: 1.4 KB
Versions: 2
Compression:
Stored size: 1.4 KB
Contents
#!/usr/bin/env ruby # Exit cleanly from an early interrupt Signal.trap("INT") { exit 1 } require 'bundler' require 'bundlegem' # require 'bundlergem/friendly_errors' require 'bundlegem/cli' require 'bundlegem/cli/gem' if ARGV.length < 1 puts "error: you need to specify a gemname at least" exit 1 end if ARGV[0] == "--help" puts "Usage: " puts " # creates a gem based on default template" puts " $ bundlegem gem_name " puts puts " # creates a gem using the service template built into gem" puts " $ bundlegem gem_name -t service " puts puts " # not implemented, but shoud create a new gem template in ~/.bundlegem/templates" puts " # that you'll love customizing to your personal preference" puts " $ bundlegem --newtemplate " puts puts " $ bundlegem --help # shows these strings" exit 0 end if ARGV[0] == "--list" or ARGV[0] == "-l" puts Bundlegem.list exit 0 end if ARGV[0] == "--newtemplate" puts "Sorry, I haven't been implemented, I don't have a lot of free time atm :(" exit 0 end options = {"bin"=>false, "ext"=>false, :coc=> false} name = ARGV[0] # gem name if ARGV.length > 1 if ARGV[1] != "-t" puts "you can ONLY use -t as an argument cause I'm quite busy and should be doing something else right now!" exit 1 end options.merge!({"template" => ARGV[2]}) end Bundlegem::CLI::Gem.new(options, name, self).run
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bundlegem-0.0.4 | bin/bundlegem |
bundlegem-0.0.3 | bin/bundlegem |