rspec_approvals 0.8.0 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5b4e09ac5169c8240d4edf4c4af422845f6508064c93d2277ecafb477c3280f
4
- data.tar.gz: f95d71fc3c4986f9e22675acb082f7c0dce415a3d92b940b98ddd494e256c154
3
+ metadata.gz: 4e597cb175306f5f78a5dac55499abb08f1cd6d70cd5726b366b090314922c58
4
+ data.tar.gz: 4d969a9b3c2be1fe22feddca704c22e5c1b9dfd050585ad4449072d2dbb53d95
5
5
  SHA512:
6
- metadata.gz: 62a96b36858efaa4d83363ce260c0e873bd6cd3dd42ed09c5e9ef5463193a813a16e7cda50d3cdd0f48a61b015679ccb8804c6fabe5c68808f9c8d3f7753b523
7
- data.tar.gz: a207d63a7719161c9bb333030b22dec35b04ea391ba17e6a8c2bde5f780c1ebe7264590023eeb6651f7d547e21f99e2ab5c6d2eb2f3d76455fad8cf7a8c3e54e
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/a06ed5e30412062c454c/maintainability)](https://codeclimate.com/github/DannyBen/rspec_approvals/maintainability)
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
@@ -1,4 +1,5 @@
1
1
  require 'rspec_approvals/extensions/file'
2
+ require 'rspec_approvals/extensions/stringio'
2
3
 
3
4
  require 'rspec_approvals/module_functions'
4
5
  require 'rspec_approvals/stream'
@@ -20,7 +20,11 @@ module RSpecApprovals
20
20
  prompt_user
21
21
  end
22
22
 
23
- private
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
+
@@ -1,3 +1,3 @@
1
1
  module RSpecApprovals
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
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.0
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-05-19 00:00:00.000000000 Z
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