openapi_ipify 3.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 062df844e1ef7f64a11da2ffdb0ae2bf7a8d93604061cdd309444d7eff9db4bf
4
- data.tar.gz: 3f2b9796d1374d9459f273af0f4329eaac4a94c77e2288d39b6a5cb36ac04cb1
3
+ metadata.gz: d937a87a75d0ab25b418e5c5ad0de28f9945ebab36a37e8c9f9d1ec7efc300ff
4
+ data.tar.gz: b14dfe2945348cc284b411fc52d38789f5d63c1198a00ec38700fa0739d544f4
5
5
  SHA512:
6
- metadata.gz: 57b6562447408b733bf63ae00abe769d2dec9f2114e15cd43448edc8f3485fc60307acf505915a2e95a2f7b7a65558e1fccab30e0136a212208261ed51a84637
7
- data.tar.gz: 2bab1c1185e14388ae66b65f543fa38609102010d6907163391e1f3c324f7cb358cbdde6591ca67794b6ff9cf0fff3220467808c8ef5211d0e94b33439c6f763
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 (3.3.0)
4
+ openapi_ipify (5.0.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -14,34 +14,36 @@ GEM
14
14
  ethon (0.16.0)
15
15
  ffi (>= 1.15.0)
16
16
  ffi (1.15.5)
17
- jaro_winkler (1.5.4)
17
+ jaro_winkler (1.5.6)
18
18
  method_source (1.0.0)
19
- parallel (1.22.1)
20
- parser (3.1.2.1)
19
+ parallel (1.23.0)
20
+ parser (3.2.2.3)
21
21
  ast (~> 2.4.1)
22
- pry (0.14.1)
22
+ racc
23
+ pry (0.14.2)
23
24
  coderay (~> 1.1)
24
25
  method_source (~> 1.0)
25
26
  pry-byebug (3.10.1)
26
27
  byebug (~> 11.0)
27
28
  pry (>= 0.13, < 0.15)
28
- psych (4.0.6)
29
+ psych (5.1.0)
29
30
  stringio
31
+ racc (1.7.1)
30
32
  rainbow (3.1.1)
31
33
  rake (13.0.6)
32
34
  rspec (3.12.0)
33
35
  rspec-core (~> 3.12.0)
34
36
  rspec-expectations (~> 3.12.0)
35
37
  rspec-mocks (~> 3.12.0)
36
- rspec-core (3.12.0)
38
+ rspec-core (3.12.2)
37
39
  rspec-support (~> 3.12.0)
38
- rspec-expectations (3.12.0)
40
+ rspec-expectations (3.12.3)
39
41
  diff-lcs (>= 1.2.0, < 2.0)
40
42
  rspec-support (~> 3.12.0)
41
- rspec-mocks (3.12.0)
43
+ rspec-mocks (3.12.6)
42
44
  diff-lcs (>= 1.2.0, < 2.0)
43
45
  rspec-support (~> 3.12.0)
44
- rspec-support (3.12.0)
46
+ rspec-support (3.12.1)
45
47
  rubocop (0.66.0)
46
48
  jaro_winkler (~> 1.5.1)
47
49
  parallel (~> 1.10)
@@ -50,8 +52,8 @@ GEM
50
52
  rainbow (>= 2.2.2, < 4.0)
51
53
  ruby-progressbar (~> 1.7)
52
54
  unicode-display_width (>= 1.4.0, < 1.6)
53
- ruby-progressbar (1.11.0)
54
- stringio (3.0.2)
55
+ ruby-progressbar (1.13.0)
56
+ stringio (3.0.8)
55
57
  typhoeus (1.4.0)
56
58
  ethon (>= 0.9.0)
57
59
  unicode-display_width (1.5.0)
@@ -67,4 +69,4 @@ DEPENDENCIES
67
69
  rubocop (~> 0.66.0)
68
70
 
69
71
  BUNDLED WITH
70
- 2.3.23
72
+ 2.4.17
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: 3.3.0
10
- - Package version: 3.3.0
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-3.3.0.gem
27
+ gem install ./openapi_ipify-5.0.0.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./openapi_ipify-3.3.0.gem` to install the development dependencies)
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', '~> 3.3.0'
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/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
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/GIT_USER_ID/GIT_REPO_ID.git'
42
+ gem 'openapi_ipify', :git => 'https://github.com/cliffano/openapi-ipify.git'
43
43
 
44
44
  ### Include the Ruby code directly
45
45
 
@@ -89,5 +89,5 @@ Class | Method | HTTP request | Description
89
89
 
90
90
  ## Documentation for Authorization
91
91
 
92
- All endpoints do not require authorization.
92
+ Endpoints do not require authorization.
93
93
 
data/bin/bundle CHANGED
@@ -47,7 +47,7 @@ m = Module.new do
47
47
  def lockfile
48
48
  lockfile =
49
49
  case File.basename(gemfile)
50
- when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
50
+ when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
51
51
  else "#{gemfile}.lock"
52
52
  end
53
53
  File.expand_path(lockfile)
@@ -62,8 +62,9 @@ m = Module.new do
62
62
 
63
63
  def bundler_requirement
64
64
  @bundler_requirement ||=
65
- env_var_version || cli_arg_version ||
66
- bundler_requirement_for(lockfile_version)
65
+ env_var_version ||
66
+ cli_arg_version ||
67
+ bundler_requirement_for(lockfile_version)
67
68
  end
68
69
 
69
70
  def bundler_requirement_for(version)
@@ -71,13 +72,7 @@ m = Module.new do
71
72
 
72
73
  bundler_gem_version = Gem::Version.new(version)
73
74
 
74
- requirement = bundler_gem_version.approximate_recommendation
75
-
76
- return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0")
77
-
78
- requirement += ".a" if bundler_gem_version.prerelease?
79
-
80
- requirement
75
+ bundler_gem_version.approximate_recommendation
81
76
  end
82
77
 
83
78
  def load_bundler!
data/bin/byebug CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/coderay CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/htmldiff CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/ldiff CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/pry CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/racc ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby2.7
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'racc' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
+
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require "rubygems"
25
+ require "bundler/setup"
26
+
27
+ load Gem.bin_path("racc", "racc")
data/bin/rake CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/rspec CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/rubocop CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/ruby-parse CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/bin/ruby-rewrite CHANGED
@@ -13,7 +13,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
15
15
  if File.file?(bundle_binstub)
16
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
17
  load(bundle_binstub)
18
18
  else
19
19
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
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="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="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: 3.3.0
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: 6.2.1
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: 3.3.0
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: 6.2.1
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: 3.3.0
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: 6.2.1
9
+ OpenAPI Generator version: 7.0.0
10
10
 
11
11
  =end
12
12
 
@@ -32,6 +32,7 @@ module OpenApiIpifyClient
32
32
  end
33
33
  else
34
34
  super arg
35
+ @message = arg
35
36
  end
36
37
  end
37
38
 
@@ -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: 3.3.0
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: 6.2.1
9
+ OpenAPI Generator version: 7.0.0
10
10
 
11
11
  =end
12
12
 
@@ -62,6 +62,16 @@ module OpenApiIpifyClient
62
62
  # Defines the access token (Bearer) used with OAuth2.
63
63
  attr_accessor :access_token
64
64
 
65
+ # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
66
+ # Overrides the access_token if set
67
+ # @return [Proc]
68
+ attr_accessor :access_token_getter
69
+
70
+ # Set this to return data as binary instead of downloading a temp file. When enabled (set to true)
71
+ # HTTP responses with return type `File` will be returned as a stream of binary data.
72
+ # Default to false.
73
+ attr_accessor :return_binary_data
74
+
65
75
  # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
66
76
  # details will be logged with `logger.debug` (see the `logger` attribute).
67
77
  # Default to false.
@@ -142,7 +152,7 @@ module OpenApiIpifyClient
142
152
  @scheme = 'https'
143
153
  @host = 'api.ipify.org'
144
154
  @base_path = ''
145
- @server_index = 0
155
+ @server_index = nil
146
156
  @server_operation_index = {}
147
157
  @server_variables = {}
148
158
  @server_operation_variables = {}
@@ -190,10 +200,12 @@ module OpenApiIpifyClient
190
200
 
191
201
  # Returns base URL for specified operation based on server settings
192
202
  def base_url(operation = nil)
193
- index = server_operation_index.fetch(operation, server_index)
194
- return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
195
-
196
- server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
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
197
209
  end
198
210
 
199
211
  # Gets API key (with prefix if set).
@@ -208,6 +220,12 @@ module OpenApiIpifyClient
208
220
  end
209
221
  end
210
222
 
223
+ # Gets access_token using access_token_getter or uses the static access_token
224
+ def access_token_with_refresh
225
+ return access_token if access_token_getter.nil?
226
+ access_token_getter.call
227
+ end
228
+
211
229
  # Gets Basic Auth token string
212
230
  def basic_auth_token
213
231
  'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
@@ -242,8 +260,8 @@ module OpenApiIpifyClient
242
260
  servers = server_settings if servers == nil
243
261
 
244
262
  # check array index out of bound
245
- if (index < 0 || index >= servers.size)
246
- 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}"
247
265
  end
248
266
 
249
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: 3.3.0
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: 6.2.1
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
- self.class.openapi_types.each_pair do |key, type|
117
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
118
- self.send("#{key}=", nil)
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[self.class.attribute_map[key]].is_a?(Array)
123
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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[self.class.attribute_map[key]].nil?
126
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
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: 3.3.0
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: 6.2.1
9
+ OpenAPI Generator version: 7.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  module OpenApiIpifyClient
14
- VERSION = '3.3.0'
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: 3.3.0
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: 6.2.1
9
+ OpenAPI Generator version: 7.0.0
10
10
 
11
11
  =end
12
12
 
@@ -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: 3.3.0
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: 6.2.1
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: 3.3.0
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: 6.2.1
9
+ OpenAPI Generator version: 7.0.0
10
10
 
11
11
  =end
12
12
 
@@ -40,7 +40,7 @@ describe 'DefaultApi' do
40
40
  # @return [Ip]
41
41
  describe 'get_ip test' do
42
42
  it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
44
  end
45
45
  end
46
46
 
@@ -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: 3.3.0
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: 6.2.1
9
+ OpenAPI Generator version: 7.0.0
10
10
 
11
11
  =end
12
12
 
@@ -89,6 +89,8 @@ describe OpenApiIpifyClient::ApiClient do
89
89
  end
90
90
  end
91
91
 
92
+
93
+
92
94
  describe '#deserialize' do
93
95
  it "handles Array<Integer>" do
94
96
  api_client = OpenApiIpifyClient::ApiClient.new
@@ -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: 3.3.0
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: 6.2.1
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: 3.3.0
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: 6.2.1
9
+ OpenAPI Generator version: 7.0.0
10
10
 
11
11
  =end
12
12
 
@@ -27,7 +27,7 @@ describe OpenApiIpifyClient::Ip do
27
27
  end
28
28
  describe 'test attribute "ip"' do
29
29
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
30
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
31
  end
32
32
  end
33
33
 
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: 3.3.0
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: 6.2.1
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: 3.3.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cliffano Subagio
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-19 00:00:00.000000000 Z
11
+ date: 2023-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -67,6 +67,7 @@ files:
67
67
  - bin/htmldiff
68
68
  - bin/ldiff
69
69
  - bin/pry
70
+ - bin/racc
70
71
  - bin/rake
71
72
  - bin/rspec
72
73
  - bin/rubocop
@@ -92,7 +93,7 @@ homepage: https://github.com/cliffano/openapi-ipify
92
93
  licenses:
93
94
  - MIT
94
95
  metadata: {}
95
- post_install_message:
96
+ post_install_message:
96
97
  rdoc_options: []
97
98
  require_paths:
98
99
  - lib
@@ -108,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
109
  version: '0'
109
110
  requirements: []
110
111
  rubygems_version: 3.1.2
111
- signing_key:
112
+ signing_key:
112
113
  specification_version: 4
113
114
  summary: openapi-ipify Ruby Gem
114
115
  test_files: