From 939595bedc0733c2baf2e55a0c524ec90e62eb61 Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Fri, 11 Mar 2016 12:56:39 +0100 Subject: [PATCH] Add missing Gemfile to the project All our puppet projects rely on a Gemfile for tests to run. This was missing, so add here as well. Also fix the linter errors that this new Gemfile addition is causing. Change-Id: I24143df44c313ea76472649bb9a6fa0ce4536307 --- Gemfile | 31 +++++++++++++++++++++++ manifests/site.pp | 8 +++--- templates/etherpad-lite_settings.json.erb | 4 +-- 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 Gemfile diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..4497876 --- /dev/null +++ b/Gemfile @@ -0,0 +1,31 @@ +source 'https://rubygems.org' + +group :development, :test do + gem 'puppetlabs_spec_helper', :require => false + + gem 'metadata-json-lint' + # This is nice and all, but let's not worry about it until we've actually + # got puppet 4.x sorted + # gem 'puppet-lint-param-docs' + gem 'puppet-lint-absolute_classname-check' + gem 'puppet-lint-absolute_template_path' + gem 'puppet-lint-trailing_newline-check' + + # Puppet 4.x related lint checks + gem 'puppet-lint-unquoted_string-check' + # Disable it because we use empty string checks + #gem 'puppet-lint-empty_string-check' + gem 'puppet-lint-leading_zero-check' + gem 'puppet-lint-variable_contains_upcase' + gem 'puppet-lint-spaceship_operator_without_tag-check' + gem 'puppet-lint-undef_in_function-check' + + if puppetversion = ENV['PUPPET_GEM_VERSION'] + gem 'puppet', puppetversion, :require => false + else + gem 'puppet', '~> 3.0', :require => false + end + +end + +# vim:ft=ruby diff --git a/manifests/site.pp b/manifests/site.pp index fffff00..ca2090d 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -3,14 +3,14 @@ class etherpad_lite::site ( $database_password, $etherpad_title, - $sessionKey = '', - $dbType = 'mysql', + $session_key = '', + $db_type = 'mysql', $database_user = 'eplite', $database_name = 'etherpad-lite', $database_host = 'localhost' ) { - include etherpad_lite + include ::etherpad_lite $base = $etherpad_lite::base_install_dir @@ -39,7 +39,7 @@ class etherpad_lite::site ( require => Class['etherpad_lite'], } - include logrotate + include ::logrotate logrotate::file { 'epliteerror': log => "${base}/${etherpad_lite::ep_user}/error.log", options => [ diff --git a/templates/etherpad-lite_settings.json.erb b/templates/etherpad-lite_settings.json.erb index bd5859a..b6572ba 100644 --- a/templates/etherpad-lite_settings.json.erb +++ b/templates/etherpad-lite_settings.json.erb @@ -16,11 +16,11 @@ // Session Key, used for reconnecting user sessions // Set this to a secure string at least 10 characters long. Do not share this value. - "sessionKey" : "<%= @sessionKey %>", + "sessionKey" : "<%= @session_key %>", //The Type of the database. You can choose between dirty, sqlite and mysql //You should use mysql or sqlite for anything else than testing or development - "dbType" : "<%= @dbType %>", + "dbType" : "<%= @db_type %>", //the database specific settings "dbSettings" : { "user" : "<%= @database_user %>",