Skip to content

Commit

Permalink
Update development dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fatkodima committed Nov 11, 2024
1 parent 2bb3d18 commit e021d32
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 57 deletions.
83 changes: 40 additions & 43 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actionpack (7.2.1)
actionview (= 7.2.1)
activesupport (= 7.2.1)
actionpack (8.0.0)
actionview (= 8.0.0)
activesupport (= 8.0.0)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actionview (7.2.1)
activesupport (= 7.2.1)
actionview (8.0.0)
activesupport (= 8.0.0)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activemodel (7.2.1)
activesupport (= 7.2.1)
activerecord (7.2.1)
activemodel (= 7.2.1)
activesupport (= 7.2.1)
activemodel (8.0.0)
activesupport (= 8.0.0)
activerecord (8.0.0)
activemodel (= 8.0.0)
activesupport (= 8.0.0)
timeout (>= 0.4.0)
activesupport (7.2.1)
activesupport (8.0.0)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
Expand All @@ -41,25 +41,27 @@ GEM
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.2)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.8)
builder (3.3.0)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crass (1.0.6)
drb (2.2.1)
erubi (1.13.0)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
irb (1.14.0)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.7.2)
json (2.8.1)
language_server-protocol (3.17.0.3)
logger (1.6.0)
loofah (2.22.0)
logger (1.6.1)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mini_portile2 (2.8.7)
Expand All @@ -68,31 +70,30 @@ GEM
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
parallel (1.26.3)
parser (3.3.4.2)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
pg (1.5.7)
psych (5.1.2)
pg (1.5.9)
psych (5.2.0)
stringio
racc (1.8.1)
rack (3.1.7)
rack (3.1.8)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.1.0)
rackup (2.2.0)
rack (>= 3)
webrick (~> 1.8)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.2.1)
actionpack (= 7.2.1)
activesupport (= 7.2.1)
railties (8.0.0)
actionpack (= 8.0.0)
activesupport (= 8.0.0)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
Expand All @@ -103,41 +104,37 @@ GEM
rdoc (6.7.0)
psych (>= 4.0.0)
regexp_parser (2.9.2)
reline (0.5.9)
reline (0.5.11)
io-console (~> 0.5)
rexml (3.3.6)
strscan
rubocop (1.65.1)
rubocop (1.68.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.1)
rubocop-ast (1.34.1)
parser (>= 3.3.1.0)
rubocop-disable_syntax (0.1.1)
rubocop (>= 1.50)
rubocop-minitest (0.35.1)
rubocop-minitest (0.36.0)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
securerandom (0.3.1)
stringio (3.1.1)
strscan (3.1.0)
securerandom (0.3.2)
stringio (3.1.2)
thor (1.3.2)
timeout (0.4.1)
timeout (0.4.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
uri (1.0.1)
useragent (0.16.10)
webrick (1.8.1)
yard (0.9.36)
zeitwerk (2.6.17)
yard (0.9.37)
zeitwerk (2.7.1)

PLATFORMS
ruby
Expand Down
8 changes: 4 additions & 4 deletions lib/online_migrations/change_column_type_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ def initialize_columns_type_change(table_name, columns_and_types, **options)
# To avoid this, we instead set it to `NOT NULL DEFAULT 0` and we'll
# copy the correct values when backfilling.
add_column(table_name, tmp_column_name, new_type,
**old_col_options.merge(column_options).merge(default: old_col.default || 0, null: false))
**old_col_options, **column_options, default: old_col.default || 0, null: false)
else
if !old_col.default.nil?
old_col_options = old_col_options.merge(default: old_col.default, null: old_col.null)
end
add_column(table_name, tmp_column_name, new_type, **old_col_options.merge(column_options))
add_column(table_name, tmp_column_name, new_type, **old_col_options, **column_options)
end
else
add_column(table_name, tmp_column_name, new_type, **old_col_options.merge(column_options))
add_column(table_name, tmp_column_name, new_type, **old_col_options, **column_options)
change_column_default(table_name, tmp_column_name, old_col.default) if !old_col.default.nil?
end
end
Expand Down Expand Up @@ -434,7 +434,7 @@ def __copy_indexes(table_name, from_column, to_column)
options[:opclass] = opclasses
end

add_index(table_name, new_columns, **options.merge(algorithm: :concurrently))
add_index(table_name, new_columns, **options, algorithm: :concurrently)
end
end

Expand Down
14 changes: 7 additions & 7 deletions lib/online_migrations/command_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ def add_index(table_name, column_name, **options)
if !new_or_small_table?(table_name)
if options[:algorithm] != :concurrently
raise_error :add_index,
command: command_str(:add_index, table_name, column_name, **options.merge(algorithm: :concurrently))
command: command_str(:add_index, table_name, column_name, **options, algorithm: :concurrently)
end

if options[:algorithm] == :concurrently && index_corruption?
Expand Down Expand Up @@ -585,7 +585,7 @@ def remove_index(table_name, column_name = nil, **options)

if options[:algorithm] != :concurrently && !new_or_small_table?(table_name)
raise_error :remove_index,
command: command_str(:remove_index, table_name, **options.merge(algorithm: :concurrently))
command: command_str(:remove_index, table_name, **options, algorithm: :concurrently)
end

index_def = connection.indexes(table_name).find do |index|
Expand All @@ -608,7 +608,7 @@ def add_foreign_key(from_table, to_table, **options)

if validate
raise_error :add_foreign_key,
add_code: command_str(:add_foreign_key, from_table, to_table, **options.merge(validate: false)),
add_code: command_str(:add_foreign_key, from_table, to_table, **options, validate: false),
validate_code: command_str(:validate_foreign_key, from_table, to_table)
end
end
Expand All @@ -633,7 +633,7 @@ def add_check_constraint(table_name, expression, **options)
name = options[:name] || check_constraint_name(table_name, expression)

raise_error :add_check_constraint,
add_code: command_str(:add_check_constraint, table_name, expression, **options.merge(validate: false)),
add_code: command_str(:add_check_constraint, table_name, expression, **options, validate: false),
validate_code: command_str(:validate_check_constraint, table_name, name: name)
end
end
Expand All @@ -645,7 +645,7 @@ def add_unique_constraint(table_name, column_name = nil, **options)

raise_error :add_unique_constraint,
add_index_code: command_str(:add_index, table_name, column_name, unique: true, name: index_name, algorithm: :concurrently),
add_code: command_str(:add_unique_constraint, table_name, **options.merge(using_index: index_name)),
add_code: command_str(:add_unique_constraint, table_name, **options, using_index: index_name),
remove_code: command_str(:remove_unique_constraint, table_name, column_name)
end

Expand All @@ -661,15 +661,15 @@ def validate_constraint(*)
def add_not_null_constraint(table_name, column_name, **options)
if !new_or_small_table?(table_name) && options[:validate] != false
raise_error :add_not_null_constraint,
add_code: command_str(:add_not_null_constraint, table_name, column_name, **options.merge(validate: false)),
add_code: command_str(:add_not_null_constraint, table_name, column_name, **options, validate: false),
validate_code: command_str(:validate_not_null_constraint, table_name, column_name, **options.except(:validate))
end
end

def add_text_limit_constraint(table_name, column_name, limit, **options)
if !new_or_small_table?(table_name) && options[:validate] != false
raise_error :add_text_limit_constraint,
add_code: command_str(:add_text_limit_constraint, table_name, column_name, limit, **options.merge(validate: false)),
add_code: command_str(:add_text_limit_constraint, table_name, column_name, limit, **options, validate: false),
validate_code: command_str(:validate_text_limit_constraint, table_name, column_name, **options.except(:validate))
end
end
Expand Down
6 changes: 3 additions & 3 deletions lib/online_migrations/schema_statements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def add_column_with_default(table_name, column_name, type, **options)
"or similar) table_name: #{table_name}, column_name: #{column_name}")
else
transaction do
add_column(table_name, column_name, type, **options.merge(default: nil, null: true))
add_column(table_name, column_name, type, **options, default: nil, null: true)
change_column_default(table_name, column_name, default)
end
end
Expand Down Expand Up @@ -672,7 +672,7 @@ def add_reference_concurrently(table_name, ref_name, **options)
index[:name] ||= "index_#{table_name}_on_#{ref_name}"
end

add_index(table_name, index_columns, **index.merge(algorithm: :concurrently))
add_index(table_name, index_columns, **index, algorithm: :concurrently)
end

foreign_key = options[:foreign_key]
Expand All @@ -681,7 +681,7 @@ def add_reference_concurrently(table_name, ref_name, **options)
foreign_key = {} if foreign_key == true

foreign_table_name = Utils.foreign_table_name(ref_name, foreign_key)
add_foreign_key(table_name, foreign_table_name, **foreign_key.merge(column: column_name, validate: false))
add_foreign_key(table_name, foreign_table_name, **foreign_key, column: column_name, validate: false)

if foreign_key[:validate] != false
validate_foreign_key(table_name, foreign_table_name, **foreign_key)
Expand Down

0 comments on commit e021d32

Please sign in to comment.