Sha256: fab03acd021cfe8efccc0887949214bda18eaada25ab16589fa206af373c19ea
Contents?: true
Size: 990 Bytes
Versions: 2
Compression:
Stored size: 990 Bytes
Contents
#!/usr/bin/env ruby1.9 # encoding: utf-8 base = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ libdir = File.expand_path(File.join(File.dirname(base), "..", "lib")) $:.unshift(libdir) unless $:.include?(libdir) def help(command, description, indentation = 40) indentation = indentation - command.length spaces = " " * indentation STDERR.puts(command + spaces + description) end case command = ARGV.shift when "create" # we can't use require_relative because it can be symlinked to # /usr/bin or just be located in different place than we expect require "rango/cli/generator" Rango::CLI::Generator.new(*ARGV).create when "-i" require "rango" Rango.boot Rango.interactive else # TODO: Generators.each { |generator| puts generator.help } STDERR.puts("=== Usage ===") help "rango create project mycoolproject", "Generate new site" help "rango create app mycoolapp", "Generate new application" help "rango -i", "Start Rango console" exit 1 end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
botanicus-rango-0.0.4 | bin/rango |
rango-0.0.4 | bin/rango |