istox 0.1.153.2 → 0.1.154.2

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: de3a514a1be536304d24a596ac394a1f145fa0a1a95a3d1de38b3628557c1202
4
- data.tar.gz: '0943b18ab8dbb3fe00f0192c0acfe30d9f9a677b30b2f06e23c594695f8ddec3'
3
+ metadata.gz: dc27873608ff702f609c372920ae7fe0f887c32f7379113c2e22dd0cd1e27d70
4
+ data.tar.gz: 9517caed4f791e620781f726fdd4f1952c9b06949d03a681857d185408e757a1
5
5
  SHA512:
6
- metadata.gz: b50d89dbeefbf57af9e188d8e90e86ef35af182afaea97786f756abd2bb1470998ed2c3818fa70868224e692e96441d140ada7eafced1d70bbdb176dd473d9b5
7
- data.tar.gz: 14c4aa870fb121d4634d52214c6ab4433f25222097fea7c4b552e8e5fb3b1355acbfeec1a7df469be2e3a27d69a205f326e172f44c9359e63bc9cea38167dad8
6
+ metadata.gz: 71fe3e68f49caa983c607952552314abc2b40437a4d6b3f4a51fc82135502ae97d5f289db292b1cff2f25761058d9da6f57cf1bf03222ac2ecaf97d949475a1d
7
+ data.tar.gz: c564f7093ca3484d6285cf4c77cd98569b5b99f44c27713a127c4e1c4995f37f807ef8d0d8acf2799b06c951bbc05a0625a90d519e5d20ce7c72fa2a4fc21df6
@@ -1,10 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- istox (0.1.153)
4
+ istox (0.1.154)
5
+ amazing_print
5
6
  awesome_print
6
7
  binding_of_caller
7
8
  bunny (>= 2.12.0)
9
+ exponential-backoff (= 0.0.4)
8
10
  graphlient
9
11
  gruf
10
12
  hashie (~> 3.5.7)
@@ -61,6 +63,7 @@ GEM
61
63
  i18n (>= 0.7, < 2)
62
64
  minitest (~> 5.1)
63
65
  tzinfo (~> 1.1)
66
+ amazing_print (1.1.0)
64
67
  amq-protocol (2.3.1)
65
68
  arel (9.0.0)
66
69
  awesome_print (1.8.0)
@@ -87,6 +90,7 @@ GEM
87
90
  uniform_notifier (~> 1.11.0)
88
91
  bunny (2.15.0)
89
92
  amq-protocol (~> 2.3, >= 2.3.1)
93
+ byebug (11.1.3)
90
94
  coderay (1.1.2)
91
95
  concurrent-ruby (1.1.6)
92
96
  crass (1.0.6)
@@ -94,6 +98,7 @@ GEM
94
98
  debug_inspector (0.0.3)
95
99
  diff-lcs (1.3)
96
100
  erubi (1.9.0)
101
+ exponential-backoff (0.0.4)
97
102
  factory_bot (4.8.2)
98
103
  activesupport (>= 3.0.0)
99
104
  factory_bot_rails (4.8.2)
@@ -107,14 +112,14 @@ GEM
107
112
  multipart-post (>= 1.2, < 3)
108
113
  faraday_middleware (1.0.0)
109
114
  faraday (~> 1.0)
110
- ffi (1.12.2)
115
+ ffi (1.13.0)
111
116
  globalid (0.4.2)
112
117
  activesupport (>= 4.2.0)
113
- google-protobuf (3.12.1-universal-darwin)
118
+ google-protobuf (3.12.2-universal-darwin)
114
119
  googleapis-common-protos-types (1.0.5)
115
120
  google-protobuf (~> 3.11)
116
- graphlient (0.3.7)
117
- faraday
121
+ graphlient (0.4.0)
122
+ faraday (>= 1.0)
118
123
  faraday_middleware
119
124
  graphql-client
120
125
  graphql (1.10.10)
@@ -169,6 +174,9 @@ GEM
169
174
  pry (0.12.2)
