rainforest-cli 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rvmrc +1 -1
- data/lib/rainforest/cli.rb +10 -9
- data/lib/rainforest/cli/options.rb +5 -0
- data/lib/rainforest/cli/version.rb +1 -1
- data/rainforest-cli.gemspec +0 -3
- data/spec/cli_spec.rb +1 -1
- data/spec/git_trigger_spec.rb +1 -1
- metadata +4 -27
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17f0506c347475feb787f15df4c3db6abd53bae7
|
4
|
+
data.tar.gz: 27985a231afb31f370324ecc8992b9d2cc9714ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50867b13b94b3d1b335a1997c81596d4083c4d12f1275599b1af56514b0677eeff65e11b830d2fe9e18d3397ad48c5393b51dd512e4b347059558666cd49c553
|
7
|
+
data.tar.gz: 29182d051069e39381c7388ae53b8952aa0ff93280430b59456a3e4d82e108058acba1bf88c4f7c180e895ebadfc08838a1170b34b54a774545d2fccb11499ab
|
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm use 2.
|
1
|
+
rvm use 2.2.0@rainforest-cli --create
|
data/lib/rainforest/cli.rb
CHANGED
@@ -7,11 +7,12 @@ require "json"
|
|
7
7
|
require "logger"
|
8
8
|
|
9
9
|
module Rainforest
|
10
|
-
module Cli
|
10
|
+
module Cli
|
11
11
|
API_URL = 'https://app.rainforestqa.com/api/1'.freeze
|
12
|
-
|
12
|
+
|
13
13
|
def self.start(args)
|
14
14
|
@options = OptionParser.new(args)
|
15
|
+
OptionParser.new(['--help']) if args.size == 0
|
15
16
|
|
16
17
|
unless @options.token
|
17
18
|
logger.fatal "You must pass your API token using: --token TOKEN"
|
@@ -64,7 +65,7 @@ module Rainforest
|
|
64
65
|
exit 0
|
65
66
|
end
|
66
67
|
else
|
67
|
-
# Not using git_trigger, so look for the
|
68
|
+
# Not using git_trigger, so look for the
|
68
69
|
if !@options.tags.empty?
|
69
70
|
post_opts[:tags] = @options.tags
|
70
71
|
else
|
@@ -94,11 +95,11 @@ module Rainforest
|
|
94
95
|
|
95
96
|
return unless @options.foreground?
|
96
97
|
|
97
|
-
while running
|
98
|
+
while running
|
98
99
|
Kernel.sleep 5
|
99
100
|
response = get "#{API_URL}/runs/#{run_id}?gem_version=#{Rainforest::Cli::VERSION}"
|
100
|
-
if response
|
101
|
-
if %w(queued in_progress sending_webhook waiting_for_callback).include?(response["state"])
|
101
|
+
if response
|
102
|
+
if %w(queued validating in_progress sending_webhook waiting_for_callback).include?(response["state"])
|
102
103
|
logger.info "Run #{run_id} is #{response['state']} and is #{response['current_progress']['percent']}% complete"
|
103
104
|
running = false if response["result"] == 'failed' && @options.failfast?
|
104
105
|
else
|
@@ -125,7 +126,7 @@ module Rainforest
|
|
125
126
|
|
126
127
|
def self.delete(url, body = {})
|
127
128
|
response = HTTParty.delete url, {
|
128
|
-
body: body,
|
129
|
+
body: body,
|
129
130
|
headers: {"CLIENT_TOKEN" => @options.token}
|
130
131
|
}
|
131
132
|
|
@@ -134,7 +135,7 @@ module Rainforest
|
|
134
135
|
|
135
136
|
def self.post(url, body = {})
|
136
137
|
response = HTTParty.post url, {
|
137
|
-
body: body,
|
138
|
+
body: body,
|
138
139
|
headers: {"CLIENT_TOKEN" => @options.token}
|
139
140
|
}
|
140
141
|
|
@@ -143,7 +144,7 @@ module Rainforest
|
|
143
144
|
|
144
145
|
def self.get(url, body = {})
|
145
146
|
response = HTTParty.get url, {
|
146
|
-
body: body,
|
147
|
+
body: body,
|
147
148
|
headers: {"CLIENT_TOKEN" => @options.token}
|
148
149
|
}
|
149
150
|
|
@@ -66,6 +66,11 @@ module Rainforest
|
|
66
66
|
opts.on("--custom-url URL", String, "Use a custom url for this run. You will need to specify a site_id too for this to work.") do |value|
|
67
67
|
@custom_url = value
|
68
68
|
end
|
69
|
+
|
70
|
+
opts.on_tail("--help", "Display help message and exit") do |value|
|
71
|
+
puts opts
|
72
|
+
exit 0
|
73
|
+
end
|
69
74
|
end.parse!(@args)
|
70
75
|
|
71
76
|
@command = @args.shift
|
data/rainforest-cli.gemspec
CHANGED
@@ -23,7 +23,4 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_dependency "ruby-progressbar"
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
25
|
spec.add_development_dependency "rake"
|
26
|
-
|
27
|
-
spec.cert_chain = ['certs/ukd1.pem']
|
28
|
-
spec.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
|
29
26
|
end
|
data/spec/cli_spec.rb
CHANGED
@@ -195,7 +195,7 @@ describe Rainforest::Cli do
|
|
195
195
|
|
196
196
|
describe ".get_environment_id" do
|
197
197
|
context "with an invalid URL" do
|
198
|
-
|
198
|
+
xit 'errors out and exits' do
|
199
199
|
expect_any_instance_of(Logger).to receive(:fatal).with("The custom URL is invalid")
|
200
200
|
expect {
|
201
201
|
described_class.get_environment_id('http://some=weird')
|
data/spec/git_trigger_spec.rb
CHANGED
metadata
CHANGED
@@ -1,38 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rainforest-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Mathieu
|
8
8
|
- Russell Smith
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
|
-
cert_chain:
|
12
|
-
-
|
13
|
-
-----BEGIN CERTIFICATE-----
|
14
|
-
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMR0wGwYDVQQDDBRydXNz
|
15
|
-
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qK/F/bl0iiZ
|
30
|
-
SQpNWk3RB/7deQThk3SYD8jS8n1d7KSRLogpXnSNWRyaSHtZ2x7T2qVpn4lp1PIi
|
31
|
-
/4Hg5bJrO0VqDlVG8UvsFbFB24ZNDQVq73MLZFNez0UBhOZVo4kBlSUvyEv5YLlA
|
32
|
-
wWdLLpBZZ1O4GE0uzQovmTiis4iyCF+8tFIgjbM/FVwKUBV6OZpxs4FOBtR1mK6L
|
33
|
-
lj0cPcKRm/FZUw==
|
34
|
-
-----END CERTIFICATE-----
|
35
|
-
date: 2014-10-23 00:00:00.000000000 Z
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-01-22 00:00:00.000000000 Z
|
36
13
|
dependencies:
|
37
14
|
- !ruby/object:Gem::Dependency
|
38
15
|
name: httparty
|
@@ -155,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
132
|
version: '0'
|
156
133
|
requirements: []
|
157
134
|
rubyforge_project:
|
158
|
-
rubygems_version: 2.
|
135
|
+
rubygems_version: 2.4.5
|
159
136
|
signing_key:
|
160
137
|
specification_version: 4
|
161
138
|
summary: Command line utility for Rainforest QA
|
checksums.yaml.gz.sig
DELETED
Binary file
|
data.tar.gz.sig
DELETED
Binary file
|
metadata.gz.sig
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
5�3Ê�;��|��ݗ͏3c�$�~fS��zs#�5oی�Igņ.dpq���a�����`�ν�c�1�[�HͰ�:��w��7���c&��QX]m�zܚ)�J�4�2�c>�H�Uԫ�t��͡�����Z"8�(�z�\�� ��$:,\�d��Z�ˮ/x��jF�b�N1+�b��w��2��?}��~�=ˮmp��L��Ű4�;ұ��b Ji��!o^g��bH]����H�D"����2J
|