Sha256: 2ed9572e239f32c99d71fec942b33a5bbb9cb9a304e401d88e6639642db80eff

Contents?: true

Size: 634 Bytes

Versions: 1

Compression:

Stored size: 634 Bytes

Contents

#!/usr/bin/env ruby

require './lib/rocket_api/rocket_commands'
require './lib/rocket_api/constants'
require './lib/rocket_api/errors'

base_command = ARGV[0]
sub_command = ARGV[1]
project_name = ARGV[2]

case base_command
when RocketApi::INIT
  case sub_command
  when RocketApi::BASE
    #  TODO: implement me
  when RocketApi::GEM
    begin
      RocketApi::RocketCommands.init_gem_dir
      RocketApi::RocketCommands.init_gem_files project_name&.downcase
    rescue RocketApi::Error  => e
      puts "Init directory error: #{e.message}"
    end
  else
    puts RocketApi::WRONG_ANSWER
  end
else
  puts RocketApi::WRONG_ANSWER
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rocket_api-0.0.1.2 bin/rocket_api