rubocop-flexport icon indicating copy to clipboard operation
rubocop-flexport copied to clipboard

Add "Engines" and "EnginesPrefix" parameters to EngineApiBoundary config

Open kremen opened this issue 1 year ago • 7 comments

"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'

kremen avatar May 26 '23 11:05 kremen

Neat! Let me reach out to someone with write permission at Flexport to get this approved and merged.

maxh avatar May 29 '23 10:05 maxh

@maxh Thanks a lot for your review! I am going to work on my PR updating this Friday.

kremen avatar May 30 '23 15:05 kremen

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.

kremen avatar Jun 02 '23 08:06 kremen

@maxh Should I do anything else for this PR to be approved and merged?

kremen avatar Jun 23 '23 12:06 kremen

Unfortunately, I don't have merge rights to this repository. Maybe @bpatzin-flexport or @noafroboy can help get this merged?

maxh avatar Jun 23 '23 14:06 maxh

I reached out to Flexport again to try to get this merged. Worst case, we can fork the repo and publish a new gem.

maxh avatar Jul 07 '23 02:07 maxh

Figuring out how to give you maintainer powers Max.

noafroboy avatar Jul 08 '23 00:07 noafroboy