diff --git a/.travis.yml b/.travis.yml index 97f772dc..5a14630b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,24 @@ matrix: env: PUPPET_GEM_VERSION="~> 3.8.0" LEGACY=yes - rvm: 2.1.9 env: PUPPET_GEM_VERSION="~> 4.9" DEPLOY_CANDIDATE=yes + - sudo: required + services: docker + rvm: '2.3.3' + env: PUPPET_INSTALL_VERSION="1.10.4" PUPPET_INSTALL_TYPE=agent BEAKER_set="centos-6-x86_64-docker" + script: bundle exec rake acceptance + bundler_args: --without development + - sudo: required + services: docker + rvm: '2.3.3' + env: PUPPET_INSTALL_VERSION="1.10.4" PUPPET_INSTALL_TYPE=agent BEAKER_set="centos-7-x86_64-docker" + script: bundle exec rake acceptance + bundler_args: --without development + - sudo: required + services: docker + rvm: '2.3.3' + env: PUPPET_INSTALL_VERSION="1.10.4" PUPPET_INSTALL_TYPE=agent BEAKER_set="ubuntu-14.04-x86_64-docker" + script: bundle exec rake acceptance + bundler_args: --without development - rvm: 2.4.0 env: PUPPET_GEM_VERSION="~> 4" FUTURE=yes allow_failures: diff --git a/Gemfile b/Gemfile index f916e444..cce56a81 100644 --- a/Gemfile +++ b/Gemfile @@ -1,28 +1,41 @@ -source "https://rubygems.org" - -RUBY_2_OR_NEWER = RUBY_VERSION >= '2.0.0' +source ENV['GEM_SOURCE'] || "https://rubygems.org" group :test do - gem "rake", '~> 11' - gem "puppet", ENV['PUPPET_GEM_VERSION'] || '~> 4.9' - gem "rspec", '~> 3.5' - gem "rspec-puppet" - gem "puppetlabs_spec_helper" - gem "metadata-json-lint" - gem "rspec-puppet-facts" - gem "json_pure" - gem "parallel_tests", RUBY_2_OR_NEWER ? '~> 2' : '2.9.0' + gem 'puppetlabs_spec_helper', '2.2.0', :require => false + gem 'rspec-puppet', :require => false, :git => 'https://github.com/rodjek/rspec-puppet.git' + gem 'rspec-puppet-facts', :require => false + gem 'rspec-puppet-utils', :require => false + gem 'puppet-lint-absolute_classname-check', :require => false + gem 'puppet-lint-leading_zero-check', :require => false + gem 'puppet-lint-trailing_comma-check', :require => false + gem 'puppet-lint-version_comparison-check', :require => false + gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false + gem 'puppet-lint-unquoted_string-check', :require => false + gem 'puppet-lint-variable_contains_upcase', :require => false + gem 'metadata-json-lint', :require => false + gem 'puppet-strings', '1.1.0', :require => false + gem 'puppet_facts', :require => false + gem 'rubocop-rspec', '~> 1.6', :require => false if RUBY_VERSION >= '2.3.0' + gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION < '2.0.0' + gem 'safe_yaml', '~> 1.0.4', :require => false + gem 'listen', '<= 3.0.6', :require => false + gem 'puppet-syntax', :require => false, git: 'https://github.com/gds-operations/puppet-syntax.git' + gem 'pry' + gem 'rb-readline' end group :development do - gem "travis" - gem "travis-lint" - gem "vagrant-wrapper" - gem "puppet-blacksmith" - gem "guard-rake" + gem 'puppet-blacksmith' + gem 'travis' end group :system_tests do - gem "beaker" - gem "beaker-rspec" + gem "beaker", '2.41.0', :require => false + gem "beaker-rspec", '5.6.0', :require => false + gem 'beaker-puppet_install_helper', :require => false end + +ENV['PUPPET_GEM_VERSION'].nil? ? puppetversion = '~> 4.9' : puppetversion = ENV['PUPPET_GEM_VERSION'].to_s +gem 'puppet', puppetversion, :require => false, :groups => [:test] + +# vim: syntax=ruby diff --git a/README.md b/README.md index 7d877573..510c6b93 100644 --- a/README.md +++ b/README.md @@ -115,14 +115,14 @@ By default, with no parameters the module will configure vault with some sensibl ```puppet class { '::vault': backend => { - 'file' => { - 'path' => '/tmp', + file => { + path => '/tmp', } }, listener => { - 'tcp' => { - 'address' => '127.0.0.1:8200', - 'tls_disable' => 0, + tcp => { + address => '127.0.0.1:8200', + tls_disable => 0, } } } diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb index 25c5ebc5..1ca407bd 100644 --- a/spec/acceptance/class_spec.rb +++ b/spec/acceptance/class_spec.rb @@ -8,14 +8,14 @@ pp = <<-EOS class { '::vault': backend => { - 'file' => { - 'path' => '/tmp', + file => { + path => '/tmp', } }, - listener' => { - 'tcp' => { - 'address' => '127.0.0.1:8200', - 'tls_disable' => 1, + listener => { + tcp => { + address => '127.0.0.1:8200', + tls_disable => 1, } } } diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index ec208b27..bf1cb18c 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,16 +1,7 @@ -require 'beaker-rspec/spec_helper' -require 'beaker-rspec/helpers/serverspec' +require 'beaker-rspec' +require 'beaker/puppet_install_helper' -unless ENV['BEAKER_provision'] == 'no' - hosts.each do |host| - # Install Puppet - if host.is_pe? - install_pe - else - install_puppet - end - end -end +run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no' RSpec.configure do |c| # Project root @@ -25,7 +16,7 @@ puppet_module_install(:source => proj_root, :module_name => 'vault') hosts.each do |host| on host, puppet('module', 'install', 'puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } - on host, puppet('module', 'install', 'nanliu-staging'), { :acceptable_exit_codes => [0,1] } + on host, puppet('module', 'install', 'puppet-archive'), { :acceptable_exit_codes => [0,1] } end end end