170
175
  coderay (~> 1.1.0)
171
176
  method_source (~> 0.9.0)
177
+ pry-byebug (3.8.0)
178
+ byebug (~> 11.0)
179
+ pry (~> 0.10)
172
180
  pry-rails (0.3.9)
173
181
  pry (>= 0.10.4)
174
182
  rack (2.2.2)
@@ -257,7 +265,7 @@ GEM
257
265
  tzinfo (1.2.6)
258
266
  thread_safe (~> 0.1)
259
267
  uniform_notifier (1.11.0)
260
- vault (0.13.2)
268
+ vault (0.14.0)
261
269
  aws-sigv4
262
270
  websocket-driver (0.7.0)
263
271
  websocket-extensions (>= 0.1.0)
@@ -276,6 +284,7 @@ DEPENDENCIES
276
284
  fakeredis
277
285
  istox!
278
286
  pry
287
+ pry-byebug
279
288
  pry-rails
280
289
  rails (~> 5.2.1)
281
290
  rake (~> 10.0)
@@ -0,0 +1,93 @@
1
+ import sys
2
+ import re
3
+ from tempfile import mkstemp
4
+ from shutil import move, copymode
5
+ from os import fdopen, remove
6
+ import os
7
+
8
+ # HOW TO RUN: python bulk-update-version.py <version updating to, eg. 0.1.150.2>
9
+
10
+ SERVICES = ["client-api", "admin-api", "message-api", "auth", "admin-auth"]
11
+
12
+
13
+ def replace(file_path, pattern, subst):
14
+ # Create temp file
15
+ fh, abs_path = mkstemp()
16
+ with fdopen(fh, 'w') as new_file:
17
+ dirname = os.path.dirname(__file__)
18
+ file_path = os.path.join(dirname, file_path)
19
+ if os.path.exists(file_path) == False:
20
+ return
21
+ with open(file_path) as old_file:
22
+ for line in old_file:
23
+ new_file.write(re.sub(pattern, subst, line))
24
+ # Copy the file permissions from the old file to the new file
25
+ copymode(file_path, abs_path)
26
+ # Remove original file
27
+ remove(file_path)
28
+ # Move new file
29
+ move(abs_path, file_path)
30
+
31
+
32
+ def push_service(file_path, version, hotfix):
33
+ dirname = os.path.dirname(__file__)
34
+ file_path = os.path.join(dirname, file_path)
35
+
36
+ if os.path.exists(file_path) == False:
37
+ return
38
+
39
+ if hotfix == True:
40
+ branch_name = "hotfix"
41
+ else:
42
+ branch_name = "FIX/update-istox-gem-" + version
43
+
44
+ os.chdir(file_path)
45
+ os.system(
46
+ "git branch -D %s &>/dev/null" % (branch_name))
47
+ os.system("echo 'Deleted local branch'")
48
+ os.system(
49
+ "git push origin --delete %s &>/dev/null" % (branch_name))
50
+ os.system("echo 'Deleted remote branch'")
51
+ os.system("git fetch -a")
52
+ os.system("git checkout -b %s" % (branch_name))
53
+ os.system("git add Gemfile")
54
+ os.system("git commit -m 'Update istox-gem version to %s'" % (version))
55
+ os.system("git push --set-upstream origin %s" % (branch_name))
56
+ # os.system("cd " + file_path + " && git branch -D " +
57
+ # branch_name + " &>/dev/null || echo 'Deleted local branch' || git push origin --delete hotfix &>/dev/null || echo 'Deleted remote branch' || git fetch -a || git checkout -b " +
58
+ # branch_name + " && git add Gemfile && git commit -m 'Update istox-gem version to "
59
+ # + version + "' && git push --set-upstream origin " + branch_name)
60
+
61
+
62
+ arguments = sys.argv
63
+ arguments.pop(0)
64
+
65
+ new_version = arguments[0]
66
+
67
+ hotfix = False
68
+
69
+ while True:
70
+ result = raw_input("Is this a hotix? Y/N \n")
71
+
72
+ if result.lower() == 'y':
73
+ hotfix = True
74
+ break
75
+ elif result.lower() == 'n':
76
+ hotfix = False
77
+ break
78
+ else:
79
+ print("Please input only Y or N.")
80
+
81
+
82
+ print("Updating services " + str(SERVICES) +
83
+ " to istox-gem version " + new_version)
84
+
85
+ for service in SERVICES:
86
+ replace("../" + service + "/Gemfile", r"gem 'istox'.+",
87
+ "gem 'istox', '" + new_version + "'")
88
+
89
+ for service in SERVICES:
90
+ push_service("../" + service, new_version, hotfix)
91
+
92
+ print("Services " + str(SERVICES) +
93
+ " has been updated to istox-gem version " + new_version)
@@ -30,9 +30,11 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ['lib']
32
32
 
