rspec-testrail 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -1
- data/Gemfile +1 -0
- data/README.md +6 -3
- data/Rakefile +3 -3
- data/lib/rspec/testrail.rb +13 -11
- data/lib/rspec/testrail/version.rb +1 -1
- data/rspec-testrail.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d75728baba5bfab17c86486fbd91b2eab7f69f3f
|
4
|
+
data.tar.gz: 9f187c3bd458ac3e14dfe7fa1cd30b4746514e85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 929a6f914077f240bf1d869087399a69b6732099502db83318d48272235f7e80bcaf0846dcd5b8cc1bb19f5a545eee44986edbfe5c3476ac7dc75ba85f54e148
|
7
|
+
data.tar.gz: 54165c4c0fef0586214dc662b312ed2beeb1ad575181663a78d10b0666197ce5d96434380e76f197e313a050809ca975a1754a9002ad4b08b16375225006e899
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# RSpec::Testrail
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/dmitryzuev/rspec-testrail.svg?branch=master)](https://travis-ci.org/dmitryzuev/rspec-testrail) [![Code Climate](https://codeclimate.com/github/dmitryzuev/rspec-testrail/badges/gpa.svg)](https://codeclimate.com/github/dmitryzuev/rspec-testrail) [![Test Coverage](https://codeclimate.com/github/dmitryzuev/rspec-testrail/badges/coverage.svg)](https://codeclimate.com/github/dmitryzuev/rspec-testrail/coverage)
|
3
4
|
|
4
5
|
## Installation
|
5
6
|
|
@@ -29,11 +30,13 @@ RSpec.configure do |config|
|
|
29
30
|
config.before :all do
|
30
31
|
# Uncomment if you are using gem `webmock`
|
31
32
|
# WebMock.allow_net_connect!
|
32
|
-
RSpec::Testrail.init url: 'http://
|
33
|
-
user: 'test@
|
33
|
+
RSpec::Testrail.init url: 'http://testrail.site',
|
34
|
+
user: 'test@testrail.site',
|
34
35
|
password: ENV.fetch('TESTRAIL_PASSWORD', '12345678'),
|
35
36
|
project_id: 228,
|
36
|
-
suite_id: 1337
|
37
|
+
suite_id: 1337,
|
38
|
+
run_name: `git rev-parse --abbrev-ref HEAD`.strip,
|
39
|
+
run_description: `git rev-parse HEAD`.strip
|
37
40
|
end
|
38
41
|
|
39
42
|
config.after :example, testrail_id: proc { |value| !value.nil? } do |example|
|
data/Rakefile
CHANGED
data/lib/rspec/testrail.rb
CHANGED
@@ -13,20 +13,15 @@ module RSpec
|
|
13
13
|
password: hash[:password],
|
14
14
|
project_id: hash[:project_id],
|
15
15
|
suite_id: hash[:suite_id],
|
16
|
-
|
17
|
-
|
16
|
+
run_name: hash[:run_name],
|
17
|
+
run_description: hash[:run_description]
|
18
18
|
}
|
19
|
-
client
|
20
19
|
end
|
21
20
|
|
22
21
|
def client
|
23
22
|
@client ||= Client.new(@options[:url], @options[:user], @options[:password])
|
24
23
|
end
|
25
24
|
|
26
|
-
def reset_client
|
27
|
-
@client = nil
|
28
|
-
end
|
29
|
-
|
30
25
|
def process(example)
|
31
26
|
if example.exception
|
32
27
|
status = 5
|
@@ -40,6 +35,13 @@ module RSpec
|
|
40
35
|
comment: message)
|
41
36
|
end
|
42
37
|
|
38
|
+
def reset
|
39
|
+
@options = nil
|
40
|
+
@client = nil
|
41
|
+
@testrun = nil
|
42
|
+
@testruns = nil
|
43
|
+
end
|
44
|
+
|
43
45
|
protected
|
44
46
|
|
45
47
|
def testrun
|
@@ -47,11 +49,11 @@ module RSpec
|
|
47
49
|
if testruns.empty?
|
48
50
|
client.send_post("add_run/#{@options[:project_id]}",
|
49
51
|
suite_id: @options[:suite_id],
|
50
|
-
name:
|
51
|
-
description:
|
52
|
+
name: @options[:run_name],
|
53
|
+
description: @options[:run_description])
|
52
54
|
else
|
53
55
|
client.send_post("update_run/#{testruns[0]['id']}",
|
54
|
-
description:
|
56
|
+
description: @options[:run_description])
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
@@ -59,7 +61,7 @@ module RSpec
|
|
59
61
|
@testruns ||= client.send_get("get_runs/#{@options[:project_id]}")
|
60
62
|
.select do |run|
|
61
63
|
run['suite_id'] == @options[:suite_id].to_i && \
|
62
|
-
run['name'].include?(@options[:
|
64
|
+
run['name'].include?(@options[:run_name])
|
63
65
|
end
|
64
66
|
end
|
65
67
|
end
|
data/rspec-testrail.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
24
24
|
spec.add_development_dependency 'rake', '~> 10.0'
|
25
25
|
spec.add_development_dependency 'webmock', '~> 2.1'
|
26
26
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-testrail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Zuev
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.10'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|