Sha256: 57eaa1b04fe4d8c1c87db350ae6576e142a63cac6d18be9dbb5e3078bb4e27a9

Contents?: true

Size: 787 Bytes

Versions: 3

Compression:

Stored size: 787 Bytes

Contents

#!/usr/bin/env ruby

require File.expand_path(File.dirname(__FILE__) + "/../lib/create")
require File.expand_path(File.dirname(__FILE__) + "/../lib/constants")
require File.expand_path(File.dirname(__FILE__) + "/../lib/errors")

require 'rubygems'
require 'rails'
require 'colored'
require 'net/http'
require 'net/ssh'

include TSRails::Errors

def usage
  "Usage: #{File.basename(__FILE__)} create new_project_name"
end

case ARGV[0]
  when 'create', '--create', 'new', '--new'
    if ARGV[1].nil?
      puts usage
    else
      begin
        TSRails::Create.run!(ARGV[1])
      rescue TSRails::InvalidInput => e
        error_with_message(e.message)
      end
    end
  when 'help', '--help'
    puts usage
  else
    error_with_message "Unknown subcommand: #{ARGV[0]}\n#{usage}"
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tsrails-2.0.3 bin/tsrails
tsrails-2.0.2 bin/tsrails
tsrails-2.0.0 bin/tsrails