openapi_ipify 4.0.0 → 5.0.0
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/Gemfile.lock +2 -2
- data/README.md +7 -7
- data/git_push.sh +2 -2
- data/lib/openapi_ipify/api/default_api.rb +2 -2
- data/lib/openapi_ipify/api_client.rb +2 -2
- data/lib/openapi_ipify/api_error.rb +2 -2
- data/lib/openapi_ipify/configuration.rb +11 -9
- data/lib/openapi_ipify/models/ip.rb +16 -19
- data/lib/openapi_ipify/version.rb +3 -3
- data/lib/openapi_ipify.rb +2 -2
- data/openapi_ipify.gemspec +2 -2
- data/spec/api/default_api_spec.rb +2 -2
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/ip_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- 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: d937a87a75d0ab25b418e5c5ad0de28f9945ebab36a37e8c9f9d1ec7efc300ff
|
4
|
+
data.tar.gz: b14dfe2945348cc284b411fc52d38789f5d63c1198a00ec38700fa0739d544f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 547d0644a692924bff2e8ac525f67e5615ef5524453c83b5647f42d0528c94974ca10598bf7857f004ae485c2818e5c71d8e48e4a9bd84433f4dea939903e22a
|
7
|
+
data.tar.gz: 9274e85742ecb796991ff9df9b8b94c2a570b3e2f596542bbfe0d53bfba7c9213097f54c56673993336c38c12b805fc6dc77f88a47ee200b21afed3c9cbb48e8
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
openapi_ipify (
|
4
|
+
openapi_ipify (5.0.0)
|
5
5
|
typhoeus (~> 1.0, >= 1.0.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -53,7 +53,7 @@ GEM
|
|
53
53
|
ruby-progressbar (~> 1.7)
|
54
54
|
unicode-display_width (>= 1.4.0, < 1.6)
|
55
55
|
ruby-progressbar (1.13.0)
|
56
|
-
stringio (3.0.
|
56
|
+
stringio (3.0.8)
|
57
57
|
typhoeus (1.4.0)
|
58
58
|
ethon (>= 0.9.0)
|
59
59
|
unicode-display_width (1.5.0)
|
data/README.md
CHANGED
@@ -6,8 +6,8 @@ OpenAPI client for ipify, a simple public IP address API
|
|
6
6
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
|
-
- API version:
|
10
|
-
- Package version:
|
9
|
+
- API version: 5.0.0
|
10
|
+
- Package version: 5.0.0
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://github.com/cliffano/openapi-ipify](https://github.com/cliffano/openapi-ipify)
|
13
13
|
|
@@ -24,22 +24,22 @@ gem build openapi_ipify.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./openapi_ipify-
|
27
|
+
gem install ./openapi_ipify-5.0.0.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./openapi_ipify-
|
30
|
+
(for development, run `gem install --dev ./openapi_ipify-5.0.0.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'openapi_ipify', '~>
|
36
|
+
gem 'openapi_ipify', '~> 5.0.0'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
40
|
-
If the Ruby gem is hosted at a git repository: https://github.com/
|
40
|
+
If the Ruby gem is hosted at a git repository: https://github.com/cliffano/openapi-ipify, then add the following in the Gemfile:
|
41
41
|
|
42
|
-
gem 'openapi_ipify', :git => 'https://github.com/
|
42
|
+
gem 'openapi_ipify', :git => 'https://github.com/cliffano/openapi-ipify.git'
|
43
43
|
|
44
44
|
### Include the Ruby code directly
|
45
45
|
|
data/git_push.sh
CHANGED
@@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then
|
|
14
14
|
fi
|
15
15
|
|
16
16
|
if [ "$git_user_id" = "" ]; then
|
17
|
-
git_user_id="
|
17
|
+
git_user_id="cliffano"
|
18
18
|
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
19
|
fi
|
20
20
|
|
21
21
|
if [ "$git_repo_id" = "" ]; then
|
22
|
-
git_repo_id="
|
22
|
+
git_repo_id="openapi-ipify"
|
23
23
|
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
24
|
fi
|
25
25
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -152,7 +152,7 @@ module OpenApiIpifyClient
|
|
152
152
|
@scheme = 'https'
|
153
153
|
@host = 'api.ipify.org'
|
154
154
|
@base_path = ''
|
155
|
-
@server_index =
|
155
|
+
@server_index = nil
|
156
156
|
@server_operation_index = {}
|
157
157
|
@server_variables = {}
|
158
158
|
@server_operation_variables = {}
|
@@ -200,10 +200,12 @@ module OpenApiIpifyClient
|
|
200
200
|
|
201
201
|
# Returns base URL for specified operation based on server settings
|
202
202
|
def base_url(operation = nil)
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
203
|
+
if operation_server_settings.key?(operation) then
|
204
|
+
index = server_operation_index.fetch(operation, server_index)
|
205
|
+
server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
206
|
+
else
|
207
|
+
server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil)
|
208
|
+
end
|
207
209
|
end
|
208
210
|
|
209
211
|
# Gets API key (with prefix if set).
|
@@ -258,8 +260,8 @@ module OpenApiIpifyClient
|
|
258
260
|
servers = server_settings if servers == nil
|
259
261
|
|
260
262
|
# check array index out of bound
|
261
|
-
if (index < 0 || index >= servers.size)
|
262
|
-
fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
|
263
|
+
if (index.nil? || index < 0 || index >= servers.size)
|
264
|
+
fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}"
|
263
265
|
end
|
264
266
|
|
265
267
|
server = servers[index]
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -59,12 +59,15 @@ module OpenApiIpifyClient
|
|
59
59
|
|
60
60
|
if attributes.key?(:'ip')
|
61
61
|
self.ip = attributes[:'ip']
|
62
|
+
else
|
63
|
+
self.ip = nil
|
62
64
|
end
|
63
65
|
end
|
64
66
|
|
65
67
|
# Show invalid properties with the reasons. Usually used together with valid?
|
66
68
|
# @return Array for valid properties with the reasons
|
67
69
|
def list_invalid_properties
|
70
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
68
71
|
invalid_properties = Array.new
|
69
72
|
if @ip.nil?
|
70
73
|
invalid_properties.push('invalid value for "ip", ip cannot be nil.')
|
@@ -76,6 +79,7 @@ module OpenApiIpifyClient
|
|
76
79
|
# Check to see if the all the properties in the model are valid
|
77
80
|
# @return true if the model is valid
|
78
81
|
def valid?
|
82
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
79
83
|
return false if @ip.nil?
|
80
84
|
true
|
81
85
|
end
|
@@ -104,37 +108,30 @@ module OpenApiIpifyClient
|
|
104
108
|
# @param [Hash] attributes Model attributes in the form of hash
|
105
109
|
# @return [Object] Returns the model itself
|
106
110
|
def self.build_from_hash(attributes)
|
107
|
-
new.build_from_hash(attributes)
|
108
|
-
end
|
109
|
-
|
110
|
-
# Builds the object from hash
|
111
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
-
# @return [Object] Returns the model itself
|
113
|
-
def build_from_hash(attributes)
|
114
111
|
return nil unless attributes.is_a?(Hash)
|
115
112
|
attributes = attributes.transform_keys(&:to_sym)
|
116
|
-
|
117
|
-
|
118
|
-
|
113
|
+
transformed_hash = {}
|
114
|
+
openapi_types.each_pair do |key, type|
|
115
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
116
|
+
transformed_hash["#{key}"] = nil
|
119
117
|
elsif type =~ /\AArray<(.*)>/i
|
120
118
|
# check to ensure the input is an array given that the attribute
|
121
119
|
# is documented as an array but the input is not
|
122
|
-
if attributes[
|
123
|
-
|
120
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
121
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
124
122
|
end
|
125
|
-
elsif !attributes[
|
126
|
-
|
123
|
+
elsif !attributes[attribute_map[key]].nil?
|
124
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
127
125
|
end
|
128
126
|
end
|
129
|
-
|
130
|
-
self
|
127
|
+
new(transformed_hash)
|
131
128
|
end
|
132
129
|
|
133
130
|
# Deserializes the data based on type
|
134
131
|
# @param string type Data type
|
135
132
|
# @param string value Value to be deserialized
|
136
133
|
# @return [Object] Deserialized data
|
137
|
-
def _deserialize(type, value)
|
134
|
+
def self._deserialize(type, value)
|
138
135
|
case type.to_sym
|
139
136
|
when :Time
|
140
137
|
Time.parse(value)
|
@@ -3,13 +3,13 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module OpenApiIpifyClient
|
14
|
-
VERSION = '
|
14
|
+
VERSION = '5.0.0'
|
15
15
|
end
|
data/lib/openapi_ipify.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/openapi_ipify.gemspec
CHANGED
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
#OpenAPI client for ipify, a simple public IP address API
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 5.0.0
|
9
9
|
Contact: blah@cliffano.com
|
10
10
|
Generated by: https://openapi-generator.tech
|
11
|
-
OpenAPI Generator version:
|
11
|
+
OpenAPI Generator version: 7.0.0
|
12
12
|
|
13
13
|
=end
|
14
14
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/spec/api_client_spec.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/spec/configuration_spec.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/spec/models/ip_spec.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/spec/spec_helper.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#OpenAPI client for ipify, a simple public IP address API
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document: 5.0.0
|
7
7
|
Contact: blah@cliffano.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openapi_ipify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cliffano Subagio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|