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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/approvals/cli.rb +7 -2
- data/lib/approvals/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23b24cfaf9706d8ead8d9c1a436025d983ac8c7b
|
4
|
+
data.tar.gz: b5ee817b9554e90d064ebc0572f3f8786fbb429a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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 #{
|
24
|
+
system("mv #{received} #{approved}")
|
20
25
|
else
|
21
26
|
rejected << approval
|
22
27
|
end
|
data/lib/approvals/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2015-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|