copy_tuner_client 0.16.0 → 0.16.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d026c94fe7b434afec7fa13369e91ddd784ed649336de71bb5d2d0a373201e0f
4
- data.tar.gz: f882fbc15358fb560d5ba695e138f2ca904ed3f1e4e5b29ccac1a4c3d7e9fe06
3
+ metadata.gz: ef95c3204853ae72081f034d8e937d83b1bd823846be8c420a8f9a13de8a836e
4
+ data.tar.gz: cedf7d327a91fb730aec0a4ef056085b1719d40bedce05f7153cd874f1e5fa51
5
5
  SHA512:
6
- metadata.gz: fc0818f17179df0462efa7a739edbd1126d4b0170d550e15834980eeaf15c61197345b2a82dc2affc911d7914a82abbb5c5a70ff71b9e8d418425841f2f51bf8
7
- data.tar.gz: ac73b7c43742c17061f318c32ff2f642d53afaa9dad02703a5e166181ac2027312a8a4f5c70626fb77923e29410c026f834db7b4ba1948fe306b6384396fc6d5
6
+ metadata.gz: 544d3d18ee051ad0ec5a46f4c41903c639675893bcc3fb172ab4e3e6aacf8422868bd59f0d47eb53e2ed29514a481bfac6e47c89a7601b3d819bb19c00025e4e
7
+ data.tar.gz: 57ef501bc64a8810ab7603ef367698a0ae1825993adadbc3a1e3b307f2597fb700c127f5b089ade7298b175dc3fdee1c8cc945ece7c3f22978f281131d440d86
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.4
1
+ 3.2.2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.16.1
2
+
3
+ - Support for i18n@1.13.0
4
+ - キーの相対パス指定とdefaultオプションを組み合わせた場合の不具合修正
5
+
1
6
  ## 0.16.0
2
7
 
3
8
  - Railsエンジン内のviewではオリジナルのtヘルパが呼ばれるように修正
@@ -13,20 +13,23 @@ module CopyTunerClient
13
13
  # TODO: test
14
14
  # NOTE: default引数が設定されている場合は、copytunerキャッシュの値をI18n.t呼び出しにより上書きしている
15
15
  # SEE: https://github.com/rails/rails/blob/6c43ebc220428ce9fc9569c2e5df90a38a4fc4e4/actionview/lib/action_view/helpers/translation_helper.rb#L82
16
- I18n.t(key, **options) if options.key?(:default)
16
+ if options.key?(:default)
17
+ I18n.t(key.to_s.first == '.' ? scope_key_by_partial(key) : key, **options)
18
+ end
17
19
 
18
20
  if CopyTunerClient.configuration.disable_copyray_comment_injection
19
21
  source
20
22
  else
21
23
  separator = options[:separator] || I18n.default_separator
22
24
  scope = options[:scope]
23
- normalized_key =
25
+ scope_key =
24
26
  if key.to_s.first == '.'
25
27
  scope_key_by_partial(key)
26
28
  else
27
- I18n.normalize_keys(nil, key, scope, separator).join(separator)
29
+ # NOTE: locale prefix無しのkeyが必要のためこうしている
30
+ I18n.normalize_keys(nil, key, scope, separator).compact.join(separator)
28
31
  end
29
- CopyTunerClient::Copyray.augment_template(source, normalized_key)
32
+ CopyTunerClient::Copyray.augment_template(source, scope_key)
30
33
  end
31
34
  end
32
35
  if middleware_enabled
@@ -1,6 +1,6 @@
1
1
  module CopyTunerClient
2
2
  # Client version
3
- VERSION = '0.16.0'.freeze
3
+ VERSION = '0.16.1'.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.16.0
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SonicGarden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-19 00:00:00.000000000 Z
11
+ date: 2023-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
281
  - !ruby/object:Gem::Version
282
282
  version: '0'
283
283
  requirements: []
284
- rubygems_version: 3.2.33
284
+ rubygems_version: 3.4.10
285
285
  signing_key:
286
286
  specification_version: 4
287
287
  summary: Client for the CopyTuner copy management service