Skip to content

Commit

Permalink
Merge pull request #152 from alexjfisher/lint
Browse files Browse the repository at this point in the history
Fix puppet-lint errors and get tests running
  • Loading branch information
alexjfisher authored Feb 8, 2020
2 parents b61b6ef + e9c5eb1 commit 5ce20d6
Show file tree
Hide file tree
Showing 21 changed files with 292 additions and 525 deletions.
55 changes: 16 additions & 39 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,44 +1,21 @@
# This file is managed centrally by modulesync
# https://github.com/maestrodev/puppet-modulesync

## MAC OS
.DS_Store

## TEXTMATE
*.tmproj
tmtags

## EMACS
*~
\#*
.\#*

## VIM
*.swp
*.swo
tags

## Bundler
.bundle
pkg/
Gemfile.lock
Gemfile.local
vendor/

## rbenv / rvm
.rbenv*
.rvmrc*
.ruby-*

# IntelliJ/RubyMine
.idea/*

## rspec
.vendor/
spec/fixtures/manifests/
spec/fixtures/modules/

## Puppet module
pkg/
.vagrant/
.bundle/
.ruby-version
coverage/

## Librarian-puppet
.tmp/
log/
.idea/
.dependencies/
.librarian/

Puppetfile.lock
*.iml
.*.sw?
.yardoc/
Guardfile
spec/fixtures/tmpdir/
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--format documentation
--color
79 changes: 27 additions & 52 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,30 @@
---
# This file is managed centrally by modulesync
# https://github.com/maestrodev/puppet-modulesync

sudo: false

dist: bionic
language: ruby
cache: bundler
before_install:
- rm -f Gemfile.lock

rvm:
- "2.0"

env:
- PUPPET_VERSION="~> 4.0.0"
- PUPPET_VERSION="~> 3.7.0"
- PUPPET_VERSION="~> 3.6.0"
- PUPPET_VERSION="~> 3.5.0"
- PUPPET_VERSION="~> 3.4.0"
- PUPPET_VERSION="~> 3.3.0"
- PUPPET_VERSION="~> 3.2.0"

- yes | gem update --system
- bundle --version
script:
- 'bundle exec rake $CHECK'
matrix:
exclude:
# No support for Ruby 2.0 before Puppet 3.2
- rvm: '2.0'
env: PUPPET_VERSION="~> 2.7.0"
- rvm: '2.0'
env: PUPPET_VERSION="~> 3.0.0"
- rvm: '2.0'
env: PUPPET_VERSION="~> 3.1.0"
# Puppet < 3.5.0 is broken under ruby 2.1 https://tickets.puppetlabs.com/browse/PUP-1243
- rvm: '2.1'
env: PUPPET_VERSION="~> 2.7.0"
- rvm: '2.1'
env: PUPPET_VERSION="~> 3.0.0"
- rvm: '2.1'
env: PUPPET_VERSION="~> 3.1.0"
- rvm: '2.1'
env: PUPPET_VERSION="~> 3.2.0"
- rvm: '2.1'
env: PUPPET_VERSION="~> 3.3.0"
- rvm: '2.1'
env: PUPPET_VERSION="~> 3.4.0"

deploy:
provider: puppetforge
user: maestrodev
password:
secure: "P0disPGZg4I9kuO98yZOPxpdJjBWV+3U9iFCfRKpCO4jzBiqkCaofnr79Iy+7aqyWAKdbp54JUIbKenvz+WixbVjxvJNiTV991B6anaDXOZfk5oudoxy+hMmkor881ZznWJgwaim4BA3qcTghpIhMSqFP5FF0CaJUfzTEaj73s8="
on:
tags: true
# all_branches is required to use tags
all_branches: true
# Only publish if our main Ruby target builds
condition: "$PUPPET_VERSION = '~> 3.6.0'"
fast_finish: true
include:
- rvm: 2.4.4
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=test
- rvm: 2.5.3
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 6.0" CHECK=test_with_coveralls
branches:
only:
- master
- /^v\d/
notifications:
email: false
webhooks: https://voxpupu.li/incoming/travis
irc:
on_success: always
on_failure: always
channels:
- "chat.freenode.org#voxpupuli-notifications"
95 changes: 82 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,86 @@
# This file is managed centrally by modulesync
# https://github.com/maestrodev/puppet-modulesync
source ENV['GEM_SOURCE'] || "https://rubygems.org"

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

gem 'puppet', ENV['PUPPET_VERSION'] || '>= 3.0', :require => false
group :test do
gem 'puppetlabs_spec_helper', '>= 2.14.0', :require => false
gem 'rspec-puppet-facts', '>= 1.9.5', :require => false
gem 'rspec-puppet-utils', :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
gem 'puppet-lint-absolute_classname-check', '>= 2.0.0', :require => false
gem 'puppet-lint-topscope-variable-check', :require => false
gem 'puppet-lint-legacy_facts-check', :require => false
gem 'puppet-lint-anchor-check', :require => false
gem 'metadata-json-lint', :require => false
gem 'redcarpet', :require => false
gem 'rubocop', '~> 0.49.1', :require => false
gem 'rubocop-rspec', '~> 1.15.0', :require => false
gem 'mocha', '~> 1.4.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'parallel_tests', :require => false
end

gem 'rake', :require => false
gem 'rspec-puppet', '>= 2.1.0', :require => false
gem 'puppetlabs_spec_helper', '>= 0.8.0', :require => false
gem 'puppet-lint', '>= 1.1.0', :require => false
gem 'simplecov', :require => false
gem 'puppet-blacksmith', '>= 3.3.1', :require => false
gem 'librarian-puppet', '>= 2.0.0', :require => false
gem 'beaker-rspec', '>= 3.0.0', :require => false
group :development do
gem 'travis', :require => false
gem 'travis-lint', :require => false
gem 'guard-rake', :require => false
gem 'overcommit', '>= 0.39.1', :require => false
end

# vim:ft=ruby
group :system_tests do
gem 'winrm', :require => false
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
else
gem 'beaker', '>= 4.2.0', :require => false
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 'serverspec', :require => false
gem 'beaker-hostgenerator', '>= 1.1.22', :require => false
gem 'beaker-docker', :require => false
gem 'beaker-puppet', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-module_install_helper', :require => false
gem 'rbnacl', '>= 4', :require => false
gem 'rbnacl-libsodium', :require => false
gem 'bcrypt_pbkdf', :require => false
gem 'ed25519', :require => false
end

group :release do
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/voxpupuli/github-changelog-generator', :branch => 'voxpupuli_essential_fixes'
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false
gem 'puppet-strings', '>= 2.2', :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 = '~> 6.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim: syntax=ruby
Loading

0 comments on commit 5ce20d6

Please sign in to comment.