33
+ spec.add_dependency 'amazing_print'
33
34
  spec.add_dependency 'awesome_print'
34
35
  spec.add_dependency 'binding_of_caller'
35
36
  spec.add_dependency 'bunny', '>= 2.12.0'
37
+ spec.add_dependency 'exponential-backoff', '0.0.4'
36
38
  spec.add_dependency 'graphlient'
37
39
  spec.add_dependency 'gruf'
38
40
  spec.add_dependency 'hashie', '~> 3.5.7'
@@ -52,6 +54,7 @@ Gem::Specification.new do |spec|
52
54
  spec.add_development_dependency 'faker', '~> 1.7.3'
53
55
  spec.add_development_dependency 'fakeredis'
54
56
  spec.add_development_dependency 'pry'
57
+ spec.add_development_dependency 'pry-byebug'
55
58
  spec.add_development_dependency 'pry-rails'
56
59
  spec.add_development_dependency 'rails', '~> 5.2.1'
57
60
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -32,7 +32,8 @@ module Istox
32
32
  require 'istox/helpers/common_helper'
33
33
  require 'istox/helpers/regex_helper'
34
34
  require 'istox/helpers/result_handler'
35
- require 'istox/helpers/redis'
35
+ require 'istox/helpers/redis_boot'
36
+ require 'istox/helpers/redis_manager'
36
37
  require 'istox/helpers/dlm'
37
38
  require 'istox/helpers/remote_model_cache'
38
39
 
@@ -215,7 +215,7 @@ module Istox
215
215
  retry_limit = queue_config_from_consumer_key!(consumer_key)['retry_limit']
216
216
 
217
217
  if retry_limit.nil?
218
- 3
218
+ 5
219
219
  else
220
220
  retry_limit.to_i
221
221
  end
@@ -234,6 +234,10 @@ module Istox
234
234
  end
235
235
  end
236
236
 
237
+ def queue_retry_gap_set?(consumer_key)
238
+ queue_config_from_consumer_key!(consumer_key)['retry_gap'].present?
239
+ end
240
+
237
241
  def channel_pool_size(consumer_key)
238
242
  channel = channel_config(consumer_key)
239
243
  return data['channel_pool_size'] || 1 if channel.nil?
@@ -6,7 +6,7 @@ module Istox
6
6
  return @logger if @logger.present?
7
7
 
8
8
  @logger = ::Ougai::Logger.new(STDOUT)
9
- @logger.formatter = ::Ougai::Formatters::Readable.new unless Rails.env.production?
9
+ @logger.formatter = ::Ougai::Formatters::Readable.new unless ENV.fetch('RAILS_ENV','development') == 'production'|| (defined?(Rails) && Rails.env.production?)
10
10
 
11
11
  @logger
12
12
  end
@@ -78,6 +78,9 @@ module Istox
78
78
  @channel[t]['confirm-1'].close
79
79
  @channel[t]['noconfirm'].close
80
80
  @channel.delete t
81
+
82
+ # Remove exchange from @exchange
83
+ @exchanges.delete t
81
84
  end
