convoy.rb 0.1.7 → 0.1.8
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/lib/convoy/api_operations/delete.rb +1 -1
- data/lib/convoy/api_operations/get.rb +1 -1
- data/lib/convoy/api_operations/list.rb +1 -1
- data/lib/convoy/api_operations/request.rb +5 -2
- data/lib/convoy/convoy_configuration.rb +1 -0
- data/lib/convoy/resources/delivery_attempt.rb +2 -1
- data/lib/convoy/resources/endpoint.rb +1 -0
- data/lib/convoy/resources/event_delivery.rb +2 -1
- data/lib/convoy/version.rb +1 -1
- data/lib/convoy.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee919edcdd707b9e06dc0106c3925878397766c114e7742475a7c87aee9db66d
|
4
|
+
data.tar.gz: 1cb0aab99274569dcba20195d43b93275bd555412f3c558040fd6b2d9cea8c34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f9137bdef6d7894adacc0665a161cd437fcfcd2739b59b7867131b0655c1d63602f210d017494c8dd5197247328f7fb84f955bbf0b2c1e698fe1e8c134bd4d2
|
7
|
+
data.tar.gz: 4be077174a93871e7c9f9c38a0110709327aa7aa8590e5fd5924e672df84f0a13984bdf05ba7b2c63b6a144e302c272dc119a3070c0ffff8fd3e0b779b301714
|
@@ -32,8 +32,11 @@ module Convoy
|
|
32
32
|
req
|
33
33
|
end
|
34
34
|
|
35
|
-
|
36
|
-
|
35
|
+
if !config.api_key.nil?
|
36
|
+
request['Authorization'] = "Bearer #{config.api_key}"
|
37
|
+
else
|
38
|
+
request.basic_auth config.username, config.password
|
39
|
+
end
|
37
40
|
|
38
41
|
# Build HTTP Client.
|
39
42
|
client = Net::HTTP.new(uri.host, uri.port)
|
@@ -3,9 +3,10 @@ module Convoy
|
|
3
3
|
include ApiOperations::Get
|
4
4
|
include ApiOperations::List
|
5
5
|
|
6
|
-
def initialize(eventId = nil, id = nil, config = Convoy.config)
|
6
|
+
def initialize(eventId = nil, id = nil, config = Convoy.config, **kwargs)
|
7
7
|
@eventId = eventId
|
8
8
|
@id = id
|
9
|
+
@params = kwargs[:params].nil? ? {} : kwargs[:params]
|
9
10
|
@config = config
|
10
11
|
end
|
11
12
|
|
@@ -3,8 +3,9 @@ module Convoy
|
|
3
3
|
include ApiOperations::Get
|
4
4
|
include ApiOperations::List
|
5
5
|
|
6
|
-
def intialize(eventId = nil, id = nil, config = Convoy.config)
|
6
|
+
def intialize(eventId = nil, id = nil, config = Convoy.config, **kwargs)
|
7
7
|
@eventId = eventId
|
8
|
+
@params = kwargs[:params].nil? ? {} : kwargs[:params]
|
8
9
|
@id = id
|
9
10
|
@config = config
|
10
11
|
end
|
data/lib/convoy/version.rb
CHANGED
data/lib/convoy.rb
CHANGED
@@ -20,10 +20,12 @@ module Convoy
|
|
20
20
|
attr_reader :config
|
21
21
|
|
22
22
|
# User configurable options
|
23
|
+
# Some of them have defaults
|
23
24
|
def_delegators :@config, :ssl, :ssl=
|
24
25
|
def_delegators :@config, :debug, :debug=
|
25
26
|
def_delegators :@config, :username, :username=
|
26
27
|
def_delegators :@config, :password, :password=
|
28
|
+
def_delegators :@config, :api_key, :api_key=
|
27
29
|
def_delegators :@config, :base_uri, :base_uri=
|
28
30
|
def_delegators :@config, :logger, :logger=
|
29
31
|
def_delegators :@config, :log_level, :log_level=
|