singleton-client-test 0.7.7.9 → 0.7.7.10

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: 33c66285f53fb194a41ee8769b58e11b78411eb9c9b017847bf78bfe98db8a4a
4
- data.tar.gz: 32980165aa18854ec621c96be34164311c61027d7ea2036afe42ecdccdb92355
3
+ metadata.gz: 78138fa830f90a88d25f0abdc40e92b00b58a0437bb90203e65e506dc30dc6d4
4
+ data.tar.gz: 4757081c06b89bd8d3f51144ed5d5185c6c2b7bf05c7e3d12eda83538fbd1f6c
5
5
  SHA512:
6
- metadata.gz: 37a00c18462c4b65aa3b9694e42dc9626e50c2109d6a1be27e6a7a1cac0c9ef57d76e5079cf6fee69960d830046cbc42d1fa98664a024d998966970679fd7adb
7
- data.tar.gz: 905b50f8d67d556e883cacdac89984a77e816adb18f1c7713b1c9ddc2d5152f74ef8db0e4be4611434857e6b04af8dd747d8b5cdb6ba774082487577dc560565
6
+ metadata.gz: 4151c6789f96fc951b33127044771af3b67dca3c150f255fe962c094860c0edce6100aeb53b976ac18e50795f113ad729771ad03a438134324b3a8432cd1f489
7
+ data.tar.gz: 6760e651dbb87a518807d9c954c1a08d8216b197e380468fe51e61d51c4013629dc5ba9d3e12a03113d3f869dca1755ce63bba64e6599f9ee47852f75be43776
@@ -11,6 +11,7 @@ module SgtnClient
11
11
  begin
12
12
  return super(component, l)
13
13
  rescue StandardError => e
14
+ SgtnClient.logger.debug { (["[#{method(__callee__).owner}.#{__callee__}] {#{component}, #{locale}} #{e.message}"] + e.backtrace).join($/) }
14
15
  error = e
15
16
  end
16
17
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2022 VMware, Inc.
1
+ # Copyright 2022-2023 VMware, Inc.
2
2
  # SPDX-License-Identifier: EPL-2.0
3
3
 
4
4
  require 'json'
@@ -33,7 +33,7 @@ module SgtnClient
33
33
  def available_bundles
34
34
  SgtnClient.logger.debug { "[#{method(__callee__).owner}.#{__callee__}]" }
35
35
 
36
- @available_bundles = @base_path.glob('*/*.json').reduce(Set.new) do |bundles, f|
36
+ @available_bundles = Pathname.glob(@base_path + '*/*.json').reduce(Set.new) do |bundles, f|
37
37
  locale = f.basename.to_s.sub(/\A#{BUNDLE_PREFIX}/i, '').sub(/#{BUNDLE_SUFFIX}\z/i, '')
38
38
  bundles.add Common::BundleID.new(f.parent.basename.to_s, locale)
39
39
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2022 VMware, Inc.
1
+ # Copyright 2022-2023 VMware, Inc.
2
2
  # SPDX-License-Identifier: EPL-2.0
3
3
 
4
4
  module SgtnClient
@@ -14,7 +14,8 @@ module SgtnClient
14
14
 
15
15
  SgtnClient.logger.debug { "[#{__FILE__}][#{__callee__}] component=#{component}, locale=#{locale}" }
16
16
 
17
- super(component, LocaleUtil.get_source_locale).transform_values! { |v| "#{@pseudo_tag}#{v}#{@pseudo_tag}" }
17
+ data = super(component, LocaleUtil.get_source_locale)
18
+ data.each { |k, v| data[k] = "#{@pseudo_tag}#{v}#{@pseudo_tag}" }
18
19
  end
19
20
  end
20
21
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2022 VMware, Inc.
1
+ # Copyright 2022-2023 VMware, Inc.
2
2
  # SPDX-License-Identifier: EPL-2.0
3
3
 
4
4
  require 'pathname'
@@ -19,7 +19,7 @@ module SgtnClient
19
19
 
20
20
  total_messages = {}
21
21
 
22
- (@source_bundle_path + component).glob('**/*.{yml, yaml}') do |f|
22
+ Pathname.glob(@source_bundle_path + component + '**/*.{yml, yaml}') do |f|
23
23
  bundle = YAML.load(File.read(f))
24
24
  messages = bundle&.first&.last # TODO: Warn about inconsistent source locale
25
25
  if messages.is_a?(Hash)
@@ -39,7 +39,7 @@ module SgtnClient
39
39
 
40
40
  @available_bundles ||= begin
41
41
  @source_bundle_path.children.select(&:directory?).reduce(Set.new) do |bundles, component|
42
- component.glob('**/*.{yml, yaml}') do |_|
42
+ Pathname.glob(component + '**/*.{yml, yaml}') do |_|
43
43
  bundles << Common::BundleID.new(component.basename.to_s, LocaleUtil.get_source_locale)
44
44
  break bundles
45
45
  end || bundles
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: singleton-client-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.7.9
4
+ version: 0.7.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware G11n Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-06 00:00:00.000000000 Z
11
+ date: 2023-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby