bin/onering in onering-client-0.0.9 vs bin/onering in onering-client-0.0.10
- old
+ new
@@ -14,24 +14,22 @@
require 'pp'
include Subcommander
-def print_format(data, format=:yaml)
+def print_format(data, format=nil)
case format
when :text
if data.is_a?(Hash)
pp data
elsif data.is_a?(Array)
puts data.join("\n")
else
puts data.to_s
end
- when :yaml
- puts YAML.dump(data)
-
+
else
- STDERR.puts "Invalid format: #{format}"
+ puts YAML.dump(data)
end
end
subcommander.version = Gem.loaded_specs['onering-client'].version.to_s
subcommander.desc = Gem.loaded_specs['onering-client'].description
\ No newline at end of file