bin/smartcloud in smartcloud-0.6.0 vs bin/smartcloud in smartcloud-0.7.0

- old
+ new

@@ -1,61 +1,61 @@ #!/usr/bin/env ruby -require 'smartcloud' +require 'smart_cloud' command = ARGV.shift if command == '--version' - puts "Smartcloud #{Smartcloud.version}" + puts "SmartCloud #{SmartCloud.version}" return end -if Smartcloud::Machine.smartcloud_local? +if SmartCloud::Machine.local? if command == 'start' - machine = Smartcloud::Machine.new + machine = SmartCloud::Machine.new machine.start elsif command == 'stop' - machine = Smartcloud::Machine.new + machine = SmartCloud::Machine.new machine.stop elsif command == 'ssh' - machine = Smartcloud::Machine.new + machine = SmartCloud::Machine.new machine.ssh elsif command == 'sync' - machine = Smartcloud::Machine.new + machine = SmartCloud::Machine.new machine.sync elsif command == 'grid' - machine = Smartcloud::Machine.new + machine = SmartCloud::Machine.new machine.grid ARGV elsif command == 'app' - machine = Smartcloud::Machine.new + machine = SmartCloud::Machine.new machine.app ARGV elsif command == 'ps' - ssh = Smartcloud::SSH.new + ssh = SmartCloud::SSH.new ssh.run "smartcloud ps #{ARGV.join(' ')}" elsif command == 'logs' - ssh = Smartcloud::SSH.new + ssh = SmartCloud::SSH.new ssh.run "smartcloud logs #{ARGV.join(' ')}" elsif command == 'credentials:edit' - credentials = Smartcloud::Credentials.new + credentials = SmartCloud::Credentials.new credentials.edit else puts "Specify a valid local command to execute." end -elsif Smartcloud::Machine.smartcloud_server? +elsif SmartCloud::Machine.remote? if command == 'run' - machine = Smartcloud::Machine.new + machine = SmartCloud::Machine.new machine.run ARGV elsif command == 'buildpacker' - buildpacker = Smartcloud::Buildpacker.new + buildpacker = SmartCloud::Buildpacker.new action = ARGV.shift if action == "install" buildpacker.install elsif action == "uninstall" buildpacker.uninstall end elsif command == 'prereceiver' - prereceiver = Smartcloud::Grids::Prereceiver.new + prereceiver = SmartCloud::Grids::Prereceiver.new action = ARGV.shift if action == "install" prereceiver.install elsif action == "uninstall" prereceiver.uninstall @@ -70,10 +70,10 @@ puts "Specify a valid server command to execute." end else if command == 'new' raise "Please specify a machine name" if ARGV.empty? - machine = Smartcloud::Machine.new + machine = SmartCloud::Machine.new machine.create ARGV else puts "Specify a valid smartcloud command to execute. Are you in the correct directory to run this command?" end end