Skip to content

Commit 5a06abf

Browse files
committed
Updating Rails to 6.1.2
Signed-off-by: HemaHG <[email protected]>
1 parent ad74766 commit 5a06abf

27 files changed

+294
-236
lines changed

Gemfile

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ end
88

99

1010
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
11-
gem 'rails', '~> 5.2.3'
11+
gem 'rails', '~> 6.1.2'
1212
gem 'pg', '>= 0.20'
13-
gem 'schema_plus_enums'
14-
1513
# Use Puma as the app server
14+
1615
gem 'puma', '~> 5.2'
1716
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
1817
# gem 'jbuilder', '~> 2.5'
@@ -28,11 +27,10 @@ gem 'puma', '~> 5.2'
2827
gem 'responders', '~> 3.0.1'
2928
gem '3scale-api'
3029

31-
gem 'bootsnap'
30+
gem 'bootsnap', '>= 1.4.4', require: false
3231

3332
gem 'que', '>= 1.0.0.beta3'
3433
gem 'que-web'
35-
gem 'baby_squeel'
3634

3735
gem 'bugsnag'
3836
# bugsnag-capistrano 2.x does not have a rake task to report deploys

Gemfile.lock

+86-84
Original file line numberDiff line numberDiff line change
@@ -17,55 +17,73 @@ GEM
1717
remote: https://rubygems.org/
1818
specs:
1919
3scale-api (1.4.0)
20+
<<<<<<< HEAD
2021
actioncable (5.2.4.5)
2122
actionpack (= 5.2.4.5)
23+
=======
24+
actioncable (6.1.3)
25+
actionpack (= 6.1.3)
26+
activesupport (= 6.1.3)
27+
>>>>>>> f4d383f... Updating Rails to 6.1.2
2228
nio4r (~> 2.0)
2329
websocket-driver (>= 0.6.1)
24-
actionmailer (5.2.4.5)
25-
actionpack (= 5.2.4.5)
26-
actionview (= 5.2.4.5)
27-
activejob (= 5.2.4.5)
30+
actionmailbox (6.1.3)
31+
actionpack (= 6.1.3)
32+
activejob (= 6.1.3)
33+
activerecord (= 6.1.3)
34+
activestorage (= 6.1.3)
35+
activesupport (= 6.1.3)
36+
mail (>= 2.7.1)
37+
actionmailer (6.1.3)
38+
actionpack (= 6.1.3)
39+
actionview (= 6.1.3)
40+
activejob (= 6.1.3)
41+
activesupport (= 6.1.3)
2842
mail (~> 2.5, >= 2.5.4)
2943
rails-dom-testing (~> 2.0)
30-
actionpack (5.2.4.5)
31-
actionview (= 5.2.4.5)
32-
activesupport (= 5.2.4.5)
33-
rack (~> 2.0, >= 2.0.8)
44+
actionpack (6.1.3)
45+
actionview (= 6.1.3)
46+
activesupport (= 6.1.3)
47+
rack (~> 2.0, >= 2.0.9)
3448
rack-test (>= 0.6.3)
3549
rails-dom-testing (~> 2.0)
36-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
37-
actionview (5.2.4.5)
38-
activesupport (= 5.2.4.5)
50+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
51+
actiontext (6.1.3)
52+
actionpack (= 6.1.3)
53+
activerecord (= 6.1.3)
54+
activestorage (= 6.1.3)
55+
activesupport (= 6.1.3)
56+
nokogiri (>= 1.8.5)
57+
actionview (6.1.3)
58+
activesupport (= 6.1.3)
3959
builder (~> 3.1)
4060
erubi (~> 1.4)
4161
rails-dom-testing (~> 2.0)
42-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
43-
activejob (5.2.4.5)
44-
activesupport (= 5.2.4.5)
62+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
63+
activejob (6.1.3)
64+
activesupport (= 6.1.3)
4565
globalid (>= 0.3.6)
46-
activemodel (5.2.4.5)
47-
activesupport (= 5.2.4.5)
48-
activerecord (5.2.4.5)
49-
activemodel (= 5.2.4.5)
50-
activesupport (= 5.2.4.5)
51-
arel (>= 9.0)
52-
activestorage (5.2.4.5)
53-
actionpack (= 5.2.4.5)
54-
activerecord (= 5.2.4.5)
66+
activemodel (6.1.3)
67+
activesupport (= 6.1.3)
68+
activerecord (6.1.3)
69+
activemodel (= 6.1.3)
70+
activesupport (= 6.1.3)
71+
activestorage (6.1.3)
72+
actionpack (= 6.1.3)
73+
activejob (= 6.1.3)
74+
activerecord (= 6.1.3)
75+
activesupport (= 6.1.3)
5576
marcel (~> 0.3.1)
56-
activesupport (5.2.4.5)
77+
mimemagic (~> 0.3.2)
78+
activesupport (6.1.3)
5779
concurrent-ruby (~> 1.0, >= 1.0.2)
58-
i18n (>= 0.7, < 2)
59-
minitest (~> 5.1)
60-
tzinfo (~> 1.1)
80+
i18n (>= 1.6, < 2)
81+
minitest (>= 5.1)
82+
tzinfo (~> 2.0)
83+
zeitwerk (~> 2.3)
6184
addressable (2.7.0)
6285
public_suffix (>= 2.0.2, < 5.0)
6386
ansi (1.5.0)
64-
arel (9.0.0)
65-
baby_squeel (1.3.1)
66-
activerecord (>= 4.2.0)
67-
join_dependency (~> 0.1.2)
68-
polyamorous (~> 1.3)
6987
binding_of_caller (0.8.0)
7088
debug_inspector (>= 0.0.1)
7189
bootsnap (1.7.2)
@@ -113,23 +131,23 @@ GEM
113131
dry-logic (~> 0.4, >= 0.4.2)
114132
erubi (1.10.0)
115133
excon (0.71.1)
116-
faraday (0.15.3)
134+
faraday (1.3.0)
135+
faraday-net_http (~> 1.0)
117136
multipart-post (>= 1.2, < 3)
137+
ruby2_keywords
138+
faraday-net_http (1.0.1)
118139
globalid (0.4.2)
119140
activesupport (>= 4.2.0)
120141
hashdiff (1.0.1)
121142
i18n (1.8.9)
122143
concurrent-ruby (~> 1.0)
123144
ice_nine (0.11.2)
124145
interception (0.5)
125-
its-it (1.3.0)
126-
join_dependency (0.1.4)
127-
activerecord (>= 4.2.0)
128146
json (2.5.1)
129147
jsonpath (0.9.9)
130148
multi_json
131149
to_regexp (~> 0.2.1)
132-
jwt (2.1.0)
150+
jwt (2.2.2)
133151
k8s-client (0.10.4)
134152
dry-struct (~> 0.5.0)
135153
dry-types (~> 0.13.0)
@@ -139,7 +157,6 @@ GEM
139157
recursive-open-struct (~> 1.1.0)
140158
yajl-ruby (~> 1.4.0)
141159
yaml-safe_load_stream (~> 0.1)
142-
key_struct (0.4.2)
143160
license_finder (6.10.1)
144161
bundler
145162
rubyzip (>= 1, < 3)
@@ -167,34 +184,30 @@ GEM
167184
rake
168185
mini_mime (1.0.2)
169186
mini_portile2 (2.5.0)
170-
minitest (5.14.3)
187+
minitest (5.14.4)
171188
minitest-reporters (1.4.3)
172189
ansi
173190
builder
174191
minitest (>= 5.0)
175192
ruby-progressbar
176193
minitest-stub-const (0.6)
177-
modware (0.1.3)
178-
key_struct (~> 0.4)
179194
msgpack (1.4.2)
180-
multi_json (1.14.1)
195+
multi_json (1.15.0)
181196
multi_xml (0.6.0)
182-
multipart-post (2.0.0)
197+
multipart-post (2.1.1)
183198
mustermann (1.1.1)
184199
ruby2_keywords (~> 0.0.1)
185-
nio4r (2.5.5)
186-
nokogiri (1.11.1)
200+
nio4r (2.5.7)
201+
nokogiri (1.11.2)
187202
mini_portile2 (~> 2.5.0)
188203
racc (~> 1.4)
189-
oauth2 (1.4.1)
190-
faraday (>= 0.8, < 0.16.0)
204+
oauth2 (1.4.7)
205+
faraday (>= 0.8, < 2.0)
191206
jwt (>= 1.0, < 3.0)
192207
multi_json (~> 1.3)
193208
multi_xml (~> 0.5)
194209
rack (>= 1.2, < 3)
195210
pg (1.2.3)
196-
polyamorous (1.3.3)
197-
activerecord (>= 3.0)
198211
prometheus-client (2.1.0)
199212
pry (0.13.1)
200213
coderay (~> 1.1)
@@ -223,30 +236,32 @@ GEM
223236
rack
224237
rack-test (1.1.0)
225238
rack (>= 1.0, < 3)
226-
rails (5.2.4.5)
227-
actioncable (= 5.2.4.5)
228-
actionmailer (= 5.2.4.5)
229-
actionpack (= 5.2.4.5)
230-
actionview (= 5.2.4.5)
231-
activejob (= 5.2.4.5)
232-
activemodel (= 5.2.4.5)
233-
activerecord (= 5.2.4.5)
234-
activestorage (= 5.2.4.5)
235-
activesupport (= 5.2.4.5)
236-
bundler (>= 1.3.0)
237-
railties (= 5.2.4.5)
239+
rails (6.1.3)
240+
actioncable (= 6.1.3)
241+
actionmailbox (= 6.1.3)
242+
actionmailer (= 6.1.3)
243+
actionpack (= 6.1.3)
244+
actiontext (= 6.1.3)
245+
actionview (= 6.1.3)
246+
activejob (= 6.1.3)
247+
activemodel (= 6.1.3)
248+
activerecord (= 6.1.3)
249+
activestorage (= 6.1.3)
250+
activesupport (= 6.1.3)
251+
bundler (>= 1.15.0)
252+
railties (= 6.1.3)
238253
sprockets-rails (>= 2.0.0)
239254
rails-dom-testing (2.0.3)
240255
activesupport (>= 4.2.0)
241256
nokogiri (>= 1.6)
242257
rails-html-sanitizer (1.3.0)
243258
loofah (~> 2.3)
244-
railties (5.2.4.5)
245-
actionpack (= 5.2.4.5)
246-
activesupport (= 5.2.4.5)
259+
railties (6.1.3)
260+
actionpack (= 6.1.3)
261+
activesupport (= 6.1.3)
247262
method_source
248263
rake (>= 0.8.7)
249-
thor (>= 0.19.0, < 2.0)
264+
thor (~> 1.0)
250265
rake (13.0.3)
251266
recursive-open-struct (1.1.0)
252267
request_store (1.5.0)
@@ -258,17 +273,6 @@ GEM
258273
ruby-progressbar (1.11.0)
259274
ruby2_keywords (0.0.2)
260275
rubyzip (2.3.0)
261-
schema_monkey (2.1.5)
262-
activerecord (>= 4.2)
263-
modware (~> 0.1)
264-
schema_plus_core (2.2.3)
265-
activerecord (~> 5.0)
266-
its-it (~> 1.2)
267-
schema_monkey (~> 2.1)
268-
schema_plus_enums (0.1.8)
269-
activerecord (>= 4.2, < 5.3)
270-
its-it (~> 1.2)
271-
schema_plus_core
272276
simplecov (0.21.2)
273277
docile (~> 1.1)
274278
simplecov-html (~> 0.11)
@@ -288,12 +292,11 @@ GEM
288292
activesupport (>= 4.0)
289293
sprockets (>= 3.0.0)
290294
thor (1.0.1)
291-
thread_safe (0.3.6)
292295
tilt (2.0.10)
293296
to_regexp (0.2.1)
294297
tomlrb (2.0.1)
295-
tzinfo (1.2.9)
296-
thread_safe (~> 0.1)
298+
tzinfo (2.0.4)
299+
concurrent-ruby (~> 1.0)
297300
validate_url (1.0.13)
298301
activemodel (>= 3.0.0)
299302
public_suffix
@@ -322,14 +325,14 @@ GEM
322325
yabeda (~> 0.8)
323326
yajl-ruby (1.4.1)
324327
yaml-safe_load_stream (0.1.1)
328+
zeitwerk (2.4.2)
325329

