Skip to content

Commit

Permalink
Merge pull request #187 from voxpupuli/modulesync
Browse files Browse the repository at this point in the history
Update from voxpupuli modulesync_config
  • Loading branch information
jyaworski committed Feb 27, 2016
2 parents 5298cee + 4659a8a commit 2ce206c
Show file tree
Hide file tree
Showing 18 changed files with 197 additions and 116 deletions.
45 changes: 10 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,11 @@
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/test/tmp/
/test/version_tmp/
/tmp/
modules/

## Specific to RubyMotion:
.dat*
.repl_history
build/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalisation:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
pkg/
Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
vendor/
spec/fixtures/
.vagrant/
.bundle/
coverage/
log/
.idea/
*.iml
.*.sw
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--format documentation
--color
--color
14 changes: 14 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
AllCops:
Include:
- ./**/*.rb
Exclude:
- vendor/**/*
- pkg/**/*
- spec/fixtures/**/*
- files/**/*

# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Expand Down Expand Up @@ -49,3 +52,14 @@ Style/WordArray:
# providers
Style/ClassAndModuleChildren:
Enabled: false

Style/Documentation:
Description: 'Document classes and non-namespace modules.'
Enabled: false

# More comfortable block layouts
Style/BlockDelimiters:
Enabled: False

Style/MultilineBlockLayout:
Enabled: False
4 changes: 4 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
.travis.yml:
secure: "ExSbFQsxOlpFTc/4TTGJElIx0/sYNZ1I2Nbd9EfGPNeECXBgmqTdJmPqdV6cl3mKDFh+tSSxnIDZe5BILhmxIR7aF2lbf8jwcbo2nxe9qAZ42GDKNV2klNXUjR7kA7tz220RNO9rM3HDKAwrKtCPtwQ0Q5u90YGGJDj2nr7NUaM="
addons:
apt:
packages:
- libaugeas-dev
.rubocop.yml:
AllCops:
Exclude:
Expand Down
38 changes: 19 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
notifications:
email: false
sudo: false
language: ruby
cache: bundler
Expand All @@ -15,25 +13,27 @@ script:
matrix:
fast_finish: true
include:
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.1.8
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
- rvm: 2.1.8
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
- rvm: 2.1.8
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.2.4
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.2.4
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=rubocop
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.1.8
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
- rvm: 2.1.8
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
- rvm: 2.1.8
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.2.4
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.2.4
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=rubocop
- rvm: 2.3.0
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
allow_failures:
- rvm: 2.3.0
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
allow_failures:
- rvm: 2.3.0
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
notifications:
email: false
deploy:
provider: puppetforge
user: puppet
Expand Down
19 changes: 16 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ will likely make it into a release a little quicker.

