-
Notifications
You must be signed in to change notification settings - Fork 568
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require the jpm ruby gem to be installed in order for our custom prov…
…ider to work jpm is located: <https://github.com/rtyler/jpm> References #10, #11, #12
- Loading branch information
R. Tyler Croy
committed
Apr 24, 2014
1 parent
1290d22
commit 1437e2e
Showing
5 changed files
with
30 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# The 'jpm' feature will help confine our custom jpm provider to only exist if | ||
# we have the `jpm` rubygem installed | ||
# | ||
# Based on: <http://alcy.github.io/2012/11/21/handling-gem-dependencies-in-custom-puppet-providers/> | ||
|
||
Puppet.features.add(:jpm, :libs => ['jpm']) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require 'puppet/provider/package' | ||
|
||
################################################################################ | ||
# This comes from: <http://alcy.github.io/2012/11/21/handling-gem-dependencies-in-custom-puppet-providers/> | ||
################################################################################ | ||
require 'rubygems' if Puppet.features.rubygems? | ||
require 'jpm' if Puppet.features.jpm? | ||
################################################################################ | ||
|
||
Puppet::Type.type(:package).provide :jpm, :parent => Puppet::Provider::Package do | ||
confine :feature => :jpm | ||
desc "Provider for managing Jenkins plugins" | ||
|
||
has_feature :installable | ||
has_feature :uninstallable | ||
|
||
# These two features are pending the following issues being resolved for jpm: | ||
# <https://github.com/rtyler/jpm/issues/8> | ||
#has_feature :upgradeable | ||
# <https://github.com/rtyler/jpm/issues/7> | ||
#has_feature :versionable | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require 'spec_helper' | ||
require 'puppet/provider/package/jenkins' | ||
require 'puppet/provider/package/jpm' | ||
|
||
provider_type = Puppet::Type.type(:package).provider(:jenkins) | ||
provider_type = Puppet::Type.type(:package).provider(:jpm) | ||
|
||
describe provider_type do | ||
end |