82
85
  end
83
86
  end.join
@@ -233,7 +236,16 @@ module Istox
233
236
  sleep 1
234
237
  do_publish(ex,options,message)
235
238
  rescue => e
236
- log.debug "Error happens: #{e}"
239
+ log.debug "Error happens: #{e.message}"
240
+
241
+ # If the error indicates that the channel is already closed
242
+ # then clear hash @channel and @exchange
243
+ if e.message.include? "cannot use a closed channel"
244
+ @channel.delete Thread.current.object_id
245
+ @exchanges.delete Thread.current.object_id
246
+ ex = exchange(eid)
247
+ do_publish(ex, options, message)
248
+ end
237
249
  end
238
250
  end
239
251
  end
@@ -3,9 +3,8 @@ require 'redis'
3
3
  module Istox
4
4
  class RedisBoot
5
5
  class << self
6
-
7
- def sets(k,v, options = {}, db)
8
- redis(db).set(k,v, options)
6
+ def sets(k, v, options = {}, db)
7
+ redis(db).set(k, v, options)
9
8
  end
10
9
 
11
10
  def scan(cursor, options = {}, db)
@@ -44,10 +43,12 @@ module Istox
44
43
 
45
44
  def redis(db)
46
45
  @redis = {} if @redis.nil?
47
- @redis[db] = Redis.new(
48
- url: ENV["REDIS_URL"] || 'redis://127.0.0.1',
46
+ if @redis[db].nil?
47
+ @redis[db] = Redis.new(
48
+ url: ENV['REDIS_URL'] || 'redis://127.0.0.1',
49
49
  db: db
50
- ) if @redis[db].nil?
50
+ )
51
+ end
51
52
  @redis[db]
52
53
  end
53
54
  end
@@ -0,0 +1,21 @@
1
+ module Istox
2
+ class RedisManager
3
+ class << self
4
+ # for remote model cache
5
+ def remote_model_redis
6
+ @remote_model_redis ||= Redis::Namespace.new(:platform_cache, redis: Redis.new(
7
+ url: ENV['REDIS_URL'] || 'redis://127.0.0.1:16379',
8
+ db: 5
9
+ ))
10
+ end
11
+
12
+ # cache request to prevent double submission
13
+ def request_redis
14
+ @request_redis ||= Redis::Namespace.new(:request_cache, redis: Redis.new(
15
+ url: ENV['REDIS_URL'] || 'redis://127.0.0.1:16379',
16
+ db: 6
17
+ ))
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,4 +1,5 @@
1
1
  require 'istox/helpers/logger'
2
+ require 'istox/helpers/redis_manager'
2
3
 
3
4
  module Istox
4
5
  class RemoteModelCache
@@ -15,9 +16,9 @@ module Istox
15
16
  log.debug "Writing data to cache, key: #{key}, fields: #{fields.inspect}"
16
17
  log.debug "Cache data: #{data.inspect}"
17
18
 
18
- Thread.new do
19
- data = data.to_json unless data.instance_of?(String)
19
+ data = data.to_json unless data.instance_of?(String)
20
20
 
21
+ Thread.new do
21
22
  results = fields.map do |f|
22
23
  redis.hset(key, f.to_s, data)
23
24
  end
@@ -77,10 +78,7 @@ module Istox
77
78
  end
78
79
 
79
80
  def redis
80
- @redis ||= Redis::Namespace.new(:platform_cache, redis: Redis.new(
81
- url: ENV['REDIS_URL'] || 'redis://127.0.0.1:16379',
82
- db: 5
83
- ))
81
+ ::Istox::RedisManager.remote_model_redis
84
82
  end
85
83
  end
86
84
  end
@@ -1,3 +1,4 @@
1
+ require 'exponential_backoff'
1
2
  require 'istox/helpers/logger'
2
3
 
3
4
  module Istox
@@ -79,26 +80,6 @@ module Istox
79
80
  queue.bind exchange, queue_options
80
81
  end
81
82
 
