rspec_flat_error_formatter 0.0.1
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 +7 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.rubocop.yml +38 -0
- data/.ruby-version +1 -0
- data/.travis.yml +14 -0
- data/Gemfile +11 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +8 -0
- data/example/.rspec +1 -0
- data/example/spec/example_spec.rb +101 -0
- data/example/spec/shared_contexts.rb +24 -0
- data/example/spec/shared_examples.rb +77 -0
- data/lib/rspec_flat_error_formatter.rb +194 -0
- data/rspec_flat_error_formatter.gemspec +33 -0
- metadata +144 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9f0fc33d0300de471fa1e50707a35558c07eb5ac
|
4
|
+
data.tar.gz: 42da12de674cfaed426fcdd7d36d7fb81ef23797
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 923d27d17e532c0c90355f3cc16998572c9ea8d924b03bccc7859e2fc5d3d13e1df60392b19cebd69f73ce68d98503148e2ce27b5cc3323c362b252d1eb08cb7
|
7
|
+
data.tar.gz: 02ffe48b051a991549393e17c03effc5e442455171cfc5505973d961abe14f4d91789db2bf2852009165bf85c36b4268614f19ba9041f4c9637394c56eb0b9cd
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
require: rubocop-rspec
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
TargetRubyVersion: 2.4
|
5
|
+
DisplayCopNames: true
|
6
|
+
|
7
|
+
Metrics/BlockLength:
|
8
|
+
Max: 10
|
9
|
+
Exclude:
|
10
|
+
- 'spec/**/*.rb'
|
11
|
+
- 'example/**/*.rb'
|
12
|
+
- rspec_flat_error_formatter.gemspec
|
13
|
+
|
14
|
+
Metrics/LineLength:
|
15
|
+
Max: 128
|
16
|
+
|
17
|
+
Metrics/MethodLength:
|
18
|
+
Enabled: 20
|
19
|
+
|
20
|
+
Metrics/ClassLength:
|
21
|
+
Max: 150
|
22
|
+
|
23
|
+
Metrics/ModuleLength:
|
24
|
+
Max: 150
|
25
|
+
|
26
|
+
Style/Documentation:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
RSpec/DescribeClass:
|
30
|
+
Exclude:
|
31
|
+
- 'example/**/*.rb'
|
32
|
+
|
33
|
+
RSpec/ExpectActual:
|
34
|
+
Exclude:
|
35
|
+
- 'example/**/*.rb'
|
36
|
+
|
37
|
+
RSpec/NestedGroups:
|
38
|
+
Max: 4
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.4.2
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
git_source(:github) do |repo_name|
|
6
|
+
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
|
7
|
+
"https://github.com/#{repo_name}.git"
|
8
|
+
end
|
9
|
+
|
10
|
+
# Specify your gem's dependencies in rspec_flat_error_formatter.gemspec
|
11
|
+
gemspec
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Victor Zagorodny
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# RspecFlatErrorFormatter
|
2
|
+
|
3
|
+
[](https://travis-ci.org/vittorius/rspec_flat_error_formatter)
|
4
|
+
|
5
|
+
RSpec formater that produces errors output easily consumable by automated tools
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'rspec_flat_error_formatter'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install rspec_flat_error_formatter
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bundle exec rake spec` to run the tests.
|
30
|
+
|
31
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/vittorius/rspec_flat_error_formatter.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Kudos
|
42
|
+
|
43
|
+
* [@sj26](https://github.com/sj26) for his beautiful [rspec_junit_formatter](https://github.com/sj26/rspec_junit_formatter) - tests organization and some other stuff in repo are under the huge influence of RSpec JUnit Formatter repo
|
data/Rakefile
ADDED
data/example/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--format RspecFlatErrorFormatter
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'shared_contexts'
|
4
|
+
|
5
|
+
describe 'specs with errors' do
|
6
|
+
it 'succeeds' do
|
7
|
+
expect(true).to be(true)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'is skipped' do
|
11
|
+
skip 'Just skipped'
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'is pending', pending: 'Just pending' do
|
15
|
+
expect(true).to be false
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'fails' do
|
19
|
+
expect(false).to be(true)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'fails with diff' do
|
23
|
+
expect(a: 1, b: 2, c: 3).to include(d: 1, e: have_attributes(f: 2))
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'raises an error' do
|
27
|
+
raise ArgumentError, 'Something went wrong with your arguments'
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'raises an error (with cause)' do
|
31
|
+
begin
|
32
|
+
raise 'This is the cause'
|
33
|
+
rescue RuntimeError
|
34
|
+
raise ArgumentError
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'raises an error (with cause, but no message)' do
|
39
|
+
begin
|
40
|
+
raise
|
41
|
+
rescue RuntimeError
|
42
|
+
raise ArgumentError
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# this test also covers RSpec::Expectations::MultipleExpectationsNotMetError but we don't test for it here explicitly
|
47
|
+
# because we don't want this gem to depend on rspec-expectations; there's no real need for it
|
48
|
+
describe 'spec with multiple errors' do
|
49
|
+
around do |example|
|
50
|
+
example.run
|
51
|
+
begin
|
52
|
+
raise 'This is the cause'
|
53
|
+
rescue # rubocop:disable Style/RescueStandardError
|
54
|
+
raise 'Error in "around" block (re-raised)'
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'fails' do
|
59
|
+
expect(true).to be false
|
60
|
+
end
|
61
|
+
|
62
|
+
after do
|
63
|
+
raise 'Error in "after" block'
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'fails because of fixed pending', pending: 'Pending but actually fixed' do
|
68
|
+
expect(true).to be true
|
69
|
+
end
|
70
|
+
|
71
|
+
context 'with error(s) in shared context' do
|
72
|
+
context 'with error in "before" block' do
|
73
|
+
include_context 'when in "before" block'
|
74
|
+
|
75
|
+
it 'succeeds' do
|
76
|
+
expect(true).to be(true)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
context 'with error in "let" block' do
|
81
|
+
include_context 'when in "let" definition'
|
82
|
+
|
83
|
+
before { error }
|
84
|
+
|
85
|
+
it 'succeeds' do
|
86
|
+
expect(true).to be(true)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
context 'with multiple errors in an example' do
|
91
|
+
include_context 'when in "after" block'
|
92
|
+
include_context 'when in "around" block: after the example'
|
93
|
+
|
94
|
+
it 'fails' do
|
95
|
+
expect(true).to be(false)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# TODO: use shared examples
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
shared_context 'when in "before" block' do
|
4
|
+
before do
|
5
|
+
raise 'Error in "before" block'
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
shared_context 'when in "let" definition' do
|
10
|
+
let(:error) { raise 'Error in "let" definition' }
|
11
|
+
end
|
12
|
+
|
13
|
+
shared_context 'when in "after" block' do
|
14
|
+
after do
|
15
|
+
raise 'Error in "after" block'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
shared_context 'when in "around" block: after the example' do
|
20
|
+
around do |example|
|
21
|
+
example.run
|
22
|
+
raise 'Error in "around" block'
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
shared_examples 'shared examples' do
|
4
|
+
describe 'specs with example errors' do
|
5
|
+
it 'succeeds in a shared example' do
|
6
|
+
expect(true).to be(true)
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'fails in a shared example' do
|
10
|
+
expect(false).to be(true)
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'raises in a shared example' do
|
14
|
+
raise ArgumentError
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'is pending in a shared example' do
|
18
|
+
if defined? skip
|
19
|
+
skip 'Skipped in shared example'
|
20
|
+
else
|
21
|
+
pending 'Pending in shared example'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe 'specs with non-example errors' do
|
27
|
+
describe 'in "before" block' do
|
28
|
+
before do
|
29
|
+
raise 'Error in "before" block'
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'fails due to error' do
|
33
|
+
expect(true).to be(true)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe 'in "let" definition' do
|
38
|
+
let(:error) { raise 'Error in "let" definition' }
|
39
|
+
|
40
|
+
it 'fails due to error' do
|
41
|
+
expect(true).to be(true)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'in "after" block' do
|
46
|
+
after do
|
47
|
+
raise 'Error in "after" block'
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'fails due to error' do
|
51
|
+
expect(true).to be(true)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe 'in "around" block: before the example' do
|
56
|
+
around do |example|
|
57
|
+
raise 'Error in "around" block'
|
58
|
+
example.run # rubocop:disable Lint/UnreachableCode
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'fails due to error' do
|
62
|
+
expect(true).to be(true)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe 'in "around" block: after the example' do
|
67
|
+
around do |example|
|
68
|
+
example.run
|
69
|
+
raise 'Error in "around" block'
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'fails due to error' do
|
73
|
+
expect(true).to be(true)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,194 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rspec/support'
|
4
|
+
require 'rspec/core'
|
5
|
+
require 'rspec/core/formatters/console_codes'
|
6
|
+
require 'rspec/core/formatters/base_text_formatter'
|
7
|
+
|
8
|
+
class RspecFlatErrorFormatter < RSpec::Core::Formatters::BaseTextFormatter
|
9
|
+
VERSION = '0.0.1'
|
10
|
+
TOKEN_SEPARATOR = ': '
|
11
|
+
|
12
|
+
RSpec::Core::Formatters.register self, :example_passed, :example_pending, :example_failed, :start_dump
|
13
|
+
|
14
|
+
def start(notification)
|
15
|
+
output.puts pluralize(notification.count, 'example')
|
16
|
+
output.puts
|
17
|
+
end
|
18
|
+
|
19
|
+
def example_passed(_notification)
|
20
|
+
output.print colorizer.wrap('.', :success)
|
21
|
+
end
|
22
|
+
|
23
|
+
def example_pending(_notification)
|
24
|
+
output.print colorizer.wrap('*', :pending)
|
25
|
+
end
|
26
|
+
|
27
|
+
def example_failed(_notification)
|
28
|
+
output.print colorizer.wrap('F', :failure)
|
29
|
+
end
|
30
|
+
|
31
|
+
def start_dump(_notification)
|
32
|
+
output.puts
|
33
|
+
end
|
34
|
+
|
35
|
+
def dump_pending(notification)
|
36
|
+
return if notification.pending_notifications.empty?
|
37
|
+
|
38
|
+
formatted = +"\nPending: (Failures listed here are expected and do not affect your suite's status)\n\n"
|
39
|
+
|
40
|
+
notification.pending_notifications.each do |pending|
|
41
|
+
formatted << "#{pending_example_message(pending.example)}\n"
|
42
|
+
end
|
43
|
+
|
44
|
+
output.puts formatted
|
45
|
+
end
|
46
|
+
|
47
|
+
def dump_failures(notification)
|
48
|
+
return if notification.failure_notifications.empty?
|
49
|
+
|
50
|
+
formatted = +"\nFailures:\n\n"
|
51
|
+
|
52
|
+
notification.failure_notifications.each do |failure|
|
53
|
+
formatted << "#{failure_message(failure)}\n"
|
54
|
+
end
|
55
|
+
|
56
|
+
output.puts formatted
|
57
|
+
end
|
58
|
+
|
59
|
+
def dump_summary(_notification)
|
60
|
+
# TODO: Finished in 0.34138 seconds (files took 0.26296 seconds to load) (copy from BaseFormatter)
|
61
|
+
# TODO: 1 example, 0 failures (copy from BaseFormatter)
|
62
|
+
end
|
63
|
+
|
64
|
+
protected
|
65
|
+
|
66
|
+
def pending_example_kind(example)
|
67
|
+
example.skipped? ? 'Skipped' : 'Pending'
|
68
|
+
end
|
69
|
+
|
70
|
+
def pending_example_message(example)
|
71
|
+
formatted_message(
|
72
|
+
bt_line: colorizer.wrap(strip_bt_block(backtrace_formatter.backtrace_line(example.location)), :detail),
|
73
|
+
severity: colorizer.wrap('info', :pending),
|
74
|
+
message: colorizer.wrap("#{pending_example_kind(example)} (#{example.execution_result.pending_message})", :detail)
|
75
|
+
)
|
76
|
+
end
|
77
|
+
|
78
|
+
def pending_fixed_failure?(failure)
|
79
|
+
failure.example.execution_result.pending_fixed?
|
80
|
+
end
|
81
|
+
|
82
|
+
def multiple_exception_error?(failure)
|
83
|
+
failure.example.exception.is_a?(RSpec::Core::MultipleExceptionError::InterfaceTag)
|
84
|
+
end
|
85
|
+
|
86
|
+
def failure_message(failure)
|
87
|
+
if pending_fixed_failure?(failure)
|
88
|
+
pending_fixed_message(failure)
|
89
|
+
elsif multiple_exception_error?(failure)
|
90
|
+
multiple_exceptions_message(failure)
|
91
|
+
else
|
92
|
+
error_message(failure)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
def pending_fixed_message(failure)
|
97
|
+
formatted_message(
|
98
|
+
bt_line: colorizer.wrap(format_backtrace_first_line(failure.exception, failure.example), :detail),
|
99
|
+
message: colorizer.wrap(
|
100
|
+
"Expected pending '#{failure.example.execution_result.pending_message}' to fail. No error was raised.",
|
101
|
+
:failure
|
102
|
+
),
|
103
|
+
severity: colorizer.wrap('error', :failure)
|
104
|
+
)
|
105
|
+
end
|
106
|
+
|
107
|
+
# TODO: skip shared example stack frame printing for sub-errors
|
108
|
+
def multiple_exceptions_message(failure)
|
109
|
+
failure.exception.all_exceptions.map { |ex| error_message_for_example(ex, failure.example) }.join("\n")
|
110
|
+
end
|
111
|
+
|
112
|
+
def error_message(failure)
|
113
|
+
error_message_for_example(failure.exception, failure.example)
|
114
|
+
end
|
115
|
+
|
116
|
+
def error_message_for_example(exception, example)
|
117
|
+
formatted_message(
|
118
|
+
bt_line: colorizer.wrap(format_backtrace_first_line(exception, example), :detail),
|
119
|
+
message: colorizer.wrap(error_failure_message_fragment(exception, example), :failure),
|
120
|
+
severity: colorizer.wrap('error', :failure)
|
121
|
+
)
|
122
|
+
end
|
123
|
+
|
124
|
+
def error_failure_message_fragment(exception, example)
|
125
|
+
exception_class = exception_class_name(exception)
|
126
|
+
message, diff = *exception.message.split('Diff:')
|
127
|
+
[
|
128
|
+
exception_class.start_with?('RSpec', 'Rspec') ? '' : "#{exception_class}: ", # only non-RSpec exception classes
|
129
|
+
message.tr("\n", ' ').squeeze(' ').strip, # making it a one-liner
|
130
|
+
formatted_cause(exception, example),
|
131
|
+
diff.nil? ? '' : "\nDiff:" + diff
|
132
|
+
].join
|
133
|
+
end
|
134
|
+
|
135
|
+
def formatted_message(bt_line:, severity:, message:)
|
136
|
+
[bt_line, severity, message].join(TOKEN_SEPARATOR)
|
137
|
+
end
|
138
|
+
|
139
|
+
def exception_class_name(exception)
|
140
|
+
name = exception.class.name
|
141
|
+
name = '(anonymous error class)' if name == ''
|
142
|
+
name
|
143
|
+
end
|
144
|
+
|
145
|
+
# violently copy-pasted from RSpec::Core::Formatters::ExceptionPresenter#final_exception
|
146
|
+
def last_cause(exception, previous = [])
|
147
|
+
cause = exception.cause
|
148
|
+
if cause && !previous.include?(cause)
|
149
|
+
previous << cause
|
150
|
+
last_cause(cause, previous)
|
151
|
+
else
|
152
|
+
exception
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
def formatted_cause(exception, example)
|
157
|
+
cause = last_cause(exception)
|
158
|
+
if cause == exception
|
159
|
+
''
|
160
|
+
else
|
161
|
+
", caused by '#{exception_class_name(cause)}: #{formatted_cause_message(cause)}' "\
|
162
|
+
"at #{format_backtrace_first_line(cause, example)}"
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
def formatted_cause_message(cause)
|
167
|
+
if cause.message.empty?
|
168
|
+
class_name = exception_class_name(cause)
|
169
|
+
class_name.match?(/anonymous/) ? '<no message>' : class_name
|
170
|
+
else
|
171
|
+
cause.message
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
def format_backtrace_first_line(exception, example)
|
176
|
+
strip_bt_block(backtrace_formatter.format_backtrace(exception.backtrace, example.metadata).first)
|
177
|
+
end
|
178
|
+
|
179
|
+
def strip_bt_block(bt_line)
|
180
|
+
bt_line.split(':in').first
|
181
|
+
end
|
182
|
+
|
183
|
+
def pluralize(count, string)
|
184
|
+
"#{count} #{string}#{'s' unless count.to_f == 1}"
|
185
|
+
end
|
186
|
+
|
187
|
+
def colorizer
|
188
|
+
RSpec::Core::Formatters::ConsoleCodes
|
189
|
+
end
|
190
|
+
|
191
|
+
def backtrace_formatter
|
192
|
+
RSpec.configuration.backtrace_formatter
|
193
|
+
end
|
194
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'rspec_flat_error_formatter'
|
8
|
+
spec.version = '0.0.1'
|
9
|
+
spec.authors = ['Victor Zagorodny']
|
10
|
+
spec.email = ['post.vittorius@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = 'RSpec formater that produces output easily consumable by automated tools'
|
13
|
+
spec.homepage = 'https://github.com/vittorius/rspec_flat_error_formatter'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
|
+
f.match(%r{^(test|spec|features)/})
|
20
|
+
end
|
21
|
+
spec.test_files = spec.files.grep(%r{^(spec)/})
|
22
|
+
spec.require_paths = ['lib']
|
23
|
+
|
24
|
+
spec.required_ruby_version = '>= 2.4.2' # TODO: work on backwards compatibility for all RSpec 3.x Ruby versions
|
25
|
+
|
26
|
+
spec.add_dependency 'rspec-core', '~> 3.0'
|
27
|
+
|
28
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
29
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
30
|
+
spec.add_development_dependency 'rspec', '~> 3.7'
|
31
|
+
spec.add_development_dependency 'rubocop', '~> 0'
|
32
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 0'
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rspec_flat_error_formatter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Victor Zagorodny
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-05-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.16'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.16'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.7'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.7'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description:
|
98
|
+
email:
|
99
|
+
- post.vittorius@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- ".rubocop.yml"
|
107
|
+
- ".ruby-version"
|
108
|
+
- ".travis.yml"
|
109
|
+
- Gemfile
|
110
|
+
- LICENSE.txt
|
111
|
+
- README.md
|
112
|
+
- Rakefile
|
113
|
+
- example/.rspec
|
114
|
+
- example/spec/example_spec.rb
|
115
|
+
- example/spec/shared_contexts.rb
|
116
|
+
- example/spec/shared_examples.rb
|
117
|
+
- lib/rspec_flat_error_formatter.rb
|
118
|
+
- rspec_flat_error_formatter.gemspec
|
119
|
+
homepage: https://github.com/vittorius/rspec_flat_error_formatter
|
120
|
+
licenses:
|
121
|
+
- MIT
|
122
|
+
metadata:
|
123
|
+
allowed_push_host: https://rubygems.org
|
124
|
+
post_install_message:
|
125
|
+
rdoc_options: []
|
126
|
+
require_paths:
|
127
|
+
- lib
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: 2.4.2
|
133
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
requirements: []
|
139
|
+
rubyforge_project:
|
140
|
+
rubygems_version: 2.6.13
|
141
|
+
signing_key:
|
142
|
+
specification_version: 4
|
143
|
+
summary: RSpec formater that produces output easily consumable by automated tools
|
144
|
+
test_files: []
|