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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rainforest_cli/exporter.rb +9 -6
- data/lib/rainforest_cli/version.rb +1 -1
- data/spec/rainforest_cli/exporter_spec.rb +13 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19fd3d73f7a5c81996ba32511b65ec0d9fc3f325
|
4
|
+
data.tar.gz: 906334408edb3c7b1c46eb8381b02440fda8a2c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
85
|
-
<<-EOF
|
84
|
+
header = <<-EOF
|
86
85
|
#! #{test['rfml_id']}
|
87
86
|
# title: #{test['title']}
|
88
87
|
# start_uri: #{test['start_uri']}
|
89
|
-
#
|
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
|
@@ -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 '
|
126
|
+
it 'prints enabled browsers only' do
|
125
127
|
subject.export
|
126
|
-
|
127
|
-
expect(
|
128
|
-
expect(
|
129
|
-
expect(
|
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
|
+
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-
|
12
|
+
date: 2017-03-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|