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

add support for puppet:// as a source to install gem #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carldenis
Copy link

Hi, I added the possibility to load gems from a puppet filemount. Please review.

Have your gem in /modules/mygeminstaller/files/mygem-1.0.0.gem

rvm_gem {
  'mygem':
    name => 'mygem',
    ruby_version => 'ruby-2.0.0',
    ensure => '1.0.0',
    require => Rvm_system_ruby['ruby-2.0.0'],
    source => 'puppet:///modules/mygeminstaller/mygem-1.0.0.gem',
}

@carlossg
Copy link
Member

carlossg commented Dec 9, 2015

could you add something to the docs about it?

@vox-pupuli-tasks
Copy link

Dear @carldenis, thanks for the PR!

This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I realize this is an ancient PR, but I'm going through the open PRs.

Comment on lines +83 to +86
tmpfile = Tempfile.open(['puppet-rvm_geminstaller','.gem'])
tmpfile.write(tmp.content)
tmpfile.flush
return tmpfile.path.to_s
Copy link
Member

Choose a reason for hiding this comment

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

I think this leaks a temporary file for every Puppet run.

Copy link
Author

Choose a reason for hiding this comment

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

You are correct the file persists. However, you cannot delete the file right there, as it would no longer be available for the installation procedure.

Unfortunately, I no longer have an instance to validate, but I believe the assumption was this would only be execute if the gem is missing and thus create a file once.

@ekohl ekohl added the enhancement New feature or request label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request merge-conflicts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants