copy_tuner_client 0.17.1 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/copy_tuner_client/cache.rb +8 -0
- data/lib/copy_tuner_client/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: 3dd1bd5be09dae5d4711ef62bae587223ed112843b7d504afd3010c8f64f313b
|
4
|
+
data.tar.gz: 9409ad92981ad447560663e177f555c1b1d327c54edf04169533e6329bbe69b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9402dac344ec22379237ecbeed0cc6f71cfeca6733d69f65e5e022f0ef5f46b98175671b0cd4db1042cf65fb058dc8eb97ad3bceaa597024a3002808febf6d46
|
7
|
+
data.tar.gz: 6c954506bb852fd34aa9608276ab93b3f786db53e5c691c8c4e96481334b4e01d52d8e3efefa6a945676b5da2ea5a7bddcdcc44d47114cadff95fbfc01dc3515
|
@@ -18,6 +18,8 @@ module CopyTunerClient
|
|
18
18
|
@mutex = Mutex.new
|
19
19
|
@exclude_key_regexp = options[:exclude_key_regexp]
|
20
20
|
@upload_disabled = options[:upload_disabled]
|
21
|
+
@ignored_keys = options.fetch(:ignored_keys, [])
|
22
|
+
@ignored_key_handler = options.fetch(:ignored_key_handler, -> (e) { raise e })
|
21
23
|
@locales = Array(options[:locales]).map(&:to_s)
|
22
24
|
# mutable states
|
23
25
|
@blurbs = {}
|
@@ -44,6 +46,12 @@ module CopyTunerClient
|
|
44
46
|
return if @locales.present? && !@locales.member?(key.split('.').first)
|
45
47
|
return if @upload_disabled
|
46
48
|
|
49
|
+
# NOTE: config/locales以下のファイルに除外キーが残っていた場合の対応
|
50
|
+
key_without_locale = key.split('.')[1..].join('.')
|
51
|
+
if @ignored_keys.include?(key_without_locale)
|
52
|
+
@ignored_key_handler.call(IgnoredKey.new("Ignored key: #{key_without_locale}"))
|
53
|
+
end
|
54
|
+
|
47
55
|
lock do
|
48
56
|
return if @blank_keys.member?(key) || @blurbs.key?(key)
|
49
57
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copy_tuner_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SonicGarden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|