Skip to content

Commit

Permalink
Merge pull request #9 from checkr/peter/ruby3-support
Browse files Browse the repository at this point in the history
Update to support Ruby3
  • Loading branch information
Ivan Rylach authored Sep 9, 2021
2 parents 1fc16ee + ba8a3ec commit 08cbd5f
Show file tree
Hide file tree
Showing 46 changed files with 99 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.14
2.4.21
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Flagr is a feature flagging, A/B testing and dynamic configuration microservice.

This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 1.1.10
- Package version: 1.1.10
- API version: 1.1.12
- Package version: 1.1.12
- Build package: io.swagger.codegen.languages.RubyClientCodegen

## Installation
Expand All @@ -23,15 +23,15 @@ gem build rbflagr.gemspec
Then either install the gem locally:

```shell
gem install ./rbflagr-1.1.10.gem
gem install ./rbflagr-1.1.12.gem
```
(for development, run `gem install --dev ./rbflagr-1.1.10.gem` to install the development dependencies)
(for development, run `gem install --dev ./rbflagr-1.1.12.gem` to install the development dependencies)

or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).

Finally add this to the Gemfile:

gem 'rbflagr', '~> 1.1.10'
gem 'rbflagr', '~> 1.1.12'

### Install from Git

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/api/constraint_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/api/distribution_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/api/evaluation_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/api/export_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/api/flag_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/api/health_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/api/segment_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/api/tag_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/api/variant_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
10 changes: 5 additions & 5 deletions lib/rbflagr/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand All @@ -15,7 +15,7 @@
require 'logger'
require 'tempfile'
require 'typhoeus'
require 'uri'
require 'addressable/uri'

module Flagr
class ApiClient
Expand Down Expand Up @@ -63,7 +63,7 @@ def call_api(http_method, path, opts = {})
:message => response.return_message)
else
fail ApiError.new(:code => response.code,
:response_headers => response.headers,
:response_headers => response.headers.to_h,
:response_body => response.body),
response.status_message
end
Expand Down Expand Up @@ -265,7 +265,7 @@ def sanitize_filename(filename)
def build_request_url(path)
# Add leading and trailing slashes to path
path = "/#{path}".gsub(/\/+/, '/')
URI.encode(@config.base_url + path)
Addressable::URI.encode(@config.base_url + path)
end

# Builds the HTTP request body
Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/api_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
8 changes: 4 additions & 4 deletions lib/rbflagr/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

require 'uri'
require 'addressable/uri'

module Flagr
class Configuration
Expand Down Expand Up @@ -175,7 +175,7 @@ def base_path=(base_path)

def base_url
url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
URI.encode(url)
Addressable::URI.encode(url)
end

# Gets API key (with prefix if set).
Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/models/constraint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/models/create_constraint_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/models/create_flag_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/models/create_segment_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/models/create_tag_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/models/create_variant_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/models/distribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/models/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/models/eval_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/models/eval_debug_log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
4 changes: 2 additions & 2 deletions lib/rbflagr/models/eval_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
OpenAPI spec version: 1.1.10
OpenAPI spec version: 1.1.12
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.14
Swagger Codegen version: 2.4.21
=end

Expand Down
Loading

0 comments on commit 08cbd5f

Please sign in to comment.