From ba8b25a2271e2a979586171e27d07054e68dc42d Mon Sep 17 00:00:00 2001 From: Rob Nelson Date: Tue, 9 Feb 2016 00:23:03 +0000 Subject: [PATCH 1/2] (44) Rspec remediation General cleanup of Gemfile/Rakefile/rspec setup to current best practices Update of all files to pass tests Separate the bind::server test into bind, bind::server, and bind::service This does not guarantee 100% coverage in any way, it only ensures that existing tests pass. --- .bundle/config | 4 + .gitignore | 12 + .pmtignore | 1 + .rspec | 2 + .rubocop.yml | 486 ++++++++++++++++++++++++++ .yardopts | 1 + Gemfile | 39 ++- Gemfile.lock | 41 --- Rakefile | 70 +++- spec/classes/bind__server_spec.rb | 9 + spec/classes/bind__service_spec.rb | 21 ++ spec/classes/bind_server_spec.rb | 25 -- spec/classes/bind_spec.rb | 15 + spec/defines/bind_server_conf_spec.rb | 69 ++-- spec/defines/bind_server_file_spec.rb | 12 +- spec/spec_helper.rb | 20 +- tests/server.pp | 2 +- tests/server/conf.pp | 10 +- tests/server/file.pp | 4 +- 19 files changed, 707 insertions(+), 136 deletions(-) create mode 100644 .bundle/config create mode 100644 .gitignore create mode 100644 .pmtignore create mode 100644 .rspec create mode 100644 .rubocop.yml create mode 100644 .yardopts delete mode 100644 Gemfile.lock create mode 100644 spec/classes/bind__server_spec.rb create mode 100644 spec/classes/bind__service_spec.rb delete mode 100644 spec/classes/bind_server_spec.rb create mode 100644 spec/classes/bind_spec.rb diff --git a/.bundle/config b/.bundle/config new file mode 100644 index 000000000..577adc833 --- /dev/null +++ b/.bundle/config @@ -0,0 +1,4 @@ +--- +BUNDLE_PATH: vendor +BUNDLE_WITHOUT: system_tests +BUNDLE_DISABLE_SHARED_GEMS: '1' diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..6dfe023fc --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +.*.sw? +/pkg +/spec/fixtures +/.rspec_system +/.vagrant +/.bundle +/vendor +/Gemfile.lock +/junit +/log +.yardoc +coverage diff --git a/.pmtignore b/.pmtignore new file mode 100644 index 000000000..48b8bf907 --- /dev/null +++ b/.pmtignore @@ -0,0 +1 @@ +vendor/ diff --git a/.rspec b/.rspec new file mode 100644 index 000000000..8c18f1abd --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--format documentation +--color diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 000000000..e73bca645 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,486 @@ +AllCops: + Exclude: + # Ignore HTML related things + - '**/*.erb' + # Ignore vendored gems + - 'vendor/**/*' + # Ignore code from test fixtures + - 'spec/fixtures/**/*' + +Lint/ConditionPosition: + Enabled: true + +Lint/ElseLayout: + Enabled: true + +Lint/UnreachableCode: + Enabled: true + +Lint/UselessComparison: + Enabled: true + +Lint/EnsureReturn: + Enabled: true + +Lint/HandleExceptions: + Enabled: true + +Lint/LiteralInCondition: + Enabled: true + +Lint/ShadowingOuterLocalVariable: + Enabled: true + +Lint/LiteralInInterpolation: + Enabled: true + +Style/RedundantReturn: + Enabled: true + +Lint/AmbiguousOperator: + Enabled: true + +Lint/AssignmentInCondition: + Enabled: true + +Style/SpaceBeforeComment: + Enabled: true + +# DISABLED - not useful +Style/HashSyntax: + Enabled: false + +# USES: as shortcut for non nil&valid checking a = x() and a.empty? +# DISABLED - not useful +Style/AndOr: + Enabled: false + +# DISABLED - not useful +Style/RedundantSelf: + Enabled: false + +# DISABLED - not useful +Metrics/MethodLength: + Enabled: false + +# DISABLED - not useful +Style/WhileUntilModifier: + Enabled: false + +# DISABLED - the offender is just haskell envy +Lint/AmbiguousRegexpLiteral: + Enabled: false + +# DISABLED +Lint/Eval: + Enabled: false + +# DISABLED +Lint/BlockAlignment: + Enabled: false + +# DISABLED +Lint/DefEndAlignment: + Enabled: false + +# DISABLED +Lint/EndAlignment: + Enabled: false + +# DISABLED +Lint/DeprecatedClassMethods: + Enabled: false + +# DISABLED +Lint/Loop: + Enabled: false + +# DISABLED +Lint/ParenthesesAsGroupedExpression: + Enabled: false + +Lint/RescueException: + Enabled: false + +Lint/StringConversionInInterpolation: + Enabled: false + +Lint/UnusedBlockArgument: + Enabled: false + +Lint/UnusedMethodArgument: + Enabled: false + +Lint/UselessAccessModifier: + Enabled: true + +Lint/UselessAssignment: + Enabled: true + +Lint/Void: + Enabled: true + +Style/AccessModifierIndentation: + Enabled: false + +Style/AccessorMethodName: + Enabled: false + +Style/Alias: + Enabled: false + +Style/AlignArray: + Enabled: false + +Style/AlignHash: + Enabled: false + +Style/AlignParameters: + Enabled: false + +Metrics/BlockNesting: + Enabled: false + +Style/AsciiComments: + Enabled: false + +Style/Attr: + Enabled: false + +Style/BracesAroundHashParameters: + Enabled: false + +Style/CaseEquality: + Enabled: false + +Style/CaseIndentation: + Enabled: false + +Style/CharacterLiteral: + Enabled: false + +Style/ClassAndModuleCamelCase: + Enabled: false + +Style/ClassAndModuleChildren: + Enabled: false + +Style/ClassCheck: + Enabled: false + +Metrics/ClassLength: + Enabled: false + +Style/ClassMethods: + Enabled: false + +Style/ClassVars: + Enabled: false + +Style/WhenThen: + Enabled: false + +# DISABLED - not useful +Style/WordArray: + Enabled: false + +Style/UnneededPercentQ: + Enabled: false + +Style/Tab: + Enabled: false + +Style/SpaceBeforeSemicolon: + Enabled: false + +Style/TrailingBlankLines: + Enabled: false + +Style/SpaceInsideBlockBraces: + Enabled: false + +Style/SpaceInsideBrackets: + Enabled: false + +Style/SpaceInsideHashLiteralBraces: + Enabled: false + +Style/SpaceInsideParens: + Enabled: false + +Style/LeadingCommentSpace: + Enabled: false + +Style/SingleSpaceBeforeFirstArg: + Enabled: false + +Style/SpaceAfterColon: + Enabled: false + +Style/SpaceAfterComma: + Enabled: false + +Style/SpaceAfterControlKeyword: + Enabled: false + +Style/SpaceAfterMethodName: + Enabled: false + +Style/SpaceAfterNot: + Enabled: false + +Style/SpaceAfterSemicolon: + Enabled: false + +Style/SpaceAroundEqualsInParameterDefault: + Enabled: false + +Style/SpaceAroundOperators: + Enabled: false + +Style/SpaceBeforeBlockBraces: + Enabled: false + +Style/SpaceBeforeComma: + Enabled: false + +Style/CollectionMethods: + Enabled: false + +Style/CommentIndentation: + Enabled: false + +Style/ColonMethodCall: + Enabled: false + +Style/CommentAnnotation: + Enabled: false + +Metrics/CyclomaticComplexity: + Enabled: false + +Style/ConstantName: + Enabled: false + +Style/Documentation: + Enabled: false + +Style/DefWithParentheses: + Enabled: false + +Style/DeprecatedHashMethods: + Enabled: false + +Style/DotPosition: + Enabled: false + +# DISABLED - used for converting to bool +Style/DoubleNegation: + Enabled: false + +Style/EachWithObject: + Enabled: false + +Style/EmptyLineBetweenDefs: + Enabled: false + +Style/IndentArray: + Enabled: false + +Style/IndentHash: + Enabled: false + +Style/IndentationConsistency: + Enabled: false + +Style/IndentationWidth: + Enabled: false + +Style/EmptyLines: + Enabled: false + +Style/EmptyLinesAroundAccessModifier: + Enabled: false + +Style/EmptyLiteral: + Enabled: false + +Metrics/LineLength: + Enabled: false + +Style/MethodCallParentheses: + Enabled: false + +Style/MethodDefParentheses: + Enabled: false + +Style/LineEndConcatenation: + Enabled: false + +Style/TrailingWhitespace: + Enabled: false + +Style/StringLiterals: + Enabled: false + +Style/TrailingComma: + Enabled: false + +Style/GlobalVars: + Enabled: false + +Style/GuardClause: + Enabled: false + +Style/IfUnlessModifier: + Enabled: false + +Style/MultilineIfThen: + Enabled: false + +Style/NegatedIf: + Enabled: false + +Style/NegatedWhile: + Enabled: false + +Style/Next: + Enabled: false + +Style/SingleLineBlockParams: + Enabled: false + +Style/SingleLineMethods: + Enabled: false + +Style/SpecialGlobalVars: + Enabled: false + +Style/TrivialAccessors: + Enabled: false + +Style/UnlessElse: + Enabled: false + +Style/VariableInterpolation: + Enabled: false + +Style/VariableName: + Enabled: false + +Style/WhileUntilDo: + Enabled: false + +Style/EvenOdd: + Enabled: false + +Style/FileName: + Enabled: false + +Style/For: + Enabled: false + +Style/Lambda: + Enabled: false + +Style/MethodName: + Enabled: false + +Style/MultilineTernaryOperator: + Enabled: false + +Style/NestedTernaryOperator: + Enabled: false + +Style/NilComparison: + Enabled: false + +Style/FormatString: + Enabled: false + +Style/MultilineBlockChain: + Enabled: false + +Style/Semicolon: + Enabled: false + +Style/SignalException: + Enabled: false + +Style/NonNilCheck: + Enabled: false + +Style/Not: + Enabled: false + +Style/NumericLiterals: + Enabled: false + +Style/OneLineConditional: + Enabled: false + +Style/OpMethod: + Enabled: false + +Style/ParenthesesAroundCondition: + Enabled: false + +Style/PercentLiteralDelimiters: + Enabled: false + +Style/PerlBackrefs: + Enabled: false + +Style/PredicateName: + Enabled: false + +Style/RedundantException: + Enabled: false + +Style/SelfAssignment: + Enabled: false + +Style/Proc: + Enabled: false + +Style/RaiseArgs: + Enabled: false + +Style/RedundantBegin: + Enabled: false + +Style/RescueModifier: + Enabled: false + +Style/RegexpLiteral: + Enabled: false + +Lint/UnderscorePrefixedVariableName: + Enabled: false + +Metrics/ParameterLists: + Enabled: false + +Lint/RequireParentheses: + Enabled: false + +Lint/SpaceBeforeFirstArg: + Enabled: false + +Style/ModuleFunction: + Enabled: false + +Lint/Debugger: + Enabled: false + +Style/IfWithSemicolon: + Enabled: false + +Style/Encoding: + Enabled: false + +Style/BlockDelimiters: + Enabled: False + +Style/MultilineBlockLayout: + Enabled: False diff --git a/.yardopts b/.yardopts new file mode 100644 index 000000000..29c933bcf --- /dev/null +++ b/.yardopts @@ -0,0 +1 @@ +--markup markdown diff --git a/Gemfile b/Gemfile index 4fe28936c..dba3b7714 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,34 @@ -# A sample Gemfile source "https://rubygems.org" -# gem "rails" -gem 'rspec-puppet' -gem 'rake' -gem 'puppet' -gem 'puppetlabs_spec_helper' -gem 'puppet-lint' \ No newline at end of file +group :test do + gem "rake" + gem "puppet", ENV['PUPPET_GEM_VERSION'] || '~> 4.0' + gem "rspec", '< 3.2.0' + gem "rspec-puppet" + gem "puppetlabs_spec_helper" + gem "metadata-json-lint" + gem "rspec-puppet-facts" + gem 'rubocop', '0.33.0' + gem 'simplecov' + 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" + gem "beaker-rspec" + gem "beaker-puppet_install_helper" +end diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 29320b0c6..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,41 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - diff-lcs (1.2.4) - facter (1.7.0) - hiera (1.2.0) - json_pure - json_pure (1.7.7) - metaclass (0.0.1) - mocha (0.13.3) - metaclass (~> 0.0.1) - puppet (3.1.1) - facter (~> 1.6) - hiera (~> 1.0) - puppet-lint (0.3.2) - puppetlabs_spec_helper (0.4.1) - mocha (>= 0.10.5) - rake - rspec (>= 2.9.0) - rspec-puppet (>= 0.1.1) - rake (10.0.4) - rspec (2.13.0) - rspec-core (~> 2.13.0) - rspec-expectations (~> 2.13.0) - rspec-mocks (~> 2.13.0) - rspec-core (2.13.1) - rspec-expectations (2.13.0) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.13.1) - rspec-puppet (0.1.6) - rspec - -PLATFORMS - ruby - -DEPENDENCIES - puppet - puppet-lint - puppetlabs_spec_helper - rake - rspec-puppet diff --git a/Rakefile b/Rakefile index 8eb5e7250..60503329b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,13 +1,65 @@ require 'rubygems' -require 'rake' -require 'bundler' -require 'rspec/core/rake_task' +require 'bundler/setup' + require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet/version' +require 'puppet/vendor/semantic/lib/semantic' unless Puppet.version.to_f < 3.6 +require 'puppet-lint/tasks/puppet-lint' +require 'puppet-syntax/tasks/puppet-syntax' +require 'metadata-json-lint/rake_task' +require 'rubocop/rake_task' +# These gems aren't always present, for instance +# on Travis with --without development begin - Bundler.setup(:default) -rescue Bundler::BundlerError => e - $stderr.puts e.message - $stderr.puts "Run `bundle install` to install missing gems" - exit e.status_code -end \ No newline at end of file + require 'puppet_blacksmith/rake_tasks' +rescue LoadError # rubocop:disable Lint/HandleExceptions +end + +RuboCop::RakeTask.new + +exclude_paths = [ + "bundle/**/*", + "pkg/**/*", + "vendor/**/*", + "spec/**/*", +] + +# Coverage from puppetlabs-spec-helper requires rcov which +# doesn't work in anything since 1.8.7 +Rake::Task[:coverage].clear + +Rake::Task[:lint].clear + +PuppetLint.configuration.relative = true +PuppetLint.configuration.disable_80chars +PuppetLint.configuration.disable_class_inherits_from_params_class +PuppetLint.configuration.disable_class_parameter_defaults +PuppetLint.configuration.disable_documentation +PuppetLint.configuration.disable_single_quote_string_with_variables +PuppetLint.configuration.fail_on_warnings = true + +PuppetLint::RakeTask.new :lint do |config| + config.ignore_paths = exclude_paths +end + +PuppetSyntax.exclude_paths = exclude_paths + +desc "Run acceptance tests" +RSpec::Core::RakeTask.new(:acceptance) do |t| + t.pattern = 'spec/acceptance' +end + +desc "Populate CONTRIBUTORS file" +task :contributors do + system("git log --format='%aN' | sort -u > CONTRIBUTORS") +end + +desc "Run syntax, lint, and spec tests." +task :test => [ + :metadata_lint, + :syntax, + :lint, + :rubocop, + :spec, +] diff --git a/spec/classes/bind__server_spec.rb b/spec/classes/bind__server_spec.rb new file mode 100644 index 000000000..e44890591 --- /dev/null +++ b/spec/classes/bind__server_spec.rb @@ -0,0 +1,9 @@ +require 'spec_helper' + +describe 'bind::server' do + it { should compile } + it { should contain_class('bind').with({ + :chroot => false, + :packagenameprefix => 'bind', + })} +end diff --git a/spec/classes/bind__service_spec.rb b/spec/classes/bind__service_spec.rb new file mode 100644 index 000000000..3416efd01 --- /dev/null +++ b/spec/classes/bind__service_spec.rb @@ -0,0 +1,21 @@ +require 'spec_helper' + +describe 'bind::service' do + let (:pre_condition) do + "include ::bind::package" + end + + let (:params) do + { + :servicename => 'named', + :service_reload => false, + } + end + + it { should compile } + it { should contain_service('named').with({ + 'enable' => true, + 'ensure' => 'running', + 'hasstatus' => true, + })} +end diff --git a/spec/classes/bind_server_spec.rb b/spec/classes/bind_server_spec.rb deleted file mode 100644 index b42cf5610..000000000 --- a/spec/classes/bind_server_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'spec_helper' - -describe 'bind::server' do - it 'should compile' do - expect { should contain_class('bind::server') } - end - - it { should contain_package('bind').with_ensure('installed') } - it { should contain_service('named').with({ - 'hasstatus' => true, - 'enable' => true, - 'ensure' => 'running', - 'restart' => '/sbin/service named reload' - })} - it 'should create the logging directory' do - expect { should contain_file('/var/log/named').with({ - 'ensure' => 'directory', - 'owner' => 'root', - 'group' => 'named', - 'mode' => '0770', - 'seltype' => 'var_log_t' - })} - end - -end \ No newline at end of file diff --git a/spec/classes/bind_spec.rb b/spec/classes/bind_spec.rb new file mode 100644 index 000000000..c6fbe2162 --- /dev/null +++ b/spec/classes/bind_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe 'bind' do + it { should compile } + it { should contain_class('bind::package') } + it { should contain_class('bind::service') } + + it { should contain_file('/var/log/named').with({ + 'ensure' => 'directory', + 'owner' => 'root', + 'group' => 'named', + 'mode' => '0770', + 'seltype' => 'var_log_t', + })} +end diff --git a/spec/defines/bind_server_conf_spec.rb b/spec/defines/bind_server_conf_spec.rb index f271c658b..bbd3dbcb2 100644 --- a/spec/defines/bind_server_conf_spec.rb +++ b/spec/defines/bind_server_conf_spec.rb @@ -1,39 +1,38 @@ require 'spec_helper' describe 'bind::server::conf' do - let (:title) { '/etc/named.conf' } - let (:params) { { - :acls => { - 'rfc1918' => [ '10/8', '172.16/12', '192.168/16' ] - }, - :masters => { - 'mymasters' => ['192.0.2.1', '198.51.100.1'] - }, - :zones => { - 'example.com' => [ - 'type master', - 'file "example.com"', - ], - 'example.org' => [ - 'type slave', - 'file "slaves/example.org"', - 'masters { mymasters; }', - ], - }, - :includes => [ - '/etc/myzones.conf', - ], - } } + let (:title) { '/etc/named.conf' } + let (:params) { { + :acls => { + 'rfc1918' => [ '10/8', '172.16/12', '192.168/16' ] + }, + :masters => { + 'mymasters' => ['192.0.2.1', '198.51.100.1'] + }, + :zones => { + 'example.com' => [ + 'type master', + 'file "example.com"', + ], + 'example.org' => [ + 'type slave', + 'file "slaves/example.org"', + 'masters { mymasters; }', + ], + }, + :includes => [ + '/etc/myzones.conf', + ], + } } - it 'should generate the bind configuration' do - expect { should contain_file ('/etc/named.conf')} - content = catalogue.resource('file', '/etc/named.conf').send(:parameters)[:content] - content.should_not be_empty - content.should match('acl rfc1918') - content.should match('masters mymasters') - content.should match('zone "example.com"') - content.should match('zone "example.org"') - content.should match('include "/etc/myzones.conf"') - end - -end \ No newline at end of file + it 'should generate the bind configuration' do + expect { should contain_file ('/etc/named.conf')} + content = catalogue.resource('file', '/etc/named.conf').send(:parameters)[:content] + content.should_not be_empty + content.should match('acl rfc1918') + content.should match('masters mymasters') + content.should match('zone "example.com"') + content.should match('zone "example.org"') + content.should match('include "/etc/myzones.conf"') + end +end diff --git a/spec/defines/bind_server_file_spec.rb b/spec/defines/bind_server_file_spec.rb index 12097295f..86da80c16 100644 --- a/spec/defines/bind_server_file_spec.rb +++ b/spec/defines/bind_server_file_spec.rb @@ -1,10 +1,10 @@ require 'spec_helper' describe 'bind::server::file' do - let(:title) { 'example.com' } - let (:params) {{ - :source => 'puppet:///modules/bind/named.empty' - }} + let(:title) { 'example.com' } + let (:params) {{ + :source => 'puppet:///modules/bind/named.empty' + }} - it { should contain_file('/var/named/example.com') } -end \ No newline at end of file + it { should contain_file('/var/named/example.com') } +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b5b93a3dd..d4ea34f68 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,10 +1,20 @@ -require 'rubygems' -require 'rspec-puppet' require 'puppetlabs_spec_helper/module_spec_helper' +require 'rspec-puppet-facts' -fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) +include RspecPuppetFacts + +require 'simplecov' +require 'simplecov-console' + +SimpleCov.start do + add_filter '/spec' + add_filter '/vendor' + formatter SimpleCov::Formatter::MultiFormatter[ + SimpleCov::Formatter::HTMLFormatter, + SimpleCov::Formatter::Console + ] +end RSpec.configure do |c| - c.module_path = File.join(fixture_path, 'modules') - c.manifest_dir = File.join(fixture_path, 'manifests') + c.hiera_config = File.expand_path(File.join(__FILE__, '../fixtures/hiera.yaml')) end diff --git a/tests/server.pp b/tests/server.pp index e76406e92..b6d9036e8 100644 --- a/tests/server.pp +++ b/tests/server.pp @@ -1 +1 @@ -include bind::server +include ::bind::server diff --git a/tests/server/conf.pp b/tests/server/conf.pp index 956ee0c1c..4f11b2fdc 100644 --- a/tests/server/conf.pp +++ b/tests/server/conf.pp @@ -1,13 +1,13 @@ # Taken from the "Sample Usage :" -include bind::server -bind::server::conf { '/etc/named.conf': - acls => { +include ::bind::server +::bind::server::conf { '/etc/named.conf': + acls => { 'rfc1918' => [ '10/8', '172.16/12', '192.168/16' ], }, - masters => { + masters => { 'mymasters' => [ '192.0.2.1', '198.51.100.1' ], }, - zones => { + zones => { 'example.com' => [ 'type master', 'file "example.com"', diff --git a/tests/server/file.pp b/tests/server/file.pp index e4370a1ae..b18d5b530 100644 --- a/tests/server/file.pp +++ b/tests/server/file.pp @@ -1,4 +1,4 @@ -include bind::server -bind::server::file { 'example.com': +include ::bind::server +::bind::server::file { 'example.com': source => "puppet:///modules/${module_name}/named.empty", } From 74bfc2a6055dd3f14d868c5fbc48bced228be1ce Mon Sep 17 00:00:00 2001 From: Rob Nelson Date: Tue, 9 Feb 2016 00:27:16 +0000 Subject: [PATCH 2/2] (44) Add Travis CI configuration for automated testing. --- .travis.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..8beb7964a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +--- +language: ruby +sudo: false +notifications: + email: false +branches: + only: + - master +bundler_args: --without development system_tests +before_install: rm Gemfile.lock || true +rvm: + - 1.9.3 + - 2.1.0 +script: bundle exec rake test +env: + - PUPPET_GEM_VERSION="~> 3.0" STRICT_VARIABLES=yes + - PUPPET_GEM_VERSION="~> 3.0" STRICT_VARIABLES=yes FUTURE_PARSER=yes + - PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES=yes