diff --git a/Gemfile b/Gemfile index 4f56d68..09044b0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,33 +1,34 @@ -source ENV['GEM_SOURCE'] || 'https://rubygems.org' +source "https://rubygems.org" -group :development, :unit_tests do - gem 'rspec-core', '~> 3.1.7', :require => false - gem 'rspec-puppet', '~> 2.1', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'simplecov', :require => false - gem 'puppet_facts', :require => false - gem 'json', :require => false - gem 'metadata-json-lint', :require => false - gem 'puppet-lint', '< 1.1.0', :require => false +group :test do + gem "rake" + gem "puppet", ENV['PUPPET_GEM_VERSION'] || '~> 3.8.0' + gem "rspec", '< 3.2.0' + gem "rspec-puppet", :git => 'https://github.com/rodjek/rspec-puppet.git' + gem "puppetlabs_spec_helper" + gem "metadata-json-lint" + gem "rspec-puppet-facts" + gem 'rubocop', '0.33.0' + gem 'simplecov', '>= 0.11.0' + gem 'simplecov-console' + + gem "puppet-lint-absolute_classname-check" + gem "puppet-lint-leading_zero-check" + gem "puppet-lint-trailing_comma-check" + gem "puppet-lint-version_comparison-check" + gem "puppet-lint-classes_and_types_beginning_with_digits-check" + gem "puppet-lint-unquoted_string-check" +end + +group :development do + gem "travis" + gem "travis-lint" + gem "puppet-blacksmith" + gem "guard-rake" end group :system_tests do - gem 'beaker-rspec', :require => false - gem 'serverspec', :require => false - gem 'beaker-puppet_install_helper', :require => false + gem "beaker" + gem "beaker-rspec" + gem "beaker-puppet_install_helper" end - -if facterversion = ENV['FACTER_GEM_VERSION'] - gem 'facter', facterversion, :require => false -else - gem 'facter', :require => false -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end - -gem 'puppet', "3.8" -# vim:ft=ruby diff --git a/manifests/init.pp b/manifests/init.pp index 0c26dfd..389f6b2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -13,6 +13,9 @@ class rsnapshot ( $package_name = $rsnapshot::params::package_name, $package_ensure = $rsnapshot::params::package_ensure, ) inherits rsnapshot::params { + if $::puppetversion =~ /^(1|2|3)/ { + fail("This module requires Puppet 4") + } if $hosts { class { 'rsnapshot::install': }-> class { 'rsnapshot::config': }