82
- if manual_ack
83
- letter_exchange = if exchange.nil?
84
- active_channel.default_exchange.name
85
- else
86
- exchange.name
87
- end
88
- retry_queue = active_channel.queue("#{queue_name}.retry", arguments: {
89
- 'x-dead-letter-exchange': letter_exchange,
90
- 'x-dead-letter-routing-key': queue_name.to_s,
91
- 'x-message-ttl': (::Istox::BunnyBoot.queue_retry_gap consumer_key)
92
- })
93
- if exchange_name.nil?
94
- exchange_retry = active_channel.default_exchange
95
- else
96
- exchange_retry_name = "#{exchange_name}.retry"
97
- exchange_retry = active_channel.send exchange_type, exchange_retry_name, durable: exchange_durable
98
- retry_queue.bind exchange_retry, routing_key: "#{queue_name}.retry" if manual_ack
99
- end
100
- end
101
-
102
83
  loop do
103
84
  break unless ::Istox::BunnyBoot.queue_single_consumer? consumer_key
104
85
 
@@ -115,9 +96,7 @@ module Istox
115
96
  ruby_class = ::Istox::BunnyBoot.ruby_class(consumer_key) || "#{consumer_key.to_s.underscore}_consumer"
116
97
  @workers = {} if @workers.nil?
117
98
  unless block || @workers[ruby_class]
118
- klass = Object.const_get(
119
- '::' + ruby_class.camelize
120
- )
99
+ klass = consumer_class(ruby_class)
121
100
  param = ::Istox::BunnyBoot.queue_worker_param consumer_key
122
101
  @workers[ruby_class] = if param.nil?
123
102
  klass.new
@@ -184,15 +163,13 @@ module Istox
184
163
  if ::Istox::BunnyBoot.queue_worker_param_format(consumer_key) == 'open_struct'
185
164
  processing_payload = ::Istox::CommonHelper.to_open_struct(processing_payload)
186
165
  end
187
- ::Istox::BunnyBoot.publish(exchange_retry, processing_payload, routing_key: "#{queue_name}.retry", priority: retry_count, type: 'dlx')
166
+
167
+ retry_obj = create_retry_obj(consumer_key, active_channel, exchange, exchange_name, queue_name, retry_count - 1)
168
+
169
+ ::Istox::BunnyBoot.publish(retry_obj.exchange_retry, processing_payload,
170
+ routing_key: retry_obj.routing_key, priority: retry_count, type: 'dlx')
188
171
  end
189
172
  end
190
- # # For redelivered message, call 'reject' not 'nack' in order to reschedule message to tail not head of queue
191
- # if delivery_info.redelivered
192
- # active_channel.reject(delivery_info.delivery_tag, true)
193
- # else
194
- # active_channel.nack(delivery_info.delivery_tag, false, true)
195
- # end
196
173
  ensure
197
174
  if manual_ack
198
175
  multiple = if !multiple.nil? && !result && result == multiple
@@ -205,6 +182,44 @@ module Istox
205
182
  end
206
183
  end
207
184
 
