singleton-client-test 0.7.0.33 → 0.7.0.34

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,94 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 VMware, Inc.
4
+ # SPDX-License-Identifier: EPL-2.0
5
+
6
+ require 'faraday'
7
+ require 'faraday_middleware'
8
+
9
+ module SgtnClient
10
+ module Common
11
+ autoload :BundleID, 'sgtn-client/common/data'
12
+ end
13
+
14
+ module TranslationLoader
15
+ autoload :CONSTS, 'sgtn-client/loader/consts'
16
+
17
+ class SgtnServer
18
+ ERROR_ILLEGAL_DATA = 'server returned illegal data.'
19
+ ERROR_BUSINESS_ERROR = 'server returned business error.'
20
+
21
+ REQUEST_ARGUMENTS = { timeout: 10 }.freeze
22
+
23
+ def initialize(config)
24
+ @server_url = config['vip_server']
25
+
26
+ product_root = format('/i18n/api/v2/translation/products/%s/versions/%s', config['product_name'], config['version'])
27
+
28
+ @bundle_url = "#{product_root}/locales/%s/components/%s"
29
+ @locales_url = "#{product_root}/localelist"
30
+ @components_url = "#{product_root}/componentlist"
31
+ end
32
+
33
+ def load_bundle(component, locale)
34
+ SgtnClient.logger.debug "[#{method(__callee__).owner}.#{__callee__}] component=#{component}, locale=#{locale}"
35
+
36
+ messages = query_server(format(@bundle_url, locale, component), ['messages'])
37
+ messages
38
+ end
39
+
40
+ def available_bundles
41
+ SgtnClient.logger.debug "[#{method(__callee__).owner}.#{__callee__}]"
42
+
43
+ components_thread = Thread.new { available_components }
44
+ available_locales.reduce(Set.new) do |bundles, locale|
45
+ components_thread.value.reduce(bundles) do |inner_bundles, component|
46
+ inner_bundles << Common::BundleID.new(component, locale)
47
+ end
48
+ end
49
+ end
50
+
51
+ private
52
+
53
+ def available_locales
54
+ query_server(@locales_url, ['locales'])
55
+ end
56
+
57
+ def available_components
58
+ query_server(@components_url, ['components'])
59
+ end
60
+
61
+ def query_server(url, path_to_data = [], queries = nil, headers = nil)
62
+ conn = Faraday.new(@server_url, request: REQUEST_ARGUMENTS) do |f|
63
+ f.response :json # decode response bodies as JSON
64
+ f.use :gzip
65
+ f.response :raise_error
66
+ f.response :logger, SgtnClient.logger, { log_level: :debug }
67
+ end
68
+ resp = conn.get(url, queries, headers)
69
+
70
+ process_business_error(resp.body)
71
+ extract_data(resp.body, path_to_data)
72
+ end
73
+
74
+ def extract_data(parsedbody, path_to_data)
75
+ data = parsedbody.dig('data', *path_to_data)
76
+ raise SgtnClient::SingletonError, "no expected data in response. Body is: #{parsedbody}" unless data
77
+
78
+ data
79
+ end
80
+
81
+ def process_business_error(parsedbody)
82
+ b_code = parsedbody.dig('response', 'code')
83
+ unless b_code >= 200 && b_code < 300 || b_code >= 600 && b_code < 700
84
+ raise SgtnClient::SingletonError, "#{ERROR_BUSINESS_ERROR} #{parsedbody['response']}"
85
+ end
86
+
87
+ # 600 means a successful response, 6xx means partial successful.
88
+ SgtnClient.logger.warn "#{ERROR_BUSINESS_ERROR} #{parsedbody['response']}" if b_code > 600
89
+ rescue TypeError, ArgumentError, NoMethodError => e
90
+ raise SgtnClient::SingletonError, "#{ERROR_ILLEGAL_DATA} #{e}. Body is: #{parsedbody}"
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,46 @@
1
+ # Copyright 2022 VMware, Inc.
2
+ # SPDX-License-Identifier: EPL-2.0
3
+
4
+ module SgtnClient
5
+ autoload :SingleOperation, 'sgtn-client/common/single_operation'
6
+ autoload :CacheUtil, 'sgtn-client/util/cache-util'
7
+
8
+ module TranslationLoader
9
+ autoload :CONSTS, 'sgtn-client/loader/consts'
10
+
11
+ module SingleLoader
12
+ def load_bundle(component, locale)
13
+ SgtnClient.logger.debug "[#{__FILE__}][#{__callee__}] component=#{component}, locale=#{locale}"
14
+
15
+ @single_bundle_loader ||= single_loader { |c,l| super(c,l) }
16
+ id = CacheUtil.get_cachekey(component, locale)
17
+ @single_bundle_loader.operate(id, component, locale)&.value
18
+ ensure
19
+ # delete thread from hash after finish
20
+ @single_bundle_loader.remove_object(id)
21
+ end
22
+
23
+ def available_bundles
24
+ SgtnClient.logger.debug "[#{__FILE__}][#{__callee__}]"
25
+
26
+ @single_available_bundles_loader ||= single_loader { super }
27
+ @single_available_bundles_loader.operate(CONSTS::AVAILABLE_BUNDLES_KEY)&.value
28
+ ensure
29
+ @single_available_bundles_loader.remove_object(CONSTS::AVAILABLE_BUNDLES_KEY)
30
+ end
31
+
32
+ private
33
+ def single_loader(&block)
34
+ none_alive = proc { |_, thread| thread.nil? || thread.alive? == false }
35
+ creator = proc do |id, _, *args|
36
+ Thread.new do
37
+ SgtnClient.logger.debug "start single loading #{id}"
38
+ block.call(*args)
39
+ end
40
+ end
41
+
42
+ SgtnClient::SingleOperation.new(none_alive, &creator)
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,53 @@
1
+ # Copyright 2022 VMware, Inc.
2
+ # SPDX-License-Identifier: EPL-2.0
3
+
4
+ module SgtnClient
5
+ module Common
6
+ autoload :BundleID, 'sgtn-client/common/data'
7
+ end
8
+
9
+ module TranslationLoader
10
+ autoload :CONSTS, 'sgtn-client/loader/consts'
11
+
12
+ class Source
13
+ def initialize(config)
14
+ @source_bundle_path = Pathname.new(config['source_bundle'])
15
+ end
16
+
17
+ def load_bundle(component, locale = nil)
18
+ return if locale && locale != CONSTS::REAL_SOURCE_LOCALE # return when NOT querying source
19
+
20
+ SgtnClient.logger.debug "[#{method(__callee__).owner}.#{__callee__}] component=#{component}"
21
+
22
+ total_messages = {}
23
+
24
+ (@source_bundle_path + component).glob('**/*.{yml, yaml}') do |f|
25
+ bundle = YAML.safe_load(File.read(f))
26
+ messages = bundle&.first&.last # TODO: Warn about inconsistent source locale
27
+ if messages.is_a?(Hash)
28
+ total_messages.merge!(messages)
29
+ else
30
+ SgtnClient.logger.error "[#{method(__callee__).owner}.#{__callee__}] invalid bundle data in #{f}"
31
+ end
32
+ end
33
+
34
+ raise SgtnClient::SingletonError, "no local source messages for component #{component}" if total_messages.empty?
35
+
36
+ total_messages
37
+ end
38
+
39
+ def available_bundles
40
+ SgtnClient.logger.debug "[#{method(__callee__).owner}.#{__callee__}]"
41
+
42
+ @available_bundles ||= begin
43
+ @source_bundle_path.children.select(&:directory?).reduce(Set.new) do |bundles, component|
44
+ component.glob('**/*.{yml, yaml}') do |_|
45
+ bundles << Common::BundleID.new(component.basename.to_s, SgtnClient::LocaleUtil.get_source_locale)
46
+ break bundles
47
+ end || bundles
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -2,37 +2,57 @@
2
2
  # SPDX-License-Identifier: EPL-2.0
3
3
 
4
4
  module SgtnClient
5
- autoload :Source, 'sgtn-client/loader/local_source_bundle'
6
- end
7
- module SgtnClient::TranslationLoader::SourceComparer
8
- def load_bundle(component, locale)
9
- # source locale always uses source bundles
10
- return SgtnClient::Source.load_bundle(component) if SgtnClient::LocaleUtil.is_source_locale(locale)
5
+ autoload :StringUtil, 'sgtn-client/util/string-util'
6
+ autoload :LocaleUtil, 'sgtn-client/util/locale-util'
11
7
 
12
- translation_bundle_thread = Thread.new { super(component, locale) }
13
- old_source_bundle = super(component, SgtnClient::LocaleUtil.get_source_locale)
14
- source_bundle = get_cs(component, SgtnClient::LocaleUtil.get_source_locale)
15
- translation_bundle = translation_bundle_thread.value
8
+ module TranslationLoader
9
+ autoload :CONSTS, 'sgtn-client/loader/consts'
16
10
 
17
- compare_source(translation_bundle, old_source_bundle, source_bundle)
18
- end
11
+ module SourceComparer
12
+ def load_bundle(component, locale)
13
+ SgtnClient.logger.debug "[#{__FILE__}][#{__callee__}] component=#{component}, locale=#{locale}"
14
+
15
+ # source locale and old source locale don't need comparison because they are bases of comparison
16
+ real_locale = cache_to_real_map[locale]
17
+ return super(component, real_locale) if real_locale
18
+
19
+ old_source_bundle_thread = Thread.new { load_bundle(component, CONSTS::OLD_SOURCE_LOCALE) }
20
+ source_bundle_thread = Thread.new { load_bundle(component, LocaleUtil.get_source_locale) }
21
+ translation_bundle = super(component, locale)
22
+
23
+ begin
24
+ old_source_bundle = old_source_bundle_thread.value
25
+ source_bundle = source_bundle_thread.value
26
+ rescue StandardError => e
27
+ SgtnClient.logger.error "[#{__FILE__}][#{__callee__}] failed to load soruce(or old source) bundle. component:#{component}. error: #{e}"
28
+ return translation_bundle
29
+ end
30
+
31
+ compare_source(translation_bundle, old_source_bundle, source_bundle)
32
+ end
33
+
34
+ private
35
+
36
+ def compare_source(translation_bundle, old_source_bundle, source_bundle)
37
+ if !translation_bundle.is_a?(Hash) || !source_bundle.is_a?(Hash) || !old_source_bundle.is_a?(Hash)
38
+ SgtnClient.logger.warn "can't do source comparison because some bundle data are wrong."
39
+ return translation_bundle
40
+ end
41
+
42
+ source_bundle.each do |key, value|
43
+ if old_source_bundle[key] != value || translation_bundle[key].nil?
44
+ translation_bundle[key] = StringUtil.new(value, LocaleUtil.get_source_locale)
45
+ end
46
+ end
47
+ translation_bundle
48
+ end
19
49
 
20
- private
21
-
22
- def compare_source(translation_bundle, old_source_bundle, source_bundle)
23
- return translation_bundle if translation_bundle.nil? || source_bundle.nil? || old_source_bundle.nil?
24
-
25
- old_source_messages = old_source_bundle['messages']
26
- translation_messages = translation_bundle['messages']
27
- translation_bundle['messages'] = new_translation_messages = {}
28
- source_bundle['messages'].each do |key, value|
29
- translation = translation_messages[key]
30
- new_translation_messages[key] = if old_source_messages[key] == value && !translation.nil?
31
- translation
32
- else
33
- SgtnClient::StringUtil.new(value, SgtnClient::LocaleUtil.get_source_locale)
34
- end
50
+ def cache_to_real_map
51
+ @cache_to_real_map ||= {
52
+ LocaleUtil.get_source_locale => CONSTS::REAL_SOURCE_LOCALE,
53
+ CONSTS::OLD_SOURCE_LOCALE => LocaleUtil.get_source_locale
54
+ }.freeze
55
+ end
35
56
  end
36
- translation_bundle
37
57
  end
38
58
  end
@@ -17,6 +17,7 @@ module SgtnClient
17
17
  autoload :ValidateUtil, "sgtn-client/util/validate-util"
18
18
  autoload :LocaleUtil, "sgtn-client/util/locale-util"
19
19
  autoload :FileUtil, "sgtn-client/util/file-util"
20
+ autoload :CacheUtil, "sgtn-client/util/cache-util"
20
21
 
21
22
  module Formatters
22
23
  autoload :PluralFormatter, "sgtn-client/formatters/plurals/plural_formatter"
@@ -8,13 +8,11 @@ module SgtnClient
8
8
 
9
9
  class CacheUtil
10
10
  def self.get_cache(cache_key)
11
- SgtnClient.logger.debug "[CacheUtil]get cache with key #{cache_key}"
12
11
  SgtnClient::Core::Cache.get(cache_key)
13
12
  end
14
13
 
15
14
  def self.clear_cache
16
15
  SgtnClient::Core::Cache.clear
17
- SgtnClient.logger.debug '[CacheUtil]clear cache'
18
16
  end
19
17
 
20
18
  def self.write_cache(cache_key, items)
@@ -24,7 +22,6 @@ module SgtnClient
24
22
  cache_expiry_period = SgtnClient::Config.configurations[env]['cache_expiry_period']
25
23
  # expired after 24 hours
26
24
  cache_expiry_period = 24 * 60 if cache_expiry_period.nil?
27
- SgtnClient.logger.debug "[CacheUtil]write cache with key #{cache_key}, cache_expiry_period #{cache_expiry_period}"
28
25
  SgtnClient::Core::Cache.put(cache_key, items, cache_expiry_period)
29
26
  end
30
27
 
@@ -3,23 +3,21 @@
3
3
  require 'set'
4
4
 
5
5
  module SgtnClient
6
- SUPPORTED_LOCALES = %w[en de es fr ko ja zh-Hans zh-Hant zh de-CH].freeze # TODO get this from service in online mode
7
-
8
- MAP_LOCALES = {
9
- 'zh-CN' => 'zh-Hans',
10
- 'zh-TW' => 'zh-Hant',
11
- 'zh-Hans-CN' => 'zh-Hans',
12
- 'zh-Hant-TW' => 'zh-Hant'
13
- }.freeze
14
-
15
6
  class LocaleUtil
7
+ MAP_LOCALES = {
8
+ 'zh-CN' => 'zh-Hans',
9
+ 'zh-TW' => 'zh-Hant',
10
+ 'zh-Hans-CN' => 'zh-Hans',
11
+ 'zh-Hant-TW' => 'zh-Hant'
12
+ }.freeze
13
+
16
14
  def self.get_best_locale(locale)
17
- return get_default_locale if locale.nil?
15
+ return get_fallback_locale if locale.nil?
18
16
 
19
17
  locale = locale.to_s
20
- return get_default_locale if locale.empty?
18
+ return get_fallback_locale if locale.empty?
21
19
 
22
- get_best_match(locale)
20
+ get_best_match(locale.gsub('_', '-'))
23
21
  end
24
22
 
25
23
  def self.is_source_locale(locale = nil)
@@ -27,11 +25,13 @@ module SgtnClient
27
25
  end
28
26
 
29
27
  def self.get_best_match(locale)
30
- locale = locale.gsub('_', '-')
31
- locale = SgtnClient::MAP_LOCALES[locale] if SgtnClient::MAP_LOCALES.key?(locale)
32
- return locale if SUPPORTED_LOCALES.include?(locale)
33
- return LocaleUtil.get_source_locale if locale.index('-').nil?
34
- get_best_match(locale.slice(0..(locale.rindex('-')-1)) )
28
+ locale = MAP_LOCALES[locale] || locale
29
+ return locale if Config.available_locales.include?(locale)
30
+
31
+ index = locale.rindex('-')
32
+ return get_fallback_locale if index.nil?
33
+
34
+ get_best_match(locale[0...index])
35
35
  end
36
36
 
37
37
  def self.get_source_locale
@@ -40,7 +40,11 @@ module SgtnClient
40
40
 
41
41
  def self.get_default_locale
42
42
  env = SgtnClient::Config.default_environment
43
- SgtnClient::Config.configurations[env]['default_language'] || 'en'
43
+ SgtnClient::Config.configurations[env]['default_language']
44
+ end
45
+
46
+ def self.get_fallback_locale
47
+ @fallback_locale ||= get_default_locale || get_source_locale || 'en'
44
48
  end
45
49
 
46
50
  private_class_method :get_best_match
@@ -14,12 +14,7 @@ module SgtnClient
14
14
  if mode != 'sandbox' && mode != 'live'
15
15
  messages = messages + "Configuration[mode] has to be 'sandbox' or 'live'!\n"
16
16
  end
17
-
18
- bundle_mode = SgtnClient::Config.configurations[env]["bundle_mode"]
19
- if bundle_mode != 'offline' && bundle_mode != 'online'
20
- messages = messages + "Configuration[bundle_mode] has to be 'offline' or 'online'!\n"
21
- end
22
-
17
+
23
18
  #version = SgtnClient::Config.configurations[env]["version"]
24
19
  #if version.is_a? Integer
25
20
  #messages = messages + "Configuration[version] has to be standard as '#.#.#, e.g '1.0.0'!\n"
@@ -0,0 +1,15 @@
1
+ # Copyright 2022 VMware, Inc.
2
+ # SPDX-License-Identifier: EPL-2.0
3
+
4
+ require_relative 'singleton-ruby'
5
+
6
+ module Singleton # :nodoc:
7
+ # load configuration from a file
8
+ def self.load_config(*args)
9
+ SgtnClient.load(*args)
10
+ end
11
+
12
+ extend SgtnClient::Translation::Implementation
13
+
14
+ private_class_method :getString, :getString_p, :getString_f, :getStrings
15
+ end
@@ -4,3 +4,5 @@
4
4
  require "sgtn-client/sgtn-client"
5
5
  require 'sgtn-client/cldr/core_ext'
6
6
  require 'twitter_cldr'
7
+
8
+ require 'sgtn-client/exceptions.rb'
metadata CHANGED
@@ -1,71 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: singleton-client-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.33
4
+ version: 0.7.0.34
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: 2022-03-30 00:00:00.000000000 Z
11
+ date: 2022-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: multi_json
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
- - !ruby/object:Gem::Dependency
28
- name: request_store
14
+ name: rdoc
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.1'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
17
+ - - ">="
39
18
  - !ruby/object:Gem::Version
40
- version: '1.1'
41
- - !ruby/object:Gem::Dependency
42
- name: twitter_cldr
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
19
+ version: 2.4.2
20
+ - - "<"
46
21
  - !ruby/object:Gem::Version
47
- version: '6.6'
22
+ version: '6.0'
48
23
  type: :development
49
24
  prerelease: false
50
25
  version_requirements: !ruby/object:Gem::Requirement
51
26
  requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '6.6'
55
- - !ruby/object:Gem::Dependency
56
- name: webmock
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
27
+ - - ">="
60
28
  - !ruby/object:Gem::Version
61
- version: '2.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
29
+ version: 2.4.2
30
+ - - "<"
67
31
  - !ruby/object:Gem::Version
68
- version: '2.0'
32
+ version: '6.0'
69
33
  - !ruby/object:Gem::Dependency
70
34
  name: rspec
71
35
  requirement: !ruby/object:Gem::Requirement
@@ -80,26 +44,6 @@ dependencies:
80
44
  - - "~>"
81
45
  - !ruby/object:Gem::Version
82
46
  version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: rdoc
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: 2.4.2
90
- - - "<"
91
- - !ruby/object:Gem::Version
92
- version: '6.0'
93
- type: :development
94
- prerelease: false
95
- version_requirements: !ruby/object:Gem::Requirement
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: 2.4.2
100
- - - "<"
101
- - !ruby/object:Gem::Version
102
- version: '6.0'
103
47
  - !ruby/object:Gem::Dependency
104
48
  name: rubocop
105
49
  requirement: !ruby/object:Gem::Requirement
@@ -115,79 +59,47 @@ dependencies:
115
59
  - !ruby/object:Gem::Version
116
60
  version: '0.49'
117
61
  - !ruby/object:Gem::Dependency
118
- name: http-accept
62
+ name: webmock
119
63
  requirement: !ruby/object:Gem::Requirement
120
64
  requirements:
121
- - - ">="
122
- - !ruby/object:Gem::Version
123
- version: 1.7.0
124
- - - "<"
65
+ - - "~>"
125
66
  - !ruby/object:Gem::Version
126
67
  version: '2.0'
127
- type: :runtime
68
+ type: :development
128
69
  prerelease: false
129
70
  version_requirements: !ruby/object:Gem::Requirement
130
71
  requirements:
131
- - - ">="
132
- - !ruby/object:Gem::Version
133
- version: 1.7.0
134
- - - "<"
72
+ - - "~>"
135
73
  - !ruby/object:Gem::Version
136
74
  version: '2.0'
137
75
  - !ruby/object:Gem::Dependency
138
- name: http-cookie
76
+ name: faraday
139
77
  requirement: !ruby/object:Gem::Requirement
140
78
  requirements:
141
79
  - - ">="
142
80
  - !ruby/object:Gem::Version
143
- version: 1.0.2
144
- - - "<"
145
- - !ruby/object:Gem::Version
146
- version: '2.0'
81
+ version: '0'
147
82
  type: :runtime
148
83
  prerelease: false
149
84
  version_requirements: !ruby/object:Gem::Requirement
150
85
  requirements:
151
86
  - - ">="
152
87
  - !ruby/object:Gem::Version
153
- version: 1.0.2
154
- - - "<"
155
- - !ruby/object:Gem::Version
156
- version: '2.0'
88
+ version: '0'
157
89
  - !ruby/object:Gem::Dependency
158
- name: mime-types
90
+ name: faraday_middleware
159
91
  requirement: !ruby/object:Gem::Requirement
160
92
  requirements:
161
93
  - - ">="
162
94
  - !ruby/object:Gem::Version
163
- version: '1.16'
164
- - - "<"
165
- - !ruby/object:Gem::Version
166
- version: '4.0'
95
+ version: '0'
167
96
  type: :runtime
168
97
  prerelease: false
169
98
  version_requirements: !ruby/object:Gem::Requirement
170
99
  requirements:
171
100
  - - ">="
172
101
  - !ruby/object:Gem::Version
173
- version: '1.16'
174
- - - "<"
175
- - !ruby/object:Gem::Version
176
- version: '4.0'
177
- - !ruby/object:Gem::Dependency
178
- name: netrc
179
- requirement: !ruby/object:Gem::Requirement
180
- requirements:
181
- - - "~>"
182
- - !ruby/object:Gem::Version
183
- version: '0.8'
184
- type: :runtime
185
- prerelease: false
186
- version_requirements: !ruby/object:Gem::Requirement
187
- requirements:
188
- - - "~>"
189
- - !ruby/object:Gem::Version
190
- version: '0.8'
102
+ version: '0'
191
103
  - !ruby/object:Gem::Dependency
192
104
  name: multi_json
193
105
  requirement: !ruby/object:Gem::Requirement
@@ -203,19 +115,19 @@ dependencies:
203
115
  - !ruby/object:Gem::Version
204
116
  version: '1.0'
205
117
  - !ruby/object:Gem::Dependency
206
- name: rest-client
118
+ name: request_store
207
119
  requirement: !ruby/object:Gem::Requirement
208
120
  requirements:
209
- - - "~>"
121
+ - - ">="
210
122
  - !ruby/object:Gem::Version
211
- version: '2.0'
123
+ version: '0'
212
124
  type: :runtime
213
125
  prerelease: false
214
126
  version_requirements: !ruby/object:Gem::Requirement
215
127
  requirements:
216
- - - "~>"
128
+ - - ">="
217
129
  - !ruby/object:Gem::Version
218
- version: '2.0'
130
+ version: '0'
219
131
  - !ruby/object:Gem::Dependency
220
132
  name: twitter_cldr
221
133
  requirement: !ruby/object:Gem::Requirement
@@ -246,24 +158,29 @@ files:
246
158
  - lib/sgtn-client/cldr/localized_datetime.rb
247
159
  - lib/sgtn-client/cldr/localized_str.rb
248
160
  - lib/sgtn-client/cldr/localized_time.rb
161
+ - lib/sgtn-client/common/data.rb
249
162
  - lib/sgtn-client/common/single_operation.rb
250
163
  - lib/sgtn-client/core/cache.rb
251
164
  - lib/sgtn-client/core/config.rb
252
165
  - lib/sgtn-client/core/exceptions.rb
253
166
  - lib/sgtn-client/core/logging.rb
254
- - lib/sgtn-client/core/request.rb
167
+ - lib/sgtn-client/exceptions.rb
255
168
  - lib/sgtn-client/formatters/plurals/plural_formatter.rb
256
169
  - lib/sgtn-client/loader/cache.rb
257
- - lib/sgtn-client/loader/local_bundle.rb
258
- - lib/sgtn-client/loader/local_source_bundle.rb
259
- - lib/sgtn-client/loader/server_bundle.rb
170
+ - lib/sgtn-client/loader/chain_loader.rb
171
+ - lib/sgtn-client/loader/consts.rb
172
+ - lib/sgtn-client/loader/loader_factory.rb
173
+ - lib/sgtn-client/loader/local_translation.rb
174
+ - lib/sgtn-client/loader/server.rb
175
+ - lib/sgtn-client/loader/single_loader.rb
176
+ - lib/sgtn-client/loader/source.rb
260
177
  - lib/sgtn-client/loader/source_comparer.rb
261
178
  - lib/sgtn-client/sgtn-client.rb
262
179
  - lib/sgtn-client/util/cache-util.rb
263
- - lib/sgtn-client/util/file-util.rb
264
180
  - lib/sgtn-client/util/locale-util.rb
265
181
  - lib/sgtn-client/util/string-util.rb
266
182
  - lib/sgtn-client/util/validate-util.rb
183
+ - lib/singleton-client.rb
267
184
  - lib/singleton-ruby.rb
268
185
  - lib/version.rb
269
186
  homepage: https://github.com/vmware/singleton