bin/rocket_api in rocket_api-0.0.1.1 vs bin/rocket_api in rocket_api-0.0.1.2

- old
+ new

@@ -1,9 +1,10 @@ #!/usr/bin/env ruby -require './rocket_api/rocket_commands' -require './rocket_api/constants' +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] @@ -11,11 +12,15 @@ when RocketApi::INIT case sub_command when RocketApi::BASE # TODO: implement me when RocketApi::GEM - RocketApi::RocketCommands.init_gem_dir - RocketApi::RocketCommands.init_gem_files project_name&.downcase + 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 \ No newline at end of file