Skip to content

Commit

Permalink
Conform to latest Rubocop additions and updates
Browse files Browse the repository at this point in the history
This disables the new `Layout/MultilineMethodCallBraceLayout` cop, but
it conforms to the new cops / changes to existing cops.
  • Loading branch information
bfad committed Jun 18, 2023
1 parent 7a0b6e8 commit da75129
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Layout/FirstHashElementIndentation:
Layout/MultilineMethodCallBraceLayout:
EnforcedStyle: new_line

Layout/MultilineMethodCallBraceLayout:
Enabled: false

Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
rubocop: warning
Expand Down
4 changes: 1 addition & 3 deletions lib/scrapbook/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ class Engine < ::Rails::Engine

initializer 'scrapbook.assets' do |app|
if app.config.scrapbook.precompile_assets && app.config.respond_to?(:assets)
app.config.assets.precompile.concat %w[
scrapbook/application.css
]
app.config.assets.precompile.push('scrapbook/application.css')
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/lib/scrapbook/routing_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
let(:books) { {} }

before do
allow(::Scrapbook::Engine.config.scrapbook).to receive(:paths)
allow(Scrapbook::Engine.config.scrapbook).to receive(:paths)
.and_return(books)
allow(object).to receive(:mount)
end
Expand All @@ -25,7 +25,7 @@
object.scrapbook('book')

expect(object).to have_received(:mount).with(hash_including(
::Scrapbook::Engine => '/book',
Scrapbook::Engine => '/book',
defaults: {'.book': 'book'},
as: 'book_scrapbook'
))
Expand All @@ -37,7 +37,7 @@
object.scrapbook('book', at: path)

expect(object).to have_received(:mount).with(hash_including(
::Scrapbook::Engine => path,
Scrapbook::Engine => path,
defaults: {'.book': 'book'},
as: 'book_scrapbook'
))
Expand Down
2 changes: 1 addition & 1 deletion spec/models/scrapbook/scrapbook_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
let(:pathname) { nested_pathname.join('pages/far/and/wide.html.haml') }

before do
allow(::Scrapbook::Engine.config.scrapbook).to receive(:paths)
allow(Scrapbook::Engine.config.scrapbook).to receive(:paths)
.and_return({'book1' => base_pathname, 'nested' => nested_pathname})
end

Expand Down
2 changes: 1 addition & 1 deletion test/boxcar/config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
config.active_support.report_deprecations = false

# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
config.log_formatter = Logger::Formatter.new

# Use a different logger for distributed setups.
# require "syslog/logger"
Expand Down

0 comments on commit da75129

Please sign in to comment.