rspec_approvals 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -1
- data/lib/rspec_approvals.rb +1 -0
- data/lib/rspec_approvals/approval_handler.rb +6 -5
- data/lib/rspec_approvals/extensions/stringio.rb +21 -0
- data/lib/rspec_approvals/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e597cb175306f5f78a5dac55499abb08f1cd6d70cd5726b366b090314922c58
|
4
|
+
data.tar.gz: 4d969a9b3c2be1fe22feddca704c22e5c1b9dfd050585ad4449072d2dbb53d95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0eb1bf41d01c3fe7a3eff0d06393b1ca11aa85c9373e3e5969969ccb1f1a5b2a3b71861c3395e4033c09af5df4b6df848aa9f67dc01dd256d3dab240d2269a6c
|
7
|
+
data.tar.gz: 60e038625da45685d5bb387894569d93355366a6db0b6b99d360e264df56ecd0a7997f811c24122035e8ce46bfbf5ff3c93e3fe849b49af9671aa343fe3be1a0
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/rspec_approvals.svg)](https://badge.fury.io/rb/rspec_approvals)
|
4
4
|
[![Build Status](https://github.com/DannyBen/rspec_approvals/workflows/Test/badge.svg)](https://github.com/DannyBen/rspec_approvals/actions?query=workflow%3ATest)
|
5
|
-
[![Maintainability](https://api.codeclimate.com/v1/badges/
|
5
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/b6ca26de93d9236c706a/maintainability)](https://codeclimate.com/github/DannyBen/rspec_approvals/maintainability)
|
6
6
|
|
7
7
|
---
|
8
8
|
|
@@ -237,6 +237,17 @@ ENV['COLUMNS'] = '80'
|
|
237
237
|
ENV['LINES'] = '24'
|
238
238
|
```
|
239
239
|
|
240
|
+
### Recommended rspec flags
|
241
|
+
|
242
|
+
For best results, it is recommended you configure rspec to use the
|
243
|
+
documentation format. Place the code below in a file named `.rspec`
|
244
|
+
in your project's directory:
|
245
|
+
|
246
|
+
```
|
247
|
+
--color
|
248
|
+
--format documentation
|
249
|
+
```
|
250
|
+
|
240
251
|
## Contributing / Support
|
241
252
|
|
242
253
|
If you experience any issue, have a question or a suggestion, or if you wish
|
data/lib/rspec_approvals.rb
CHANGED
@@ -20,7 +20,11 @@ module RSpecApprovals
|
|
20
20
|
prompt_user
|
21
21
|
end
|
22
22
|
|
23
|
-
|
23
|
+
def prompt
|
24
|
+
@prompt ||= TTY::Prompt.new
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
24
28
|
|
25
29
|
def prompt_user
|
26
30
|
response = auto_approve? ? :approve : get_response
|
@@ -87,13 +91,10 @@ module RSpecApprovals
|
|
87
91
|
end
|
88
92
|
|
89
93
|
def show(what)
|
94
|
+
say ""
|
90
95
|
say separator
|
91
96
|
say what
|
92
97
|
say separator
|
93
98
|
end
|
94
|
-
|
95
|
-
def prompt
|
96
|
-
@prompt ||= TTY::Prompt.new
|
97
|
-
end
|
98
99
|
end
|
99
100
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This is a fix for a pesky issue with tty-screen (dependency of tty-reader,
|
2
|
+
# which is a dependency of tty-prompt, which is a dependency of ours).
|
3
|
+
# ref: https://github.com/piotrmurach/tty-screen/issues/11
|
4
|
+
require 'stringio'
|
5
|
+
|
6
|
+
unless StringIO.method_defined? :ioctl
|
7
|
+
class StringIO
|
8
|
+
def ioctl(*)
|
9
|
+
80
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
unless StringIO.method_defined? :wait_readable
|
15
|
+
class StringIO
|
16
|
+
def wait_readable(*)
|
17
|
+
true
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_approvals
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colsole
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/rspec_approvals.rb
|
91
91
|
- lib/rspec_approvals/approval_handler.rb
|
92
92
|
- lib/rspec_approvals/extensions/file.rb
|
93
|
+
- lib/rspec_approvals/extensions/stringio.rb
|
93
94
|
- lib/rspec_approvals/matchers/base.rb
|
94
95
|
- lib/rspec_approvals/matchers/match_approval.rb
|
95
96
|
- lib/rspec_approvals/matchers/output_approval.rb
|