Skip to content

Commit

Permalink
Merge pull request #294 from ifad/chore/update-rubocop
Browse files Browse the repository at this point in the history
Update RuboCop and autofix new offenses
  • Loading branch information
tagliala authored May 31, 2024
2 parents 804afe2 + 607e29f commit 0addc9c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .rubocop_todo.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/chrono_model/adapter/migrations_modules/stable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/chrono_model/patches/preloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def initialize(**options)
if options.empty?
super()
else
super(**options)
super
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/support/matchers/column.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions spec/support/matchers/function.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -73,7 +73,7 @@ def initialize(schema = 'public')
def matches?(table)
@functions = @function_templates.map { |t| format(t, table) }

super(table)
super
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/support/matchers/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/support/matchers/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ?
Expand Down
8 changes: 4 additions & 4 deletions spec/support/matchers/table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def relation_exists?(options)
#
class HavePublicBacking < Base
def matches?(table)
super(table)
super

relation_exists? in: public_schema
end
Expand All @@ -59,7 +59,7 @@ def have_public_backing
#
class HaveTemporalBacking < Base
def matches?(table)
super(table)
super

relation_exists? in: temporal_schema
end
Expand Down Expand Up @@ -87,7 +87,7 @@ def have_temporal_backing
#
class HaveHistoryBacking < Base
def matches?(table)
super(table)
super

table_exists? &&
inherits_from_temporal? &&
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0addc9c

Please sign in to comment.