data_plane_api 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: ef9b77e23457f82223d970f629f3a49cd9d014d842f63b5b09ed69426728dcf5
4
- data.tar.gz: 2ddee17d5f8ca74c2c26a371aade290f8eed7318ef0ee4007a1d7bf5c5755250
3
+ metadata.gz: cc317af5694ae9e6972ddbfd6db39c0389cd57c93fff4c76ac093ef6c5b9a1bd
4
+ data.tar.gz: 455464f49c2842dea2849e8d3c3fdaab3b74f879281e4ea36d122f18750cb746
5
5
  SHA512:
6
- metadata.gz: 8bc942ceebb102d2fb5805b48df7468e0cfcafe33ff7ee3508f9aef3c5b1ed7704dbfa29199fb990d5de992b24868cb274bcb37082a29e52a07fcb72834a6065
7
- data.tar.gz: fe7567a34f721e700674a8d0e4e156b0ed368d74897c08de38c150f0bfe5d8fbe399ae6efc9462c22175b0f447e5975f471bdd1f3b88a2f2ef499c03ed1f988e
6
+ metadata.gz: 652ea631a623bff177c3f9b7d662be8915a3f79d4c95f296d9fe946bd4b481d63b758db425438c8293a261ccad316c56530ca55ab6a86e0420c294680dde2025
7
+ data.tar.gz: 1acc0677dbf9633846535f875ea3f2e2f97d589ffd1760ac2efc3c43aed7eedac3efadfdbdb68629a5b44d465e75db92dfa15cfd28f996e83e8b39c4fe7a59e2
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.1.3
data/Gemfile CHANGED
@@ -5,11 +5,11 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in data_plane_api.gemspec
6
6
  gemspec
7
7
 
8
+ gem 'debug' # Ruby debugger
8
9
  gem 'minitest', '~> 5.0' # Tests framework
9
10
  gem 'rake', '~> 13.0' # Ruby automation tasks
10
11
  gem 'rubocop', '~> 1.21' # Ruby linter
11
12
  gem 'rubocop-espago', '~> 1.0' # Custom Ruby linter config
12
13
  gem 'shoulda-context', '~> 2.0' # Testing utilities
13
- gem 'debug' # Ruby debugger
14
14
  gem 'vcr' # Save HTTP interactions to files during tests
15
15
  gem 'webmock' # Mock network interactions
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- data_plane_api (0.1.0)
5
- faraday (~> 2.7)
4
+ data_plane_api (0.1.1)
5
+ faraday (> 1, < 3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -61,6 +61,7 @@ GEM
61
61
 
62
62
  PLATFORMS
63
63
  arm64-darwin-20
64
+ x86_64-linux
64
65
 
65
66
  DEPENDENCIES
66
67
  data_plane_api!
@@ -30,7 +30,7 @@ require_relative 'lib/data_plane_api/version'
30
30
  spec.require_paths = ['lib']
31
31
 
32
32
  # Uncomment to register a new dependency of your gem
33
- spec.add_dependency 'faraday', '~> 2.7'
33
+ spec.add_dependency 'faraday', '> 1', '< 3'
34
34
 
35
35
  # For more information and examples about making a new gem, check out our
36
36
  # guide at: https://bundler.io/guides/creating_gem.html
@@ -105,15 +105,31 @@ module DataPlaneApi
105
105
 
106
106
  private
107
107
 
108
- # @return [Faraday::Connection]
109
- def build_connection
110
- headers = { 'Content-Type' => 'application/json' }
111
-
112
- ::Faraday.new(url: "#{url}/v2/", headers: headers) do |f|
113
- f.request :json
114
- f.response :json
115
- f.request :authorization, :basic, basic_user, basic_password
108
+ if ::Faraday::VERSION > '2'
109
+ # @return [Faraday::Connection]
110
+ def build_connection
111
+ headers = { 'Content-Type' => 'application/json' }
112
+
113
+ ::Faraday.new(url: "#{url}/v2/", headers: headers) do |f|
114
+ f.request :json
115
+ f.response :json
116
+ f.request :authorization, :basic, basic_user, basic_password
117
+ end
118
+ end
119
+ else
120
+ # Faraday 1.x compatibility
121
+
122
+ # @return [Faraday::Connection]
123
+ def build_connection
124
+ headers = { 'Content-Type' => 'application/json' }
125
+
126
+ ::Faraday.new(url: "#{url}/v2/", headers: headers) do |f|
127
+ f.request :json
128
+ f.response :json
129
+ f.request :basic_auth, basic_user, basic_password
130
+ end
116
131
  end
117
132
  end
133
+
118
134
  end
119
135
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module DataPlaneApi
4
4
  # @return [String]
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_plane_api
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
  - Mateusz Drewniak
@@ -15,16 +15,22 @@ dependencies:
15
15
  name: faraday
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">"
19
19
  - !ruby/object:Gem::Version
20
- version: '2.7'
20
+ version: '1'
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '3'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">"
29
+ - !ruby/object:Gem::Version
30
+ version: '1'
31
+ - - "<"
26
32
  - !ruby/object:Gem::Version
27
- version: '2.7'
33
+ version: '3'
28
34
  description: Ruby gem which covers a limited subset of the HAProxy Data Plane API.
29
35
  email:
30
36
  - m.drewniak@espago.com
@@ -33,6 +39,7 @@ extensions: []
33
39
  extra_rdoc_files: []
34
40
  files:
35
41
  - ".rubocop.yml"
42
+ - ".ruby-version"
36
43
  - CHANGELOG.md
37
44
  - Gemfile
38
45
  - Gemfile.lock