hey-you 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/lib/hey_you/config.rb +10 -2
- data/lib/hey_you/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: 3679941e8f2ff22ed129c4fdbb90c8d8c27f860e2aa1f8514855afec34c86852
|
4
|
+
data.tar.gz: 6a1b5bb70850f69a7a017ac5c29125138ba22ec722d192666360daf9bbb2b1ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6a8430acbcc2c0399c87b899cd61e42915c2d7a5b9d06fac81df719b55bfa59716245ce6c50d12056d4707ceb6c4881017d06d1f444e728df2be6e71b504d02
|
7
|
+
data.tar.gz: 52412155756eaed0bd09aed322cbf34ce933d9a99965327264096834bcf1f70b7c6e5eb2d2d7f36cc8653d7183b0c7d893e94866cd5a2481ba3e0d1696e043a1
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# Changelog for hey-you gem
|
2
2
|
|
3
|
-
|
3
|
+
## 1.4.2
|
4
|
+
- Improvement: Freeze loaded collection to prevent changes notification templates in memory
|
5
|
+
|
6
|
+
## 1.4.1
|
7
|
+
- Improvement: custom complex classes in Sender
|
8
|
+
|
9
|
+
## 1.4.0
|
4
10
|
- Improvement: configs validations for custom classes
|
5
11
|
- Improvement: allow custom classes with '_' in name
|
6
12
|
|
data/lib/hey_you/config.rb
CHANGED
@@ -50,11 +50,11 @@ module HeyYou
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def collection
|
53
|
-
@collection ||= load_collection
|
53
|
+
@collection ||= deep_freeze(load_collection)
|
54
54
|
end
|
55
55
|
|
56
56
|
def env_collection
|
57
|
-
@env_collection ||= load_env_collection
|
57
|
+
@env_collection ||= deep_freeze(load_env_collection)
|
58
58
|
end
|
59
59
|
|
60
60
|
def registrate_receiver(receiver_class)
|
@@ -109,5 +109,13 @@ module HeyYou
|
|
109
109
|
def load_collection
|
110
110
|
data_source.load_data
|
111
111
|
end
|
112
|
+
|
113
|
+
def deep_freeze(val)
|
114
|
+
if val.respond_to? :each
|
115
|
+
val.class == Hash ? val.each { |_, val| deep_freeze(val) } : val.each { |val| deep_freeze(val) }
|
116
|
+
end
|
117
|
+
|
118
|
+
val.freeze unless val.frozen?
|
119
|
+
end
|
112
120
|
end
|
113
121
|
end
|
data/lib/hey_you/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hey-you
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Nesterov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01
|
11
|
+
date: 2021-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fcm
|