statelydb 0.6.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/common/auth/auth0_token_provider.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a195c44ae0509bce7638e0b0f702e2fa9d61a22c6edfb61c09fb4c76065cd83
|
4
|
+
data.tar.gz: 3fa3ac72792f70c203b63c52e3ca0987c39bbc0c7f7fbee8fcf47ea407028360
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7f2a619018c507f1d4bffe72f1c3dd1abe761102453c2c6acd499ec4c8400a9b97d7c63befadc41dc6dd44c35d371d78ae172e3d2917e3ab87bb3c3e5461ea4
|
7
|
+
data.tar.gz: 0527abd449a1d079c8553109966b346a30bce559de872f48e1e857f4677e027e23e7f6012592d56edb3c9b5dff0785b1b010d3ad8604716ea6a3f2308ffd0da8
|
data/README.md
CHANGED
@@ -29,7 +29,7 @@ gem install statelydb
|
|
29
29
|
Create an authenticated client, then import your item types from your generated schema module and use the client!
|
30
30
|
|
31
31
|
```ruby
|
32
|
-
require_relative 'schema/stately
|
32
|
+
require_relative 'schema/stately'
|
33
33
|
|
34
34
|
def put_my_item
|
35
35
|
# Create a client. This will use the environment variables
|
@@ -100,10 +100,11 @@ module StatelyDB
|
|
100
100
|
# there is no non-blocking sleep in ruby.
|
101
101
|
# skip this if we have a pending timer thread already
|
102
102
|
@timer = Thread.new do
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
|
103
|
+
# Calculate a random multiplier between 0.3 and 0.8 to to apply to the expiry
|
104
|
+
# so that we refresh in the background ahead of expiration, but avoid
|
105
|
+
# multiple processes hammering the service at the same time.
|
106
|
+
jitter = (Random.rand * 0.5) + 0.3
|
107
|
+
delay = resp_data["expires_in"] * jitter
|
107
108
|
sleep(delay)
|
108
109
|
refresh_token
|
109
110
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statelydb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stately Cloud, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|