summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColleen Murphy <colleen@gazlene.net>2015-08-03 22:36:22 -0700
committerColleen Murphy <colleen@gazlene.net>2015-08-03 22:36:55 -0700
commita94f0895357762085e274bba44d8f497a9252562 (patch)
tree19f226fdf6da36efc93b13c25ed57281ee7efc3a
parentce473c9cb858950e08da3f0964fbd6f815abc523 (diff)
Add Gemfile and puppet 4 checks
In anticipation of puppet 4, start trying to deal with puppet 4 things that can be helpfully predicted by puppet lint plugins. Also fix lint errors caught by the puppet-lint-absolute_classname-check gem. Change-Id: Icc120da2373214a9222e9434e725477096e989d3
Notes
Notes (review): Code-Review+2: Monty Taylor <mordred@inaugust.com> Workflow+1: Monty Taylor <mordred@inaugust.com> Verified+2: Jenkins Code-Review+2: yolanda.robla <info@ysoft.biz> Submitted-by: Jenkins Submitted-at: Sun, 09 Aug 2015 03:12:13 +0000 Reviewed-on: https://review.openstack.org/208807 Project: openstack-infra/puppet-logrotate Branch: refs/heads/master
-rw-r--r--.gitignore2
-rw-r--r--Gemfile30
-rw-r--r--manifests/file.pp2
3 files changed, 33 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..dade81e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
1Gemfile.lock
2.bundled_gems/
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..96912da
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,30 @@
1source 'https://rubygems.org'
2
3group :development, :test do
4 gem 'puppetlabs_spec_helper', :require => false
5
6 gem 'metadata-json-lint'
7 # This is nice and all, but let's not worry about it until we've actually
8 # got puppet 4.x sorted
9 # gem 'puppet-lint-param-docs'
10 gem 'puppet-lint-absolute_classname-check'
11 gem 'puppet-lint-absolute_template_path'
12 gem 'puppet-lint-trailing_newline-check'
13
14 # Puppet 4.x related lint checks
15 gem 'puppet-lint-unquoted_string-check'
16 gem 'puppet-lint-empty_string-check'
17 gem 'puppet-lint-leading_zero-check'
18 gem 'puppet-lint-variable_contains_upcase'
19 gem 'puppet-lint-spaceship_operator_without_tag-check'
20 gem 'puppet-lint-undef_in_function-check'
21
22 if puppetversion = ENV['PUPPET_GEM_VERSION']
23 gem 'puppet', puppetversion, :require => false
24 else
25 gem 'puppet', '~> 3.0', :require => false
26 end
27
28end
29
30# vim:ft=ruby
diff --git a/manifests/file.pp b/manifests/file.pp
index 685cc2d..88df974 100644
--- a/manifests/file.pp
+++ b/manifests/file.pp
@@ -14,7 +14,7 @@ define logrotate::file (
14 # directives (e.g. missingok, compress). 14 # directives (e.g. missingok, compress).
15 validate_string($options[0]) 15 validate_string($options[0])
16 16
17 include logrotate 17 include ::logrotate
18 # This allows us to handle fully pathed files 18 # This allows us to handle fully pathed files
19 $escaped_path = regsubst($name, '/', '_', 'G') 19 $escaped_path = regsubst($name, '/', '_', 'G')
20 20