simple_approvals-rspec 1.0.2 → 1.1.0

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: 814f75f6418ca6f93bcb761ef3e3ad6589c5584a
4
- data.tar.gz: a7d45f22b4751d8afd90ace0623d0cb897282c59
3
+ metadata.gz: c55a27cedbf93964a2c84516d1f8d1ba26db78c2
4
+ data.tar.gz: 6f52c988b080e2734acefc9b36584cc12770960a
5
5
  SHA512:
6
- metadata.gz: cf1e5b00dd26c840d45d495ce0da9bffbda755c5ad3ab5798fde864a4dbf1482014bf7350852237a95f594ee1073d7019a29206fc45de03d5534f464cc5661ce
7
- data.tar.gz: da4e6c6e613f3501382dc853f121e84771118ba7f0ec74cfd84c9c4fc27d9776155023bcc532e7401fa790b197e5703ba29a9eb6a4b11cc7a920a2814bf7179c
6
+ metadata.gz: 7816895a44b23c16fd49ef9930ea78c706afa24f7053c0daa93728fc87e42ddb4450e853b9a449b4ca76614cb29f0f4a6666a0019fab875ea8ad3c1bb020604a
7
+ data.tar.gz: a847e0f5072b1988d63770737b8b1fb09d8bc607f8f836051b2c040e573c04763295dee4dd83eaa2b1b1a79b40e054a2a98f59b4f539b8f50a65379145e590d9
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'simple_approvals/rspec/approvals'
2
4
  require 'simple_approvals/rspec/matchers'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Top-level class to provide approval test support (inspired by http://approvaltests.com/)
2
4
  class Approvals
3
5
  class << self
@@ -28,7 +30,7 @@ class Approvals
28
30
  end
29
31
 
30
32
  def pre_approve_if_asked(approved_path, scrubbed_content, **options)
31
- File.write(approved_path, scrubbed_content) if options[:approve_all] || options[:accept_all]
33
+ File.write(approved_path, scrubbed_content) if options[:approve_all] || options[:accept_all] || ENV['APPROVE_ALL']
32
34
  end
33
35
 
34
36
  def handle_match(received_path, received_content, **options)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rspec/expectations'
2
4
 
3
5
  RSpec::Matchers.define :match_hash do |expected|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_approvals-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Alpert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-18 00:00:00.000000000 Z
11
+ date: 2019-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: json
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 2.1.0
103
+ version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 2.1.0
110
+ version: '0'
111
111
  description: a simple rspec-based implementation of the ApprovalTests pattern
112
112
  email:
113
113
  - david@spinthemoose.com