Sha256: f72c2a99712876d22f71b443ac5e21c5b53d6aafabe126361317c7dd114e1187

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 Bytes

Contents

#!/usr/bin/env ruby

require 'active_support/inflector'

def require_lib(name)
  path = File.join('..', 'lib', *(name.split('::').map(&:underscore)))
  require_relative path
end

def usage(dest = $stdout)
  dest.puts 'Usage: straptible <flavor> <path> [options...]'
end

flavor = ARGV.shift
case flavor
when 'api'
  require_lib 'Straptible::Rails::Generators::Api'
  Straptible::Rails::Generators::Api.start
when nil
  usage($stderr)
  exit 1
else
  $stderr.puts "Unknown flavor: #{flavor}"
  usage($stderr)
  exit 1
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
straptible-0.1.0 bin/straptible