## Contributing

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. [Contributor Code of Conduct](https://voxpupuli.org/coc/).

1. Fork the repo.

1. Create a separate branch for your change.
Expand Down Expand Up @@ -47,18 +49,29 @@ The test suite will run [Puppet Lint](http://puppet-lint.com/) and
[Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to
check various syntax and style things. You can run these locally with:

bundle exec rake test
bundle exec rake lint
bundle exec rake validate

## Running the unit tests

The unit test suite covers most of the code, as mentioned above please
add tests if you're adding new functionality. If you've not used
[rspec-puppet](http://rspec-puppet.com/) before then feel free to ask
about how best to test your new feature. To run your specific spec test
you can pass it to `SPEC`:
about how best to test your new feature.

To run your all the unit tests

bundle exec rake spec SPEC_OPTS='--format documentation'

To run a specific spec test set the `SPEC` variable:

bundle exec rake spec SPEC=spec/foo_spec.rb

To run the linter, the syntax checker and the unit tests:

bundle exec rake test


## Integration tests

The unit tests just check the code runs, not that it does exactly what
Expand Down
79 changes: 55 additions & 24 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,64 @@
source 'https://rubygems.org'
source ENV['GEM_SOURCE'] || "https://rubygems.org"

def location_for(place, fake_version = nil)
if place =~ /^(git[:@][^#]*)#(.*)/
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
elsif place =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
else
[place, { :require => false }]
end
end

group :test do
gem 'rake'
gem 'puppet', ENV['PUPPET_VERSION'] || '~> 3.8.0'
gem 'rspec-puppet', git: 'https://github.com/rodjek/rspec-puppet.git'
gem 'rspec-puppet-augeas'
gem 'ruby-augeas'
gem 'puppetlabs_spec_helper'
gem 'metadata-json-lint'
gem 'rspec-puppet-facts'
gem 'rspec'
gem 'puppet-blacksmith'
gem 'rubocop', '0.37.2'
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-variable_contains_upcase'
gem 'rake', :require => false
gem 'rspec-puppet', :require => false, :git => 'https://github.com/rodjek/rspec-puppet.git'
gem 'puppet-lint', :require => false, :git => 'https://github.com/rodjek/puppet-lint.git'
gem 'metadata-json-lint', :require => false
gem 'rspec-puppet-facts', :require => false
gem 'rspec', :require => false
gem 'puppet-blacksmith', :require => false, :git => 'https://github.com/voxpupuli/puppet-blacksmith.git'
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git'
gem 'rubocop', '0.37.2', :require => false
gem 'rspec-puppet-utils', :require => false
gem 'puppetlabs_spec_helper', :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
end

group :development do
gem 'travis'
gem 'travis-lint'
gem 'guard-rake'
gem 'travis', :require => false
gem 'travis-lint', :require => false
gem 'guard-rake', :require => false
end

group :system_tests do
gem 'beaker'
gem 'beaker-rspec'
gem 'beaker', :require => false
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
end
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
gem 'beaker-rspec', *location_for(beaker_rspec_version)
else
gem 'beaker-rspec', :require => false
end
gem 'beaker-puppet_install_helper', :require => false
end



if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion.to_s, :require => false, :groups => [:test]
else
gem 'facter', :require => false, :groups => [:test]
end

ENV['PUPPET_VERSION'].nil? ? puppetversion = '3.8.4' : puppetversion = ENV['PUPPET_VERSION'].to_s
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim:ft=ruby
33 changes: 6 additions & 27 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@ require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax'
require 'metadata-json-lint/rake_task'
require 'puppet_blacksmith/rake_tasks'
require 'voxpupuli/release/rake_tasks'
require 'rubocop/rake_task'

RuboCop::RakeTask.new

PuppetLint.configuration.relative = true
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.log_format = '%{path}:%{linenumber}:%{check}:%{KIND}:%{message}'
PuppetLint.configuration.fail_on_warnings = true

# Forsake support for Puppet 2.6.2 for the benefit of cleaner code.
# http://puppet-lint.com/checks/class_parameter_defaults/
PuppetLint.configuration.send('disable_class_parameter_defaults')
# http://puppet-lint.com/checks/class_inherits_from_params_class/
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')

exclude_paths = %w(
pkg/**/*
Expand All @@ -36,24 +34,5 @@ task test: [
:metadata_lint,
:lint,
:syntax,
:spec
:spec,
]

Blacksmith::RakeTask.new do |t|
t.build = false # do not build the module nor push it to the Forge
# just do the tagging [:clean, :tag, :bump_commit]
end

desc 'Offload release process to Travis.'
task travis_release: [
:check_changelog, # check that the changelog contains an entry for the current release
:"module:release", # do everything except build / push to forge, travis will do that for us
]

desc 'Check Changelog.'
task :check_changelog do
v = Blacksmith::Modulefile.new.version
if File.readlines('CHANGELOG.md').grep(/Releasing #{v}/).empty?
raise "Unable to find a CHANGELOG.md entry for the #{v} release."
end
end
4 changes: 2 additions & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
ensure_resource('group', 'rundeck', { 'ensure' => 'present' } )
} else {
ensure_resource('group', $group, { 'ensure' => 'present' } )

group { 'rundeck':
ensure => absent,
}
Expand All @@ -82,7 +82,7 @@
ensure_resource('user', $user, { 'ensure' => 'present', 'groups' => [$group] } )
} else {
ensure_resource('user', $user, { 'ensure' => 'present', 'groups' => [$group] } )

user { 'rundeck':
ensure => absent,
}
Expand Down
9 changes: 9 additions & 0 deletions spec/acceptance/nodesets/centos-511-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
HOSTS:
centos-511-x64:
roles:
- master
platform: el-5-x86_64
box: puppetlabs/centos-5.11-64-nocm
hypervisor: vagrant
CONFIG:
type: foss
11 changes: 11 additions & 0 deletions spec/acceptance/nodesets/centos-66-x64-pe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
HOSTS:
centos-66-x64:
roles:
- master
- database
- dashboard
platform: el-6-x86_64
box: puppetlabs/centos-6.6-64-puppet-enterprise
hypervisor: vagrant
CONFIG:
type: pe
9 changes: 9 additions & 0 deletions spec/acceptance/nodesets/centos-66-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
HOSTS:
centos-66-x64:
roles:
- master
platform: el-6-x86_64
box: puppetlabs/centos-6.6-64-nocm
hypervisor: vagrant
CONFIG:
type: foss
9 changes: 9 additions & 0 deletions spec/acceptance/nodesets/centos-72-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
HOSTS:
centos-72-x64:
roles:
- master
platform: el-7-x86_64
box: puppetlabs/centos-7.2-64-nocm
hypervisor: vagrant
CONFIG:
type: foss
9 changes: 9 additions & 0 deletions spec/acceptance/nodesets/debian-78-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
HOSTS:
debian-78-x64:
roles:
- master
platform: debian-7-amd64
box: puppetlabs/debian-7.8-64-nocm
hypervisor: vagrant
CONFIG:
type: foss
Loading

0 comments on commit 2ce206c

Please sign in to comment.