From 21b3b78c4ebcea153f06f73adc68c28b79cd6004 Mon Sep 17 00:00:00 2001 From: Michael Milligan Date: Fri, 15 Jul 2016 11:59:03 -0500 Subject: [PATCH 1/4] Remove whitespace that makes lint complain --- manifests/pip.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/pip.pp b/manifests/pip.pp index b50d7efb..70560a6d 100644 --- a/manifests/pip.pp +++ b/manifests/pip.pp @@ -85,7 +85,7 @@ $python_provider = getparam(Class['python'], 'provider') $python_version = getparam(Class['python'], 'version') - + # Get SCL exec prefix # NB: this will not work if you are running puppet from scl enabled shell $exec_prefix = $python_provider ? { @@ -93,7 +93,7 @@ 'rhscl' => "scl enable ${python_version} -- ", default => '', } - + # Parameter validation if ! $virtualenv { fail('python::pip: virtualenv parameter must not be empty') From 285069d0e15d893bff107bd38af0d1f507367d74 Mon Sep 17 00:00:00 2001 From: Michael Milligan Date: Fri, 15 Jul 2016 13:49:44 -0500 Subject: [PATCH 2/4] disable 140 character test multi-line strings aren't consistently handled, don't force lint to fail --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 1f6c81f0..28d00a1e 100644 --- a/Rakefile +++ b/Rakefile @@ -12,6 +12,7 @@ end PuppetLint.configuration.fail_on_warnings PuppetLint.configuration.send('relative') PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_140chars') PuppetLint.configuration.send('disable_class_inherits_from_params_class') PuppetLint.configuration.send('disable_class_parameter_defaults') PuppetLint.configuration.send('disable_documentation') @@ -36,4 +37,4 @@ task :test => [ :syntax, :lint, :spec, -] \ No newline at end of file +] From 90f800f327edf5e45b9e8defd4931ba71ede4265 Mon Sep 17 00:00:00 2001 From: Michael Milligan Date: Fri, 15 Jul 2016 14:21:22 -0500 Subject: [PATCH 3/4] Pin older json gem for ruby 1.8.7 --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 9161e3cc..b0462fd6 100644 --- a/Gemfile +++ b/Gemfile @@ -13,6 +13,7 @@ end if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9' gem 'rspec', '~> 2.0' gem 'rake', '~> 10.0' + gem 'json', '~> 1.8' else gem 'rake', :require => false end From 315efa074ea0b244f907a6f130ff3e483a058e85 Mon Sep 17 00:00:00 2001 From: Michael Milligan Date: Fri, 15 Jul 2016 17:44:46 -0500 Subject: [PATCH 4/4] pin json gem to 1.0 for ruby < 2.0 --- Gemfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index b0462fd6..f5b005b8 100644 --- a/Gemfile +++ b/Gemfile @@ -13,11 +13,14 @@ end if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9' gem 'rspec', '~> 2.0' gem 'rake', '~> 10.0' - gem 'json', '~> 1.8' else gem 'rake', :require => false end +if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '2.0' + gem 'json', '~> 1.0' +end + if facterversion = ENV['FACTER_GEM_VERSION'] gem 'facter', facterversion, :require => false else