Skip to content

Conversation

bastelfreak
Copy link
Collaborator

On modern ruby, base64 moved from MRI Ruby core to a standalone gem.
Without this change, we get this error:

lib/puppet_forge/v3/release.rb:5: warning: base64 was loaded from the standard library, but is not part of the default gems starting from Ruby 3.4.0.
You can add base64 to your Gemfile or gemspec to silence this warning.

On modern ruby, base64 moved from MRI Ruby core to a standalone gem.
Without this change, we get this error:

```
lib/puppet_forge/v3/release.rb:5: warning: base64 was loaded from the standard library, but is not part of the default gems starting from Ruby 3.4.0.
You can add base64 to your Gemfile or gemspec to silence this warning.
```

spec.required_ruby_version = '>= 3.1.0'

spec.add_runtime_dependency "base64", '~> 0.2.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no difference between add_runtime_dependency and add_dependency: https://guides.rubygems.org/specification-reference/#add_dependency. I don't like things having aliases, but that's Ruby for you.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added rubocop in #130 , to enforce a consistent style.

bastelfreak added a commit to bastelfreak/metadata_json_deps that referenced this pull request May 5, 2025
base64 is a dependency for puppet on ruby 3.4. That's pulled in by
puppet_forge. Upstream doesn't respond in
puppetlabs/forge-ruby#129, so we add it here as
a workaround.
bastelfreak added a commit to voxpupuli/metadata_json_deps that referenced this pull request May 21, 2025
* puppet_metadata: Allow 5.x

* Add base64 as runtime dependency

base64 is a dependency for puppet on ruby 3.4. That's pulled in by
puppet_forge. Upstream doesn't respond in
puppetlabs/forge-ruby#129, so we add it here as
a workaround.
@bastelfreak
Copy link
Collaborator Author

raised support ticket #01446451

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