From 794ef229342af6870df37b4f136c7f463cd10944 Mon Sep 17 00:00:00 2001 From: Ken Barber Date: Mon, 25 Feb 2013 18:28:45 +0000 Subject: [PATCH] Fix versions for travis-ci This fixes some mistakes in the .travis.yml file: * Corrects matches so the minor gem revisions get rounded, this means 2.6.0 for example is used. * Adds Ruby 2.0.0 tests * Allows 2.6.0 to fail for now, as it doesn't have create_resources. * Removes trailing commas and arrays in functions for 2.6.0. Signed-off-by: Ken Barber --- .travis.yml | 22 +++++++++++++++------- Gemfile | 2 +- manifests/params.pp | 2 +- manifests/pg_hba_rule.pp | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index dd3394d..f9decd3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,22 +4,30 @@ script: "bundle exec rake spec SPEC_OPTS='--format documentation'" rvm: - 1.8.7 - 1.9.3 + - 2.0.0 - ruby-head env: - - PUPPET_GEM_VERSION="~> 2.6" - - PUPPET_GEM_VERSION="~> 2.7" - - PUPPET_GEM_VERSION="~> 3.0" + - PUPPET_GEM_VERSION="~> 2.6.0" + - PUPPET_GEM_VERSION="~> 2.7.0" + - PUPPET_GEM_VERSION="~> 3.0.0" + - PUPPET_GEM_VERSION="~> 3.1.0" matrix: allow_failures: + - rvm: 2.0.0 - rvm: ruby-head + - env: PUPPET_GEM_VERSION="~> 2.6.0" exclude: - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7" + env: PUPPET_GEM_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.7.0" - rvm: ruby-head - env: PUPPET_GEM_VERSION="~> 2.7" + env: PUPPET_GEM_VERSION="~> 2.7.0" - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.6" + env: PUPPET_GEM_VERSION="~> 2.6.0" + - rvm: 2.0.0 + env: PUPPET_GEM_VERSION="~> 2.6.0" - rvm: ruby-head - env: PUPPET_GEM_VERSION="~> 2.6" + env: PUPPET_GEM_VERSION="~> 2.6.0" notifications: email: false diff --git a/Gemfile b/Gemfile index 0b2db90..9d9b920 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source :rubygems +source 'https://rubygems.org' group :development, :test do gem 'rake' diff --git a/manifests/params.pp b/manifests/params.pp index 2b66c3a..1f295c1 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -43,7 +43,7 @@ class postgresql::params( $custom_service_name = undef, $custom_user = undef, $custom_group = undef, - $run_initdb = undef, + $run_initdb = undef ) { $user = pick($custom_user, 'postgres') $group = pick($custom_group, 'postgres') diff --git a/manifests/pg_hba_rule.pp b/manifests/pg_hba_rule.pp index 7a45140..5abb885 100644 --- a/manifests/pg_hba_rule.pp +++ b/manifests/pg_hba_rule.pp @@ -13,7 +13,7 @@ define postgresql::pg_hba_rule( ) { include postgresql::params - validate_re($type, ['^local$', '^host$', '^hostssl$', '^hostnossl$'], + validate_re($type, '^(local|host|hostssl|hostnossl)$', "The type you specified [${type}] must be one of: local, host, hostssl, hostnosssl") validate_re($auth_method, '^(trust|reject|md5|crypt|password|gss|sspi|krb5|ident|peer|ldap|radius|cert|pam)$', "The auth_method you specified [${auth_method}] must be one of: trust, reject, md5, crypt, password, krb5, ident, ldap, pam")