326330
PLATFORMS
327331
ruby
328332

329333
DEPENDENCIES
330334
3scale-api
331-
baby_squeel
332-
bootsnap
335+
bootsnap (>= 1.4.4)
333336
bugsnag
334337
bugsnag-capistrano (< 2)
335338
codecov
@@ -351,10 +354,9 @@ DEPENDENCIES
351354
puma (~> 5.2)
352355
que (>= 1.0.0.beta3)
353356
que-web
354-
rails (~> 5.2.3)
357+
rails (~> 6.1.2)
355358
responders (~> 3.0.1)
356359
rubyzip (>= 1.3.0)
357-
schema_plus_enums
358360
simplecov (~> 0.21.2)
359361
tzinfo-data
360362
validate_url
@@ -364,4 +366,4 @@ DEPENDENCIES
364366
yabeda-rails
365367

366368
BUNDLED WITH
367-
2.1.4
369+
2.2.15

app/adapters/abstract_adapter.rb

+4-5
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ def headers
5959
JSON_TYPE = Mime[:json]
6060
private_constant :JSON_TYPE
6161

62-
NULL_TYPE = Mime::Type.lookup(nil)
63-
6462
attr_reader :http_client
6563

6664
def build_http_client(endpoint)
@@ -94,9 +92,10 @@ def parse_client(_)
9492
def self.parse_response(response)
9593
body = response.body
9694

97-
case Mime::Type.lookup(response.content_type)
95+
content_type = response.content_type.presence or return body
96+
97+
case Mime::Type.lookup(content_type)
9898
when JSON_TYPE then JSON.parse(body)
99-
when NULL_TYPE then body
10099
else raise InvalidResponseError, { response: response, message: 'Unknown Content-Type' }
101100
end
102101
end
@@ -195,7 +194,7 @@ def access_token
195194
def oauth_client
196195
OAuth2::Client.new(@endpoint.client_id, @endpoint.client_secret,
197196
site: @endpoint.uri.dup, token_url: token_endpoint) do |builder|
198-
builder.adapter(:httpclient).last.instance_variable_set(:@client, http_client)
197+
builder.adapter(:httpclient).instance_variable_set(:@client, http_client)
199198
end
200199
end
201200

app/adapters/keycloak_adapter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def redirectUris=(uris)
6565
end
6666

6767
def oidc_configuration=(params)
68-
write_attribute :oidc_configuration, OAuthConfiguration.new(params)
68+
_write_attribute 'oidc_configuration', OAuthConfiguration.new(params)
6969
end
7070

7171
def persisted?

app/jobs/application_job.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ def self.retry_on(exception, wait: 3.seconds, attempts: 5, queue: nil, priority:
3131
def relation
3232
record = self.class.model
3333
arguments = serialize.slice('arguments')
34-
record.where.has {
35-
args.op('@>', quoted([arguments].to_json))
36-
}
34+
record.where('args @> ?', [arguments].to_json)
3735
end
3836

3937
def delete_duplicates

app/jobs/process_integration_entry_job.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ def call(_payload)
4343
end
4444

4545
def finish(success:)
46-
state.update_attributes(success: success, finished_at: timestamp)
46+
state.update(success: success, finished_at: timestamp)
4747
end
4848

4949
def start
50-
state.update_attributes(started_at: timestamp, entry: entry, success: nil)
50+
state.update(started_at: timestamp, entry: entry, success: nil)
5151
end
5252

5353
def to_proc

0 commit comments

Comments
 (0)