lib/cartup_command_helper.rb in cartup-0.1.6 vs lib/cartup_command_helper.rb in cartup-0.1.7
- old
+ new
@@ -1,39 +1,39 @@
-require "cartup"
+require 'cartup'
module CartBinaryUploader
class CartupCommandHelper
- COMMAND_RUN = "run"
- COMMAND_INIT = "init"
- COMMAND_HELP = "help"
+ COMMAND_RUN = 'run'.freeze
+ COMMAND_INIT = 'init'.freeze
+ COMMAND_HELP = 'help'.freeze
- attr_reader :helpDescription
+ attr_reader :help_description
def initialize
- @helpDescription = <<-EOF
+ @help_description = <<-EOF
These are common Cartup commands used in some situations:
- init Create an empty cart_uploader.yaml
- run uploading the Carthage prebuilts to a cloud storage
- help show help instructions and list available subcommands
EOF
end
def handle(command)
case command
- when COMMAND_RUN
- CartBinaryUploader.run
- when COMMAND_INIT
- CartBinaryUploader.init
- when COMMAND_HELP
- printHelper
- else
- printHelper
+ when COMMAND_RUN
+ CartBinaryUploader.run
+ when COMMAND_INIT
+ CartBinaryUploader.init
+ when COMMAND_HELP
+ print_helper
+ else
+ print_helper
end
end
- def printHelper
- puts @helpDescription
+ def print_helper
+ puts @help_description
end
end
end