rspec_flat_error_formatter 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.env.test +1 -0
- data/.gitignore +0 -5
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/.travis.yml +9 -0
- data/CHANGELOG.md +27 -0
- data/README.md +12 -0
- data/lib/rspec_flat_error_formatter.rb +6 -6
- data/lib/rspec_flat_error_formatter/version.rb +1 -1
- data/rspec_flat_error_formatter.gemspec +2 -1
- metadata +20 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e573b28e00ea838591fa72851ab94602b85beba2
|
4
|
+
data.tar.gz: 37c8e07ba10a0d45370b52ee0aa969943ff61bb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee2f7fa5b3240268fa9778f469e76831c595c5641883b991ea6a008ba39d494fd4e903e9734400a3c3e139c2b7c05d1596309e8c145ff156447656821fb6125c
|
7
|
+
data.tar.gz: 39d5b62ebd8bb407d42b9c5286032ce9bac5f0fdaa1622e00421559d26124759baef57a048ca01f480b95481527bd4b2cc2563d2238065815e4fec5759cd02ec
|
data/.env.test
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# RFEF_TESTS_DEBUG=1 # enable this if you need printing the test suite debug output
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.1.10
|
data/.travis.yml
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.1
|
4
|
+
- 2.2
|
5
|
+
- 2.3
|
6
|
+
- 2.4
|
7
|
+
- 2.5
|
8
|
+
- ruby-head
|
2
9
|
cache: bundler
|
10
|
+
|
3
11
|
before_install: gem install bundler -v 1.16.1
|
4
12
|
|
13
|
+
# we're running the rubocop in "before_script" hook to fail the build immediately and not waste time on running the "script"
|
5
14
|
before_script:
|
6
15
|
- bundle exec rubocop --config .rubocop.yml
|
7
16
|
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
### [0.0.6](https://github.com/vittorius/rspec_flat_error_formatter/releases/tag/v0.0.6)
|
4
|
+
|
5
|
+
* Expanded the range of supported Ruby versions to be from 2.1 to 2.5 (only MRI support for now)
|
6
|
+
* Added docs on supported Ruby versions
|
7
|
+
* Added a simple ENV-flip-based test suite debugging
|
8
|
+
|
9
|
+
### [0.0.5](https://github.com/vittorius/rspec_flat_error_formatter/releases/tag/v0.0.5)
|
10
|
+
|
11
|
+
* Improved usage documentation regarding the VS Code tasks configuration
|
12
|
+
|
13
|
+
### [0.0.4](https://github.com/vittorius/rspec_flat_error_formatter/releases/tag/v0.0.4)
|
14
|
+
|
15
|
+
* Added usage documentation
|
16
|
+
|
17
|
+
### 0.0.3
|
18
|
+
|
19
|
+
* First version available at Rubygems and actually usable
|
20
|
+
|
21
|
+
### 0.0.2
|
22
|
+
|
23
|
+
* Yanked from Rubygems because of wrong specification of dependencies in gemspec
|
24
|
+
|
25
|
+
### 0.0.1
|
26
|
+
|
27
|
+
* First version
|
data/README.md
CHANGED
@@ -8,6 +8,18 @@ RSpec formater that produces errors output easily consumable by automated tools
|
|
8
8
|
|
9
9
|
Initially, this tool came out as an attempt to use the [Visual Studio Code tasks](https://code.visualstudio.com/docs/editor/tasks) for running the RSpec and scanning its output to locate and test the failing specs very quickly. VS Code offers the mechanism of [problem matchers](https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher) that are, in fact, regular expressions to filter the output of a task line by line and feed the extracted info to the Problems view.
|
10
10
|
|
11
|
+
## Requirements
|
12
|
+
|
13
|
+
The following **MRI** Ruby versions are officially supported:
|
14
|
+
|
15
|
+
* 2.1
|
16
|
+
* 2.2
|
17
|
+
* 2.3
|
18
|
+
* 2.4
|
19
|
+
* 2.5
|
20
|
+
|
21
|
+
Although it's not recommended to use 2.1 or 2.2 as their support period has ended. The are no plans to support JRuby or Rubinius for now. But if the community has a strong request for it, it will likely be added.
|
22
|
+
|
11
23
|
## Installation
|
12
24
|
|
13
25
|
Add this line to your application's Gemfile:
|
@@ -6,7 +6,7 @@ require 'rspec/core/formatters/console_codes'
|
|
6
6
|
require 'rspec/core/formatters/base_text_formatter'
|
7
7
|
|
8
8
|
class RspecFlatErrorFormatter < RSpec::Core::Formatters::BaseTextFormatter
|
9
|
-
TOKEN_SEPARATOR = ': '
|
9
|
+
TOKEN_SEPARATOR = ': '.freeze
|
10
10
|
|
11
11
|
RSpec::Core::Formatters.register self, :example_passed, :example_pending, :example_failed, :start_dump
|
12
12
|
|
@@ -34,10 +34,10 @@ class RspecFlatErrorFormatter < RSpec::Core::Formatters::BaseTextFormatter
|
|
34
34
|
def dump_pending(notification)
|
35
35
|
return if notification.pending_notifications.empty?
|
36
36
|
|
37
|
-
formatted =
|
37
|
+
formatted = "\nPending: (Failures listed here are expected and do not affect your suite's status)\n\n"
|
38
38
|
|
39
39
|
notification.pending_notifications.each do |pending|
|
40
|
-
formatted
|
40
|
+
formatted += "#{pending_example_message(pending.example)}\n"
|
41
41
|
end
|
42
42
|
|
43
43
|
output.puts formatted
|
@@ -46,10 +46,10 @@ class RspecFlatErrorFormatter < RSpec::Core::Formatters::BaseTextFormatter
|
|
46
46
|
def dump_failures(notification)
|
47
47
|
return if notification.failure_notifications.empty?
|
48
48
|
|
49
|
-
formatted =
|
49
|
+
formatted = "\nFailures:\n\n"
|
50
50
|
|
51
51
|
notification.failure_notifications.each do |failure|
|
52
|
-
formatted
|
52
|
+
formatted += "#{failure_message(failure)}\n"
|
53
53
|
end
|
54
54
|
|
55
55
|
output.puts formatted
|
@@ -165,7 +165,7 @@ class RspecFlatErrorFormatter < RSpec::Core::Formatters::BaseTextFormatter
|
|
165
165
|
def formatted_cause_message(cause)
|
166
166
|
if cause.message.empty?
|
167
167
|
class_name = exception_class_name(cause)
|
168
|
-
class_name
|
168
|
+
class_name =~ /anonymous/ ? '<no message>' : class_name
|
169
169
|
else
|
170
170
|
cause.message
|
171
171
|
end
|
@@ -23,11 +23,12 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.test_files = spec.files.grep(%r{^(spec)/})
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.required_ruby_version = '>= 2.
|
26
|
+
spec.required_ruby_version = '>= 2.1'
|
27
27
|
|
28
28
|
spec.add_dependency 'rspec-core', '~> 3.0'
|
29
29
|
|
30
30
|
spec.add_development_dependency 'bundler', '~> 1.16'
|
31
|
+
spec.add_development_dependency 'dotenv'
|
31
32
|
spec.add_development_dependency 'rake', '~> 10.0'
|
32
33
|
spec.add_development_dependency 'rspec', '~> 3.7'
|
33
34
|
spec.add_development_dependency 'rubocop', '~> 0.52'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_flat_error_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Zagorodny
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-core
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.16'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: dotenv
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,11 +115,13 @@ executables: []
|
|
101
115
|
extensions: []
|
102
116
|
extra_rdoc_files: []
|
103
117
|
files:
|
118
|
+
- ".env.test"
|
104
119
|
- ".gitignore"
|
105
120
|
- ".rspec"
|
106
121
|
- ".rubocop.yml"
|
107
122
|
- ".ruby-version"
|
108
123
|
- ".travis.yml"
|
124
|
+
- CHANGELOG.md
|
109
125
|
- Gemfile
|
110
126
|
- LICENSE.txt
|
111
127
|
- README.md
|
@@ -130,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
146
|
requirements:
|
131
147
|
- - ">="
|
132
148
|
- !ruby/object:Gem::Version
|
133
|
-
version: 2.
|
149
|
+
version: '2.1'
|
134
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
151
|
requirements:
|
136
152
|
- - ">="
|
@@ -138,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
154
|
version: '0'
|
139
155
|
requirements: []
|
140
156
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.
|
157
|
+
rubygems_version: 2.2.5
|
142
158
|
signing_key:
|
143
159
|
specification_version: 4
|
144
160
|
summary: RSpec formater that produces output easily consumable by automated tools
|