rainforest-cli 1.12.4 → 1.12.5

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: f54c910d4fc7afc7fe1e34339fcec1fcf527ff4f
4
- data.tar.gz: 36e5270a0ca146bf6551c56693665b69c6c90219
3
+ metadata.gz: 19fd3d73f7a5c81996ba32511b65ec0d9fc3f325
4
+ data.tar.gz: 906334408edb3c7b1c46eb8381b02440fda8a2c6
5
5
  SHA512:
6
- metadata.gz: f79e346115f41720295e728b176fd8c3879fa02fed0e7919a4028902c87200dacb8621c6fc6e06501a678a90afe8341bd017e5337aca57fcacaeab5dccc1599f
7
- data.tar.gz: 9e3df417d44589f3cf111dcc55e86556fc1815cc8adfbbf3b7ea5a2978136a0f280191e9d57ddba2fbab499dee47978f1b746e947cc004577c7362f5fe40212b
6
+ metadata.gz: ec606e2caa52e0142384a6e138130e73caa24191c6c8d6a6d9986d67954329589e37dde21d3c71afab67f5115c9f8eb71b59758fa13720e5303b3075ffdb2d45
7
+ data.tar.gz: f933956637418ff39a7abe8e51050cc436d536378c38245b00d8a186dff3de919ce05de4957826a9abc8944f266d814f38bc32c9bd371be2d1263d99e57877a6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Rainforest CLI Changelog
2
2
 
3
+ ## 1.12.5 - 7th March 2017
4
+ - Include site ID for exported tests.
5
+ (1816af9406013ac7594765822f73066adf332cf1, @epaulet)
6
+
3
7
  ## 1.12.4 - 4th March 2017
4
8
  - Lower threads used in HTTP requests to 4 for more stability.
5
9
  (ce01a1defa8b9a5e523af0bc5797a5eef365e4e1, @epaulet)
@@ -81,16 +81,19 @@ class RainforestCli::Exporter
81
81
  end
82
82
 
83
83
  def get_header(test)
84
- browsers = test['browsers'].map { |b| b['name'] if b['state'] == 'enabled' }.compact
85
- <<-EOF
84
+ header = <<-EOF
86
85
  #! #{test['rfml_id']}
87
86
  # title: #{test['title']}
88
87
  # start_uri: #{test['start_uri']}
89
- # tags: #{test['tags'].join(", ")}
90
- # browsers: #{browsers.join(", ")}
91
- #
92
-
88
+ # site_id: #{test['site_id']}
93
89
  EOF
90
+
91
+ header += "# tags: #{test['tags'].join(', ')}\n" if test['tags'].any?
92
+
93
+ browsers = test['browsers'].map { |b| b['name'] if b['state'] == 'enabled' }.compact
94
+ header += "# browsers: #{browsers.join(', ')}\n" if browsers.any?
95
+ header += "\n"
96
+ header
94
97
  end
95
98
 
96
99
  def http_client
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module RainforestCli
3
- VERSION = '1.12.4'
3
+ VERSION = '1.12.5'
4
4
  end
@@ -80,11 +80,13 @@ describe RainforestCli::Exporter do
80
80
  ]
81
81
  end
82
82
  let(:single_test_id) { 123 }
83
+ let(:single_test_site_id) { 987 }
83
84
  let(:single_test) do
84
85
  {
85
86
  'id' => single_test_id,
86
87
  'title' => 'Test title',
87
88
  'start_uri' => '/uri',
89
+ 'site_id' => single_test_site_id,
88
90
  'tags' => ['foo', 'bar'],
89
91
  'browsers' => [
90
92
  { 'name' => 'chrome', 'state' => 'enabled' },
@@ -121,12 +123,18 @@ describe RainforestCli::Exporter do
121
123
  expect(file).to_not include("- #{embedded_rfml_id}")
122
124
  end
123
125
 
124
- it 'print enabled browsers only' do
126
+ it 'prints enabled browsers only' do
125
127
  subject.export
126
- comments = file[0]
127
- expect(comments).to include('chrome')
128
- expect(comments).to include('safari')
129
- expect(comments).to_not include('firefox')
128
+ meta_data = file[0]
129
+ expect(meta_data).to include('chrome')
130
+ expect(meta_data).to include('safari')
131
+ expect(meta_data).to_not include('firefox')
132
+ end
133
+
134
+ it 'prints site id' do
135
+ subject.export
136
+ meta_data = file[0]
137
+ expect(meta_data).to include("# site_id: #{single_test_site_id}")
130
138
  end
131
139
 
132
140
  context 'action and/or question contain newlines' 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.12.4
4
+ version: 1.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russell Smith
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-03 00:00:00.000000000 Z
12
+ date: 2017-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty