Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: plugin generator #3267

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

chore: plugin generator #3267

wants to merge 3 commits into from

Conversation

adrianthedev
Copy link
Collaborator

@adrianthedev adrianthedev commented Sep 25, 2024

Description

This PR will add the plugin generator to Avo

Still to do

  • finish the component templates
  • add the text field templates
  • the app/avo/plugins directory is not autoloaded so Avo is not picking up the plugin
  • docs

Branched from the refactor/plugin-rework branch so merge #3259 first.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

Manual review steps

  1. Step 1
  2. Step 2

Manual reviewer: please leave a comment with output from the test if that's the case.

@github-actions github-actions bot added the Chore label Sep 25, 2024
Copy link

codeclimate bot commented Sep 25, 2024

Code Climate has analyzed commit ec3f6b5 and detected 0 issues on this pull request.

View more on Code Climate.


no_tasks do
def blank_plugin? = options[:type] == "blank"
def field_plugin? = options[:type] == "field"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Corrected] Layout/EmptyLineBetweenDefs: Expected 1 empty line between method definitions; found 0.

no_tasks do
def blank_plugin? = options[:type] == "blank"
def field_plugin? = options[:type] == "field"
def full_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Corrected] Layout/EmptyLineBetweenDefs: Expected 1 empty line between method definitions; found 0.

file_name
end
end
def name_without_field = full_name["_field"] = ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Corrected] Layout/EmptyLineBetweenDefs: Expected 1 empty line between method definitions; found 0.

end
end
def name_without_field = full_name["_field"] = ""
def full_class_name = full_name.classify
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Corrected] Layout/EmptyLineBetweenDefs: Expected 1 empty line between method definitions; found 0.

end
def name_without_field = full_name["_field"] = ""
def full_class_name = full_name.classify
def module_name = full_class_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Corrected] Layout/EmptyLineBetweenDefs: Expected 1 empty line between method definitions; found 0.

def name_without_field = full_name["_field"] = ""
def full_class_name = full_name.classify
def module_name = full_class_name
def full_path = Rails.root.join(PATH, full_name).to_s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Corrected] Layout/EmptyLineBetweenDefs: Expected 1 empty line between method definitions; found 0.

def full_class_name = full_name.classify
def module_name = full_class_name
def full_path = Rails.root.join(PATH, full_name).to_s
def lib_dir = Rails.root.join(full_path, "lib", full_name).to_s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Corrected] Layout/EmptyLineBetweenDefs: Expected 1 empty line between method definitions; found 0.

def module_name = full_class_name
def full_path = Rails.root.join(PATH, full_name).to_s
def lib_dir = Rails.root.join(full_path, "lib", full_name).to_s
def railtie_or_engine = File.exist?("#{lib_dir}/railtie.rb") ? "#{lib_dir}/railtie.rb" : "#{lib_dir}/engine.rb"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Corrected] Layout/EmptyLineBetweenDefs: Expected 1 empty line between method definitions; found 0.

# Do things while the app boots#{field_code if field_plugin?}
end
end
METHOD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Corrected] Layout/ClosingHeredocIndentation: METHOD is not aligned with <<-METHOD.

@adrianthedev adrianthedev changed the title refactor: plugin rework chore: plugin generator Sep 25, 2024
Copy link
Contributor

This PR has been marked as stale because there was no activity for the past 15 days.

@github-actions github-actions bot added the Stale label Oct 11, 2024
@adrianthedev adrianthedev marked this pull request as draft October 13, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants