ravelin 0.1.46 → 0.1.47

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: 6c83f962f93b06d886e7f3a68570d09d6377409248be85834c7b01e514c45149
4
- data.tar.gz: 6cc5c0081ccb8c752f1bef3303aaf165b86924e0fc330513f0472d103dc2e014
3
+ metadata.gz: 3c658a67cc9147a5494723b434bfedfe44f9ed7afc3ec3ecacf669f2f657f3da
4
+ data.tar.gz: 380067a9cd40b0d7acc00d924d249f1cb0f24ea15c6ed0a108b138dde6950f94
5
5
  SHA512:
6
- metadata.gz: 809aca51a779ff21a13ad78bb255a6f5f81987bbad00e6e6bbc006c64651a7d1422f6a0572a857f1866f554d746dbb0f1c5d50818646f45b3462082183e13cc7
7
- data.tar.gz: bcd4cab0acd9360ac93246fad19cadec4ecda2bce2784577bc5a049b009dde175c5176a3271ef76c6638aa5fa25e17eb01fef3663c72668b843302ae9e7a212b
6
+ metadata.gz: fe1cd7ed644cd7d92b899197d2a7c4d0204c784eb57cb02fca8e299492c3b27cd3ebde4920b65ac7bd12b4e5d48e4ac67b89eb9f091778896f882e94cd6ab394
7
+ data.tar.gz: 192540941b834e6391899dc6723b7ae2c5ae384a22d57b5a2a1650ded9c47f5f3647cef137f211d329faee4c2e0261e32df13a2a7defa28aa50b98a7019c075e
@@ -27,11 +27,12 @@ module Ravelin
27
27
 
28
28
  def send_event(**args)
29
29
  score = args.delete(:score)
30
+ headers = args.delete(:headers)
30
31
  event = Event.new(**args)
31
32
 
32
33
  score_param = score ? "?score=true" : nil
33
34
 
34
- post("#{@url_prefix}/v#{@api_version}/#{event.name}#{score_param}", event.serializable_hash)
35
+ post("#{@url_prefix}/v#{@api_version}/#{event.name}#{score_param}", event.serializable_hash, headers)
35
36
  end
36
37
 
37
38
  def send_backfill_event(**args)
@@ -67,8 +68,12 @@ module Ravelin
67
68
 
68
69
  private
69
70
 
70
- def post(url, payload)
71
- response = @connection.post(url, payload.to_json)
71
+ def post(url, payload, headers = {})
72
+ response = @connection.post(url, payload.to_json) do |request|
73
+ headers&.each { |key, value|
74
+ request.headers[key] = value
75
+ }
76
+ end
72
77
 
73
78
  if response.success?
74
79
  Response.new(response)
@@ -1,3 +1,3 @@
1
1
  module Ravelin
2
- VERSION = '0.1.46'
2
+ VERSION = '0.1.47'
3
3
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ravelin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.46
4
+ version: 0.1.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Levy
8
8
  - Tommy Palmer
9
9
  - Gurkan Oluc
10
10
  - Mathilda Thompson
11
- autorequire:
11
+ autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2022-10-17 00:00:00.000000000 Z
14
+ date: 2024-04-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday
@@ -163,7 +163,7 @@ homepage: https://developer.ravelin.com
163
163
  licenses:
164
164
  - MIT
165
165
  metadata: {}
166
- post_install_message:
166
+ post_install_message:
167
167
  rdoc_options: []
168
168
  require_paths:
169
169
  - lib
@@ -178,8 +178,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  requirements: []
181
- rubygems_version: 3.3.23
182
- signing_key:
181
+ rubygems_version: 3.0.9
182
+ signing_key:
183
183
  specification_version: 4
184
184
  summary: Ruby bindings for the Ravelin API
185
185
  test_files: []