approvals 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MGRlZTc3ZTE4MWFjZWIwZjBmNzMxODkzMzJjZWE3OTU4Zjk1ODg0NQ==
5
+ data.tar.gz: !binary |-
6
+ OGJiMzk0NGI4OGQ1NjdmY2Y5MzgzZTQ1N2I5YjNlODBjYzFhZGVjMA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ OTE4MDIzYWVlMjBjOTc4MmY5YjE2ODQyODFiMTVmYmYzMmI2NjI3NjhlYWEw
10
+ ZTliMjM0YzNlYmZiZTYyMjc4NmZkODU3ZjM3MWJiN2NkOTU5ZGFhZDgzNTI0
11
+ MjZlM2ZiOGYzNmFmODUxOTQyODgyNjdmZjExMGU1NmFhY2M2MWQ=
12
+ data.tar.gz: !binary |-
13
+ NWUyZTE2MWY3NmZlYjdjZTAzM2QwY2EzMzQ2YmUyYzAxNGNiOWE5ZjAyMzYx
14
+ N2M3NDMwYzA4NDY5ZjYxYjhlMzVjYjk5YzZmOTM2YjQ2OGMwYWVkMmNkYTNi
15
+ NjUwZGRkNjMyNTFkN2RmZmZjYTRiOTI4YjI2NmEzNDkzMTAzMzM=
@@ -52,12 +52,10 @@ module Approvals
52
52
  end
53
53
 
54
54
  def received_matches?
55
- FileUtils.cmp received_path, approved_path
55
+ IO.read(received_path) == ERB.new(IO.read(approved_path)).result
56
56
  end
57
57
 
58
58
  def fail_with(message)
59
- FileUtils.touch(approved_path) unless File.exists? approved_path
60
-
61
59
  Dotfile.append(diff_path)
62
60
 
63
61
  if subject.respond_to?(:on_failure)
@@ -13,7 +13,7 @@ module Approvals
13
13
  approvals.each do |approval|
14
14
  system("#{options[:diff]} #{approval}")
15
15
 
16
- if options[:ask] && yes?("Approve?")
16
+ if options[:ask] && yes?("Approve? [y/N] ")
17
17
  system("mv #{approval}")
18
18
  else
19
19
  rejected << approval
@@ -1,3 +1,3 @@
1
1
  module Approvals
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
@@ -74,4 +74,10 @@ describe Approvals do
74
74
 
75
75
  Approvals.verify executable, :namer => namer
76
76
  end
77
+
78
+ it "passes approved files through ERB" do
79
+ $what = 'greatness'
80
+ string = "We have, I fear, confused power with greatness."
81
+ Approvals.verify string, :namer => namer
82
+ end
77
83
  end
@@ -0,0 +1 @@
1
+ We have, I fear, confused power with <%= $what %>.
metadata CHANGED
@@ -1,60 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: approvals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
- prerelease:
4
+ version: 0.0.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Katrina Owen
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-08-29 00:00:00.000000000 Z
11
+ date: 2013-05-30 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
- requirement: &70197693976720 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: '2.9'
22
20
  type: :development
23
21
  prerelease: false
24
- version_requirements: *70197693976720
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '2.9'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: json
27
- requirement: &70197693976000 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ! '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
34
  type: :development
34
35
  prerelease: false
35
- version_requirements: *70197693976000
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: thor
38
- requirement: &70197693975480 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
45
  - - ! '>='
42
46
  - !ruby/object:Gem::Version
43
47
  version: '0'
44
48
  type: :runtime
45
49
  prerelease: false
46
- version_requirements: *70197693975480
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: nokogiri
49
- requirement: &70197693975040 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  type: :runtime
56
63
  prerelease: false
57
- version_requirements: *70197693975040
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
58
69
  description: Approval Tests for Ruby
59
70
  email:
60
71
  - katrina.owen@gmail.com
@@ -112,6 +123,7 @@ files:
112
123
  - spec/configuration_spec.rb
113
124
  - spec/extensions/rspec_approvals_spec.rb
114
125
  - spec/fixtures/approvals/approvals_fails.approved.txt
126
+ - spec/fixtures/approvals/approvals_passes_approved_files_through_erb.approved.txt
115
127
  - spec/fixtures/approvals/approvals_verifies_a_complex_object.approved.txt
116
128
  - spec/fixtures/approvals/approvals_verifies_a_hash.approved.txt
117
129
  - spec/fixtures/approvals/approvals_verifies_a_string.approved.txt
@@ -156,26 +168,26 @@ files:
156
168
  - spec/utilities/system_command_spec.rb
157
169
  homepage: ''
158
170
  licenses: []
171
+ metadata: {}
159
172
  post_install_message:
160
173
  rdoc_options: []
161
174
  require_paths:
162
175
  - lib
163
176
  required_ruby_version: !ruby/object:Gem::Requirement
164
- none: false
165
177
  requirements:
166
178
  - - ! '>='
167
179
  - !ruby/object:Gem::Version
168
180
  version: '0'
169
181
  required_rubygems_version: !ruby/object:Gem::Requirement
170
- none: false
171
182
  requirements:
172
183
  - - ! '>='
173
184
  - !ruby/object:Gem::Version
174
185
  version: '0'
175
186
  requirements: []
176
187
  rubyforge_project: approvals
177
- rubygems_version: 1.8.15
188
+ rubygems_version: 2.0.3
178
189
  signing_key:
179
- specification_version: 3
190
+ specification_version: 4
180
191
  summary: Approval Tests for Ruby
181
192
  test_files: []
193
+ has_rdoc: