results_keeper_rspec 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/results_keeper_rspec.rb +6 -5
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b2013033048ff95c8e4fcab9c5a5024342d3c3d
|
4
|
+
data.tar.gz: a33904ff0636b364139ca2a7e084cee0ad03c30c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 021939909037c75687d96f1ceb9d3b9e9e0b82681d89f63370b747cbd0aa017338aa7ec0d7ad2c50f30580cfce6fee877727a77f2da8ffca19c854af3c5a486c
|
7
|
+
data.tar.gz: 69cdf1a84f5fece3e71d99c78067b66d5a3b6022bc7ecf65a2c65363bba33573a4e83037d545efbe67560b2c626dfaf9fb12f2643ab54ff242271fc84030a314
|
data/lib/results_keeper_rspec.rb
CHANGED
@@ -28,7 +28,8 @@ class ResultsKeeperRspec
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def send_test(scenario)
|
31
|
-
|
31
|
+
test_duration = Time.now - scenario.metadata[:execution_result].started_at
|
32
|
+
@screenshot_path = save_screenshot(scenario) if ENV['SEND_SCREENSHOT']
|
32
33
|
status = scenario.exception ? 'failed' : 'passed'
|
33
34
|
scenario_error = scenario.exception.message if scenario.exception
|
34
35
|
run_path = "rspec #{scenario.location}"
|
@@ -38,7 +39,8 @@ class ResultsKeeperRspec
|
|
38
39
|
feature_name: scenario.example_group.description,
|
39
40
|
run_path: run_path,
|
40
41
|
error: scenario_error,
|
41
|
-
revision_id: @revision['revision_id']
|
42
|
+
revision_id: @revision['revision_id'],
|
43
|
+
duration: test_duration
|
42
44
|
}
|
43
45
|
@test = send_json(data, 'tests')
|
44
46
|
send_screenshot(@screenshot_path) if @screenshot_path
|
@@ -70,14 +72,14 @@ class ResultsKeeperRspec
|
|
70
72
|
end
|
71
73
|
|
72
74
|
def send_screenshot(screenshot_path)
|
73
|
-
if ENV['
|
75
|
+
if ENV['SEND_SCREENSHOT']
|
74
76
|
t1 = Thread.new do
|
75
77
|
params = { project: @revision['project_id'], revision: @revision['revision_id'], test: @test['id'] }
|
76
78
|
RestClient.post("http://#{@host}:#{@port}/api/tests/upload_screenshot",
|
77
79
|
:name_of_file_param => File.new(screenshot_path), :body => params)
|
78
|
-
File.delete(screenshot_path)
|
79
80
|
end
|
80
81
|
t1.join
|
82
|
+
File.delete(screenshot_path)
|
81
83
|
end
|
82
84
|
end
|
83
85
|
|
@@ -89,4 +91,3 @@ class ResultsKeeperRspec
|
|
89
91
|
puts " RK: #{text}".blue
|
90
92
|
end
|
91
93
|
end
|
92
|
-
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: results_keeper_rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Kozakov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flickraw
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rest-client
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Results Keeper is a application which can help you to track and manage
|
@@ -57,12 +57,12 @@ require_paths:
|
|
57
57
|
- lib
|
58
58
|
required_ruby_version: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- -
|
65
|
+
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
68
|
requirements: []
|