rainforest-cli 1.0.5 → 1.0.6

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: de69b9d90b2a8b1ddfc19cf287245431f5ae3ed7
4
- data.tar.gz: c2f08b36e64d29337297b9ef41dc772ef1788ed3
3
+ metadata.gz: 40e961e73be70a98532715ed684c099be7123ee2
4
+ data.tar.gz: e9d7c1e437f736f86018c942c427d460214ba1e6
5
5
  SHA512:
6
- metadata.gz: e9ec6367a9685646ced80f2c86c9696388b9dc8df22c8795899458f2a404e8d0a938b12338dbcfa1fc0adea09981e52e8c79b73fd2e1daeb522a209a15ad46df
7
- data.tar.gz: 4766ea01f10850422ea14a176d3b46473b057a8cd1819e2d54d5bb6432dd763d447629728ac61941270fee8d96b429ac0732892f92a7ea7bff5f9de5c53d84a6
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
 
@@ -92,6 +92,8 @@ module Rainforest
92
92
  # Not using git_trigger, so look for the
93
93
  if !options.tags.empty?
94
94
  post_opts[:tags] = options.tags
95
+ elsif !options.folder.nil?
96
+ post_opts[:smart_folder_id] = @options.folder.to_i
95
97
  else
96
98
  post_opts[:tests] = options.tests
97
99
  end
@@ -1,5 +1,5 @@
1
1
  module Rainforest
2
2
  module Cli
3
- VERSION = "1.0.5"
3
+ VERSION = "1.0.6"
4
4
  end
5
5
  end
data/spec/cli_spec.rb CHANGED
@@ -65,7 +65,7 @@ describe Rainforest::Cli do
65
65
  end
66
66
  end
67
67
 
68
- describe "with tags parameter passed" do
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.5
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-08-25 00:00:00.000000000 Z
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.5
140
+ rubygems_version: 2.4.6
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Command line utility for Rainforest QA