lite-ruby 1.1.11 → 1.1.12
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/Gemfile.lock +1 -1
- data/lib/lite/ruby/open_struct.rb +19 -0
- data/lib/lite/ruby/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: a396444ff8c06f3c21d41e17b3360d5af587e6914f1d9835527316c6eaeb9a3a
|
4
|
+
data.tar.gz: 6034fb2b62c4e0ab25b74cccd1285c5266d3880741c345f3780dcd193ff16eff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70d61e9235e2a68f62848ac14e37a6bc442746e57af32d26a2361849c88501cbf20ed723f6db5665a95734c77e9418fe66e2f9b900c36ffedfdbad141b0f6f48
|
7
|
+
data.tar.gz: 42661db34d7fa54d3d29a4ddc71f266ab7670d334544c8e14a5504ffece60a1f0bf04fcefbbad0e69d29bcf14a40e738326f95c06a4c98c72faf45e00680e52a
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.1.12] - 2021-07-05
|
10
|
+
### Added
|
11
|
+
- Added OpenStruct backwards compatibility
|
12
|
+
|
9
13
|
## [1.1.11] - 2021-07-04
|
10
14
|
### Added
|
11
15
|
- Added Array => `contains_all?`
|
data/Gemfile.lock
CHANGED
@@ -43,6 +43,25 @@ if Lite::Ruby.configuration.monkey_patches.include?('open_struct')
|
|
43
43
|
|
44
44
|
private
|
45
45
|
|
46
|
+
# rubocop:disable Metrics/MethodLength, Naming/PredicateName
|
47
|
+
def is_method_protected!(name)
|
48
|
+
return false unless respond_to?(name, true)
|
49
|
+
return true if name.match?(/!$/)
|
50
|
+
|
51
|
+
owner = method!(name).owner
|
52
|
+
|
53
|
+
if owner.instance_of?(::Class)
|
54
|
+
owner < ::OpenStruct
|
55
|
+
else
|
56
|
+
self.class.ancestors.any? do |mod|
|
57
|
+
return false if mod == ::OpenStruct
|
58
|
+
|
59
|
+
mod == owner
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
# rubocop:enable Metrics/MethodLength, Naming/PredicateName
|
64
|
+
|
46
65
|
def new_ostruct_member!(name)
|
47
66
|
return if is_method_protected!(name)
|
48
67
|
|
data/lib/lite/ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lite-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|