wrapi 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c98bc6c2eee387f249deb88ca115e68379a7b1e6fee7931440a3b0cecb5fcf0
4
- data.tar.gz: d2a971caf861d8ab974ff2a4b29b886926021ac1297aea12b932336458daf9ee
3
+ metadata.gz: 98ca96c390b3ef729370d1237e095eb1436c326d4acd16600e3343f96f7499b9
4
+ data.tar.gz: cf29c70d73b05dfb7dac0e9d4e1098bbf573b76f9f19de1259c4b9a0f1835897
5
5
  SHA512:
6
- metadata.gz: a03c3c4c9c2ef461c5b2ab83ec791baaceb753569b87a1df32b42120b719c49b7f89b01fb98f80077fbb5a4a99f9824b4c7f156a81bcc5c721f53f471965458b
7
- data.tar.gz: 19bdac9d4e22f1d9cbeda68e32146b6535ec49ee30f0684a5e250394aefd3fca03dbc0d2537708fee79ef556728b0e7ed0cd621dbcfec24941927d83762e86ba
6
+ metadata.gz: 95c0e427ccdb8f4a1a9147e15122bbba3891556149bd1431c2668cce3038537e5f921b943a42636786aa795aecc1fdfe220ed0ed337f74e8066cd634cc9f2ec9
7
+ data.tar.gz: c3f42e63e01ba136bb47a71cf396b4a1f34ca3c39d8c26c86018bfa880d60f624bc8a1e1d8aa8dfbe01ae001c98341445501d71ed90a4e2f439675cd41749731
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
@@ -75,7 +70,6 @@ module WrAPI
75
70
 
76
71
  self.logger = nil
77
72
  self.connection_options = DEFAULT_CONNECTION_OPTIONS
78
- self.endpoint = DEFAULT_ENDPOINT
79
73
  self.format = DEFAULT_FORMAT
80
74
  self.page_size = DEFAULT_PAGE_SIZE
81
75
  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.1'
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.1
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