approvals 0.0.19 → 0.0.20

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: 6e2bdf9201b64d91a4d5368e0edf159eb3dd5cb2
4
- data.tar.gz: f82203e46e50c60ac0d229db67a8ac6651fc6b8a
3
+ metadata.gz: 23b24cfaf9706d8ead8d9c1a436025d983ac8c7b
4
+ data.tar.gz: b5ee817b9554e90d064ebc0572f3f8786fbb429a
5
5
  SHA512:
6
- metadata.gz: 3cbe81a1c8ab477819e5080a7cae752e0fab27f759497eb23bd5e84f0135a7622a7b82915693fc168c1a2d874393043471940c939c99011df56942035e31724a
7
- data.tar.gz: cf9c5b74d5e40bfcef8b78dfeabb236d2d1328ca5b1264224a02b801d2caa4f9322e9e70cdf7fd3ba8643235cf3335982122584f99c6c0d2009166ef42d94350
6
+ metadata.gz: 1d64e7023845cfa1b25365bf09682849e0d1b9912b44c621994badab49ed46be3deda93db41468a28e7eb88e95fa5fa7d02d197647b1a33a7aa52b96fda725c6
7
+ data.tar.gz: c4f5a05a1cb1e317c69aae65f931a3521f1cfda9cfca0faf455052a1904a53c6c961fb6898dbca5908649c0defd7db5eb75708eadac11322e605bc5e98f76fd0
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  * Your contribution here
6
6
 
7
+ ### v0.0.20 (2015-04-21)
8
+
9
+ * [#63](https://github.com/kytrinyx/approvals/issues/62) Make CLI --ask compatible with new or old .approval file. - [@kytrinyx](https://github.com/kytrinyx)
10
+
7
11
  ### v0.0.19 (2015-04-20)
8
12
 
9
13
  * [#62](https://github.com/kytrinyx/approvals/issues/62) Fix bug in CLI with --ask option that deletes approval file instead of overwriting it. - [@kytrinyx](https://github.com/kytrinyx)
data/lib/approvals/cli.rb CHANGED
@@ -11,12 +11,17 @@ module Approvals
11
11
 
12
12
  rejected = []
13
13
  approvals.each do |approval|
14
- diff_command = "#{options[:diff]} #{approval}"
14
+ approved, received = approval.split(/\s+/)
15
+ if received.include?(".approved.")
16
+ received, approved = approved, received
17
+ end
18
+
19
+ diff_command = "#{options[:diff]} #{approved} #{received}"
15
20
  puts diff_command
16
21
  system(diff_command)
17
22
 
18
23
  if options[:ask] && yes?("Approve? [y/N] ")
19
- system("mv #{approval}")
24
+ system("mv #{received} #{approved}")
20
25
  else
21
26
  rejected << approval
22
27
  end
@@ -1,3 +1,3 @@
1
1
  module Approvals
2
- VERSION = '0.0.19'
2
+ VERSION = '0.0.20'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: approvals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec