rspec_yah_formatter 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.README/example.png +0 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +33 -38
- data/README.md +15 -11
- data/VERSION +1 -1
- data/lib/oopsy.rb +1 -1
- data/rspec_yah_formatter.gemspec +7 -6
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ef9104fd95504cd29bed17ac3a76ed2699728c1
|
|
4
|
+
data.tar.gz: 03ea6204439c56ccccd182fac66a161035658e00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 456ed804e057acbd3155d32f09ba7166a7f5079f041f79c057254ef8c1474c1a7a19a36249e0c9a633947745f711eab26dc770de0b770564a094f37f5da026c1
|
|
7
|
+
data.tar.gz: 23f7fa91adc6e08516dceddbf87bed697c194724dae669d5a8d67e9f584109ef20c3fcb01e35269e5a0766222b9c0d4415ef357237db3f05521572cd37ac0d34
|
data/.README/example.png
ADDED
|
Binary file
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
GIT
|
|
2
|
-
remote: https://github.com/mihael/jeweler.git
|
|
3
|
-
revision: ca94ec62ca7990a5c22ee0b378c5bba57ab7b0fd
|
|
4
|
-
branch: obsolete-safe-issue278
|
|
5
|
-
specs:
|
|
6
|
-
jeweler (2.0.1)
|
|
7
|
-
builder
|
|
8
|
-
bundler (>= 1.0)
|
|
9
|
-
git (>= 1.2.5)
|
|
10
|
-
github_api
|
|
11
|
-
highline (>= 1.6.15)
|
|
12
|
-
nokogiri (>= 1.5.10)
|
|
13
|
-
rake
|
|
14
|
-
rdoc
|
|
15
|
-
|
|
16
1
|
GEM
|
|
17
2
|
remote: http://rubygems.org/
|
|
18
3
|
specs:
|
|
@@ -22,44 +7,53 @@ GEM
|
|
|
22
7
|
minitest (~> 5.1)
|
|
23
8
|
thread_safe (~> 0.1)
|
|
24
9
|
tzinfo (~> 1.1)
|
|
25
|
-
addressable (2.
|
|
10
|
+
addressable (2.4.0)
|
|
26
11
|
builder (3.2.2)
|
|
27
12
|
descendants_tracker (0.0.4)
|
|
28
13
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
29
14
|
diff-lcs (1.2.5)
|
|
30
|
-
faraday (0.9.
|
|
15
|
+
faraday (0.9.2)
|
|
31
16
|
multipart-post (>= 1.2, < 3)
|
|
32
|
-
git (1.
|
|
33
|
-
github_api (0.
|
|
34
|
-
addressable (~> 2.
|
|
17
|
+
git (1.3.0)
|
|
18
|
+
github_api (0.13.1)
|
|
19
|
+
addressable (~> 2.4.0)
|
|
35
20
|
descendants_tracker (~> 0.0.4)
|
|
36
21
|
faraday (~> 0.8, < 0.10)
|
|
37
|
-
hashie (>= 3.
|
|
22
|
+
hashie (>= 3.4)
|
|
38
23
|
multi_json (>= 1.7.5, < 2.0)
|
|
39
|
-
nokogiri (~> 1.6.3)
|
|
40
24
|
oauth2
|
|
41
|
-
hashie (3.
|
|
42
|
-
highline (1.
|
|
25
|
+
hashie (3.4.3)
|
|
26
|
+
highline (1.7.8)
|
|
43
27
|
i18n (0.6.11)
|
|
28
|
+
jeweler (2.1.1)
|
|
29
|
+
builder
|
|
30
|
+
bundler (>= 1.0)
|
|
31
|
+
git (>= 1.2.5)
|
|
32
|
+
github_api
|
|
33
|
+
highline (>= 1.6.15)
|
|
34
|
+
nokogiri (>= 1.5.10)
|
|
35
|
+
rake
|
|
36
|
+
rdoc
|
|
37
|
+
semver
|
|
44
38
|
json (1.8.3)
|
|
45
|
-
jwt (1.
|
|
46
|
-
|
|
39
|
+
jwt (1.5.1)
|
|
40
|
+
mini_portile2 (2.0.0)
|
|
47
41
|
minitest (5.4.0)
|
|
48
|
-
multi_json (1.
|
|
42
|
+
multi_json (1.11.2)
|
|
49
43
|
multi_xml (0.5.5)
|
|
50
44
|
multipart-post (2.0.0)
|
|
51
|
-
nokogiri (1.6.
|
|
52
|
-
|
|
53
|
-
nokogiri (1.6.
|
|
54
|
-
|
|
55
|
-
oauth2 (1.
|
|
45
|
+
nokogiri (1.6.7.2)
|
|
46
|
+
mini_portile2 (~> 2.0.0.rc2)
|
|
47
|
+
nokogiri (1.6.7.2-x86-mingw32)
|
|
48
|
+
mini_portile2 (~> 2.0.0.rc2)
|
|
49
|
+
oauth2 (1.1.0)
|
|
56
50
|
faraday (>= 0.8, < 0.10)
|
|
57
|
-
jwt (~> 1.0)
|
|
51
|
+
jwt (~> 1.0, < 1.5.2)
|
|
58
52
|
multi_json (~> 1.3)
|
|
59
53
|
multi_xml (~> 0.5)
|
|
60
|
-
rack (
|
|
61
|
-
rack (1.
|
|
62
|
-
rake (
|
|
54
|
+
rack (>= 1.2, < 3)
|
|
55
|
+
rack (1.6.4)
|
|
56
|
+
rake (11.1.2)
|
|
63
57
|
rdoc (3.12.2)
|
|
64
58
|
json (~> 1.4)
|
|
65
59
|
rouge (1.6.1)
|
|
@@ -75,7 +69,8 @@ GEM
|
|
|
75
69
|
rspec-mocks (3.0.3)
|
|
76
70
|
rspec-support (~> 3.0.0)
|
|
77
71
|
rspec-support (3.0.3)
|
|
78
|
-
|
|
72
|
+
semver (1.0.1)
|
|
73
|
+
thread_safe (0.3.5)
|
|
79
74
|
tzinfo (1.2.1)
|
|
80
75
|
thread_safe (~> 0.1)
|
|
81
76
|
|
|
@@ -86,7 +81,7 @@ PLATFORMS
|
|
|
86
81
|
DEPENDENCIES
|
|
87
82
|
activesupport (>= 4.1.4)
|
|
88
83
|
bundler (~> 1.0)
|
|
89
|
-
jeweler
|
|
84
|
+
jeweler (~> 2.1.1)
|
|
90
85
|
rdoc (~> 3.12)
|
|
91
86
|
rouge (>= 1.6.1)
|
|
92
87
|
rspec (~> 3.0.0)
|
data/README.md
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
# PLEASE NOTE - This is a fork from [rspec_reports_formatter](https://github.com/kingsleyh/rspec_reports_formatter)
|
|
2
|
-
|
|
3
1
|
# Publish pretty [rspec](http://rspec.info/) reports with images
|
|
4
2
|
|
|
3
|
+
**PLEASE NOTE - This is a fork from [rspec_reports_formatter](https://github.com/kingsleyh/rspec_reports_formatter)**
|
|
4
|
+
|
|
5
5
|
This is a RSpec formatter which generates pretty html reports showing the results of rspec tests, where you can also easily attach images and screenshots.
|
|
6
6
|
|
|
7
7
|
## Why another formatter?
|
|
8
8
|
|
|
9
9
|
On CI servers, xUnit xml test reports are quite "standard", but the attachments cannot be linked to a concrete test. I mean, just [look at this](https://wiki.jenkins-ci.org/download/attachments/42467572/junit-attachments.png).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
kingsleyh created a nicer interface using an RSpec formatter with [rspec_reports_formatter](https://github.com/kingsleyh/rspec_reports_formatter), but it had some issues with nested blocks and it was still not possible to attach images.
|
|
12
12
|
|
|
13
13
|
With `rspec_yah_formatter` you can attach images, which is very useful for `capybara`, `selenium` and so on.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
19
|
This report is inspired in [rspec_reports_formatter](https://github.com/kingsleyh/rspec_reports_formatter), with some differences:
|
|
20
20
|
|
|
21
|
-
- All examples are shown in the same page. This makes it simpler, and also
|
|
21
|
+
- All examples are shown in the same page. This makes it simpler, and also
|
|
22
22
|
avoids [this](https://github.com/kingsleyh/rspec_reports_formatter/issues/3)
|
|
23
23
|
- As mentioned, you can add images
|
|
24
24
|
- To avoid that the page is filled with stacktraces and images, errors are by default hidden, and you can show them by clicking on them.
|
|
25
25
|
- This report only makes sense in html, so you must specify a file in `--out`when running rspec
|
|
26
|
-
- Removed the "magic" Gherkin processing of the comments on the specs
|
|
27
26
|
|
|
28
27
|
Here is also the [Changelog](../../wiki/Changelog) and a [TODO list](../../wiki/TODO-list)
|
|
29
28
|
|
|
@@ -32,13 +31,13 @@ Here is also the [Changelog](../../wiki/Changelog) and a [TODO list](../../wiki/
|
|
|
32
31
|
This gem was build to use Rspec 3.x.x
|
|
33
32
|
|
|
34
33
|
```
|
|
35
|
-
gem install rspec_yah_formatter -v 0.0.
|
|
34
|
+
gem install rspec_yah_formatter -v 0.0.7
|
|
36
35
|
```
|
|
37
36
|
|
|
38
37
|
ideally just add it to your bundler Gemfile as follows:
|
|
39
38
|
|
|
40
39
|
```ruby
|
|
41
|
-
gem 'rspec_yah_formatter','~> 0.0.
|
|
40
|
+
gem 'rspec_yah_formatter','~> 0.0.7'
|
|
42
41
|
```
|
|
43
42
|
|
|
44
43
|
## Use
|
|
@@ -48,20 +47,20 @@ When running your rspec tests with rspec 3.0.0 just use the custom formatter:
|
|
|
48
47
|
This should work:
|
|
49
48
|
|
|
50
49
|
```
|
|
51
|
-
rspec -f RspecYahFormatter
|
|
50
|
+
rspec spec/my/spec -f RspecYahFormatter --out path/to/report.html
|
|
52
51
|
```
|
|
53
52
|
|
|
54
53
|
If not you can explicitly add in a require as follows:
|
|
55
54
|
|
|
56
55
|
```
|
|
57
|
-
rspec --require rspec_yah_formatter.rb --format RspecYahFormatter
|
|
56
|
+
rspec spec/my/spec --require rspec_yah_formatter.rb --format RspecYahFormatter --out path/to/report.html
|
|
58
57
|
```
|
|
59
58
|
|
|
60
59
|
To add images:
|
|
61
60
|
|
|
62
61
|
```
|
|
63
62
|
RSpec.configure do |config|
|
|
64
|
-
config.after(:each) do |example|
|
|
63
|
+
config.after(:each) do |example|
|
|
65
64
|
if example.exception
|
|
66
65
|
# Save screenshot to 'path/to/foo.png'
|
|
67
66
|
example.metadata[:screenshot] = 'path/to/foo.png'
|
|
@@ -69,4 +68,9 @@ RSpec.configure do |config|
|
|
|
69
68
|
end
|
|
70
69
|
end
|
|
71
70
|
```
|
|
71
|
+
## Show me something
|
|
72
|
+
|
|
73
|
+
*Generated with `spec/test2_spec.rb`*
|
|
72
74
|
|
|
75
|
+
![example report]
|
|
76
|
+
(https://raw.githubusercontent.com/dgmora/rspec_yah_formatter/master/.README/example.png)
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.8
|
data/lib/oopsy.rb
CHANGED
|
@@ -7,7 +7,7 @@ class Oopsy
|
|
|
7
7
|
unless @exception.nil?
|
|
8
8
|
@klass = @exception.class
|
|
9
9
|
@message = @exception.message.encode('utf-8')
|
|
10
|
-
@backtrace = @exception.backtrace
|
|
10
|
+
@backtrace = Array(@exception.backtrace)
|
|
11
11
|
@backtrace_message = @backtrace.select { |r| r.match(@file_path) }.join('').encode('utf-8')
|
|
12
12
|
@highlighted_source = process_source
|
|
13
13
|
@explanation = process_message
|
data/rspec_yah_formatter.gemspec
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: rspec_yah_formatter 0.0.
|
|
5
|
+
# stub: rspec_yah_formatter 0.0.8 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "rspec_yah_formatter"
|
|
9
|
-
s.version = "0.0.
|
|
9
|
+
s.version = "0.0.8"
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.require_paths = ["lib"]
|
|
13
13
|
s.authors = ["Kingsley Hendrickse", "David Garcia"]
|
|
14
|
-
s.date = "2016-
|
|
14
|
+
s.date = "2016-04-07"
|
|
15
15
|
s.description = "Rspec html formatter to generate pretty results with images"
|
|
16
16
|
s.email = "david.garcia.mora@gmail.com"
|
|
17
17
|
s.extra_rdoc_files = [
|
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
|
|
|
19
19
|
"README.md"
|
|
20
20
|
]
|
|
21
21
|
s.files = [
|
|
22
|
+
".README/example.png",
|
|
22
23
|
".document",
|
|
23
24
|
".rspec",
|
|
24
25
|
"Gemfile",
|
|
@@ -62,7 +63,7 @@ Gem::Specification.new do |s|
|
|
|
62
63
|
s.add_development_dependency(%q<rspec>, ["~> 3.0.0"])
|
|
63
64
|
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
|
64
65
|
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
|
65
|
-
s.add_development_dependency(%q<jeweler>, ["
|
|
66
|
+
s.add_development_dependency(%q<jeweler>, ["~> 2.1.1"])
|
|
66
67
|
else
|
|
67
68
|
s.add_dependency(%q<rspec-core>, [">= 3.0.3"])
|
|
68
69
|
s.add_dependency(%q<rouge>, [">= 1.6.1"])
|
|
@@ -70,7 +71,7 @@ Gem::Specification.new do |s|
|
|
|
70
71
|
s.add_dependency(%q<rspec>, ["~> 3.0.0"])
|
|
71
72
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
|
72
73
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
|
73
|
-
s.add_dependency(%q<jeweler>, ["
|
|
74
|
+
s.add_dependency(%q<jeweler>, ["~> 2.1.1"])
|
|
74
75
|
end
|
|
75
76
|
else
|
|
76
77
|
s.add_dependency(%q<rspec-core>, [">= 3.0.3"])
|
|
@@ -79,7 +80,7 @@ Gem::Specification.new do |s|
|
|
|
79
80
|
s.add_dependency(%q<rspec>, ["~> 3.0.0"])
|
|
80
81
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
|
81
82
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
|
82
|
-
s.add_dependency(%q<jeweler>, ["
|
|
83
|
+
s.add_dependency(%q<jeweler>, ["~> 2.1.1"])
|
|
83
84
|
end
|
|
84
85
|
end
|
|
85
86
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec_yah_formatter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kingsley Hendrickse
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-
|
|
12
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rspec-core
|
|
@@ -99,16 +99,16 @@ dependencies:
|
|
|
99
99
|
name: jeweler
|
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
|
101
101
|
requirements:
|
|
102
|
-
- - "
|
|
102
|
+
- - "~>"
|
|
103
103
|
- !ruby/object:Gem::Version
|
|
104
|
-
version:
|
|
104
|
+
version: 2.1.1
|
|
105
105
|
type: :development
|
|
106
106
|
prerelease: false
|
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
|
108
108
|
requirements:
|
|
109
|
-
- - "
|
|
109
|
+
- - "~>"
|
|
110
110
|
- !ruby/object:Gem::Version
|
|
111
|
-
version:
|
|
111
|
+
version: 2.1.1
|
|
112
112
|
description: Rspec html formatter to generate pretty results with images
|
|
113
113
|
email: david.garcia.mora@gmail.com
|
|
114
114
|
executables: []
|
|
@@ -117,6 +117,7 @@ extra_rdoc_files:
|
|
|
117
117
|
- LICENSE.txt
|
|
118
118
|
- README.md
|
|
119
119
|
files:
|
|
120
|
+
- ".README/example.png"
|
|
120
121
|
- ".document"
|
|
121
122
|
- ".rspec"
|
|
122
123
|
- Gemfile
|