swiftrail 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/swiftrail/cli.rb +2 -1
- data/lib/swiftrail/config/reader.rb +2 -1
- data/lib/swiftrail/testrail/api/test_rail_test.rb +3 -5
- data/lib/swiftrail/testrail/reporter.rb +7 -2
- data/lib/swiftrail/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51234aa58e9dc759d1c9077869dd5fcddc3d3bb1a2a1dd6d8a473cd34b04059c
|
4
|
+
data.tar.gz: 35cae68f64877c428d2d8e186e266f9a0e7f7e0cbf0b9eebaa68001c09992f8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7857a8b24416b06c7ce38d10fcbf0779df08246b04b64a5a0a4fa502c2d2aa7a9315e390b52d7cc62394c518d63a19cc0e1b454f185ce77597ecd45472ff9e08
|
7
|
+
data.tar.gz: 0eb016bd6a57e0a23cbac1c5a9e5830fad3e3e6d43dc1f8d398758c78d93ebdb71677ad565fe6fa8e1f4e3cd82ca774165dce46df88c001a21715804b7b19beb
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
swiftrail (0.1.
|
4
|
+
swiftrail (0.1.6)
|
5
5
|
nokogiri (~> 1.10)
|
6
6
|
thor (~> 0.20)
|
7
7
|
|
@@ -10,7 +10,7 @@ GEM
|
|
10
10
|
specs:
|
11
11
|
diff-lcs (1.3)
|
12
12
|
mini_portile2 (2.4.0)
|
13
|
-
nokogiri (1.10.
|
13
|
+
nokogiri (1.10.3)
|
14
14
|
mini_portile2 (~> 2.4.0)
|
15
15
|
rake (10.5.0)
|
16
16
|
rspec (3.8.0)
|
@@ -19,7 +19,7 @@ GEM
|
|
19
19
|
rspec-mocks (~> 3.8.0)
|
20
20
|
rspec-core (3.8.0)
|
21
21
|
rspec-support (~> 3.8.0)
|
22
|
-
rspec-expectations (3.8.
|
22
|
+
rspec-expectations (3.8.3)
|
23
23
|
diff-lcs (>= 1.2.0, < 2.0)
|
24
24
|
rspec-support (~> 3.8.0)
|
25
25
|
rspec-mocks (3.8.0)
|
data/lib/swiftrail/cli.rb
CHANGED
@@ -22,8 +22,9 @@ module Swiftrail
|
|
22
22
|
desc 'report', 'Reports success/failure to test rail, based on the results of your tests'
|
23
23
|
method_option :test_reports, type: :string, aliases: '-reports', default: defaults['reports'], desc: 'Regex to match your junit report files.'
|
24
24
|
method_option :strict, type: :boolean, aliases: '-strict', default: defaults['reports'], desc: 'Fail if there you are trying to report missing test case id'
|
25
|
+
method_option :dry_run, type: :boolean, default: defaults['dry_run'], desc: 'During dry run, results will be printed out instead of sent to test rail'
|
25
26
|
def report
|
26
|
-
if swiftrail_reporter.report_results(options[:run_id])
|
27
|
+
if swiftrail_reporter.report_results(options[:run_id], options[:dry_run])
|
27
28
|
puts 'Successfully reported the results'
|
28
29
|
else
|
29
30
|
puts 'There was an issue while reporting the results'
|
@@ -1,18 +1,16 @@
|
|
1
1
|
module Swiftrail
|
2
2
|
module Testrail
|
3
3
|
module Api
|
4
|
-
TestRailTest = Struct.new(:case_id, :id, :title
|
4
|
+
TestRailTest = Struct.new(:case_id, :id, :title) do
|
5
5
|
def self.from_json(json)
|
6
|
-
|
7
|
-
TestRailTest.new(json['case_id'], json['id'], json['title'], automated)
|
6
|
+
TestRailTest.new(json['case_id'], json['id'], json['title'])
|
8
7
|
end
|
9
8
|
|
10
9
|
def to_json(*_args)
|
11
10
|
{
|
12
11
|
id: id,
|
13
12
|
case_id: case_id,
|
14
|
-
title: title
|
15
|
-
automated: automated
|
13
|
+
title: title
|
16
14
|
}
|
17
15
|
end
|
18
16
|
end
|
@@ -15,8 +15,13 @@ module Swiftrail
|
|
15
15
|
@strict = strict
|
16
16
|
end
|
17
17
|
|
18
|
-
def report_results(run_id)
|
19
|
-
|
18
|
+
def report_results(run_id, dry_run)
|
19
|
+
unless dry_run
|
20
|
+
test_rail_client(run_id).publish_results(purge(assembler(swift_test_parser.parse, junit_parser.parse).assemble, run_id))
|
21
|
+
else
|
22
|
+
STDOUT::puts("RUN_ID = #{run_id}")
|
23
|
+
STDOUT::puts(purge(assembler(swift_test_parser.parse, junit_parser.parse).assemble, run_id).map(&:to_json))
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
private
|
data/lib/swiftrail/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swiftrail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Slavko Krucaj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|