rubocop-flexport
rubocop-flexport copied to clipboard
Add "Engines" and "EnginesPrefix" parameters to EngineApiBoundary config
"Engines" parameter
A list of engine names that can be used instead of the "EnginesPath" parameter.
This helps in the case when engines are placed in a project's root directory.
Engines:
- my_engine1
- my_engine2
"EnginesPrefix" parameter
Prefix/namespace of engine classes
This helps in the case when engine classes have a namespace.
module MyNamespace
class MyEngine::MyModel < ApplicationModel
end
end
EnginesPrefix: 'MyNamespace'
Neat! Let me reach out to someone with write permission at Flexport to get this approved and merged.
@maxh Thanks a lot for your review! I am going to work on my PR updating this Friday.
The spec diff is difficult to parse. Let's please add a new spec instead of changing the existing spec. It could be called something like:
spec/rubocop/cop/flexport/engine_api_boundary_spec_root_engines.rb
If the existing spec needs to change, please make those changes small.
Updated.
@maxh Should I do anything else for this PR to be approved and merged?
Unfortunately, I don't have merge rights to this repository. Maybe @bpatzin-flexport or @noafroboy can help get this merged?
I reached out to Flexport again to try to get this merged. Worst case, we can fork the repo and publish a new gem.
Figuring out how to give you maintainer powers Max.