active_record_api-request 0.3.5 → 0.3.6

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: 95b910becd72375f68dbfe2b1d2ae98a7972a63f5497803b2a045886e60168c5
4
- data.tar.gz: 421c9cd61aaa12944d7c2fcfabc5686b1cc30968bd6565322abb10a26f6bf3e8
3
+ metadata.gz: ec6db51deb4bbce9665e99e40b21a72720c29f3508e39ce945518f8b0ed5bad3
4
+ data.tar.gz: 2c2add015ee0865b360ebce7c45dfa9e06b7225cf39a85be05464d4148601379
5
5
  SHA512:
6
- metadata.gz: acf6216e93081547b8de869aa266a74c87b374f7dc27b8341cd5a62dfcd3929f5cde9b0f81b50b1fb28d398fdd9e85f3c4831dc380086078a0486f51371e2148
7
- data.tar.gz: a52d0ca8a4fd2f7a1cf69dd23ad19e50d0a0d9a53db8688adc6e175905df7930d8376b35417d68c29ddc398ed979712fc14a5b1a24d5aa5305ccffba68826203
6
+ metadata.gz: b2176d2c4964be039374fa73155e13453258a2f128d7423ad2721d848d992a3b79f7551bdbd49b674a184bf288569804e8f471970969817a35eafb5ef14c82e7
7
+ data.tar.gz: 4795aff92c17edb1104b33b8db999b7895809ce94f6ce09c1d6b2fffa4f38f64c859c587bc65edfac10790afba2318e8327613eaed410d08d99e2f8161035f23
@@ -7,6 +7,8 @@ module ActiveRecordApi
7
7
 
8
8
  def flush
9
9
  return unless defined? AUTH_REDIS_POOL
10
+ debug_log 'flushing token cache'
11
+ Honeybadger.notify(StandardError.new('token cache has been flushed'))
10
12
  AUTH_REDIS_POOL.with do |client|
11
13
  @redis_client = client
12
14
  @redis_client.del('auth_token')
@@ -20,7 +22,11 @@ module ActiveRecordApi
20
22
 
21
23
  def retrieve_token_from_redis(token_proc)
22
24
  debug_log 'looking?'
23
- return token_proc.call() unless defined? AUTH_REDIS_POOL
25
+ unless defined? AUTH_REDIS_POOL
26
+ debug_log 'no auth redis pool'
27
+ Honeybadger.notify(StandardError.new('no auth redis pool for token cache'))
28
+ return token_proc.call()
29
+ end
24
30
  debug_log 'looking for token in cache'
25
31
  AUTH_REDIS_POOL.with do |client|
26
32
  @redis_client = client
@@ -35,6 +41,7 @@ module ActiveRecordApi
35
41
  if acquire_lock
36
42
  begin
37
43
  debug_log "acquired lock"
44
+ Honeybadger.notify(StandardError.new('acquired lock and fetching token for cache'))
38
45
  @token = token_proc.call()
39
46
  @redis_client.set 'auth_token', @token
40
47
  ensure
@@ -1,5 +1,5 @@
1
1
  module ActiveRecordApi
2
2
  module Request
3
- VERSION = '0.3.5'.freeze
3
+ VERSION = '0.3.6'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_api-request
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Full Measure Education
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-30 00:00:00.000000000 Z
11
+ date: 2019-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_attr