Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
116 additions
and
82 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 |
---|---|---|
@@ -1,2 +1,9 @@ | ||
pkg/ | ||
Gemfile.lock | ||
vendor/ | ||
spec/fixtures/ | ||
.vagrant/ | ||
.bundle/ | ||
coverage/ | ||
*.swp | ||
.vendor/ |
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,7 @@ | ||
--fail-on-warnings | ||
--relative | ||
--no-80chars-check | ||
--no-class_inherits_from_params_class-check | ||
--no-documentation-check | ||
--no-single_quote_string_with_variables-check | ||
--no-selector_inside_resource-check |
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,7 @@ | ||
--- | ||
Rakefile: | ||
extra_disabled_lint_checks: | ||
- 'disable_selector_inside_resource' | ||
.puppet-lint.rc: | ||
extra_disabled_lint_checks: | ||
- '--no-selector_inside_resource-check' |
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,45 +1,34 @@ | ||
--- | ||
language: ruby | ||
cache: | ||
directories: | ||
- vendor/bundle | ||
- spec/fixtures/modules | ||
sudo: false | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
language: ruby | ||
bundler_args: --without development | ||
script: "bundle exec rake spec SPEC_OPTS='--format documentation'" | ||
rvm: | ||
- 1.8.7 | ||
- 1.9.3 | ||
- 2.0.0 | ||
- 2.1.0 | ||
env: | ||
matrix: | ||
- PUPPET_GEM_VERSION="~> 2.7.0" | ||
- PUPPET_GEM_VERSION="~> 3.2.0" | ||
- 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" | ||
# https://docs.puppetlabs.com/guides/platforms.html#ruby-versions | ||
bundler_args: --without system_tests | ||
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'" | ||
matrix: | ||
exclude: | ||
- rvm: 1.9.3 | ||
env: PUPPET_GEM_VERSION="~> 2.7.0" | ||
- rvm: 2.0.0 | ||
env: PUPPET_GEM_VERSION="~> 2.7.0" | ||
- rvm: 2.1.0 | ||
env: PUPPET_GEM_VERSION="~> 2.7.0" | ||
- rvm: 1.8.7 | ||
env: PUPPET_GEM_VERSION="~> 3.2.0" | ||
- rvm: 1.8.7 | ||
env: PUPPET_GEM_VERSION="~> 3.3.0" | ||
- rvm: 1.8.7 | ||
env: PUPPET_GEM_VERSION="~> 3.4.0" | ||
- rvm: 2.1.0 | ||
env: PUPPET_GEM_VERSION="~> 3.2.0" | ||
- rvm: 2.1.0 | ||
env: PUPPET_GEM_VERSION="~> 3.3.0" | ||
- rvm: 2.1.0 | ||
env: PUPPET_GEM_VERSION="~> 3.4.0" | ||
fast_finish: true | ||
include: | ||
- rvm: 1.8.7 | ||
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" | ||
- rvm: 1.8.7 | ||
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" | ||
- rvm: 1.8.7 | ||
env: PUPPET_GEM_VERSION="~> 3.0" | ||
- rvm: 1.9.3 | ||
env: PUPPET_GEM_VERSION="~> 3.0" | ||
- rvm: 2.0.0 | ||
env: PUPPET_GEM_VERSION="~> 3.0" | ||
- rvm: 2.0.0 | ||
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes" | ||
allow_failures: | ||
- rvm: 2.0.0 | ||
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes" | ||
notifications: | ||
email: | ||
- github@razorsedge.org |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
require 'rubygems' | ||
require 'puppetlabs_spec_helper/rake_tasks' | ||
require 'puppet-lint/tasks/puppet-lint' | ||
|
||
desc "Run visual spec tests on an existing fixtures directory" | ||
RSpec::Core::RakeTask.new(:spec_standalonev) do |t| | ||
t.rspec_opts = ['--color', '--format documentation'] | ||
t.pattern = 'spec/{classes,defines,unit}/**/*_spec.rb' | ||
end | ||
|
||
# https://github.com/stahnma/puppet-modules/blob/master/common/Rakefile | ||
desc "Check puppet and ERB for syntax errors." | ||
task :validate do | ||
Dir['manifests/**/*.pp'].each do |path| | ||
sh "puppet parser validate --noop #{path}" | ||
end | ||
Dir['templates/**/*.erb'].each do |path| | ||
sh "erb -P -x -T '-' #{path} | ruby -c" | ||
end | ||
end | ||
PuppetLint.configuration.fail_on_warnings = true | ||
PuppetLint.configuration.send('relative') | ||
PuppetLint.configuration.send('disable_80chars') | ||
PuppetLint.configuration.send('disable_class_inherits_from_params_class') | ||
PuppetLint.configuration.send('disable_documentation') | ||
PuppetLint.configuration.send('disable_single_quote_string_with_variables') | ||
PuppetLint.configuration.send('disable_selector_inside_resource') | ||
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "vender/**/*.pp"] | ||
|
||
# Enable puppet-lint for all manifests: rake lint | ||
require 'puppet-lint/tasks/puppet-lint' | ||
#PuppetLint.configuration.send("disable_80chars") # no warnings on lines over 80 chars. | ||
PuppetLint.configuration.ignore_paths = ["spec/fixtures/**/*.pp", "pkg/**/*"] | ||
PuppetSyntax.exclude_paths = ["spec/**/*", "pkg/**/*", "vender/**/*"] | ||
PuppetSyntax.hieradata_paths = ["**/data/**/*.yaml", "hieradata/**/*.yaml", "hiera*.yaml"] | ||
|
||
desc "Check puppet metadata.json with metadata-json-lint." | ||
task :metadata do | ||
sh "metadata-json-lint metadata.json" | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--format | ||
s | ||
--colour | ||
--loadby | ||
mtime | ||
--backtrace |
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,2 +1 @@ | ||
require 'rubygems' | ||
require 'puppetlabs_spec_helper/module_spec_helper' |