acts_as_hashable 1.3.0.pre.alpha → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/README.md +1 -1
- data/lib/acts_as_hashable/constant_resolver.rb +1 -1
- data/lib/acts_as_hashable/factory.rb +4 -4
- data/lib/acts_as_hashable/hash_refinements.rb +1 -1
- data/lib/acts_as_hashable/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 512a071f89b95030d2e3669230a444aeb2c84bfa3eba507e922364f92d00d484
|
4
|
+
data.tar.gz: a6a796fbbcbae31bcd528bf1300e1ef74c61b3db1a104898320569a68c48e378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cdcb125699f45bf9165bf92008eb42eede26e983d4ed82335116c72640b8a1356a1202b366c294e75966312d9b02e1bd0703fbf9dfea74318c459b78a73efe6
|
7
|
+
data.tar.gz: b7b0e7304fec6cf66c4a034a0575244b06ee3c7f5381274df3fbbe5bcc33b12982d67f6ad9271f8ab196acf77bd37e42a90c6f068038e9890eafd6997d5b22bc
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
module ActsAsHashable
|
11
11
|
# This class is responsible for turning strings and symbols into constants.
|
12
12
|
# It does not deal with inflection, simply just constant resolution.
|
13
|
-
class ConstantResolver
|
13
|
+
class ConstantResolver # :nodoc: all
|
14
14
|
# Only use Module constant resolution if a string or symbol was passed in.
|
15
15
|
# Any other type is defined as an acceptable constant and is simply returned.
|
16
16
|
def constantize(value)
|
@@ -38,22 +38,22 @@ module ActsAsHashable
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
def registry
|
41
|
+
def registry # :nodoc:
|
42
42
|
@registry ||= {}
|
43
43
|
end
|
44
44
|
|
45
|
-
def materialize_registry
|
45
|
+
def materialize_registry # :nodoc:
|
46
46
|
@registry.map do |k, v|
|
47
47
|
value = v.is_a?(Proc) ? v.call(k) : v
|
48
48
|
[k, value]
|
49
49
|
end.to_h
|
50
50
|
end
|
51
51
|
|
52
|
-
def type_key(key)
|
52
|
+
def type_key(key) # :nodoc:
|
53
53
|
@typed_with = key
|
54
54
|
end
|
55
55
|
|
56
|
-
def typed_with
|
56
|
+
def typed_with # :nodoc:
|
57
57
|
@typed_with || TypeFactory::DEFAULT_TYPE_KEY
|
58
58
|
end
|
59
59
|
|
@@ -10,7 +10,7 @@
|
|
10
10
|
module ActsAsHashable
|
11
11
|
# Let's provide a refinenment instead of monkey-patching Hash. That way we can stop
|
12
12
|
# polluting other libraries and internalize our specific needs.
|
13
|
-
module HashRefinements
|
13
|
+
module HashRefinements # :nodoc: all
|
14
14
|
refine Hash do
|
15
15
|
def symbolize_keys
|
16
16
|
map { |k, v| [k.to_sym, v] }.to_h
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_hashable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.0
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Ruggio
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: caution
|
@@ -188,9 +188,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
188
|
version: '2.5'
|
189
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
190
|
requirements:
|
191
|
-
- - "
|
191
|
+
- - ">="
|
192
192
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
193
|
+
version: '0'
|
194
194
|
requirements: []
|
195
195
|
rubygems_version: 3.0.3
|
196
196
|
signing_key:
|