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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 387528f7427d7cc41117899444a50220fe5592acb66f335a1631dff4af05e557
4
- data.tar.gz: 6eecdd3ba6cd2bda1e4bbc87826a6adacf8cf256171faab7bbcf53828e91b382
3
+ metadata.gz: 3dd1bd5be09dae5d4711ef62bae587223ed112843b7d504afd3010c8f64f313b
4
+ data.tar.gz: 9409ad92981ad447560663e177f555c1b1d327c54edf04169533e6329bbe69b4
5
5
  SHA512:
6
- metadata.gz: cc3f90e4dcba9bf60ae3713c157a98bb05c01dd77e0938784b31843c2a006d118a5a0a3b0043a6cf4c0ff0d3c74792dc0c161338aa40e79aa1f6c47d2b49b57b
7
- data.tar.gz: 0d64b9fa930e3e3604a67d2721291e93226c6507c689af5ed18af9c2e17f3b6013d466afb2d4739dbc0acce359c1fbf494a1ce821e9a39261b3389c8ab696bd8
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
 
@@ -1,6 +1,6 @@
1
1
  module CopyTunerClient
2
2
  # Client version
3
- VERSION = '0.17.1'.freeze
3
+ VERSION = '0.18.0'.freeze
4
4
 
5
5
  # API version being used to communicate with the server
6
6
  API_VERSION = '2.0'.freeze
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.17.1
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-04-30 00:00:00.000000000 Z
11
+ date: 2024-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n