pludoni_rspec 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +83 -26
- data/README.md +20 -0
- data/lib/pludoni_rspec.rb +4 -2
- data/lib/pludoni_rspec/version.rb +1 -1
- data/pludoni_rspec.gemspec +8 -2
- metadata +102 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ce3524dca25e4a41f37fe2135924b1cdbd1e1ff0fa7e83cd5501c9cf6d55123
|
4
|
+
data.tar.gz: 9b6f43e2fbe7149ee26567f1e3d9d0156ca71325ba9dc7f361ee901eade94066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2737c05b3e5bd855247e942cdb4d5006af3f2e5a386d55180f135c8d555db81ed60a98d4e1f34fea16b9198831443ea484f142dbfd788232edc01882399f5737
|
7
|
+
data.tar.gz: c6fa190fa8e274c3b52fcf91b8bda8d07bfb347051e2e731dba110972e6da4101b75416b89d81df273397de007e04c16eac1b295b94b9c95d0722153f30834f2
|
data/Gemfile.lock
CHANGED
@@ -1,78 +1,135 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pludoni_rspec (0.
|
4
|
+
pludoni_rspec (0.9.0)
|
5
|
+
apparition
|
5
6
|
capybara (>= 3.13.2)
|
6
7
|
fuubar (>= 2.3.1)
|
7
8
|
headless (>= 2.3.1)
|
8
9
|
pry-rails
|
9
10
|
puma
|
11
|
+
rspec_junit_formatter
|
12
|
+
rubocop
|
13
|
+
rubocop-performance
|
14
|
+
rubocop-rails
|
15
|
+
rubocop-rspec
|
10
16
|
selenium-webdriver (>= 3.141.0)
|
11
17
|
simplecov (>= 0.16.1)
|
18
|
+
simplecov-cobertura
|
12
19
|
webdrivers (>= 4.0.0)
|
13
20
|
|
14
21
|
GEM
|
15
22
|
remote: https://rubygems.org/
|
16
23
|
specs:
|
24
|
+
activesupport (6.1.3.1)
|
25
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
26
|
+
i18n (>= 1.6, < 2)
|
27
|
+
minitest (>= 5.1)
|
28
|
+
tzinfo (~> 2.0)
|
29
|
+
zeitwerk (~> 2.3)
|
17
30
|
addressable (2.7.0)
|
18
31
|
public_suffix (>= 2.0.2, < 5.0)
|
19
|
-
|
32
|
+
apparition (0.6.0)
|
33
|
+
capybara (~> 3.13, < 4)
|
34
|
+
websocket-driver (>= 0.6.5)
|
35
|
+
ast (2.4.2)
|
36
|
+
capybara (3.35.3)
|
20
37
|
addressable
|
21
38
|
mini_mime (>= 0.1.3)
|
22
39
|
nokogiri (~> 1.8)
|
23
40
|
rack (>= 1.6.0)
|
24
41
|
rack-test (>= 0.6.3)
|
25
|
-
regexp_parser (
|
42
|
+
regexp_parser (>= 1.5, < 3.0)
|
26
43
|
xpath (~> 3.2)
|
27
44
|
childprocess (3.0.0)
|
28
45
|
coderay (1.1.3)
|
29
|
-
|
30
|
-
|
46
|
+
concurrent-ruby (1.1.8)
|
47
|
+
docile (1.3.5)
|
48
|
+
fuubar (2.5.1)
|
31
49
|
rspec-core (~> 3.0)
|
32
50
|
ruby-progressbar (~> 1.4)
|
33
51
|
headless (2.3.1)
|
52
|
+
i18n (1.8.9)
|
53
|
+
concurrent-ruby (~> 1.0)
|
34
54
|
method_source (1.0.0)
|
35
|
-
mini_mime (1.0.
|
36
|
-
mini_portile2 (2.
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
55
|
+
mini_mime (1.0.3)
|
56
|
+
mini_portile2 (2.5.0)
|
57
|
+
minitest (5.14.4)
|
58
|
+
nio4r (2.5.7)
|
59
|
+
nokogiri (1.11.2)
|
60
|
+
mini_portile2 (~> 2.5.0)
|
61
|
+
racc (~> 1.4)
|
62
|
+
parallel (1.20.1)
|
63
|
+
parser (3.0.0.0)
|
64
|
+
ast (~> 2.4.1)
|
65
|
+
pry (0.14.0)
|
41
66
|
coderay (~> 1.1)
|
42
67
|
method_source (~> 1.0)
|
43
68
|
pry-rails (0.3.9)
|
44
69
|
pry (>= 0.10.4)
|
45
|
-
<<<<<<< HEAD
|
46
|
-
public_suffix (4.0.1)
|
47
|
-
puma (4.3.5)
|
48
|
-
=======
|
49
70
|
public_suffix (4.0.6)
|
50
|
-
puma (5.
|
51
|
-
>>>>>>> 41f9d46... V.0.8.0
|
71
|
+
puma (5.2.2)
|
52
72
|
nio4r (~> 2.0)
|
73
|
+
racc (1.5.2)
|
53
74
|
rack (2.2.3)
|
54
75
|
rack-test (1.1.0)
|
55
76
|
rack (>= 1.0, < 3)
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
rspec-
|
61
|
-
|
77
|
+
rainbow (3.0.0)
|
78
|
+
rake (13.0.1)
|
79
|
+
regexp_parser (2.1.1)
|
80
|
+
rexml (3.2.4)
|
81
|
+
rspec-core (3.10.1)
|
82
|
+
rspec-support (~> 3.10.0)
|
83
|
+
rspec-support (3.10.2)
|
84
|
+
rspec_junit_formatter (0.4.1)
|
85
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
86
|
+
rubocop (1.12.0)
|
87
|
+
parallel (~> 1.10)
|
88
|
+
parser (>= 3.0.0.0)
|
89
|
+
rainbow (>= 2.2.2, < 4.0)
|
90
|
+
regexp_parser (>= 1.8, < 3.0)
|
91
|
+
rexml
|
92
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
93
|
+
ruby-progressbar (~> 1.7)
|
94
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
95
|
+
rubocop-ast (1.4.1)
|
96
|
+
parser (>= 2.7.1.5)
|
97
|
+
rubocop-performance (1.10.2)
|
98
|
+
rubocop (>= 0.90.0, < 2.0)
|
99
|
+
rubocop-ast (>= 0.4.0)
|
100
|
+
rubocop-rails (2.9.1)
|
101
|
+
activesupport (>= 4.2.0)
|
102
|
+
rack (>= 1.1)
|
103
|
+
rubocop (>= 0.90.0, < 2.0)
|
104
|
+
rubocop-rspec (2.2.0)
|
105
|
+
rubocop (~> 1.0)
|
106
|
+
rubocop-ast (>= 1.1.0)
|
107
|
+
ruby-progressbar (1.11.0)
|
62
108
|
rubyzip (2.3.0)
|
63
109
|
selenium-webdriver (3.142.7)
|
64
110
|
childprocess (>= 0.5, < 4.0)
|
65
111
|
rubyzip (>= 1.2.2)
|
66
|
-
simplecov (0.
|
112
|
+
simplecov (0.21.2)
|
67
113
|
docile (~> 1.1)
|
68
114
|
simplecov-html (~> 0.11)
|
115
|
+
simplecov_json_formatter (~> 0.1)
|
116
|
+
simplecov-cobertura (1.4.2)
|
117
|
+
simplecov (~> 0.8)
|
69
118
|
simplecov-html (0.12.3)
|
70
|
-
|
119
|
+
simplecov_json_formatter (0.1.2)
|
120
|
+
tzinfo (2.0.4)
|
121
|
+
concurrent-ruby (~> 1.0)
|
122
|
+
unicode-display_width (2.0.0)
|
123
|
+
webdrivers (4.6.0)
|
71
124
|
nokogiri (~> 1.6)
|
72
125
|
rubyzip (>= 1.3.0)
|
73
126
|
selenium-webdriver (>= 3.0, < 4.0)
|
127
|
+
websocket-driver (0.7.3)
|
128
|
+
websocket-extensions (>= 0.1.0)
|
129
|
+
websocket-extensions (0.1.5)
|
74
130
|
xpath (3.2.0)
|
75
131
|
nokogiri (~> 1.8)
|
132
|
+
zeitwerk (2.4.2)
|
76
133
|
|
77
134
|
PLATFORMS
|
78
135
|
ruby
|
@@ -80,7 +137,7 @@ PLATFORMS
|
|
80
137
|
DEPENDENCIES
|
81
138
|
bundler (~> 1.16)
|
82
139
|
pludoni_rspec!
|
83
|
-
rake (~>
|
140
|
+
rake (~> 13.0)
|
84
141
|
|
85
142
|
BUNDLED WITH
|
86
143
|
1.17.3
|
data/README.md
CHANGED
@@ -50,3 +50,23 @@ Optional - Loaded if companion gem is available:
|
|
50
50
|
* extract_link_from(last_mail, link: 0) - gets you the link (without protocol + host) of the first link in the last mail with a html body
|
51
51
|
* ``include_context 'active_job_inline'``
|
52
52
|
* all ActiveJobs will be run immediately in this group
|
53
|
+
|
54
|
+
### Gitlab coverage + test report
|
55
|
+
|
56
|
+
Gitlab supports inlining test-coverage + showing detailed failed/passed test statistics. This gems includes the necessary formatters. Coverage is automatically loaded in CI. For test case integration, add the RspecJunitFormatter to the rspec command in your ``bin/ci``/run command etc.
|
57
|
+
|
58
|
+
e.g. using multiple rspec runs
|
59
|
+
|
60
|
+
```
|
61
|
+
bundle exec rspec --color --tty --failure-exit-code 0 --format RspecJunitFormatter -out rspec1.xml
|
62
|
+
bundle exec rspec --color --tty --only-failures --format RspecJunitFormatter -out rspec2.xml
|
63
|
+
```
|
64
|
+
|
65
|
+
```yaml
|
66
|
+
# .gitlab-ci.yml
|
67
|
+
artifacts:
|
68
|
+
reports:
|
69
|
+
cobertura: coverage/coverage.xml
|
70
|
+
junit: 'rspec*.xml'
|
71
|
+
```
|
72
|
+
-
|
data/lib/pludoni_rspec.rb
CHANGED
@@ -21,7 +21,7 @@ module PludoniRspec
|
|
21
21
|
self.capybara_timeout = ENV['CI'] == '1' ? 30 : 5
|
22
22
|
self.firefox_arguments = ['--headless', '--window-size=1600,1200']
|
23
23
|
self.apparition_arguments = { js_errors: false, screen_size: [1600, 1200], window_size: [1600, 1200], browser_logger: File.open(File::NULL, 'w') }
|
24
|
-
self.capybara_driver = :
|
24
|
+
self.capybara_driver = :apparition
|
25
25
|
end
|
26
26
|
def self.run
|
27
27
|
ENV["RAILS_ENV"] ||= 'test'
|
@@ -33,7 +33,6 @@ module PludoniRspec
|
|
33
33
|
|
34
34
|
require 'pludoni_rspec/spec_helper'
|
35
35
|
if PludoniRspec::Config.capybara_driver == :apparition
|
36
|
-
puts "Apparition is deprecated for us, use Firefox"
|
37
36
|
require 'pludoni_rspec/apparition'
|
38
37
|
else
|
39
38
|
require 'pludoni_rspec/capybara'
|
@@ -62,6 +61,9 @@ module PludoniRspec
|
|
62
61
|
end
|
63
62
|
require 'simplecov'
|
64
63
|
SimpleCov.command_name "spec:#{Time.now.to_i}"
|
64
|
+
if ENV['CI']
|
65
|
+
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
|
66
|
+
end
|
65
67
|
SimpleCov.start 'rails' do
|
66
68
|
add_filter do |source_file|
|
67
69
|
source_file.lines.count < 10
|
data/pludoni_rspec.gemspec
CHANGED
@@ -30,8 +30,14 @@ Gem::Specification.new do |spec|
|
|
30
30
|
# We don't need selenium, but rails system specs checks for availability
|
31
31
|
spec.add_dependency 'selenium-webdriver', ">= 3.141.0"
|
32
32
|
spec.add_dependency "webdrivers", ">= 4.0.0"
|
33
|
-
|
33
|
+
spec.add_dependency 'apparition'
|
34
34
|
spec.add_dependency 'simplecov', ">= 0.16.1"
|
35
|
+
spec.add_dependency "simplecov-cobertura"
|
36
|
+
spec.add_dependency "rspec_junit_formatter"
|
37
|
+
spec.add_dependency 'rubocop'
|
38
|
+
spec.add_dependency 'rubocop-rails'
|
39
|
+
spec.add_dependency 'rubocop-performance'
|
40
|
+
spec.add_dependency 'rubocop-rspec'
|
35
41
|
spec.add_development_dependency "bundler", "~> 1.16"
|
36
|
-
spec.add_development_dependency "rake", "~>
|
42
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
37
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pludoni_rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Wienert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 4.0.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: apparition
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: simplecov
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +136,90 @@ dependencies:
|
|
122
136
|
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: 0.16.1
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov-cobertura
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rspec_junit_formatter
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rubocop
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rubocop-rails
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rubocop-performance
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: rubocop-rspec
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :runtime
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
125
223
|
- !ruby/object:Gem::Dependency
|
126
224
|
name: bundler
|
127
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +240,14 @@ dependencies:
|
|
142
240
|
requirements:
|
143
241
|
- - "~>"
|
144
242
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
243
|
+
version: '13.0'
|
146
244
|
type: :development
|
147
245
|
prerelease: false
|
148
246
|
version_requirements: !ruby/object:Gem::Requirement
|
149
247
|
requirements:
|
150
248
|
- - "~>"
|
151
249
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
250
|
+
version: '13.0'
|
153
251
|
description: pludoni GmbH's RSpec template. Just require in spec_helper
|
154
252
|
email:
|
155
253
|
- info@stefanwienert.de
|