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

r10k::module::git: expose remote as getter #1380

Merged
merged 1 commit into from
May 9, 2024

Conversation

bastelfreak
Copy link
Contributor

This allows us to access the remote property to figure out the git URI for a module:

$ bundle exec irb
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
irb(main):001:0> require 'json'
=> true
irb(main):002:0> require 'r10k/module_loader/puppetfile'
=> true
irb(main):003:0> puppetfile = R10K::ModuleLoader::Puppetfile.new(basedir: '/home/bastelfreak/code/controlrepo/').load
=>
{:modules=>
...
irb(main):004:0> mod = puppetfile[:modules].map {|mod| mod if mod.class == R10K::Module::Git}.compact.first
=>
...
irb(main):005:0> mod.remote
=> "https://github.com/voxpupuli/puppet-borg"
irb(main):006:0>

cherry-picked 22da06b from #1379

This allows us to access the remote property to figure out the git URI
for a module:

```
$ bundle exec irb
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
irb(main):001:0> require 'json'
=> true
irb(main):002:0> require 'r10k/module_loader/puppetfile'
=> true
irb(main):003:0> puppetfile = R10K::ModuleLoader::Puppetfile.new(basedir: '/home/bastelfreak/code/controlrepo/').load
=>
{:modules=>
...
irb(main):004:0> mod = puppetfile[:modules].map {|mod| mod if mod.class == R10K::Module::Git}.compact.first
=>
...
irb(main):005:0> mod.remote
=> "https://github.com/voxpupuli/puppet-borg"
irb(main):006:0>
```

cherry-picked 22da06b from puppetlabs#1379
@bastelfreak bastelfreak requested a review from a team as a code owner April 9, 2024 18:15
@bastelfreak
Copy link
Contributor Author

@justinstoller can you also merge this? I cherry-picked the commit from #1379 .

@justinstoller
Copy link
Member

Sure thing.

@justinstoller justinstoller merged commit 88d4d78 into puppetlabs:3.x May 9, 2024
1 check passed
@bastelfreak bastelfreak deleted the remote branch May 9, 2024 21:05
@bastelfreak
Copy link
Contributor Author

bastelfreak commented May 9, 2024

@justinstoller any chance you can do a new 3.x release?

@justinstoller
Copy link
Member

Yeah, I just need to enable automation on the 3.x branch first: #1389

@justinstoller
Copy link
Member

That took a bit of shenanigans but it's finally up https://rubygems.org/gems/r10k/versions/3.16.2 !

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