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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c7bf89524e38698559962748d31fab5c45fb41c1c17d559db74874710c2aaa7
4
- data.tar.gz: 1cee6e43c07ec2f51407b3948f18720134a3f7fc7b261f6e83efc54d67a0d1ca
3
+ metadata.gz: 5ce3524dca25e4a41f37fe2135924b1cdbd1e1ff0fa7e83cd5501c9cf6d55123
4
+ data.tar.gz: 9b6f43e2fbe7149ee26567f1e3d9d0156ca71325ba9dc7f361ee901eade94066
5
5
  SHA512:
6
- metadata.gz: bd3c264e8e6a811a01b75c7cfe5319753df420506b19dc562c0b2de1b51c5d7bad812b1a9eefee43e72fce8010534cc476da1d35f56d5998fef8afa28fe76270
7
- data.tar.gz: ff5b0724cbb3ddd44823ff6edc7975c1806357aaa5aa689a06b1698a74a153d634b5ca42445a0b6faac62781ddc1db6de38f29347123be1c51fa6aa148d92aec
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.8.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
- capybara (3.33.0)
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 (~> 1.5)
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
- docile (1.3.2)
30
- fuubar (2.5.0)
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.2)
36
- mini_portile2 (2.4.0)
37
- nio4r (2.5.4)
38
- nokogiri (1.10.10)
39
- mini_portile2 (~> 2.4.0)
40
- pry (0.13.1)
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.0.2)
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
- rake (10.5.0)
57
- regexp_parser (1.8.2)
58
- rspec-core (3.9.3)
59
- rspec-support (~> 3.9.3)
60
- rspec-support (3.9.3)
61
- ruby-progressbar (1.10.1)
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.19.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
- webdrivers (4.4.1)
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 (~> 10.0)
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 = :firefox
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
@@ -1,3 +1,3 @@
1
1
  module PludoniRspec
2
- VERSION = "0.8.1".freeze
2
+ VERSION = "0.9.0".freeze
3
3
  end
@@ -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
- # spec.add_dependency 'apparition'
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", "~> 10.0"
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.8.1
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: 2020-10-17 00:00:00.000000000 Z
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: '10.0'
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: '10.0'
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