turnip_formatter 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +37 -0
- data/README.md +1 -2
- data/gemfiles/{Gemfile-rspec-3.6.x → Gemfile-rspec-3.11.x} +1 -1
- data/gemfiles/{Gemfile-rspec-3.7.x → Gemfile-rspec-3.12.x} +1 -1
- data/lib/rspec/core/formatters/turnip_formatter.rb +13 -3
- data/lib/turnip_formatter/version.rb +1 -1
- data/test/helper.rb +6 -1
- data/turnip_formatter.gemspec +4 -4
- metadata +18 -19
- data/.travis.yml +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da43704d6a7c59ce21267414fca4792f933de89f09a803ce3be89b79bb579d05
|
4
|
+
data.tar.gz: 999b25ce21d7a9dd4e7626b57395460e3ebc416a5182dde423fecd57f5533971
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac3a6c0cbbde3dfae86dec26a24c5b00e8f46f79ff4307600279b7b17f76eeedf5a05a92497c39f4b05875543c35934fcb0978cfc8afdba497561b6dcedbbd88
|
7
|
+
data.tar.gz: 19446cae80050a51f7ed82be4858951887a0e5ac1a983cfca529b501efa2cfecba481a99d208bca09759daba9edfc0d6fbbfccb3329045d595d9e9f519544e25
|
@@ -0,0 +1,37 @@
|
|
1
|
+
name: Ruby CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
|
15
|
+
strategy:
|
16
|
+
matrix:
|
17
|
+
ruby-version: ['3.2', '3.1', '3.2']
|
18
|
+
rspec-version: ['3.12', '3.11']
|
19
|
+
|
20
|
+
name: Ruby ${{ matrix.ruby-version }}, RSpec ${{ matrix.rspec-version }}
|
21
|
+
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v3
|
24
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
25
|
+
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
|
26
|
+
with:
|
27
|
+
ruby-version: ${{ matrix.ruby-version }}
|
28
|
+
- name: Install dependencies
|
29
|
+
run: bundle install --gemfile=gemfiles/Gemfile-rspec-${{ matrix.rspec-version }}.x
|
30
|
+
- name: Run tests
|
31
|
+
env:
|
32
|
+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
33
|
+
CI_NAME: GitHub Actions
|
34
|
+
CI_BUILD_NUMBER: ${{ github.run_number }}
|
35
|
+
CI_BRANCH: ${{ github.ref }}
|
36
|
+
CI_PULL_REQUEST: ${{ github.event.pull_request.html_url }}
|
37
|
+
run: bundle exec rake test
|
data/README.md
CHANGED
@@ -3,10 +3,9 @@ RSpec::Core::Formatters::TurnipFormatter
|
|
3
3
|
|
4
4
|
TurnipFormatter is a pretty custom formatter for [Turnip](https://github.com/jnicklas/turnip).
|
5
5
|
|
6
|
-
|
6
|
+
![CI status](https://github.com/gongo/turnip_formatter/actions/workflows/main.yml/badge.svg?branch=master)
|
7
7
|
[![Coverage Status](https://coveralls.io/repos/gongo/turnip_formatter/badge.png?branch=master)](https://coveralls.io/r/gongo/turnip_formatter)
|
8
8
|
[![Code Climate](https://codeclimate.com/github/gongo/turnip_formatter.png)](https://codeclimate.com/github/gongo/turnip_formatter)
|
9
|
-
[![Dependency Status](https://gemnasium.com/gongo/turnip_formatter.png)](https://gemnasium.com/gongo/turnip_formatter)
|
10
9
|
|
11
10
|
Requirements
|
12
11
|
--------------------
|
@@ -11,7 +11,7 @@ module RSpec
|
|
11
11
|
module Core
|
12
12
|
module Formatters
|
13
13
|
class TurnipFormatter < BaseFormatter
|
14
|
-
attr_accessor :scenarios
|
14
|
+
attr_accessor :scenarios, :failure_count, :pending_count
|
15
15
|
|
16
16
|
Formatters.register self, :example_passed, :example_pending, :example_failed, :dump_summary
|
17
17
|
|
@@ -24,29 +24,39 @@ module RSpec
|
|
24
24
|
def initialize(output)
|
25
25
|
super(output)
|
26
26
|
@scenarios = []
|
27
|
+
@failure_count = 0
|
28
|
+
@pending_count = 0
|
27
29
|
end
|
28
30
|
|
29
31
|
def dump_summary(summary)
|
30
32
|
print_params = {
|
31
33
|
scenarios: scenarios,
|
32
|
-
failed_count:
|
33
|
-
pending_count:
|
34
|
+
failed_count: failure_count,
|
35
|
+
pending_count: pending_count,
|
34
36
|
total_time: summary.duration
|
35
37
|
}
|
36
38
|
output_html(print_params)
|
37
39
|
end
|
38
40
|
|
39
41
|
def example_passed(notification)
|
42
|
+
return unless notification.example.metadata[:type] == :feature
|
43
|
+
|
40
44
|
scenario = ::TurnipFormatter::Resource::Scenario::Pass.new(notification.example)
|
41
45
|
scenarios << scenario
|
42
46
|
end
|
43
47
|
|
44
48
|
def example_pending(notification)
|
49
|
+
return unless notification.example.metadata[:type] == :feature
|
50
|
+
|
51
|
+
@pending_count +=1
|
45
52
|
scenario = ::TurnipFormatter::Resource::Scenario::Pending.new(notification.example)
|
46
53
|
scenarios << scenario
|
47
54
|
end
|
48
55
|
|
49
56
|
def example_failed(notification)
|
57
|
+
return unless notification.example.metadata[:type] == :feature
|
58
|
+
|
59
|
+
@failure_count +=1
|
50
60
|
scenario = ::TurnipFormatter::Resource::Scenario::Failure.new(notification.example)
|
51
61
|
scenarios << scenario
|
52
62
|
end
|
data/test/helper.rb
CHANGED
@@ -5,6 +5,11 @@ require 'turnip_formatter/ext/turnip/rspec'
|
|
5
5
|
require 'turnip_formatter/resource/scenario/failure'
|
6
6
|
require 'turnip_formatter/resource/scenario/pending'
|
7
7
|
|
8
|
+
if ENV['COVERALLS_REPO_TOKEN']
|
9
|
+
require 'coveralls'
|
10
|
+
Coveralls.wear!('test_frameworks')
|
11
|
+
end
|
12
|
+
|
8
13
|
def html_parse(str)
|
9
14
|
Oga.parse_xml(str)
|
10
15
|
end
|
@@ -113,7 +118,7 @@ module TurnipFormatter
|
|
113
118
|
expect(true).to be false # RSpec Matcher Error
|
114
119
|
end
|
115
120
|
|
116
|
-
Turnip::RSpec.__send__(:
|
121
|
+
Turnip::RSpec.__send__(:run_scenario_group, rspec_context, feature, filename)
|
117
122
|
rspec_context.run(NoopObject.new)
|
118
123
|
Turnip::RSpec.update_metadata(feature, rspec_context)
|
119
124
|
|
data/turnip_formatter.gemspec
CHANGED
@@ -18,17 +18,17 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^test/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'turnip', '~>
|
21
|
+
spec.add_dependency 'turnip', '~> 4.1'
|
22
22
|
spec.add_dependency 'rspec', [">=3.3", "<4.0"]
|
23
23
|
|
24
24
|
# For ruby >= 2.1
|
25
|
-
spec.add_dependency 'activesupport', '>= 4.2.7', '<
|
25
|
+
spec.add_dependency 'activesupport', '>= 4.2.7', '< 8.0'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'test-unit'
|
28
28
|
spec.add_development_dependency 'test-unit-rr'
|
29
|
-
spec.add_development_dependency 'bundler'
|
29
|
+
spec.add_development_dependency 'bundler'
|
30
30
|
spec.add_development_dependency 'rake'
|
31
|
-
spec.add_development_dependency '
|
31
|
+
spec.add_development_dependency 'coveralls_reborn'
|
32
32
|
spec.add_development_dependency 'sass'
|
33
33
|
spec.add_development_dependency 'bootstrap-sass'
|
34
34
|
spec.add_development_dependency 'oga'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turnip_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wataru MIYAGUNI
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: turnip
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '4.1'
|
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
|
-
version:
|
26
|
+
version: '4.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
version: 4.2.7
|
54
54
|
- - "<"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
56
|
+
version: '8.0'
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -63,7 +63,7 @@ dependencies:
|
|
63
63
|
version: 4.2.7
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
66
|
+
version: '8.0'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: test-unit
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,16 +96,16 @@ dependencies:
|
|
96
96
|
name: bundler
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- - "
|
99
|
+
- - ">="
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: '
|
101
|
+
version: '0'
|
102
102
|
type: :development
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- - "
|
106
|
+
- - ">="
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
108
|
+
version: '0'
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
110
|
name: rake
|
111
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,7 +121,7 @@ dependencies:
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
|
-
name:
|
124
|
+
name: coveralls_reborn
|
125
125
|
requirement: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
127
|
- - ">="
|
@@ -183,8 +183,8 @@ executables: []
|
|
183
183
|
extensions: []
|
184
184
|
extra_rdoc_files: []
|
185
185
|
files:
|
186
|
+
- ".github/workflows/main.yml"
|
186
187
|
- ".gitignore"
|
187
|
-
- ".travis.yml"
|
188
188
|
- Gemfile
|
189
189
|
- LICENSE.txt
|
190
190
|
- README.md
|
@@ -211,8 +211,8 @@ files:
|
|
211
211
|
- example/spec/steps/escape_steps.rb
|
212
212
|
- example/spec/steps/spell_steps.rb
|
213
213
|
- example/spec/steps/steps.rb
|
214
|
-
- gemfiles/Gemfile-rspec-3.
|
215
|
-
- gemfiles/Gemfile-rspec-3.
|
214
|
+
- gemfiles/Gemfile-rspec-3.11.x
|
215
|
+
- gemfiles/Gemfile-rspec-3.12.x
|
216
216
|
- lib/rspec/core/formatters/turnip_formatter.rb
|
217
217
|
- lib/turnip_formatter.rb
|
218
218
|
- lib/turnip_formatter/ext/turnip/rspec.rb
|
@@ -273,7 +273,7 @@ homepage: https://github.com/gongo/turnip_formatter
|
|
273
273
|
licenses:
|
274
274
|
- MIT
|
275
275
|
metadata: {}
|
276
|
-
post_install_message:
|
276
|
+
post_install_message:
|
277
277
|
rdoc_options: []
|
278
278
|
require_paths:
|
279
279
|
- lib
|
@@ -288,9 +288,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
288
|
- !ruby/object:Gem::Version
|
289
289
|
version: '0'
|
290
290
|
requirements: []
|
291
|
-
|
292
|
-
|
293
|
-
signing_key:
|
291
|
+
rubygems_version: 3.2.33
|
292
|
+
signing_key:
|
294
293
|
specification_version: 4
|
295
294
|
summary: RSpec custom formatter for Turnip
|
296
295
|
test_files:
|
data/.travis.yml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
sudo: false
|
4
|
-
cache: bundler
|
5
|
-
|
6
|
-
branches:
|
7
|
-
only:
|
8
|
-
- master
|
9
|
-
|
10
|
-
rvm:
|
11
|
-
- 2.2
|
12
|
-
- 2.3.6
|
13
|
-
- 2.4.3
|
14
|
-
- 2.5.0
|
15
|
-
- jruby-9.0.5.0
|
16
|
-
|
17
|
-
script:
|
18
|
-
- bundle exec rake test
|
19
|
-
|
20
|
-
gemfile:
|
21
|
-
- gemfiles/Gemfile-rspec-3.6.x
|
22
|
-
- gemfiles/Gemfile-rspec-3.7.x
|