lockstep_rails 0.3.79 → 0.3.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/concepts/lockstep/client.rb +22 -0
- data/lib/lockstep_rails/version.rb +1 -1
- 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: c740a1a110fddf1f482502e7c081d422c3991234df99037799ac2912428de815
|
4
|
+
data.tar.gz: dbba28340fff480f5a8a518cf377021121f755a1956c3fa8ba66bbdea4ae2866
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 164f1f2f60bb0461b483d810eaaf955a22373c8217ed7fb59e62cf35620a56f2735cc3800d6c88aac651cf53ec4c0323ea2b8733a27f8c5fcdf0970841d9c77c
|
7
|
+
data.tar.gz: 5444e3005e27b38fa29a1e445b813df473b875e57ef0a649108dc2ff3bb57f5d7af8c3591331e347c423f556aa4a4f2a95dac1c1744b9d14bbf949fa94b8f295
|
@@ -37,6 +37,20 @@ module Lockstep
|
|
37
37
|
RequestStore.store[:internal_service_key]
|
38
38
|
end
|
39
39
|
|
40
|
+
def self.set_x_group_key(x_group_key)
|
41
|
+
RequestStore.store[:lockstep_x_group_key] = x_group_key
|
42
|
+
true
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.x_group_key
|
46
|
+
RequestStore.store[:lockstep_x_group_key]
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.set_m2m_token(token)
|
50
|
+
# this method can be ommitted and we can use directly `set_bearer_token`
|
51
|
+
set_bearer_token(token)
|
52
|
+
end
|
53
|
+
|
40
54
|
##
|
41
55
|
# Construct a new Lockstep API client targeting the specified server.
|
42
56
|
#
|
@@ -81,6 +95,10 @@ module Lockstep
|
|
81
95
|
self.class.api_key
|
82
96
|
end
|
83
97
|
|
98
|
+
def x_group_key
|
99
|
+
self.class.x_group_key
|
100
|
+
end
|
101
|
+
|
84
102
|
##
|
85
103
|
# Configure this API to use an application name
|
86
104
|
#
|
@@ -139,6 +157,10 @@ module Lockstep
|
|
139
157
|
request["Authorization"] = 'Bearer ' + bearer_token
|
140
158
|
end
|
141
159
|
|
160
|
+
if x_group_key != nil
|
161
|
+
request["X-Group-Key"] = x_group_key
|
162
|
+
end
|
163
|
+
|
142
164
|
# Send the request
|
143
165
|
http.request(request)
|
144
166
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lockstep_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.80
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vivek AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|