copy_tuner_client 1.1.0 → 1.1.2

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: 077fca3432ac4660b4b4211b4546d5fe76c0ad8bb77c2c675a95bcf2e24d7090
4
- data.tar.gz: 07ca6d48a19d32179a9aecc1b92d4c1550cc489b06c893cc80a25557bfbb3b8e
3
+ metadata.gz: 6ee84863d170d53461be6443bd7fc89c2001f5cc258d0d63a71181df5e8276a5
4
+ data.tar.gz: d3358560b0d7e9c090f72766110e4316778c2c9bfd53eedcf952691ae91519c0
5
5
  SHA512:
6
- metadata.gz: 5806d46e0b1eae66187806615b387b9254c6c667dcf43c38312cda68f8dc1a7865475ea40e01a5166ef4678b7474652f2395e14986b29ae2cf5babc10be9725d
7
- data.tar.gz: 6fe660fbe9406975a1aef91b236b3c718201606f003da46ea96b3fc1b437e0e0e50ff1dc86cd7f527c5efcde52dac3a602c0fd15ed7d2e7bdc182669c06eac77
6
+ metadata.gz: db8b3a3f593597b98e936dd93fccbda3414db3dbbd28c179f22f4a7d6cf64682d446c740a9f549368a8e0c291e45252835343e526f4f2131fb9b74e42f6ab5fb
7
+ data.tar.gz: d08f1ac925bb2026b70348d895d6d4b095148a7e42af51c277f5e50ff113d9c9123e55594b185844934d9063484cc7e061c40f921f7ba568d9a6427823f2e76d
data/.gitignore CHANGED
@@ -21,3 +21,4 @@ pkg
21
21
  node_modules
22
22
 
23
23
  Gemfile.lock
24
+ .claude/settings.local.json
@@ -20,10 +20,15 @@ Gem::Specification.new do |s|
20
20
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
21
21
  s.files = `git ls-files`.split("\n")
22
22
  s.homepage = 'https://github.com/SonicGarden/copy-tuner-ruby-client'
23
+
24
+ s.metadata["homepage_uri"] = s.homepage
25
+ s.metadata["source_code_uri"] = "https://github.com/SonicGarden/copy-tuner-ruby-client"
26
+ s.metadata["changelog_uri"] = "https://github.com/SonicGarden/copy-tuner-ruby-client/releases"
27
+ s.metadata['rubygems_mfa_required'] = 'true'
28
+
23
29
  s.name = 'copy_tuner_client'
24
30
  s.platform = Gem::Platform::RUBY
25
31
  s.require_paths = ['lib']
26
32
  s.summary = 'Client for the CopyTuner copy management service'
27
33
  s.version = CopyTunerClient::VERSION
28
- s.metadata['rubygems_mfa_required'] = 'true'
29
34
  end
@@ -80,9 +80,10 @@ module CopyTunerClient
80
80
  return exact_match
81
81
  end
82
82
 
83
- ensure_tree_cache_current
84
- tree_result = lookup_in_tree_cache(parts)
85
- return tree_result if tree_result
83
+ # NOTE: 色々考慮する必要があることが分かったため暫定対応として、ツリーキャッシュを使用しないようにしている
84
+ # ensure_tree_cache_current
85
+ # tree_result = lookup_in_tree_cache(parts)
86
+ # return tree_result if tree_result
86
87
 
87
88
  content = super
88
89
 
@@ -107,9 +108,14 @@ module CopyTunerClient
107
108
  return nil if @tree_cache.nil?
108
109
 
109
110
  symbol_keys = keys.map(&:to_sym)
110
- result = @tree_cache.dig(*symbol_keys)
111
-
112
- result.is_a?(Hash) ? result : nil
111
+ begin
112
+ result = @tree_cache.dig(*symbol_keys)
113
+ result.is_a?(Hash) ? result : nil
114
+ rescue TypeError
115
+ # Handle the case where dig encounters a non-Hash value
116
+ # (e.g., when ja.hoge exists as a string and ja.hoge.hello is searched)
117
+ nil
118
+ end
113
119
  end
114
120
 
115
121
  def store_item(locale, data, scope = [])
@@ -1,6 +1,6 @@
1
1
  module CopyTunerClient
2
2
  # Client version
3
- VERSION = '1.1.0'.freeze
3
+ VERSION = '1.1.2'.freeze
4
4
 
5
5
  # API version being used to communicate with the server
6
6
  API_VERSION = '2.0'.freeze
@@ -243,7 +243,8 @@ describe 'CopyTunerClient::I18nBackend' do
243
243
  end
244
244
  end
245
245
 
246
- describe 'ツリー構造のlookup' do
246
+ # NOTE: 色々考慮する必要があることが分かったため暫定対応として、ツリーキャッシュを使用しないようにしている
247
+ xdescribe 'ツリー構造のlookup' do # rubocop:disable Metrics/BlockLength
247
248
  subject { build_backend }
248
249
 
249
250
  context '完全一致が存在する場合' do
@@ -417,6 +418,13 @@ describe 'CopyTunerClient::I18nBackend' do
417
418
  # ignored_keys が動作することを確認
418
419
  subject.translate('ja', 'views.secret')
419
420
  end
421
+
422
+ it 'stringキーが存在する場合のsub-keyアクセスでエラーが発生しないこと' do
423
+ cache['ja.hoge'] = 'hoge value'
424
+
425
+ result = subject.translate('ja', 'hoge.hello', default: nil)
426
+ expect(result).to be_nil
427
+ end
420
428
  end
421
429
  end
422
430
  end
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: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - SonicGarden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-01 00:00:00.000000000 Z
11
+ date: 2025-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -267,6 +267,9 @@ files:
267
267
  homepage: https://github.com/SonicGarden/copy-tuner-ruby-client
268
268
  licenses: []
269
269
  metadata:
270
+ homepage_uri: https://github.com/SonicGarden/copy-tuner-ruby-client
271
+ source_code_uri: https://github.com/SonicGarden/copy-tuner-ruby-client
272
+ changelog_uri: https://github.com/SonicGarden/copy-tuner-ruby-client/releases
270
273
  rubygems_mfa_required: 'true'
271
274
  post_install_message:
272
275
  rdoc_options: []