rainforest-cli 1.0.5 → 1.0.6
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.
- checksums.yaml +4 -4
- data/lib/rainforest/cli/options.rb +5 -1
- data/lib/rainforest/cli/runner.rb +2 -0
- data/lib/rainforest/cli/version.rb +1 -1
- data/spec/cli_spec.rb +13 -1
- data/spec/options_spec.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40e961e73be70a98532715ed684c099be7123ee2
|
4
|
+
data.tar.gz: e9d7c1e437f736f86018c942c427d460214ba1e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2af94476bfdda2979af022be631c24185bc3fa55aef4e555574ca5e96ccbe3515eaa26739d4dc4685517faf45873897c91a328433a85bada8300eebe009661c6
|
7
|
+
data.tar.gz: f802da9550fd0821e5a265da33abe411047a28cea5c2e588fe7a2864cea4a07eafaaf82220c9c14226e048182c7b803de354ec5eece128c6b5f3911e3a7a0724
|
@@ -11,7 +11,7 @@ module Rainforest
|
|
11
11
|
|
12
12
|
class OptionParser
|
13
13
|
attr_reader :command, :token, :tags, :conflict, :browsers, :site_id, :environment_id,
|
14
|
-
:import_file_name, :import_name, :custom_url, :description
|
14
|
+
:import_file_name, :import_name, :custom_url, :description, :folder
|
15
15
|
|
16
16
|
VALID_BROWSERS = %w{chrome firefox safari ie8 ie9}.freeze
|
17
17
|
|
@@ -49,6 +49,10 @@ module Rainforest
|
|
49
49
|
@tags << value
|
50
50
|
end
|
51
51
|
|
52
|
+
opts.on("--folder ID", "Run tests in the specified folders") do |value|
|
53
|
+
@folder = value
|
54
|
+
end
|
55
|
+
|
52
56
|
opts.on("--browsers LIST", "Run against the specified browsers") do |value|
|
53
57
|
@browsers = value.split(',').map{|x| x.strip.downcase }.uniq
|
54
58
|
|
data/spec/cli_spec.rb
CHANGED
@@ -65,7 +65,7 @@ describe Rainforest::Cli do
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
describe "
|
68
|
+
describe "without tags parameter passed" do
|
69
69
|
let(:params) { %w(all --token x --git-trigger) }
|
70
70
|
|
71
71
|
it "warns about the parameter being ignored" do
|
@@ -158,6 +158,18 @@ describe Rainforest::Cli do
|
|
158
158
|
end
|
159
159
|
end
|
160
160
|
|
161
|
+
context "with smart_folder_id" do
|
162
|
+
let(:params) { %w(--token x --folder 123) }
|
163
|
+
|
164
|
+
it "starts the run with smart folder" do
|
165
|
+
http_client.should_receive(:post).with(
|
166
|
+
"/runs",
|
167
|
+
{ :smart_folder_id=>123 }
|
168
|
+
).and_return( {} )
|
169
|
+
described_class.start(params)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
161
173
|
context "a simple run" do
|
162
174
|
before do
|
163
175
|
http_client.stub(:post) { {"id" => 1} }
|
data/spec/options_spec.rb
CHANGED
@@ -24,6 +24,11 @@ describe Rainforest::Cli::OptionParser do
|
|
24
24
|
its(:tags) { should == ["run-me"]}
|
25
25
|
end
|
26
26
|
|
27
|
+
context "run from folder" do
|
28
|
+
let(:args) { ["run", "--folder", "12"] }
|
29
|
+
its(:folder) { should == "12"}
|
30
|
+
end
|
31
|
+
|
27
32
|
context "only run in specific browsers" do
|
28
33
|
let(:args) { ["run", "--browsers", "ie8"] }
|
29
34
|
its(:browsers) { should == ["ie8"]}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rainforest-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Mathieu
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-09-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.4.
|
140
|
+
rubygems_version: 2.4.6
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Command line utility for Rainforest QA
|