diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index eaf44e1..fe72539 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --no-offense-counts --no-auto-gen-timestamp` -# using RuboCop version 1.63.2. +# using RuboCop version 1.64.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new diff --git a/lib/chrono_model/adapter/migrations_modules/stable.rb b/lib/chrono_model/adapter/migrations_modules/stable.rb index 291d736..7bb6a80 100644 --- a/lib/chrono_model/adapter/migrations_modules/stable.rb +++ b/lib/chrono_model/adapter/migrations_modules/stable.rb @@ -17,7 +17,7 @@ def add_index(table_name, column_name, **options) # Uniqueness constraints do not make sense in the history table options = options.dup.tap { |o| o.delete(:unique) } if options[:unique].present? - on_history_schema { super(table_name, column_name, **options) } + on_history_schema { super } end end diff --git a/lib/chrono_model/patches/preloader.rb b/lib/chrono_model/patches/preloader.rb index 41827fb..f489159 100644 --- a/lib/chrono_model/patches/preloader.rb +++ b/lib/chrono_model/patches/preloader.rb @@ -19,7 +19,7 @@ def initialize(**options) if options.empty? super() else - super(**options) + super end end diff --git a/spec/support/matchers/column.rb b/spec/support/matchers/column.rb index 2c5afcb..1614f6e 100644 --- a/spec/support/matchers/column.rb +++ b/spec/support/matchers/column.rb @@ -14,7 +14,7 @@ def description end def matches?(table) - super(table) + super @matches = @columns.inject({}) do |h, (name, type)| h.update([name, type] => has_column?(name, type)) diff --git a/spec/support/matchers/function.rb b/spec/support/matchers/function.rb index 52d6ac2..0365480 100644 --- a/spec/support/matchers/function.rb +++ b/spec/support/matchers/function.rb @@ -14,7 +14,7 @@ def description end def matches?(table) - super(table) + super @matches = @functions.inject({}) do |h, name| h.update(name => has_function?(name)) @@ -73,7 +73,7 @@ def initialize(schema = 'public') def matches?(table) @functions = @function_templates.map { |t| format(t, table) } - super(table) + super end end diff --git a/spec/support/matchers/index.rb b/spec/support/matchers/index.rb index 0108d56..e0c05a5 100644 --- a/spec/support/matchers/index.rb +++ b/spec/support/matchers/index.rb @@ -17,7 +17,7 @@ def description end def matches?(table) - super(table) + super select_values(<<-SQL.squish, [table, name, schema], 'Check index') == columns SELECT a.attname diff --git a/spec/support/matchers/source.rb b/spec/support/matchers/source.rb index c4bbd2a..b4ca7ee 100644 --- a/spec/support/matchers/source.rb +++ b/spec/support/matchers/source.rb @@ -14,7 +14,7 @@ def description end def matches?(table) - super(table) + super source = select_value(<<-SQL.squish, [@function], "Get #{@function} source") SELECT prosrc FROM pg_catalog.pg_proc WHERE proname = ? diff --git a/spec/support/matchers/table.rb b/spec/support/matchers/table.rb index bb723b4..f35f762 100644 --- a/spec/support/matchers/table.rb +++ b/spec/support/matchers/table.rb @@ -32,7 +32,7 @@ def relation_exists?(options) # class HavePublicBacking < Base def matches?(table) - super(table) + super relation_exists? in: public_schema end @@ -59,7 +59,7 @@ def have_public_backing # class HaveTemporalBacking < Base def matches?(table) - super(table) + super relation_exists? in: temporal_schema end @@ -87,7 +87,7 @@ def have_temporal_backing # class HaveHistoryBacking < Base def matches?(table) - super(table) + super table_exists? && inherits_from_temporal? && @@ -202,7 +202,7 @@ def have_history_backing # class HavePublicInterface < Base def matches?(table) - super(table) + super view_exists? && [is_updatable?, has_triggers?].all? end