hanami-utils 1.3.3 → 1.3.4
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/hanami/utils/basic_object.rb +17 -0
- data/lib/hanami/utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68be8ddda779b8240ab53da6641e364091bea551058a1d70867a5473e1132a67
|
4
|
+
data.tar.gz: 955c6531113488bcc4d46a89fdcbc08d8a4b08377ba9bc16307b5415fb20d51c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40e0d112499873dabd51acaab7f7e4283754bfc764080a83d766970fb3908553a0f1c637492f570f7716919823cca883c5e5280d07efe9c9aa7780d97241401c
|
7
|
+
data.tar.gz: fcd8e38137f5527e245da4c5e1af4a3248a40314588d35ea6de24a097dddcc1ce9da6601153f264f2a32e991631fab7b1e0e0b37003fdbde52097dca7df60f64
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Hanami::Utils
|
2
2
|
Ruby core extentions and class utilities for Hanami
|
3
3
|
|
4
|
+
## v1.3.4 - 2019-09-27
|
5
|
+
### Added
|
6
|
+
- [Luca Guidi] Let `Utils::BasicObject` to lookup constants at the top-level namespace
|
7
|
+
|
4
8
|
## v1.3.3 - 2019-09-13
|
5
9
|
### Fixed
|
6
10
|
- [Mauro Morales] Ensure `Utils::Inflector.pluralize` and `.singularize` to work with words that contain an underscore (`_`)
|
@@ -4,6 +4,23 @@ module Hanami
|
|
4
4
|
#
|
5
5
|
# @since 0.3.5
|
6
6
|
class BasicObject < ::BasicObject
|
7
|
+
# Lookup constants at the top-level namespace, if they are missing in the
|
8
|
+
# current context.
|
9
|
+
#
|
10
|
+
# @param name [Symbol] the constant name
|
11
|
+
#
|
12
|
+
# @return [Object, Module] the constant
|
13
|
+
#
|
14
|
+
# @raise [NameError] if the constant cannot be found
|
15
|
+
#
|
16
|
+
# @since 1.3.4
|
17
|
+
# @api private
|
18
|
+
#
|
19
|
+
# @see https://ruby-doc.org/core/Module.html#method-i-const_missing
|
20
|
+
def self.const_missing(name)
|
21
|
+
::Object.const_get(name)
|
22
|
+
end
|
23
|
+
|
7
24
|
# Return the class for debugging purposes.
|
8
25
|
#
|
9
26
|
# @since 0.3.5
|
data/lib/hanami/utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: transproc
|