bin/morph in morph-cli-0.1.1 vs bin/morph in morph-cli-0.2
- old
+ new
@@ -9,11 +9,11 @@
require 'pathname'
require 'json'
require 'morph-cli'
class MorphThor < Thor
- class_option :dev, default: false, type: :boolean, desc: "Run against a local dev of Morph"
+ class_option :dev, default: false, type: :boolean, desc: "Run against development Morph (for morph developers)"
desc "[execute]", "execute morph scraper"
option :directory, :default => Dir.getwd
def execute
@@ -40,9 +40,15 @@
rescue RestClient::InternalServerError => e
$stderr.puts "Uh oh. Something has gone wrong on the Morph server at #{env_config[:base_url]} (#{e})"
exit(1)
end
end
+ end
+
+ desc "version", "Show Morph version number and quit"
+ def version
+ puts "Morph CLI #{MorphCLI::VERSION}"
+ exit
end
no_commands {
def ask_and_save_api_key(env_config, config)
env_config[:api_key] = ask("What is your key? (Go to #{env_config[:base_url]}/settings)")