Sha256: 2c8011ad4dbc3d4af1eb2d6219bcb0c85e88d0995064c1293aa4c38855424909

Contents?: true

Size: 680 Bytes

Versions: 3

Compression:

Stored size: 680 Bytes

Contents

#!/usr/bin/env ruby

lib = File.expand_path("../../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require "fileutils"
require "cli"
require "optparse"

filename = ARGV[0] ? File.expand_path(ARGV[0], FileUtils.pwd) : nil

options = {}

OptionParser.new do |opts|
  opts.banner = "Usage: rambo [FILE] [OPTIONS]"

  options[:framework] = :rails
  opts.on("--framework=FRAMEWORK", "Choose rails (default), sinatra:classic, sinatra:modular, or grape") do |v|
    options[:framework] = v.to_sym
  end
  opts.on("--token=TOKEN", "-T=TOKEN", "Specify an API token") do |v|
    options[:token] = v
  end
end.parse!

Rambo::CLI.new(filename, options, STDOUT).run!

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rambo_ruby-0.7.1 bin/rambo
rambo_ruby-0.7.0 bin/rambo
rambo_ruby-0.6.0 bin/rambo