From ee4f11968acfd99e33a043509d7c4c7345f1bc11 Mon Sep 17 00:00:00 2001 From: Will Hopper Date: Wed, 28 Sep 2016 10:14:50 -0700 Subject: [PATCH] (PDOC-80) Remove runtime dependency on puppet The runtime dependency on puppet presents problems when puppet is not installed on the system as a gem, as is the case in PE installations. Because the dependency will only be satisfied by a gem, strings currently cannot be installed in PE 3.8. This had to be worked around in newer PE versions with a fake gemspec file. Another issue is that installing strings with an older version of puppet will force an upgrade to the newest version of puppet via the gem. This commit replaces the runtime dependency on puppet with a requirement which will be present on the gem homepage on rubygems.org. Requirements are meant to list external requirements needed for the gem to work, which is correct for puppet as it can be present via a different type of package. --- README.md | 18 ++++++++++++++++++ puppet-strings.gemspec | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a98324..3b6efb0 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ In order to run strings you need to have the following software installed: * Puppet 3.7 or newer * The `yard` Ruby gem +Note that a few extra steps are necessary to install puppet-strings with Puppet Enterprise 3.8. + Installing the YARD Gem ----------------------- @@ -47,6 +49,17 @@ For Puppet 3.x: $ puppet resource package yard provider=gem ``` +For Puppet Enterprise 3.8: +``` +GEM_HOME=/opt/puppet/lib/ruby/gems/1.9.1 puppet resource package yard provider=gem +``` + +Installing the redcarpet Gem (Puppet Enterprise 3.8 only) +------------------------- +``` +GEM_HOME=/opt/puppet/lib/ruby/gems/1.9.1 puppet resource package redcarpet provider=gem +``` + Installing Puppet Strings ------------------------- @@ -64,6 +77,11 @@ For Puppet 3.x: $ puppet resource package puppet-strings provider=gem ``` +For Puppet Enterprise 3.8: +``` +GEM_HOME=/opt/puppet/lib/ruby/gems/1.9.1 puppet resource package puppet-strings provider=gem +``` + Running Puppet Strings ---------------------- diff --git a/puppet-strings.gemspec b/puppet-strings.gemspec index 77c8314..4638dd4 100644 --- a/puppet-strings.gemspec +++ b/puppet-strings.gemspec @@ -17,6 +17,6 @@ Gem::Specification.new do |s| ] s.files = `git ls-files`.split("\n") - Dir['.*', '*.gemspec'] - s.add_runtime_dependency 'puppet', '>= 3.7.0' s.add_runtime_dependency 'yard', '~> 0.9.5' + s.requirements << 'puppet, >= 3.7.0' end