Skip to content

Commit 41f015a

Browse files
authored
Merge pull request #866 from Dynamoid/ak/fix-uninitialized-constant-logger-issue-on-ci
Fix uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger error on CI
2 parents a16be4e + 75c8b3f commit 41f015a

File tree

3 files changed

+25
-21
lines changed

3 files changed

+25
-21
lines changed

Gemfile.lock

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
dynamoid (3.10.0)
4+
dynamoid (3.11.0)
55
activemodel (>= 4)
66
aws-sdk-dynamodb (~> 1.0)
77
concurrent-ruby (>= 1.0)
@@ -55,7 +55,7 @@ GEM
5555
concurrent-ruby (~> 1.0)
5656
iniparse (1.5.0)
5757
jmespath (1.6.2)
58-
json (2.7.2)
58+
json (2.9.1)
5959
language_server-protocol (3.17.0.3)
6060
method_source (1.0.0)
6161
minitest (5.21.1)
@@ -64,8 +64,8 @@ GEM
6464
childprocess (>= 0.6.3, < 6)
6565
iniparse (~> 1.4)
6666
rexml (~> 3.2)
67-
parallel (1.25.1)
68-
parser (3.3.3.0)
67+
parallel (1.26.3)
68+
parser (3.3.6.0)
6969
ast (~> 2.4.1)
7070
racc
7171
pry (0.14.2)
@@ -74,12 +74,11 @@ GEM
7474
pry-byebug (3.10.1)
7575
byebug (~> 11.0)
7676
pry (>= 0.13, < 0.15)
77-
racc (1.8.0)
77+
racc (1.8.1)
7878
rainbow (3.1.1)
7979
rake (13.1.0)
80-
regexp_parser (2.9.2)
81-
rexml (3.3.1)
82-
strscan
80+
regexp_parser (2.10.0)
81+
rexml (3.4.0)
8382
rspec (3.12.0)
8483
rspec-core (~> 3.12.0)
8584
rspec-expectations (~> 3.12.0)
@@ -93,18 +92,17 @@ GEM
9392
diff-lcs (>= 1.2.0, < 2.0)
9493
rspec-support (~> 3.12.0)
9594
rspec-support (3.12.1)
96-
rubocop (1.64.1)
95+
rubocop (1.70.0)
9796
json (~> 2.3)
9897
language_server-protocol (>= 3.17.0)
9998
parallel (~> 1.10)
10099
parser (>= 3.3.0.2)
101100
rainbow (>= 2.2.2, < 4.0)
102-
regexp_parser (>= 1.8, < 3.0)
103-
rexml (>= 3.2.5, < 4.0)
104-
rubocop-ast (>= 1.31.1, < 2.0)
101+
regexp_parser (>= 2.9.3, < 3.0)
102+
rubocop-ast (>= 1.36.2, < 2.0)
105103
ruby-progressbar (~> 1.7)
106-
unicode-display_width (>= 2.4.0, < 3.0)
107-
rubocop-ast (1.31.3)
104+
unicode-display_width (>= 2.4.0, < 4.0)
105+
rubocop-ast (1.37.0)
108106
parser (>= 3.3.1.0)
109107
rubocop-md (1.2.2)
110108
rubocop (>= 1.0)
@@ -117,8 +115,8 @@ GEM
117115
rubocop (~> 1.0)
118116
rubocop-rspec (3.0.2)
119117
rubocop (~> 1.61)
120-
rubocop-thread_safety (0.5.1)
121-
rubocop (>= 0.90.0)
118+
rubocop-thread_safety (0.6.0)
119+
rubocop (>= 1.48.1)
122120
ruby-progressbar (1.13.0)
123121
ruby2_keywords (0.0.5)
124122
simplecov (0.21.2)
@@ -134,11 +132,12 @@ GEM
134132
simplecov
135133
simplecov-lcov (0.8.0)
136134
simplecov_json_formatter (0.1.4)
137-
strscan (3.1.0)
138135
thor (1.3.0)
139136
tzinfo (2.0.6)
140137
concurrent-ruby (~> 1.0)
141-
unicode-display_width (2.5.0)
138+
unicode-display_width (3.1.4)
139+
unicode-emoji (~> 4.0, >= 4.0.4)
140+
unicode-emoji (4.0.4)
142141
yard (0.9.34)
143142

144143
PLATFORMS

lib/dynamoid/persistence/save.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def conditions_for_write
7373
# Add an optimistic locking check if the lock_version column exists
7474
# Uses the original lock_version value from Dirty API
7575
# in case user changed 'lock_version' manually
76-
if @model.class.attributes[:lock_version] && (@model.changes[:lock_version][0])
76+
if @model.class.attributes[:lock_version] && @model.changes[:lock_version][0]
7777
conditions[:if] ||= {}
7878
conditions[:if][:lock_version] = @model.changes[:lock_version][0]
7979
end
@@ -96,7 +96,7 @@ def options_to_update_item
9696
# Add an optimistic locking check if the lock_version column exists
9797
# Uses the original lock_version value from Dirty API
9898
# in case user changed 'lock_version' manually
99-
if @model.class.attributes[:lock_version] && (@model.changes[:lock_version][0])
99+
if @model.class.attributes[:lock_version] && @model.changes[:lock_version][0]
100100
conditions[:if] ||= {}
101101
conditions[:if][:lock_version] = @model.changes[:lock_version][0]
102102
end

spec/spec_helper.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# frozen_string_literal: true
22

33
# Standard Libs
4-
# N/A
4+
5+
# Explicit requiring the "logger" library is needed for Rails 6.0-7.0
6+
# See the following for details:
7+
# - https://github.com/rails/rails/issues/54260
8+
# - https://github.com/rails/rails/pull/49372
9+
require 'logger'
510

611
# Third Party Libs
712
# https://guides.rubyonrails.org/active_support_core_extensions.html#stand-alone-active-support

0 commit comments

Comments
 (0)