Skip to content

Commit

Permalink
Updating Rails to 6.1.2
Browse files Browse the repository at this point in the history
Signed-off-by: HemaHG <hhg@redhat.com>
  • Loading branch information
hemahg committed Apr 9, 2021
1 parent ad74766 commit 5a06abf
Show file tree
Hide file tree
Showing 27 changed files with 294 additions and 236 deletions.
8 changes: 3 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.3'
gem 'rails', '~> 6.1.2'
gem 'pg', '>= 0.20'
gem 'schema_plus_enums'

# Use Puma as the app server

gem 'puma', '~> 5.2'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.5'
Expand All @@ -28,11 +27,10 @@ gem 'puma', '~> 5.2'
gem 'responders', '~> 3.0.1'
gem '3scale-api'

gem 'bootsnap'
gem 'bootsnap', '>= 1.4.4', require: false

gem 'que', '>= 1.0.0.beta3'
gem 'que-web'
gem 'baby_squeel'

gem 'bugsnag'
# bugsnag-capistrano 2.x does not have a rake task to report deploys
Expand Down
170 changes: 86 additions & 84 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,55 +17,73 @@ GEM
remote: https://rubygems.org/
specs:
3scale-api (1.4.0)
<<<<<<< HEAD
actioncable (5.2.4.5)
actionpack (= 5.2.4.5)
=======
actioncable (6.1.3)
actionpack (= 6.1.3)
activesupport (= 6.1.3)
>>>>>>> f4d383f... Updating Rails to 6.1.2
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.5)
actionpack (= 5.2.4.5)
actionview (= 5.2.4.5)
activejob (= 5.2.4.5)
actionmailbox (6.1.3)
actionpack (= 6.1.3)
activejob (= 6.1.3)
activerecord (= 6.1.3)
activestorage (= 6.1.3)
activesupport (= 6.1.3)
mail (>= 2.7.1)
actionmailer (6.1.3)
actionpack (= 6.1.3)
actionview (= 6.1.3)
activejob (= 6.1.3)
activesupport (= 6.1.3)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.4.5)
actionview (= 5.2.4.5)
activesupport (= 5.2.4.5)
rack (~> 2.0, >= 2.0.8)
actionpack (6.1.3)
actionview (= 6.1.3)
activesupport (= 6.1.3)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.4.5)
activesupport (= 5.2.4.5)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.3)
actionpack (= 6.1.3)
activerecord (= 6.1.3)
activestorage (= 6.1.3)
activesupport (= 6.1.3)
nokogiri (>= 1.8.5)
actionview (6.1.3)
activesupport (= 6.1.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.4.5)
activesupport (= 5.2.4.5)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.3)
activesupport (= 6.1.3)
globalid (>= 0.3.6)
activemodel (5.2.4.5)
activesupport (= 5.2.4.5)
activerecord (5.2.4.5)
activemodel (= 5.2.4.5)
activesupport (= 5.2.4.5)
arel (>= 9.0)
activestorage (5.2.4.5)
actionpack (= 5.2.4.5)
activerecord (= 5.2.4.5)
activemodel (6.1.3)
activesupport (= 6.1.3)
activerecord (6.1.3)
activemodel (= 6.1.3)
activesupport (= 6.1.3)
activestorage (6.1.3)
actionpack (= 6.1.3)
activejob (= 6.1.3)
activerecord (= 6.1.3)
activesupport (= 6.1.3)
marcel (~> 0.3.1)
activesupport (5.2.4.5)
mimemagic (~> 0.3.2)
activesupport (6.1.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
arel (9.0.0)
baby_squeel (1.3.1)
activerecord (>= 4.2.0)
join_dependency (~> 0.1.2)
polyamorous (~> 1.3)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
bootsnap (1.7.2)
Expand Down Expand Up @@ -113,23 +131,23 @@ GEM
dry-logic (~> 0.4, >= 0.4.2)
erubi (1.10.0)
excon (0.71.1)
faraday (0.15.3)
faraday (1.3.0)
faraday-net_http (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords
faraday-net_http (1.0.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
hashdiff (1.0.1)
i18n (1.8.9)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
interception (0.5)
its-it (1.3.0)
join_dependency (0.1.4)
activerecord (>= 4.2.0)
json (2.5.1)
jsonpath (0.9.9)
multi_json
to_regexp (~> 0.2.1)
jwt (2.1.0)
jwt (2.2.2)
k8s-client (0.10.4)
dry-struct (~> 0.5.0)
dry-types (~> 0.13.0)
Expand All @@ -139,7 +157,6 @@ GEM
recursive-open-struct (~> 1.1.0)
yajl-ruby (~> 1.4.0)
yaml-safe_load_stream (~> 0.1)
key_struct (0.4.2)
license_finder (6.10.1)
bundler
rubyzip (>= 1, < 3)
Expand Down Expand Up @@ -167,34 +184,30 @@ GEM
rake
mini_mime (1.0.2)
mini_portile2 (2.5.0)
minitest (5.14.3)
minitest (5.14.4)
minitest-reporters (1.4.3)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
minitest-stub-const (0.6)
modware (0.1.3)
key_struct (~> 0.4)
msgpack (1.4.2)
multi_json (1.14.1)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.0.0)
multipart-post (2.1.1)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
nio4r (2.5.5)
nokogiri (1.11.1)
nio4r (2.5.7)
nokogiri (1.11.2)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
oauth2 (1.4.7)
faraday (>= 0.8, < 2.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
pg (1.2.3)
polyamorous (1.3.3)
activerecord (>= 3.0)
prometheus-client (2.1.0)
pry (0.13.1)
coderay (~> 1.1)
Expand Down Expand Up @@ -223,30 +236,32 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4.5)
actioncable (= 5.2.4.5)
actionmailer (= 5.2.4.5)
actionpack (= 5.2.4.5)
actionview (= 5.2.4.5)
activejob (= 5.2.4.5)
activemodel (= 5.2.4.5)
activerecord (= 5.2.4.5)
activestorage (= 5.2.4.5)
activesupport (= 5.2.4.5)
bundler (>= 1.3.0)
railties (= 5.2.4.5)
rails (6.1.3)
actioncable (= 6.1.3)
actionmailbox (= 6.1.3)
actionmailer (= 6.1.3)
actionpack (= 6.1.3)
actiontext (= 6.1.3)
actionview (= 6.1.3)
activejob (= 6.1.3)
activemodel (= 6.1.3)
activerecord (= 6.1.3)
activestorage (= 6.1.3)
activesupport (= 6.1.3)
bundler (>= 1.15.0)
railties (= 6.1.3)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (5.2.4.5)
actionpack (= 5.2.4.5)
activesupport (= 5.2.4.5)
railties (6.1.3)
actionpack (= 6.1.3)
activesupport (= 6.1.3)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
thor (~> 1.0)
rake (13.0.3)
recursive-open-struct (1.1.0)
request_store (1.5.0)
Expand All @@ -258,17 +273,6 @@ GEM
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.2)
rubyzip (2.3.0)
schema_monkey (2.1.5)
activerecord (>= 4.2)
modware (~> 0.1)
schema_plus_core (2.2.3)
activerecord (~> 5.0)
its-it (~> 1.2)
schema_monkey (~> 2.1)
schema_plus_enums (0.1.8)
activerecord (>= 4.2, < 5.3)
its-it (~> 1.2)
schema_plus_core
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -288,12 +292,11 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
to_regexp (0.2.1)
tomlrb (2.0.1)
tzinfo (1.2.9)
thread_safe (~> 0.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
validate_url (1.0.13)
activemodel (>= 3.0.0)
public_suffix
Expand Down Expand Up @@ -322,14 +325,14 @@ GEM
yabeda (~> 0.8)
yajl-ruby (1.4.1)
yaml-safe_load_stream (0.1.1)
zeitwerk (2.4.2)

PLATFORMS
ruby

DEPENDENCIES
3scale-api
baby_squeel
bootsnap
bootsnap (>= 1.4.4)
bugsnag
bugsnag-capistrano (< 2)
codecov
Expand All @@ -351,10 +354,9 @@ DEPENDENCIES
puma (~> 5.2)
que (>= 1.0.0.beta3)
que-web
rails (~> 5.2.3)
rails (~> 6.1.2)
responders (~> 3.0.1)
rubyzip (>= 1.3.0)
schema_plus_enums
simplecov (~> 0.21.2)
tzinfo-data
validate_url
Expand All @@ -364,4 +366,4 @@ DEPENDENCIES
yabeda-rails

BUNDLED WITH
2.1.4
2.2.15
9 changes: 4 additions & 5 deletions app/adapters/abstract_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ def headers
JSON_TYPE = Mime[:json]
private_constant :JSON_TYPE

NULL_TYPE = Mime::Type.lookup(nil)

attr_reader :http_client

def build_http_client(endpoint)
Expand Down Expand Up @@ -94,9 +92,10 @@ def parse_client(_)
def self.parse_response(response)
body = response.body

case Mime::Type.lookup(response.content_type)
content_type = response.content_type.presence or return body

case Mime::Type.lookup(content_type)
when JSON_TYPE then JSON.parse(body)
when NULL_TYPE then body
else raise InvalidResponseError, { response: response, message: 'Unknown Content-Type' }
end
end
Expand Down Expand Up @@ -195,7 +194,7 @@ def access_token
def oauth_client
OAuth2::Client.new(@endpoint.client_id, @endpoint.client_secret,
site: @endpoint.uri.dup, token_url: token_endpoint) do |builder|
builder.adapter(:httpclient).last.instance_variable_set(:@client, http_client)
builder.adapter(:httpclient).instance_variable_set(:@client, http_client)
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/adapters/keycloak_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def redirectUris=(uris)
end

def oidc_configuration=(params)
write_attribute :oidc_configuration, OAuthConfiguration.new(params)
_write_attribute 'oidc_configuration', OAuthConfiguration.new(params)
end

def persisted?
Expand Down
4 changes: 1 addition & 3 deletions app/jobs/application_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ def self.retry_on(exception, wait: 3.seconds, attempts: 5, queue: nil, priority:
def relation
record = self.class.model
arguments = serialize.slice('arguments')
record.where.has {
args.op('@>', quoted([arguments].to_json))
}
record.where('args @> ?', [arguments].to_json)
end

def delete_duplicates
Expand Down
4 changes: 2 additions & 2 deletions app/jobs/process_integration_entry_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ def call(_payload)
end

def finish(success:)
state.update_attributes(success: success, finished_at: timestamp)
state.update(success: success, finished_at: timestamp)
end

def start
state.update_attributes(started_at: timestamp, entry: entry, success: nil)
state.update(started_at: timestamp, entry: entry, success: nil)
end

def to_proc
Expand Down
Loading

0 comments on commit 5a06abf

Please sign in to comment.