-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* improved rspec tests * fixed - pe requirement is no longer supported by the Forge * formatting fixes for lint test * additional rspec expected results for more coverage * meta updated for next release and added puppet 4.x support
- Loading branch information
Showing
9 changed files
with
263 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--format documentation | ||
--color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,45 @@ | ||
--- | ||
sudo: false | ||
language: ruby | ||
bundler_args: --without development system_tests | ||
before_install: rm Gemfile.lock || true | ||
before_install: | ||
- rm Gemfile.lock || true | ||
- gem update bundler | ||
rvm: | ||
- 1.9.3 | ||
- 2.0.0 | ||
- 2.1.4 | ||
script: rake | ||
- 2.1.5 | ||
- 2.3.1 | ||
script: bundle exec rake test | ||
env: | ||
- PUPPET_VERSION=3.1.1 | ||
- PUPPET_VERSION=3.2.4 | ||
- PUPPET_VERSION=3.3.2 | ||
- PUPPET_VERSION=3.4.3 | ||
- PUPPET_VERSION=3.6.2 | ||
- PUPPET_VERSION=3.7.3 FUTURE_PARSER="no" | ||
- PUPPET_VERSION=3.8.1 FUTURE_PARSER="no" | ||
- PUPPET_GEM_VERSION="~> 3.3.0" | ||
- PUPPET_GEM_VERSION="~> 3.4.0" | ||
- PUPPET_GEM_VERSION="~> 3.5.0" | ||
- PUPPET_GEM_VERSION="~> 3.6.0" | ||
- PUPPET_GEM_VERSION="~> 3.7.0" | ||
- PUPPET_GEM_VERSION="~> 3.8.0" FUTURE_PARSER=yes | ||
- PUPPET_GEM_VERSION="~> 4.1.0" | ||
- PUPPET_GEM_VERSION="~> 4.2.0" | ||
- PUPPET_GEM_VERSION="~> 4.3.0" | ||
- PUPPET_GEM_VERSION="~> 4.4.0" | ||
- PUPPET_GEM_VERSION="~> 4.5.0" | ||
- PUPPET_GEM_VERSION="~> 4.6.0" | ||
- PUPPET_GEM_VERSION="~> 4.7.0" | ||
- PUPPET_GEM_VERSION="~> 4.8.0" FUTURE_PARSER=yes | ||
matrix: | ||
allow_failures: | ||
- rvm: ruby-head | ||
- env: PUPPET_VERSION=3.7.3 | ||
exclude: | ||
- rvm: 2.0.0 | ||
env: PUPPET_VERSION=3.1.1 | ||
- rvm: 2.1.4 | ||
env: PUPPET_VERSION=3.1.1 | ||
- rvm: 2.1.4 | ||
env: PUPPET_VERSION=3.2.4 | ||
- rvm: 2.1.4 | ||
env: PUPPET_VERSION=3.3.2 | ||
fast_finish: true | ||
exclude: | ||
- rvm: 2.1.5 | ||
env: PUPPET_GEM_VERSION="~> 3.3.0" | ||
- rvm: 2.3.1 | ||
env: PUPPET_GEM_VERSION="~> 3.3.0" | ||
- rvm: 2.3.1 | ||
env: PUPPET_GEM_VERSION="~> 3.4.0" | ||
- rvm: 2.3.1 | ||
env: PUPPET_GEM_VERSION="~> 3.5.0" | ||
- rvm: 2.3.1 | ||
env: PUPPET_GEM_VERSION="~> 3.6.0" | ||
- rvm: 2.3.1 | ||
env: PUPPET_GEM_VERSION="~> 3.7.0" | ||
- rvm: 2.3.1 | ||
env: PUPPET_GEM_VERSION="~> 3.8.0" FUTURE_PARSER=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,37 @@ | ||
source 'https://rubygems.org' | ||
source ENV['GEM_SOURCE'] || "https://rubygems.org" | ||
|
||
if ENV.key?('PUPPET_VERSION') | ||
puppetversion = "= #{ENV['PUPPET_VERSION']}" | ||
else | ||
puppetversion = ['>= 2.7'] | ||
group :test do | ||
gem 'rake', '< 11.0' | ||
gem "puppet", ENV['PUPPET_GEM_VERSION'] || '~> 4.2.3' | ||
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', '>= 0.11.0' | ||
gem 'simplecov-console', '< 0.4.0' | ||
|
||
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" | ||
gem 'puppet-lint-resource_reference_syntax' | ||
|
||
gem 'json_pure', '<= 2.0.1' if RUBY_VERSION < '2.0.0' | ||
end | ||
|
||
gem 'rake' | ||
gem 'puppet-lint' | ||
gem 'rspec-puppet' | ||
gem 'puppetlabs_spec_helper' | ||
gem 'puppet', puppetversion | ||
group :development do | ||
gem "travis" if RUBY_VERSION >= '2.1.0' | ||
gem "travis-lint" if RUBY_VERSION >= '2.1.0' | ||
gem "puppet-blacksmith" | ||
gem "guard-rake" if RUBY_VERSION >= '2.2.5' # per dependency https://rubygems.org/gems/ruby_dep | ||
end | ||
|
||
group :system_tests do | ||
gem "beaker", '< 3.0.0' | ||
gem "beaker-rspec" | ||
gem "beaker-puppet_install_helper" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,64 @@ | ||
require 'rubygems' | ||
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 | ||
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.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 | ||
] | ||
|
||
task :default => [:spec, :lint] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.