-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add Gemfile.lock #503
Add Gemfile.lock #503
Conversation
WalkthroughThe recent changes primarily focus on refining the workflow and gem packaging configurations within the project. Key updates include removing Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
Gemfile.lock
is excluded by!**/*.lock
Files selected for processing (1)
- .gitignore (1 hunks)
Files skipped from review due to trivial changes (1)
- .gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- shakapacker.gemspec (1 hunks)
Additional comments not posted (1)
shakapacker.gemspec (1)
31-33
: LGTM! Improved file inclusion logic.The updated logic using null-terminated strings and excluding unnecessary files and directories is a good practice. This ensures that the gem package does not include files that are not needed for the gem's functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- .github/workflows/ruby.yml (1 hunks)
- shakapacker.gemspec (1 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/ruby.yml
Additional comments not posted (1)
shakapacker.gemspec (1)
31-33
: LGTM! Improved file inclusion precision and exclusion filter.The change to use
git ls-files -z
and split by\x0
enhances the precision of file inclusion, especially for filenames with special characters. The reject filter ensures that specific directories and files, such asGemfile.lock
, are excluded from the gem package.
@@ -28,5 +28,10 @@ Gem::Specification.new do |s| | |||
s.add_development_dependency "rubocop-performance" | |||
|
|||
s.files = `git ls-files`.split("\n") | |||
s.files = `git ls-files -z`.split("\x0").reject { |f| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have two invocations of s.files
? Failing on some linting here too so let's fix before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first one was supposed to be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- shakapacker.gemspec (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- shakapacker.gemspec
@tomdracz OK now? :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- shakapacker.gemspec (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- shakapacker.gemspec
Summary
When creating a gem, it is generally recommended to exclude the Gemfile.lock file from the gem's distribution. The Gemfile.lock file is specific to the development environment and ensures that the exact versions of dependencies used during development are installed. However, when someone else uses your gem in their project, they should rely on the gem's specified dependency versions in the gemspec file, not the Gemfile.lock.
In the gemspec file, you typically use the git ls-files command to include all the necessary files in the gem. The reject block is used to exclude certain files or directories that shouldn't be included in the gem.
Here's an example of how you can exclude files in the gemspec:
Summary by CodeRabbit
Chores
Gemfile.lock
from the list of ignored files in.gitignore
.Gemfile.lock
before setting up Ruby.Refactor