Skip to content

Conversation

@arielvalentin
Copy link
Contributor

@arielvalentin arielvalentin commented Feb 21, 2025

Enforce that development dependencies for a gem are specified in Gemfile, rather than in the gemspec using add_development_dependency. Alternatively, using EnforcedStyle: gemspec, enforce that all dependencies are specified in gemspec, rather than in Gemfile.

https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecdevelopmentdependencies

@arielvalentin arielvalentin force-pushed the enable-development-dependencies-gemfile branch from 48b14b6 to c473ecc Compare February 25, 2025 03:00
@arielvalentin arielvalentin marked this pull request as ready for review February 25, 2025 03:02
Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

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

Thank you! Approved as-is, one small docs suggestion.

P.S. I didn't realize how merging the Rubocop PR would impact this one! Apologies for the merge conflicts!

fi

for gemspec in $(git ls-files \*.gemspec)
for gemspec in $(git ls-files \*Gemfile)
Copy link
Contributor

Choose a reason for hiding this comment

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

I know we usually use this for dev dependencies, but prior to this PR, the script could also be used with general dependencies too. if this is all that needs to be changed, what do you think about updating documentation (possibly in CONTRIBUTING.md) to note how to adjust the script to update dependencies in gemspecs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True! I'll make sure this supports both.

Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

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

Thank you!

@kaylareopelle
Copy link
Contributor

@arielvalentin - Thanks for the updates! Once the conflicts are resolved I'll merge this in. It doesn't look like I have the option to resolve them myself.

@arielvalentin arielvalentin force-pushed the enable-development-dependencies-gemfile branch from c3b6c2b to 6f50651 Compare February 26, 2025 19:46
@arielvalentin arielvalentin merged commit 5cf6114 into open-telemetry:main Feb 27, 2025
59 checks passed
@arielvalentin arielvalentin deleted the enable-development-dependencies-gemfile branch February 27, 2025 03:38
kaylareopelle added a commit to kaylareopelle/opentelemetry-ruby-contrib that referenced this pull request Aug 18, 2025
In open-telemetry#1426 we enabled Gemfile dev dependencies.
kaylareopelle added a commit that referenced this pull request Aug 21, 2025
In #1426 we enabled Gemfile dev dependencies.
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.

2 participants