wrapi 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/wrapi/configuration.rb +1 -6
- data/lib/wrapi/connection.rb +2 -1
- data/lib/wrapi/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: ff558eb0e62fb544d7beadc13a7c0c87379b782b08ddc2965fb8bf2a72bd5949
|
4
|
+
data.tar.gz: c3de6d2a2ffafdfaf924ebb7ad56bc4773eaff7892ed2e974a44456b43dd4a9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c2b08f4aecd91f74d2f01939d95c712899b9b03c38bd5b5e01763b43143ea9754e2353916c64e4fdf159a9069fbf3e48310685a195ef050a4913e8f2a58dbac
|
7
|
+
data.tar.gz: 26e5aa20ded0ed3701515afb906859121a9d6f4ba2ee978828918785c39c8216153a35420cdd163617d7734f1c2f612c554a89559613ad81c6ec4f1d455c54c1
|
data/CHANGELOG.md
CHANGED
data/lib/wrapi/configuration.rb
CHANGED
@@ -24,11 +24,6 @@ module WrAPI
|
|
24
24
|
# By default, don't set any connection options
|
25
25
|
DEFAULT_CONNECTION_OPTIONS = {}
|
26
26
|
|
27
|
-
# The endpoint that will be used to connect if none is set
|
28
|
-
#
|
29
|
-
# @note There is no reason to use any other endpoint at this time
|
30
|
-
DEFAULT_ENDPOINT = 'https://api.com'.freeze
|
31
|
-
|
32
27
|
# The response format appended to the path and sent in the 'Accept' header if none is set
|
33
28
|
#
|
34
29
|
# @note JSON is the only available format at this time
|
@@ -72,10 +67,10 @@ module WrAPI
|
|
72
67
|
self.client_secret = nil
|
73
68
|
self.username = nil
|
74
69
|
self.password = nil
|
70
|
+
self.endpoint = nil
|
75
71
|
|
76
72
|
self.logger = nil
|
77
73
|
self.connection_options = DEFAULT_CONNECTION_OPTIONS
|
78
|
-
self.endpoint = DEFAULT_ENDPOINT
|
79
74
|
self.format = DEFAULT_FORMAT
|
80
75
|
self.page_size = DEFAULT_PAGE_SIZE
|
81
76
|
self.user_agent = DEFAULT_USER_AGENT
|
data/lib/wrapi/connection.rb
CHANGED
@@ -10,8 +10,9 @@ module WrAPI
|
|
10
10
|
private
|
11
11
|
|
12
12
|
def connection
|
13
|
-
|
13
|
+
raise ArgumentError, "Option for endpoint is not defined" unless endpoint
|
14
14
|
|
15
|
+
options = setup_options
|
15
16
|
Faraday::Connection.new(options) do |connection|
|
16
17
|
connection.use Faraday::Response::RaiseError
|
17
18
|
connection.adapter Faraday.default_adapter
|
data/lib/wrapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wrapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janco Tanis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|