185
+ def create_retry_obj(consumer_key, active_channel, _exchange, exchange_name, queue_name, retried_count)
186
+ minimal_interval = 1.0
187
+ maximal_elapsed_time = 60.0
188
+
189
+ # retry interval will be [1, 3, 9, 27, 60, 60....] seconds
190
+ backoff = ExponentialBackoff.new(minimal_interval, maximal_elapsed_time)
191
+ backoff.multiplier = 3
192
+ ttl = ::Istox::BunnyBoot.queue_retry_gap_set?(consumer_key) ? ::Istox::BunnyBoot.queue_retry_gap(consumer_key) : backoff.interval_at(retried_count) * 1000
193
+ ttl = ttl.to_i
194
+
195
+ routing_key = "#{queue_name}.retry.#{ttl}"
196
+
197
+ retry_queue = active_channel.queue(routing_key, arguments: {
198
+ 'x-dead-letter-exchange': active_channel.default_exchange.name,
199
+ 'x-dead-letter-routing-key': queue_name.to_s,
200
+ 'x-message-ttl': ttl.to_i
201
+ })
202
+ if exchange_name.nil?
203
+ exchange_retry = active_channel.default_exchange
204
+ else
205
+ exchange_durable = ::Istox::BunnyBoot.exchange_durable? exchange_name
206
+ exchange_retry_name = "#{exchange_name}.retry"
207
+ exchange_retry = active_channel.direct(exchange_retry_name, durable: exchange_durable)
208
+ retry_queue.bind exchange_retry, routing_key: routing_key
209
+ end
210
+
211
+ OpenStruct.new(
212
+ exchange_retry: exchange_retry,
213
+ routing_key: routing_key
214
+ )
215
+ end
216
+
217
+ def consumer_class(ruby_class)
218
+ Object.const_get(
219
+ '::' + ruby_class.camelize
220
+ )
221
+ end
222
+
208
223
  def intercept(interceptors, payload, metadata, delivery_info)
209
224
  return yield if interceptors.none?
210
225
 
@@ -1,5 +1,4 @@
1
1
  require 'istox/helpers/logger'
2
- require 'aws-xray-sdk'
3
2
 
4
3
  module Istox
5
4
  module Xray
@@ -1,5 +1,4 @@
1
1
  require 'istox/helpers/logger'
2
- require 'aws-xray-sdk'
3
2
 
4
3
  module Istox
5
4
  module Xray
@@ -1,5 +1,4 @@
1
1
  require 'istox/helpers/logger'
2
- require 'aws-xray-sdk'
3
2
 
4
3
  module Istox
5
4
  module Xray
@@ -1,5 +1,4 @@
1
1
  require 'istox/helpers/logger'
2
- require 'aws-xray-sdk'
3
2
 
4
3
  module Istox
5
4
  module Xray
@@ -4,7 +4,6 @@ require 'istox/helpers/xray/grpc_server_xray_interceptor'
4
4
  require 'istox/helpers/xray/rabbitmq_publisher_interceptor'
5
5
  require 'istox/helpers/xray/rabbitmq_consumer_interceptor'
6
6
  require 'istox/helpers/logger'
7
- require 'aws-xray-sdk'
8
7
 
9
8
  module Istox
10
9
  module Xray
@@ -15,27 +14,42 @@ module Istox
15
14
  ## input gruf config to enable gruf/grpc tracing, eg. Gruf.configure do |config|
16
15
  ## set enable_rabbitmq_trace to enable rabbitmq tracing
17
16
  def init(service_name, gruf_config: nil, enable_rabbitmq_trace: nil)
18
- Rails.application.config.xray = {
19
- # default segment name generated by XRay middleware
20
- daemon_address: ENV['AWS_XRAY_DAEMON_ADDRESS'],
21
- name: service_name,
22
- patch: %I[net_http aws_sdk],
23
- # record db transactions as subsegments
24
- active_record: true,
25
- context_missing: 'LOG_ERROR'
26
- }
27
-
28
- @service_name = service_name
29
-
30
- if gruf_config.present?
31
- gruf_config.interceptors.use(::Istox::Xray::GrpcServerXrayInterceptor)
32
- ::Istox::GrpcClient.add_interceptors(::Istox::Xray::GrpcClientXrayInterceptor.new)
33
- end
17
+ if ENV['AWS_XRAY_ENABLE']&.downcase.to_s == 'true'
18
+
19
+ Rails.application.config.xray = {
20
+ # default segment name generated by XRay middleware
21
+ daemon_address: ENV['AWS_XRAY_DAEMON_ADDRESS'],
22
+ name: service_name,
23
+ patch: %I[net_http aws_sdk],
24
+ # record db transactions as subsegments
25
+ active_record: true,
26
+ context_missing: 'LOG_ERROR'
27
+ }
28
+
29
+ @service_name = service_name
30
+
31
+ if gruf_config.present?
32
+ gruf_config.interceptors.use(::Istox::Xray::GrpcServerXrayInterceptor)
33
+ ::Istox::GrpcClient.add_interceptors(::Istox::Xray::GrpcClientXrayInterceptor.new)
34
+ end
34
35
 
