rekey 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rekey.rb +1 -1
- data/lib/rekey/rekey.rb +2 -2
- data/test/test_monkey_patching.rb +5 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a5afeefc751d6d94e863fbc3a0728323f9c8379
|
4
|
+
data.tar.gz: c79b4c27daf11a1905fe2e5d09d0b07be8cc5f5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98b0ac1857651dd1d2f561cf10fbb466ab3bedd10c1068702454c0aaa4750c1f5edea75c7096d164a5316e335f0e7805aa2fa145c7ce63cdb48d8bcde0f71624
|
7
|
+
data.tar.gz: 76a0051babba822500df84772fec87e7686fa29349d14e98239162f81e34202ce774b3a45cf07cffa92206d5c8f6747aa46a56781d8b5582ad0dc83e20605517
|
data/lib/rekey.rb
CHANGED
data/lib/rekey/rekey.rb
CHANGED
@@ -38,8 +38,8 @@ module Rekey
|
|
38
38
|
new_key = block.call key, value
|
39
39
|
end
|
40
40
|
else
|
41
|
-
new_key = PluckIt.
|
42
|
-
new_value = PluckIt.
|
41
|
+
new_key = PluckIt.pluckit value, key_handle if key_handle
|
42
|
+
new_value = PluckIt.pluckit value, value_handle if value_handle
|
43
43
|
end
|
44
44
|
|
45
45
|
# collect results
|
@@ -13,8 +13,10 @@ class MonkeyPatchingTest < Minitest::Test
|
|
13
13
|
skip
|
14
14
|
end
|
15
15
|
|
16
|
-
# `require '
|
17
|
-
|
16
|
+
# `require 'rekey/rekey'` should load Rekey
|
17
|
+
assert Rekey
|
18
|
+
|
19
|
+
# but no monkey patching
|
18
20
|
assert_raises NoMethodError do
|
19
21
|
[ 1, 2, 3 ].rekey 0
|
20
22
|
end
|
@@ -27,7 +29,7 @@ class MonkeyPatchingTest < Minitest::Test
|
|
27
29
|
Set.new([ 1, 2, 3 ]).rekey 0
|
28
30
|
end
|
29
31
|
|
30
|
-
puts 'no monkey patching'
|
32
|
+
puts 'yay, no monkey patching'
|
31
33
|
end
|
32
34
|
|
33
35
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rekey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Pepper
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1'
|
19
|
+
version: '1.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1'
|
26
|
+
version: '1.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|