lesspainful 0.10.3 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ module LessPainful
14
14
  include Thor::Actions
15
15
 
16
16
  attr_accessor :host, :app, :api_key, :workspace, :config, :profile, :features_zip, :skip_check, :reset_between_scenarios, :dry_run
17
-
17
+ attr_accessor :pretty
18
18
  attr_accessor :endpoint_path
19
19
 
20
20
  FILE_UPLOAD_ENDPOINT = "upload2"
@@ -58,6 +58,11 @@ module LessPainful
58
58
  :aliases => '-p',
59
59
  :type => :string
60
60
 
61
+ method_option :pretty,
62
+ :desc => "Pretty print JSON output.",
63
+ :type => :boolean,
64
+ :default => false
65
+
61
66
  method_option "skip-check",
62
67
  :desc => "Skip checking for ipa linked with Calabash (iOS only).",
63
68
  :type => :boolean
@@ -77,6 +82,8 @@ module LessPainful
77
82
 
78
83
  self.host = options[:host]
79
84
 
85
+ self.pretty = options[:pretty] || false
86
+
80
87
  unless self.host #if invoked though old-style
81
88
  self.host = ENV["LP_HOST"] || 'https://www.lesspainful.com'
82
89
  else
@@ -142,7 +149,7 @@ module LessPainful
142
149
  json = submit_test_job
143
150
 
144
151
  unless dry_run
145
- if JSON.respond_to?(:pretty_generate)
152
+ if pretty and JSON.respond_to?(:pretty_generate)
146
153
  puts JSON.pretty_generate(json)
147
154
  else
148
155
  puts json
@@ -1,3 +1,3 @@
1
1
  module LessPainful
2
- VERSION = "0.10.3"
2
+ VERSION = "0.10.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesspainful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 0.10.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: