singleton-client-test 0.7.7.1 → 0.7.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sgtn-client/api/source.rb +0 -1
- data/lib/sgtn-client/api/translation.rb +41 -29
- data/lib/sgtn-client/common/data.rb +1 -1
- data/lib/sgtn-client/common/single_operation.rb +7 -8
- data/lib/sgtn-client/core/cache.rb +11 -14
- data/lib/sgtn-client/core/config.rb +56 -170
- data/lib/sgtn-client/i18n_backend.rb +7 -5
- data/lib/sgtn-client/loader/cache.rb +23 -36
- data/lib/sgtn-client/loader/loader_factory.rb +5 -4
- data/lib/sgtn-client/loader/local_translation.rb +3 -3
- data/lib/sgtn-client/loader/server.rb +4 -4
- data/lib/sgtn-client/loader/single_loader.rb +22 -19
- data/lib/sgtn-client/loader/source.rb +3 -3
- data/lib/sgtn-client/loader/source_comparer.rb +1 -1
- data/lib/sgtn-client/loader.rb +1 -0
- data/lib/sgtn-client/sgtn-client.rb +44 -86
- data/lib/sgtn-client/util/cache-util.rb +1 -9
- data/lib/sgtn-client/util/locale-util.rb +60 -27
- data/lib/sgtn-client/util/string-util.rb +5 -2
- data/lib/sgtn-client/util/validate-util.rb +9 -19
- data/lib/singleton-client.rb +12 -2
- metadata +20 -55
- data/lib/sgtn-client/core/logging.rb +0 -53
@@ -16,9 +16,9 @@ module SgtnClient
|
|
16
16
|
REQUEST_ARGUMENTS = { timeout: 10 }.freeze
|
17
17
|
|
18
18
|
def initialize(config)
|
19
|
-
@server_url = config
|
19
|
+
@server_url = config.vip_server
|
20
20
|
|
21
|
-
product_root = format('i18n/api/v2/translation/products/%s/versions/%s', config
|
21
|
+
product_root = format('i18n/api/v2/translation/products/%s/versions/%s', config.product_name, config.version)
|
22
22
|
|
23
23
|
@bundle_url = "#{product_root}/locales/%s/components/%s"
|
24
24
|
@locales_url = "#{product_root}/localelist"
|
@@ -26,14 +26,14 @@ module SgtnClient
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def load_bundle(component, locale)
|
29
|
-
SgtnClient.logger.debug "[#{method(__callee__).owner}.#{__callee__}] component=#{component}, locale=#{locale}"
|
29
|
+
SgtnClient.logger.debug { "[#{method(__callee__).owner}.#{__callee__}] component=#{component}, locale=#{locale}" }
|
30
30
|
|
31
31
|
messages = query_server(format(@bundle_url, locale, component), ['messages'])
|
32
32
|
messages
|
33
33
|
end
|
34
34
|
|
35
35
|
def available_bundles
|
36
|
-
SgtnClient.logger.debug "[#{method(__callee__).owner}.#{__callee__}]"
|
36
|
+
SgtnClient.logger.debug { "[#{method(__callee__).owner}.#{__callee__}]" }
|
37
37
|
|
38
38
|
components_thread = Thread.new { available_components }
|
39
39
|
available_locales.reduce(Set.new) do |bundles, locale|
|
@@ -4,39 +4,42 @@
|
|
4
4
|
module SgtnClient
|
5
5
|
module TranslationLoader
|
6
6
|
module SingleLoader
|
7
|
-
def load_bundle(component, locale)
|
8
|
-
SgtnClient.logger.debug "[#{__FILE__}][#{__callee__}] component=#{component}, locale=#{locale}"
|
7
|
+
def load_bundle(component, locale, sync: true)
|
8
|
+
SgtnClient.logger.debug { "[#{__FILE__}][#{__callee__}] component=#{component}, locale=#{locale}" }
|
9
9
|
|
10
|
-
|
11
|
-
id = CacheUtil.get_cachekey(component, locale)
|
12
|
-
@single_bundle_loader.operate(id, component, locale)&.value
|
10
|
+
do_single_load(Common::BundleID.new(component, locale), sync) { super(component, locale) }
|
13
11
|
end
|
14
12
|
|
15
|
-
def available_bundles
|
16
|
-
SgtnClient.logger.debug "[#{__FILE__}][#{__callee__}]"
|
13
|
+
def available_bundles(sync: true)
|
14
|
+
SgtnClient.logger.debug { "[#{__FILE__}][#{__callee__}]" }
|
17
15
|
|
18
|
-
|
19
|
-
@single_available_bundles_loader.operate(CONSTS::AVAILABLE_BUNDLES_KEY)&.value
|
16
|
+
do_single_load(CONSTS::AVAILABLE_BUNDLES_KEY, sync) { super() }
|
20
17
|
end
|
21
18
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
loader = nil
|
26
|
-
none_alive = proc { |_, thread| thread.nil? }
|
27
|
-
creator = proc do |id, _, *args|
|
19
|
+
def initialize(*args)
|
20
|
+
none_alive = proc { |_, thread| thread.nil? || thread.alive? == false }
|
21
|
+
creator = proc do |id, &block|
|
28
22
|
Thread.new do
|
29
|
-
SgtnClient.logger.debug "start single loading #{id}"
|
23
|
+
SgtnClient.logger.debug { "start single loading #{id}" }
|
30
24
|
begin
|
31
|
-
block.call
|
25
|
+
block.call
|
32
26
|
ensure
|
33
27
|
# delete thread from hash after finish
|
34
|
-
|
28
|
+
@single_loader.remove_object(id)
|
35
29
|
end
|
36
30
|
end
|
37
31
|
end
|
38
32
|
|
39
|
-
|
33
|
+
@single_loader = SingleOperation.new(none_alive, &creator)
|
34
|
+
|
35
|
+
super
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def do_single_load(id, sync, &block)
|
41
|
+
thread = @single_loader.operate(id, &block)
|
42
|
+
thread&.value if sync
|
40
43
|
end
|
41
44
|
end
|
42
45
|
end
|
@@ -9,13 +9,13 @@ module SgtnClient
|
|
9
9
|
module TranslationLoader
|
10
10
|
class Source
|
11
11
|
def initialize(config)
|
12
|
-
@source_bundle_path = Pathname.new(config
|
12
|
+
@source_bundle_path = Pathname.new(config.source_bundle)
|
13
13
|
end
|
14
14
|
|
15
15
|
def load_bundle(component, locale = nil)
|
16
16
|
return if locale && locale != CONSTS::REAL_SOURCE_LOCALE # return when NOT querying source
|
17
17
|
|
18
|
-
SgtnClient.logger.debug "[#{method(__callee__).owner}.#{__callee__}] component=#{component}"
|
18
|
+
SgtnClient.logger.debug { "[#{method(__callee__).owner}.#{__callee__}] component=#{component}" }
|
19
19
|
|
20
20
|
total_messages = {}
|
21
21
|
|
@@ -35,7 +35,7 @@ module SgtnClient
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def available_bundles
|
38
|
-
SgtnClient.logger.debug "[#{method(__callee__).owner}.#{__callee__}]"
|
38
|
+
SgtnClient.logger.debug { "[#{method(__callee__).owner}.#{__callee__}]" }
|
39
39
|
|
40
40
|
@available_bundles ||= begin
|
41
41
|
@source_bundle_path.children.select(&:directory?).reduce(Set.new) do |bundles, component|
|
@@ -5,7 +5,7 @@ module SgtnClient
|
|
5
5
|
module TranslationLoader
|
6
6
|
module SourceComparer
|
7
7
|
def load_bundle(component, locale)
|
8
|
-
SgtnClient.logger.debug "[#{__FILE__}][#{__callee__}] component=#{component}, locale=#{locale}"
|
8
|
+
SgtnClient.logger.debug { "[#{__FILE__}][#{__callee__}] component=#{component}, locale=#{locale}" }
|
9
9
|
|
10
10
|
# source locale and old source locale don't need comparison because they are bases of comparison
|
11
11
|
real_locale = cache_to_real_map[locale]
|
data/lib/sgtn-client/loader.rb
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
module SgtnClient
|
7
7
|
module TranslationLoader # :nodoc:
|
8
8
|
autoload :Cache, 'sgtn-client/loader/cache'
|
9
|
+
autoload :CacheFiller, 'sgtn-client/loader/cache'
|
9
10
|
autoload :Chain, 'sgtn-client/loader/chain_loader'
|
10
11
|
autoload :CONSTS, 'sgtn-client/loader/consts'
|
11
12
|
autoload :LoaderFactory, 'sgtn-client/loader/loader_factory'
|
@@ -1,90 +1,48 @@
|
|
1
1
|
# Copyright 2022 VMware, Inc.
|
2
2
|
# SPDX-License-Identifier: EPL-2.0
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
log.error exception.message
|
49
|
-
end
|
50
|
-
|
51
|
-
# create log file
|
52
|
-
file = './sgtnclient_d.log'
|
53
|
-
logger.debug "[Client][load]create log file=#{file}"
|
54
|
-
if args[2] != nil
|
55
|
-
file = args[2]
|
56
|
-
end
|
57
|
-
file = File.open(file, 'a')
|
58
|
-
file.sync = true
|
59
|
-
logger = Logger.new(file, LOGFILE_SHIFT_AGE)
|
60
|
-
|
61
|
-
# Set log level for sandbox mode
|
62
|
-
env = Config.default_environment
|
63
|
-
mode = Config.configurations[env]["mode"]
|
64
|
-
logger.debug "[Client][load]set log level, mode=#{mode}"
|
65
|
-
if mode == 'sandbox'
|
66
|
-
logger.level = Logger::DEBUG
|
67
|
-
else
|
68
|
-
logger.level = Logger::INFO
|
69
|
-
end
|
70
|
-
|
71
|
-
# initialize cache
|
72
|
-
disable_cache = Config.configurations[env]["disable_cache"]
|
73
|
-
logger.debug "[Client][load]cache initialize, disable_cache=#{disable_cache}"
|
74
|
-
if disable_cache != nil
|
75
|
-
Core::Cache.initialize(disable_cache)
|
76
|
-
else
|
77
|
-
Core::Cache.initialize()
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def logger
|
82
|
-
Config.logger
|
83
|
-
end
|
84
|
-
|
85
|
-
def logger=(log)
|
86
|
-
Config.logger = log
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
4
|
+
require 'forwardable'
|
5
|
+
require 'yaml'
|
6
|
+
|
7
|
+
module SgtnClient # :nodoc:
|
8
|
+
autoload :Common, 'sgtn-client/common'
|
9
|
+
autoload :TranslationLoader, 'sgtn-client/loader'
|
10
|
+
autoload :SingleOperation, 'sgtn-client/common/single_operation'
|
11
|
+
|
12
|
+
module Core # :nodoc:
|
13
|
+
autoload :Cache, 'sgtn-client/core/cache'
|
14
|
+
end
|
15
|
+
|
16
|
+
autoload :Translation, 'sgtn-client/api/translation'
|
17
|
+
autoload :T, 'sgtn-client/api/t'
|
18
|
+
autoload :Source, 'sgtn-client/api/source'
|
19
|
+
autoload :Config, 'sgtn-client/core/config'
|
20
|
+
autoload :Exceptions, 'sgtn-client/core/exceptions'
|
21
|
+
autoload :ValidateUtil, 'sgtn-client/util/validate-util'
|
22
|
+
autoload :LocaleUtil, 'sgtn-client/util/locale-util'
|
23
|
+
autoload :CacheUtil, 'sgtn-client/util/cache-util'
|
24
|
+
autoload :StringUtil, 'sgtn-client/util/string-util'
|
25
|
+
autoload :SingletonError, 'sgtn-client/exceptions'
|
26
|
+
autoload :I18nBackend, 'sgtn-client/i18n_backend'
|
27
|
+
|
28
|
+
module Formatters # :nodoc:
|
29
|
+
autoload :PluralFormatter, 'sgtn-client/formatters/plurals/plural_formatter'
|
30
|
+
end
|
31
|
+
|
32
|
+
class << self
|
33
|
+
extend Forwardable
|
34
|
+
|
35
|
+
def_delegator Config, :instance, :config
|
36
|
+
def_delegators :config, :logger, :logger=
|
37
|
+
|
38
|
+
def load(config_file, env, log_file = nil)
|
39
|
+
configurations = YAML.load(File.read(config_file))
|
40
|
+
config_hash = configurations[env]
|
41
|
+
raise "Configuration[#{env}] NotFound" unless config_hash
|
42
|
+
|
43
|
+
config_hash['log_file'] = log_file if log_file
|
44
|
+
config.update(config_hash)
|
45
|
+
ValidateUtil.validate_config
|
46
|
+
end
|
47
|
+
end
|
90
48
|
end
|
@@ -16,20 +16,12 @@ module SgtnClient
|
|
16
16
|
def self.write_cache(cache_key, items)
|
17
17
|
return nil if items.nil? || items.empty?
|
18
18
|
|
19
|
-
|
20
|
-
cache_expiry_period = Config.configurations[env]['cache_expiry_period']
|
19
|
+
cache_expiry_period = SgtnClient.config.cache_expiry_period
|
21
20
|
# expired after 24 hours
|
22
21
|
cache_expiry_period = 24 * 60 if cache_expiry_period.nil?
|
23
22
|
Core::Cache.put(cache_key, items, cache_expiry_period)
|
24
23
|
end
|
25
24
|
|
26
|
-
def self.get_cachekey(component, locale)
|
27
|
-
env = Config.default_environment
|
28
|
-
product_name = Config.configurations[env]['product_name']
|
29
|
-
version = Config.configurations[env]['version'].to_s
|
30
|
-
product_name + '_' + version + '_' + component + '_' + locale
|
31
|
-
end
|
32
|
-
|
33
25
|
def self.is_expired(cache_item)
|
34
26
|
cache_item[:expiry] < Time.now
|
35
27
|
end
|
@@ -3,8 +3,10 @@
|
|
3
3
|
# Copyright 2022 VMware, Inc.
|
4
4
|
# SPDX-License-Identifier: EPL-2.0
|
5
5
|
|
6
|
+
require 'concurrent/map'
|
7
|
+
|
6
8
|
module SgtnClient
|
7
|
-
class LocaleUtil
|
9
|
+
class LocaleUtil # :nodoc:
|
8
10
|
MAP_LOCALES = {
|
9
11
|
'zh-cn' => 'zh-hans',
|
10
12
|
'zh-tw' => 'zh-hant',
|
@@ -12,57 +14,88 @@ module SgtnClient
|
|
12
14
|
'zh-hant-tw' => 'zh-hant'
|
13
15
|
}.freeze
|
14
16
|
LOCALE_SEPARATOR = '-'
|
17
|
+
EN_LOCALE = 'en'
|
18
|
+
@locale_match_results = Concurrent::Map.new
|
19
|
+
@lowercase_locales_map = Concurrent::Map.new
|
20
|
+
|
21
|
+
def self.get_best_locale(locale, component)
|
22
|
+
component_result = @locale_match_results[component] ||= begin
|
23
|
+
components = SgtnClient.config.available_components
|
24
|
+
unless components.empty? || components.include?(component)
|
25
|
+
raise SingletonError, "component '#{component}' doesn't exist!"
|
26
|
+
end
|
27
|
+
|
28
|
+
Concurrent::Map.new
|
29
|
+
end
|
15
30
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
31
|
+
component_result[locale] ||= begin
|
32
|
+
# component_result.shift if component_result.size >= 50
|
33
|
+
if SgtnClient.config.available_locales(component).include?(locale)
|
34
|
+
locale
|
35
|
+
elsif locale.nil?
|
36
|
+
get_fallback_locale
|
37
|
+
else
|
38
|
+
locale = locale.to_s
|
39
|
+
if locale.empty?
|
40
|
+
get_fallback_locale
|
41
|
+
else
|
42
|
+
candidates = lowercase_locales_map(component)
|
43
|
+
if candidates.empty?
|
44
|
+
locale
|
45
|
+
else
|
46
|
+
get_best_match(locale.gsub('_', LOCALE_SEPARATOR).downcase, candidates)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
29
51
|
end
|
30
52
|
|
31
|
-
def self.get_best_match(locale)
|
53
|
+
def self.get_best_match(locale, candidates)
|
32
54
|
locale = MAP_LOCALES[locale] || locale
|
33
|
-
|
55
|
+
candidates[locale] or begin
|
34
56
|
index = locale.rindex(LOCALE_SEPARATOR)
|
35
57
|
return get_fallback_locale if index.nil?
|
36
58
|
|
37
|
-
get_best_match(locale[0...index])
|
59
|
+
get_best_match(locale[0...index], candidates)
|
38
60
|
end
|
39
61
|
end
|
40
62
|
|
41
63
|
def self.get_source_locale
|
42
|
-
|
64
|
+
EN_LOCALE
|
43
65
|
end
|
44
66
|
|
45
67
|
def self.get_default_locale
|
46
|
-
|
47
|
-
Config.configurations[env]['default_language']
|
68
|
+
EN_LOCALE
|
48
69
|
end
|
49
70
|
|
50
71
|
def self.get_fallback_locale
|
51
|
-
|
72
|
+
locale_fallbacks[0]
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.locale_fallbacks
|
76
|
+
@locale_fallbacks ||= [get_default_locale, get_source_locale, EN_LOCALE].uniq(&:to_s) - [nil, '']
|
52
77
|
end
|
53
78
|
|
54
|
-
def self.lowercase_locales_map
|
55
|
-
@lowercase_locales_map ||=
|
79
|
+
def self.lowercase_locales_map(component)
|
80
|
+
@lowercase_locales_map[component] ||= SgtnClient.config.available_locales(component).each_with_object({}) do |locale, memo|
|
56
81
|
memo[locale.to_s.downcase] = locale
|
57
82
|
end
|
58
83
|
end
|
59
84
|
|
60
|
-
def self.
|
61
|
-
|
85
|
+
def self.reset_locale_data(type, component = nil)
|
86
|
+
return unless type == :available_locales
|
87
|
+
|
88
|
+
if component.nil?
|
89
|
+
@locale_match_results.clear
|
90
|
+
@lowercase_locales_map.clear
|
91
|
+
else
|
92
|
+
@locale_match_results.delete(component)
|
93
|
+
@lowercase_locales_map.delete(component)
|
94
|
+
end
|
62
95
|
end
|
63
96
|
|
64
|
-
|
97
|
+
SgtnClient.config.add_observer(self, :reset_locale_data)
|
65
98
|
|
66
|
-
private_class_method :get_best_match, :lowercase_locales_map, :
|
99
|
+
private_class_method :get_best_match, :lowercase_locales_map, :reset_locale_data
|
67
100
|
end
|
68
101
|
end
|
@@ -6,31 +6,21 @@ module SgtnClient
|
|
6
6
|
class ValidateUtil
|
7
7
|
|
8
8
|
def self.validate_config()
|
9
|
-
|
10
|
-
|
11
|
-
messages = "\n"
|
9
|
+
puts "validating config..."
|
10
|
+
messages = ""
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
version = SgtnClient.config.version
|
13
|
+
SgtnClient.config.version = version.to_s
|
14
|
+
if version.to_s !~ /\A(\d+\.)*\d+\z/
|
15
|
+
messages = messages + "Configuration[version] has to be standard as '#.#.#, e.g '1.0.0'!\n"
|
16
16
|
end
|
17
|
-
|
18
|
-
#version = Config.configurations[env]["version"]
|
19
|
-
#if version.is_a? Integer
|
20
|
-
#messages = messages + "Configuration[version] has to be standard as '#.#.#, e.g '1.0.0'!\n"
|
21
|
-
#end
|
22
17
|
|
23
|
-
cache_expiry_period =
|
18
|
+
cache_expiry_period = SgtnClient.config.cache_expiry_period
|
24
19
|
if cache_expiry_period != nil && (cache_expiry_period.is_a? Integer) == false
|
25
20
|
messages = messages + "Configuration[cache_expiry_period] has to be a number!\n"
|
26
21
|
end
|
27
|
-
|
28
|
-
|
29
|
-
if disable_cache != nil && disable_cache != false && disable_cache != true
|
30
|
-
messages = messages + "Configuration[disable_cache] has to be a 'true' or 'false'!\n"
|
31
|
-
end
|
32
|
-
|
33
|
-
if messages != "\n"
|
22
|
+
|
23
|
+
if messages != ""
|
34
24
|
raise Exceptions::MissingConfig.new(messages)
|
35
25
|
end
|
36
26
|
end
|
data/lib/singleton-client.rb
CHANGED
@@ -7,8 +7,18 @@ require_relative 'singleton-ruby'
|
|
7
7
|
module Sgtn # :nodoc:
|
8
8
|
class << self
|
9
9
|
extend Forwardable
|
10
|
-
|
11
|
-
|
10
|
+
|
11
|
+
# load configurations from a file
|
12
|
+
def load_config(config_file, env)
|
13
|
+
SgtnClient.load(config_file, env)
|
14
|
+
end
|
15
|
+
|
16
|
+
def_delegator SgtnClient::Config, :instance, :config
|
17
|
+
delegate %i[translate t get_translations locale locale=] => SgtnClient::Translation,
|
18
|
+
%i[logger product_name version vip_server translation_bundle
|
19
|
+
source_bundle cache_expiry_period log_file log_level].flat_map { |m|
|
20
|
+
[m, "#{m}=".to_sym]
|
21
|
+
} => :config
|
12
22
|
end
|
13
23
|
|
14
24
|
I18nBackend = SgtnClient::I18nBackend
|
metadata
CHANGED
@@ -1,79 +1,59 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: singleton-client-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.7.
|
4
|
+
version: 0.7.7.4
|
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-
|
11
|
+
date: 2022-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: concurrent-ruby
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '6.0'
|
23
|
-
type: :development
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '6.0'
|
26
|
+
version: '0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
28
|
+
name: faraday
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
31
|
- - "~>"
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
40
|
-
type: :
|
33
|
+
version: '1.10'
|
34
|
+
type: :runtime
|
41
35
|
prerelease: false
|
42
36
|
version_requirements: !ruby/object:Gem::Requirement
|
43
37
|
requirements:
|
44
38
|
- - "~>"
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
40
|
+
version: '1.10'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '0'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: webmock
|
42
|
+
name: faraday_middleware
|
63
43
|
requirement: !ruby/object:Gem::Requirement
|
64
44
|
requirements:
|
65
45
|
- - "~>"
|
66
46
|
- !ruby/object:Gem::Version
|
67
|
-
version: '2
|
68
|
-
type: :
|
47
|
+
version: '1.2'
|
48
|
+
type: :runtime
|
69
49
|
prerelease: false
|
70
50
|
version_requirements: !ruby/object:Gem::Requirement
|
71
51
|
requirements:
|
72
52
|
- - "~>"
|
73
53
|
- !ruby/object:Gem::Version
|
74
|
-
version: '2
|
54
|
+
version: '1.2'
|
75
55
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
56
|
+
name: i18n
|
77
57
|
requirement: !ruby/object:Gem::Requirement
|
78
58
|
requirements:
|
79
59
|
- - ">="
|
@@ -87,7 +67,7 @@ dependencies:
|
|
87
67
|
- !ruby/object:Gem::Version
|
88
68
|
version: '0'
|
89
69
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
70
|
+
name: lumberjack
|
91
71
|
requirement: !ruby/object:Gem::Requirement
|
92
72
|
requirements:
|
93
73
|
- - ">="
|
@@ -118,16 +98,16 @@ dependencies:
|
|
118
98
|
name: request_store
|
119
99
|
requirement: !ruby/object:Gem::Requirement
|
120
100
|
requirements:
|
121
|
-
- - "
|
101
|
+
- - "~>"
|
122
102
|
- !ruby/object:Gem::Version
|
123
|
-
version: '0'
|
103
|
+
version: '1.0'
|
124
104
|
type: :runtime
|
125
105
|
prerelease: false
|
126
106
|
version_requirements: !ruby/object:Gem::Requirement
|
127
107
|
requirements:
|
128
|
-
- - "
|
108
|
+
- - "~>"
|
129
109
|
- !ruby/object:Gem::Version
|
130
|
-
version: '0'
|
110
|
+
version: '1.0'
|
131
111
|
- !ruby/object:Gem::Dependency
|
132
112
|
name: twitter_cldr
|
133
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,20 +122,6 @@ dependencies:
|
|
142
122
|
- - "~>"
|
143
123
|
- !ruby/object:Gem::Version
|
144
124
|
version: '6.6'
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: i18n
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - ">="
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '0'
|
152
|
-
type: :runtime
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - ">="
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '0'
|
159
125
|
description: Singleton Ruby client
|
160
126
|
email: g11n-vip-project@vmware.com
|
161
127
|
executables: []
|
@@ -178,7 +144,6 @@ files:
|
|
178
144
|
- lib/sgtn-client/core/cache.rb
|
179
145
|
- lib/sgtn-client/core/config.rb
|
180
146
|
- lib/sgtn-client/core/exceptions.rb
|
181
|
-
- lib/sgtn-client/core/logging.rb
|
182
147
|
- lib/sgtn-client/exceptions.rb
|
183
148
|
- lib/sgtn-client/formatters/plurals/plural_formatter.rb
|
184
149
|
- lib/sgtn-client/i18n_backend.rb
|