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

Drop git ls-files in gemspec #476

Merged
merged 1 commit into from Jul 15, 2020
Merged

Drop git ls-files in gemspec #476

merged 1 commit into from Jul 15, 2020

Conversation

utkarsh2102
Copy link
Member

@utkarsh2102 utkarsh2102 commented Jul 15, 2020

Hi,

Thanks again for working on this! ❤️
However, while maintaining this in Debian, we found that this library relies on git to list the files which could be done via pure Ruby alternative -- which is what this PR does.

Also, added rubocop-packaging as a development_dependency which will ensure the best practices.
Here's what it shows:

Inspecting 33 files
...C.............................

Offenses:

cucumber-rails.gemspec:49:24: C: Packaging/GemspecGit: Avoid using git to produce lists of files.
Downstreams often need to build your package in an environment that does not have git (on purpose).
Use some pure Ruby alternative, like Dir or Dir.glob.
  s.files            = `git ls-files`.split("\n")
                       ^^^^^^^^^^^^^^

cucumber-rails.gemspec:50:24: C: Packaging/GemspecGit: Avoid using git to produce lists of files.
Downstreams often need to build your package in an environment that does not have git (on purpose).
Use some pure Ruby alternative, like Dir or Dir.glob.
  s.test_files       = `git ls-files -- {spec,features}/*`.split("\n")
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


33 files inspected, 2 offense detected

And this PR fixes the same, which helps us in shipping this in Debian! 🎉
Hope this would make sense and you'll be open to this change 💯

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>


CC: @luke-hill 😄
Closes: #475

Closes: #475

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
@luke-hill luke-hill merged commit f8b7a68 into cucumber:master Jul 15, 2020
@aslakhellesoy
Copy link
Contributor

Hi @utkarsh2102,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for this generous offer we hope you will:

  • ✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

@utkarsh2102 utkarsh2102 deleted the drop-git branch July 15, 2020 10:39
@utkarsh2102
Copy link
Member Author

Wow, thank you, @luke-hill and @aslakhellesoy ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop git from gemspec
3 participants