ravelin 0.1.46 → 0.1.48
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ravelin/client.rb +8 -3
- data/lib/ravelin/payment_method.rb +2 -1
- data/lib/ravelin/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06c54c8c59397f5bef51ca8568ad810e02b667d5f4b503603eb9c9f0207d4f01
|
4
|
+
data.tar.gz: 16dcb580db44f8f063d8f00f841e64512500660ccbda629b903f8eaea91fac4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bf5a8a7f2f5ca0be37afb92018d8fc956428040663e2aabdd6e782436b30e22265d11da77956466109a7e7be0928ba9c25828493610a6a2365400292699a72a
|
7
|
+
data.tar.gz: 0da901e101e17a842dafa6400cd22edea3183fafcd2d48aa9830ac4c3f7d257067c50e3b84fb9b60ed5ce7af1140afa9545065d6755ad5462c8514bd8b180121
|
data/lib/ravelin/client.rb
CHANGED
@@ -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)
|
data/lib/ravelin/version.rb
CHANGED
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.
|
4
|
+
version: 0.1.48
|
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:
|
14
|
+
date: 2024-09-27 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|
@@ -47,14 +47,14 @@ dependencies:
|
|
47
47
|
requirements:
|
48
48
|
- - "~>"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
50
|
+
version: '2.5'
|
51
51
|
type: :development
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
57
|
+
version: '2.5'
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rake
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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.
|
182
|
-
signing_key:
|
181
|
+
rubygems_version: 3.5.11
|
182
|
+
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: Ruby bindings for the Ravelin API
|
185
185
|
test_files: []
|