diff --git a/Gemfile.lock b/Gemfile.lock index 201d56b..6dd2fea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: uuidable (1.0.rc1) - activerecord (>= 4.2, < 7.1) + activerecord (>= 4.2, < 7.2) mysql-binuuid-rails (>= 1.3, < 2) uuidtools (>= 2.1, < 3) @@ -110,7 +110,7 @@ PLATFORMS ruby DEPENDENCIES - bundler (~> 1.11) + bundler (~> 2.4) rake (~> 13.0) rspec (~> 3.0) rubocop @@ -118,4 +118,4 @@ DEPENDENCIES uuidable! BUNDLED WITH - 1.17.3 + 2.4.22 diff --git a/lib/uuidable/migration.rb b/lib/uuidable/migration.rb index 541d7be..d6f5af0 100644 --- a/lib/uuidable/migration.rb +++ b/lib/uuidable/migration.rb @@ -14,8 +14,8 @@ def uuid(column_name = COLUMN_NAME, **opts) column_name ||= opts.delete(:column_name) - column column_name, COLUMN_TYPE, COLUMN_OPTIONS.merge(opts) - index column_name, INDEX_OPTIONS.merge(index_opts) if index_opts + column column_name, COLUMN_TYPE, **COLUMN_OPTIONS.merge(opts) + index column_name, **INDEX_OPTIONS.merge(index_opts) if index_opts end end @@ -27,7 +27,7 @@ def add_uuid_column(table_name, column_name = COLUMN_NAME, **opts) column_name ||= opts.delete(:column_name) - add_column table_name, column_name, COLUMN_TYPE, COLUMN_OPTIONS.merge(opts) + add_column table_name, column_name, COLUMN_TYPE, **COLUMN_OPTIONS.merge(opts) add_uuid_index(table_name, index_opts.merge(column_name: column_name)) if index_opts end @@ -35,7 +35,7 @@ def add_uuid_column(table_name, column_name = COLUMN_NAME, **opts) def add_uuid_index(table_name, opts = {}) column_name = opts.delete(:column_name) || COLUMN_NAME - add_index table_name, column_name, INDEX_OPTIONS.merge(opts) + add_index table_name, column_name, **INDEX_OPTIONS.merge(opts) end end end diff --git a/lib/uuidable/v1_migration_helpers.rb b/lib/uuidable/v1_migration_helpers.rb index d6c3fd7..cef8bd1 100644 --- a/lib/uuidable/v1_migration_helpers.rb +++ b/lib/uuidable/v1_migration_helpers.rb @@ -9,7 +9,7 @@ module V1MigrationHelpers def uuidable_migrate_uuid_columns_to_v1(table_name, **columns) change_table table_name, bulk: true do |t| columns.each do |column, options| - t.column :"#{column}_new", :binary, COLUMN_OPTIONS.merge(options).merge(after: column) + t.column :"#{column}_new", :binary, **COLUMN_OPTIONS.merge(options).merge(after: column) end end diff --git a/uuidable.gemspec b/uuidable.gemspec index 3bdd5f6..91b637b 100644 --- a/uuidable.gemspec +++ b/uuidable.gemspec @@ -22,12 +22,12 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 2.7' - spec.add_development_dependency 'bundler', '~> 1.11' + spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'travis', '~> 1.8', '>= 1.8.2' - spec.add_dependency 'activerecord', '>= 4.2', '< 7.1' + spec.add_dependency 'activerecord', '>= 4.2', '< 7.2' spec.add_dependency 'mysql-binuuid-rails', '>= 1.3', '< 2' spec.add_dependency 'uuidtools', '>= 2.1', '< 3' end