rspec_flat_error_formatter 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: b06b1ffe4f85b563d85345815e1c0227b783de92
4
- data.tar.gz: 59f99c33e4f013ee3a76fd4f93071866d8a34760
3
+ metadata.gz: 83bbaea242ea06cfba8a176a54d89f4d60cf7ee6
4
+ data.tar.gz: b6412c3ed7e93f51a915634ca19c3031291eab3d
5
5
  SHA512:
6
- metadata.gz: 3b2829c56586463bffbffe3531a77c19c3deef5c401aa586071a28faf178c000cee22cd1677b4b3c9082aa9057ea7b94a37e847ab9cb2ccc4b3663027d0ccbe5
7
- data.tar.gz: 3efee6a8e6ff757feccf559aab362bad2862817ae971bd4e46513f7db24b302f9edbf2eaaa59478ac844414d7e0a50e4489ef9fb844e9710ff7790ea4e3eedff
6
+ metadata.gz: '08054e55593e5f2cbeae838327adf6559c2789b82707a7be56aa69c1380a0797ee10a957cb73e958b28fc66886196dec0596306edf5cf9bb04823f6ff8e631b4'
7
+ data.tar.gz: 5ca716ef66f4913402064e7f33f2a459529cde2269c6c405f495a4761ab18505dce0a263bdf42d120c01c4204bd84e35b4592b05b04f7c9da40a5905640c630c
data/README.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  RSpec formater that produces errors output easily consumable by automated tools
6
6
 
7
+ ## Rationale
8
+
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
+
7
11
  ## Installation
8
12
 
9
13
  Add this line to your application's Gemfile:
@@ -22,7 +26,87 @@ Or install it yourself as:
22
26
 
23
27
  ## Usage
24
28
 
25
- TODO: Write usage instructions here
29
+ ### Basic
30
+
31
+ Pass as a value of the `--format` (or `-f`) option to the RSpec
32
+
33
+ $ bundle exec rspec --format RSpecFlatErrorFormatter
34
+
35
+
36
+ Or add as to the default set of options via `.rspec` file:
37
+
38
+ ```
39
+ --format RSpecFlatErrorFormatter
40
+ ```
41
+
42
+ Now run the tests as usual:
43
+
44
+ $ bundle exec rspec
45
+
46
+ After you've configured the formatter to be used by RSpec, you can consume its output by the tools you have to automate your test results navigation.
47
+
48
+ ### VS Code tasks
49
+
50
+ Here's the example of configuring `rspec` and `guard-rspec` using VS Code tasks to consume the output of RspecFlatErrorFormatter.
51
+
52
+ Create a `tasks.json` file with contents:
53
+
54
+ ```json
55
+ {
56
+ "version": "2.0.0",
57
+ "tasks": [
58
+ // rspec
59
+ {
60
+ "label": "rspec",
61
+ "type": "shell",
62
+ "command": "rspec",
63
+ "group": "test",
64
+ "presentation": {
65
+ "echo": true,
66
+ "reveal": "always"
67
+ },
68
+ "problemMatcher": {
69
+ "fileLocation": ["relative", "${workspaceFolder}"],
70
+ "pattern": {
71
+ "regexp": "^(.*):(\\d*):\\s(error|info):\\s(.*)$",
72
+ "file": 1,
73
+ "line": 2,
74
+ "severity": 3,
75
+ "message": 4
76
+ }
77
+ }
78
+ },
79
+ // guard-rspec
80
+ {
81
+ "label": "guard",
82
+ "type": "shell",
83
+ "command": "bundle exec guard",
84
+ "presentation": {
85
+ "echo": true,
86
+ "reveal": "always",
87
+ "panel": "dedicated"
88
+ },
89
+ "isBackground": true,
90
+ "problemMatcher": {
91
+ "fileLocation": ["relative", "${workspaceFolder}"],
92
+ "pattern": {
93
+ "regexp": "^(.*):(\\d*):\\s(error|info):\\s(.*)$",
94
+ "file": 1,
95
+ "line": 2,
96
+ "severity": 3,
97
+ "message": 4
98
+ },
99
+ "background": {
100
+ "activeOnStart": true,
101
+ "beginsPattern": "^\\d{2}:\\d{2}:\\d{2} - INFO - Running",
102
+ "endsPattern": "^Randomized with"
103
+ }
104
+ }
105
+ }
106
+ ]
107
+ }
108
+
109
+ ```
26
110
 
27
111
  ## Development
28
112
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class RspecFlatErrorFormatterVersion
4
- VERSION = '0.0.3'
4
+ VERSION = '0.0.4'
5
5
  end
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.3
4
+ version: 0.0.4
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-19 00:00:00.000000000 Z
11
+ date: 2018-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core