puppetlabs/puppet — pull request #2429 by petems (2014-03-12 16:21:20+00:00)
Title: PUP-620 - Add `:install_options` to gem provider

Necro'd https://github.com/puppetlabs/puppet/pull/2012 to make sure the `install_options` only apply to the install command in the gem provider:

```
package { 'sass':
provider => gem,
install_options => '--config-file=/root/.gemrc',
}
```

So now the `--config-file=/root/.gemrc` option only affects install:
```
Debug: Prefetching gem resources for package
Debug: Executing '/opt/boxen/rbenv/versions/1.9.3-p448/bin/gem list --local'
Debug: Executing '/opt/boxen/rbenv/versions/1.9.3-p448/bin/gem list --local sass$'
Debug: Executing '/opt/boxen/rbenv/versions/1.9.3-p448/bin/gem install --no-rdoc --no-ri sass --config-file=/root/.gemrc'
Notice: /Stage[main]/Main/Package[sass]/ensure: created
```

I've added a basic default spec to check that the install_options defaults to nil, but I can't figure out how to mock the install_options, any help would be appreciated! :+1: