tater 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tater.rb +14 -10
- 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: 1913c7bc9ecb58cbb7ff7c4239978c8401116a954f967e1fd1e557ad30b0e7bd
|
4
|
+
data.tar.gz: cd65a35921e999375affaf4a38717fc14c6938285f3ad1d4258727494a212d40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8744cffa6df1821728ee83f221899d7b5dae739c9420f0ce40bbd02f9b7a7d1388aeed8f54a3d029663a2843b0fca915cd277dc688b044a559c994630695bfc1
|
7
|
+
data.tar.gz: 4e0cfde2f00feaf6e3ce76aec920b0f56a208dfc59e18f0af0c679fe1f8d733ce6c5343bdafc36df33bb2170b6ac660e36d906161273ddf7a3c9fc0a96cf78aa
|
data/lib/tater.rb
CHANGED
@@ -210,20 +210,24 @@ class Tater
|
|
210
210
|
#
|
211
211
|
# @return [Boolean]
|
212
212
|
def includes?(key, options = HASH)
|
213
|
-
|
214
|
-
|
215
|
-
|
213
|
+
if options.empty?
|
214
|
+
!lookup(key).nil?
|
215
|
+
else
|
216
|
+
message =
|
217
|
+
if options.key?(:locales)
|
218
|
+
options[:locales].append(@locale) if @locale && !options[:locales].include?(@locale)
|
216
219
|
|
217
|
-
|
218
|
-
|
220
|
+
options[:locales].find do |accept|
|
221
|
+
found = lookup(key, locale: accept, cascade: options[:cascade])
|
219
222
|
|
220
|
-
|
223
|
+
break found unless found.nil?
|
224
|
+
end
|
225
|
+
else
|
226
|
+
lookup(key, locale: options[:locale], cascade: options[:cascade])
|
221
227
|
end
|
222
|
-
else
|
223
|
-
lookup(key, locale: options[:locale], cascade: options[:cascade])
|
224
|
-
end
|
225
228
|
|
226
|
-
|
229
|
+
!message.nil?
|
230
|
+
end
|
227
231
|
end
|
228
232
|
|
229
233
|
# Translate a key path and optional interpolation arguments into a string.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Lecklider
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|