lockstep_rails 0.3.79 → 0.3.80

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: c0fe73a5f2c5f253cacccf071634a2b1e7ac9bed8a3dee4cff7ae2c9be272fed
4
- data.tar.gz: b4377a0458f8a422ab3b67514ba21359309b464383c4f5fc2a7db1cb9f3f32ba
3
+ metadata.gz: c740a1a110fddf1f482502e7c081d422c3991234df99037799ac2912428de815
4
+ data.tar.gz: dbba28340fff480f5a8a518cf377021121f755a1956c3fa8ba66bbdea4ae2866
5
5
  SHA512:
6
- metadata.gz: d70576f4cf0602c65fe7d1ef155cd302307d0dd6db75ad7977eb0089436a1db9af2332ed0d8b655ac149b5b55b7bf553a434029e4190fdf3f1f3aafbe604f10f
7
- data.tar.gz: 0b0dadad816724abae003b828b89ef7de57ce8f2f04d825786faf9f16f7c03911bd8a0e7100e42f89bafcf1cc79bcaa4677a7820055fdabc18fa718cdcde9a57
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LockstepRails
4
- VERSION = '0.3.79'
4
+ VERSION = '0.3.80'
5
5
  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.79
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-09 00:00:00.000000000 Z
11
+ date: 2024-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails