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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c98bc6c2eee387f249deb88ca115e68379a7b1e6fee7931440a3b0cecb5fcf0
4
- data.tar.gz: d2a971caf861d8ab974ff2a4b29b886926021ac1297aea12b932336458daf9ee
3
+ metadata.gz: ff558eb0e62fb544d7beadc13a7c0c87379b782b08ddc2965fb8bf2a72bd5949
4
+ data.tar.gz: c3de6d2a2ffafdfaf924ebb7ad56bc4773eaff7892ed2e974a44456b43dd4a9d
5
5
  SHA512:
6
- metadata.gz: a03c3c4c9c2ef461c5b2ab83ec791baaceb753569b87a1df32b42120b719c49b7f89b01fb98f80077fbb5a4a99f9824b4c7f156a81bcc5c721f53f471965458b
7
- data.tar.gz: 19bdac9d4e22f1d9cbeda68e32146b6535ec49ee30f0684a5e250394aefd3fca03dbc0d2537708fee79ef556728b0e7ed0cd621dbcfec24941927d83762e86ba
6
+ metadata.gz: 6c2b08f4aecd91f74d2f01939d95c712899b9b03c38bd5b5e01763b43143ea9754e2353916c64e4fdf159a9069fbf3e48310685a195ef050a4913e8f2a58dbac
7
+ data.tar.gz: 26e5aa20ded0ed3701515afb906859121a9d6f4ba2ee978828918785c39c8216153a35420cdd163617d7734f1c2f612c554a89559613ad81c6ec4f1d455c54c1
data/CHANGELOG.md CHANGED
@@ -2,3 +2,6 @@
2
2
 
3
3
  ## [0.1.0] - 2024-02-2
4
4
  - Initial release extracted from CloudAlly gem
5
+
6
+ ## [0.1.1] - 2024-02-5
7
+ - default endpoint to nil and raise error in connection when not available
@@ -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
@@ -10,8 +10,9 @@ module WrAPI
10
10
  private
11
11
 
12
12
  def connection
13
- options = setup_options
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WrAPI
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.2'
5
5
  end
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.0
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-02 00:00:00.000000000 Z
11
+ date: 2024-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday