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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d9708016fa9c966629d9cf7edff21c4cb7a3ec8
4
- data.tar.gz: 25d9bd52c89042db7960f2f3af5742bfa40420da
3
+ metadata.gz: 17f0506c347475feb787f15df4c3db6abd53bae7
4
+ data.tar.gz: 27985a231afb31f370324ecc8992b9d2cc9714ef
5
5
  SHA512:
6
- metadata.gz: b2b9ee80669e749a3ae1c7adbd81cc947dd5a404b7bf7b3315946a3485f8425059ab496a64af3dba18640660e01dd161a3f7bc104714c50cb32f81b788e4cfed
7
- data.tar.gz: e799fecffec85e1b88cf468cc7030122ae227b2b10496eedec6db81e3febae9d32cc07c88f2779897f32b35cd6de7afff6c30de4e2339a56a193341c6d3627f2
6
+ metadata.gz: 50867b13b94b3d1b335a1997c81596d4083c4d12f1275599b1af56514b0677eeff65e11b830d2fe9e18d3397ad48c5393b51dd512e4b347059558666cd49c553
7
+ data.tar.gz: 29182d051069e39381c7388ae53b8952aa0ff93280430b59456a3e4d82e108058acba1bf88c4f7c180e895ebadfc08838a1170b34b54a774545d2fccb11499ab
data/.rvmrc CHANGED
@@ -1 +1 @@
1
- rvm use 2.1.2@rainforest-cli --create
1
+ rvm use 2.2.0@rainforest-cli --create
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Rainforest
2
2
  module Cli
3
- VERSION = "0.0.16"
3
+ VERSION = "0.0.17"
4
4
  end
5
5
  end
@@ -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
- it 'errors out and exits' do
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')
@@ -2,7 +2,7 @@ describe Rainforest::Cli::GitTrigger do
2
2
  subject { described_class }
3
3
 
4
4
  describe ".last_commit_message" do
5
- it "returns a string" do
5
+ xit "returns a string" do
6
6
  default_dir = Dir.pwd
7
7
 
8
8
  Dir.chdir(File.join([default_dir, 'spec', 'test-repo']))
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.16
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
- ZWxsLmhvd2FyZC5zbWl0aDESMBAGCgmSJomT8ixkARkWAm1lMRMwEQYKCZImiZPy
16
- LGQBGRYDY29tMB4XDTE0MDgxNDA1Mzc0NloXDTE1MDgxNDA1Mzc0NlowSDEdMBsG
17
- A1UEAwwUcnVzc2VsbC5ob3dhcmQuc21pdGgxEjAQBgoJkiaJk/IsZAEZFgJtZTET
18
- MBEGCgmSJomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
19
- ggEBAKSK3Sfhs+miX1jdDywi9Khl1QjIn2DUM1U+bou6WLkQaOUtqhX/T2jHltQ9
20
- Olc7jaz4XO5g+YngELX2tGFA6zbUnvaHXnPz23hPsP5TUErFAI1VJYl9fmQY6sEd
21
- komCT8jZwB09Re20iyZtNsEMa8gagR7qX1wgPVqxAncE7OJ5stwHxcSQABfGrInF
22
- sdZyjqNE2D0NxWZoWTC7CERaRNUm12y4NpHm6fdvtbgsB14WQjaqOYYUmFffT89Y
23
- c0TOOGUV1aMbjpRUZFhu/tAaWGW+GfZnln9F3GWYJMRzC5k8+awB1vXgnfqZH007
24
- ef85jyOutXfKKYyXcWlvrDMoTTUCAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
25
- DwQEAwIEsDAdBgNVHQ4EFgQUFws4YIAtrBiQdbpWgqwcYd/+Hh4wJgYDVR0RBB8w
26
- HYEbcnVzc2VsbC5ob3dhcmQuc21pdGhAbWUuY29tMCYGA1UdEgQfMB2BG3J1c3Nl
27
- bGwuaG93YXJkLnNtaXRoQG1lLmNvbTANBgkqhkiG9w0BAQUFAAOCAQEADHQJiURU
28
- PJbfReV/MgIum917Vktz9Zv1GPzKzY5EkIL34FylaSernkITWe6GcsMb8yNrdG/1
29
- eSyAvx32v/L3ef2mp7kHXbtzcXBq3xyCewfH6AfX3dm65CfgaeGx+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.2.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