patch 0.4.15 → 0.4.16

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
  SHA1:
3
- metadata.gz: 89ece74ab2dba3ae14594532a505c35eab007f30
4
- data.tar.gz: 218c8db751291d328f42156c6ad672902f84fb0c
3
+ metadata.gz: 8cd3946117fb996ae07fa615cf94829cdcb468ab
4
+ data.tar.gz: b3e66f89dac3bfdd964ab87d2ad762dfb4f0cb4a
5
5
  SHA512:
6
- metadata.gz: 3b62a32cf912eae5e4eb1938eb2c8048fa73f0e7efe93312fdac660343d6085746398023a3214641080d3011efef099c2ae2027af13954492ddba2120fbd0225
7
- data.tar.gz: af71587809704451cc2f6c89163007ed4234ae7742174f787c6cb324b4ebd4f60a56e68d3dd342e01240001892d185e3d173b1364aad670b3b2dad34de14064f
6
+ metadata.gz: e8ff22748c79b1f1f06807180c4612496235641ff494eac18ec0121e36242e06a160147bef510c8e7b3d0addd246831d4fca69142575b2e32f688913b504e07f
7
+ data.tar.gz: af543eee31a85c35e59d797ee6c4d60cb869b46b624d1a5c940dd57d12a31888a48ae0a8c1f16c47fa7771d03171f435743a1759590e84884d8578635e15807c
data/lib/patch/patch.rb CHANGED
@@ -17,7 +17,7 @@ module Patch
17
17
  # @return [Array<Patch::Message>]
18
18
  def default_messages
19
19
  actions_with_default = @actions.select do |action|
20
- !action[:default][:value].nil?
20
+ !action[:default].nil? && !action[:default][:value].nil?
21
21
  end
22
22
  actions_with_default.map do |action|
23
23
  value = action[:default][:value]
data/lib/patch.rb CHANGED
@@ -37,6 +37,6 @@ require "patch/em_patch"
37
37
 
38
38
  module Patch
39
39
 
40
- VERSION = "0.4.15"
40
+ VERSION = "0.4.16"
41
41
 
42
42
  end
data/test/patch_test.rb CHANGED
@@ -37,7 +37,9 @@ class Patch::PatchTest < Minitest::Test
37
37
  setup do
38
38
  @patch = @patches.first
39
39
  @messages = @patch.default_messages
40
- @actions_with_default = @patch.actions.select { |action| !action[:default].nil? }
40
+ @actions_with_default = @patch.actions.select do |action|
41
+ !action[:default].nil? && !action[:default][:value].nil?
42
+ end
41
43
  end
42
44
 
43
45
  should "populate messages from defaults" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.15
4
+ version: 0.4.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Russo