rainforest-cli 1.0.2 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3a484bd94488a210728f2a47ea8d10e72d1910a
4
- data.tar.gz: 2690b22660e7ab92114a66a5f3c431f6b7cdbb6c
3
+ metadata.gz: 7723399cb823b7e1c8fd946426a4460c5623acf3
4
+ data.tar.gz: e4fbdab03d284ed4fb8b7caf3e2a9b3eaa388791
5
5
  SHA512:
6
- metadata.gz: 51edacba7bc21caf29103f7b51e453c246935b6a997b5919e5997de0bf52f7cbcc53f0523020fb1ef2db5f3852d5b8f5e5eaf2164644e13548f93a9ce7b35d00
7
- data.tar.gz: 63b6e946f0c31eaf449b53e97f2c63ef76bd93dc49c319c671b00274bb51a3bba8914752ed7511755d0eb4ea5f1758e12e514eeab39440d58edeb27a224e4873
6
+ metadata.gz: e125ec46cf083e2d6b291fb8b15862435ad6f8e96dc8d2d55fe3c977e429f6fa20e5612d3c79c973ef6e109d34e4dad037f02832074ebf7e9813284770a18d08
7
+ data.tar.gz: c5b1a52540578ff9f56e5309b14cbb2c3b7200a2a5a400de1ef274d78b1d784c4b0d562c699419feb9cc625ea901fc51d072088bab80da9db69c2002616212d1
data/README.md CHANGED
@@ -61,6 +61,7 @@ The most popular options are:
61
61
  - `--fail-fast` - fail the build as soon as the first failed result comes in. If you don't pass this it will wait until 100% of the run is done. Use with `--fg`.
62
62
  - `--custom-url` - use a custom url for this run. Example use case: an ad-hoc QA environment with [Fourchette](https://github.com/rainforestapp/fourchette). You will need to specify a `site_id` too for this to work. Note that we will be creating a new environment for this particular run.
63
63
  - `--git-trigger` - only trigger a run when the last commit (for a git repo in the current working directory) has contains `@rainforest` and a list of one or more tags. E.g. "Fix checkout process. @rainforest #checkout" would trigger a run for everything tagged `checkout`. This over-rides `--tag` and any tests specified. If no `@rainforest` is detected it will exit 0.
64
+ - `--run-description "CI automatic run"` - add an arbitrary description for the run.
64
65
 
65
66
  More detailed info on options can be [found here](https://github.com/rainforestapp/rainforest-cli/blob/master/lib/rainforest/cli/options.rb#L23-L74).
66
67
 
@@ -11,7 +11,7 @@ module Rainforest
11
11
 
12
12
  class OptionParser
13
13
  attr_reader :command, :token, :tags, :conflict, :browsers, :site_id,
14
- :import_file_name, :import_name, :custom_url
14
+ :import_file_name, :import_name, :custom_url, :description
15
15
 
16
16
  VALID_BROWSERS = %w{chrome firefox safari ie8 ie9}.freeze
17
17
 
@@ -67,10 +67,15 @@ module Rainforest
67
67
  @custom_url = value
68
68
  end
69
69
 
70
+ opts.on("--description DESCRIPTION", "Add a description for the run.") do |value|
71
+ @description = value
72
+ end
73
+
70
74
  opts.on_tail("--help", "Display help message and exit") do |value|
71
75
  puts opts
72
76
  exit 0
73
77
  end
78
+
74
79
  end.parse!(@args)
75
80
 
76
81
  @command = @args.shift
@@ -118,4 +123,3 @@ module Rainforest
118
123
  end
119
124
  end
120
125
  end
121
-
@@ -100,6 +100,7 @@ module Rainforest
100
100
  post_opts[:conflict] = options.conflict if options.conflict
101
101
  post_opts[:browsers] = options.browsers if options.browsers
102
102
  post_opts[:site_id] = options.site_id if options.site_id
103
+ post_opts[:description] = options.description if options.description
103
104
 
104
105
  if options.custom_url
105
106
  post_opts[:environment_id] = get_environment_id(options.custom_url)
@@ -1,5 +1,5 @@
1
1
  module Rainforest
2
2
  module Cli
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
  end
data/spec/options_spec.rb CHANGED
@@ -78,6 +78,11 @@ describe Rainforest::Cli::OptionParser do
78
78
  let(:args) { ["run", "--custom-url", 'http://ad-hoc.example.com'] }
79
79
  its(:custom_url) { should eq 'http://ad-hoc.example.com' }
80
80
  end
81
+
82
+ context "it add a run description" do
83
+ let(:args) { ["run", "--description", 'test description'] }
84
+ its(:description) { should eq 'test description' }
85
+ end
81
86
  end
82
87
 
83
88
  describe "#validate!" do
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.2
4
+ version: 1.0.3
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-05-15 00:00:00.000000000 Z
12
+ date: 2015-07-02 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