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

[plugin_generator] move development dependencies from *.gemspec.erb to Gemfile.erb #21726

Conversation

rogerluan
Copy link
Member

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've updated the documentation if necessary.
  • I've added or updated relevant unit tests.

Motivation and Context

This is a follow up PR similar to #21725

This is the recommended best practice as per RuboCop https://docs.rubocop.org/rubocop/cops_gemspec.html and there was an exception disabling this rule previously.

Description

The only thing I couldn't enable was ensuring that the Gemfile.erb gems are sorted alphabetically, because apparently even if I add - Include statement for Gemfile.erb in the rubocop config file, it will ignore it and will only look for Gemfile, .gemspec and .gems files in custom directories 😞 The gems are already sorted alphabetically, though, and since this file pretty much never receives updates, this is good enough.

I also added a brief comment about what each dependency does. I think this is great for newcomers and helps lower the contribution barrier 😊 which is especially helpful when users are developing new plugins.

Testing Steps

To test this branch, modify your Gemfile as:

gem 'fastlane', git: 'https://github.com/fastlane/fastlane.git', branch: 'rogerluan/move-dev-dependencies-to-gemfile-in-plugin-generator'

And run bundle install to apply the changes.

Then run:

bundle exec fastlane new_plugin this-is-my-test

Screenshot demo'ing this working (notice the Gemfile was generated correctly, including the version placeholders):

image

Copy link
Collaborator

@lacostej lacostej left a comment

Choose a reason for hiding this comment

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

🚀

@rogerluan rogerluan merged commit eafe646 into master Dec 14, 2023
6 checks passed
@rogerluan rogerluan deleted the rogerluan/move-dev-dependencies-to-gemfile-in-plugin-generator branch December 14, 2023 17:40
@Garciakj4
Copy link

I no

SubhrajyotiSen pushed a commit to KeepTruckin/fastlane that referenced this pull request Jan 17, 2024
… to `Gemfile.erb` (fastlane#21726)

* Make Gemfile a template and move dev dependencies to it, in plugin generator.

* Remove now-unnecessary rule exception on RuboCop.

* Update comments.
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.

None yet

3 participants