Sha256: 4f046720f426c7641bae76170103e85b0342ba3cbad56365987baa31210786cf
Contents?: true
Size: 1.21 KB
Versions: 5
Compression:
Stored size: 1.21 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' if ARGV.length < 1 puts "Error: you need to specify a name for the project being created\n\n" puts Bundlegem::HELP_MSG exit 1 end if ARGV[0] == "--help" puts Bundlegem::HELP_MSG exit 0 end if ARGV[0] == "--list" or ARGV[0] == "-l" puts Bundlegem.list exit 0 end if ARGV[0] == "--version" or ARGV[0] == "-v" puts Bundlegem.version 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 Bundlegem.newtemplate(ARGV) end if ARGV[0] == "--install-best-templates" Bundlegem.install_best_templates exit 0 end options = {"bin"=>false, "ext"=>false, :coc=> false} gem_name = "" skip_i = -99 # Loop over CLI parameters ARGV.each_with_index do |arg, i| next if skip_i == i if arg == "-t" or arg == "--template" # the item after this specifies the template to use options.merge!({"template" => ARGV[i+1]}) skip_i = i+1 next elsif !(arg =~ /^-/) # this must be what they want as the gem_name gem_name = arg end end Bundlegem.gem(options, gem_name)
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
bundlegem-0.1.0 | bin/bundlegem |
bundlegem-0.0.15 | bin/bundlegem |
bundlegem-0.0.14 | bin/bundlegem |
bundlegem-0.0.13 | bin/bundlegem |
bundlegem-0.0.12 | bin/bundlegem |