35
- return unless enable_rabbitmq_trace == true
36
+ return unless enable_rabbitmq_trace == true
36
37
 
37
- ::Istox::BunnyBoot.add_publisher_interceptor(::Istox::Xray::RabbitmqPublisherInterceptor.new)
38
- ::Istox::BunnyBoot.add_consumer_interceptor(::Istox::Xray::RabbitmqConsumerInterceptor.new)
38
+ ::Istox::BunnyBoot.add_publisher_interceptor(::Istox::Xray::RabbitmqPublisherInterceptor.new)
39
+ ::Istox::BunnyBoot.add_consumer_interceptor(::Istox::Xray::RabbitmqConsumerInterceptor.new)
40
+
41
+ else
42
+ Rails.application.config.xray = {
43
+ name: service_name,
44
+ context_missing: 'LOG_ERROR'
45
+ }
46
+
47
+ config = {
48
+ sampling: false,
49
+ name: service_name
50
+ }
51
+ XRay.recorder.configure(config)
52
+ end
39
53
  end
40
54
  end
41
55
  end
@@ -1,5 +1,4 @@
1
1
  require 'date'
2
- require 'rails'
3
2
 
4
3
  # https://en.wikipedia.org/wiki/Day_count_convention#30/360_Bond_Basis
5
4
  # For 360 basis: 30/360 Bond Basis
@@ -248,4 +247,4 @@ module Istox
248
247
 
249
248
  end
250
249
  end
251
- end
250
+ end
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.1.153.2'.freeze
2
+ VERSION = '0.1.154.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.153.2
4
+ version: 0.1.154.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-22 00:00:00.000000000 Z
11
+ date: 2020-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: amazing_print
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: awesome_print
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +66,20 @@ dependencies:
52
66
  - - ">="
53
67
  - !ruby/object:Gem::Version
54
68
  version: 2.12.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: exponential-backoff
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 0.0.4
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 0.0.4
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: graphlient
57
85
  requirement: !ruby/object:Gem::Requirement
@@ -318,6 +346,20 @@ dependencies:
318
346
  - - ">="
319
347
  - !ruby/object:Gem::Version
320
348
  version: '0'
349
+ - !ruby/object:Gem::Dependency
350
+ name: pry-byebug
351
+ requirement: !ruby/object:Gem::Requirement
352
+ requirements:
353
+ - - ">="
354
+ - !ruby/object:Gem::Version
355
+ version: '0'
356
+ type: :development
357
+ prerelease: false
358
+ version_requirements: !ruby/object:Gem::Requirement
359
+ requirements:
360
+ - - ">="
361
+ - !ruby/object:Gem::Version
362
+ version: '0'
321
363
  - !ruby/object:Gem::Dependency
322
364
  name: pry-rails
323
365
  requirement: !ruby/object:Gem::Requirement
@@ -441,6 +483,7 @@ files:
441
483
  - Rakefile
442
484
  - bin/console
443
485
  - bin/setup
486
+ - bulk-update-version.py
444
487
  - istox.gemspec
445
488
  - lib/istox.rb
446
489
  - lib/istox/constants/error.rb
@@ -460,7 +503,8 @@ files:
460
503
  - lib/istox/helpers/order_book_prorate.rb
461
504
  - lib/istox/helpers/publisher.rb
462
505
  - lib/istox/helpers/rate_limit.rb
463
- - lib/istox/helpers/redis.rb
506
+ - lib/istox/helpers/redis_boot.rb
507
+ - lib/istox/helpers/redis_manager.rb
464
508
  - lib/istox/helpers/regex_helper.rb
465
509
  - lib/istox/helpers/remote_model_cache.rb
466
510
  - lib/istox/helpers/result_handler.rb