From 2b849545ddb547bdae9b5725feed34d44ebc9acc Mon Sep 17 00:00:00 2001 From: Chris Edester Date: Sun, 30 Jul 2017 14:23:04 -0400 Subject: [PATCH] Fix tests and update meta files Fix README --- .rubocop.yml | 21 +++++++++++---------- .ruby-version | 2 +- .travis.yml | 8 +------- Gemfile | 20 ++++---------------- README.md | 34 +++++++++++++++++----------------- Rakefile | 22 +++++++++++----------- metadata.json | 8 ++------ 7 files changed, 47 insertions(+), 68 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index ba8db26..f87c721 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -20,7 +20,14 @@ AllCops: - 'vendor/**/*' DisplayCopNames: true -#################### Style ################################## +#################### Layout ############################### + +# The shebang stuff at the top triggers this +Layout/LeadingCommentSpace: + Exclude: + - Puppetfile + +#################### Style ############################### # Cop supports --auto-correct. # Configuration parameters: SupportedStyles. @@ -28,22 +35,16 @@ AllCops: Style/HashSyntax: EnforcedStyle: hash_rockets -# The shebang stuff at the top triggers this -Style/LeadingCommentSpace: - Exclude: - - Puppetfile - -#################### Metrics ################################ +#################### Metrics ############################### Metrics/LineLength: # Ruduce this... Max: 80 Max: 112 Metrics/BlockLength: - # Ruduce this... Max: 25 - Max: 27 + Enabled: false -##################### Bundler ############################# +##################### Bundler ############################## Bundler/DuplicatedGem: Enabled: false diff --git a/.ruby-version b/.ruby-version index 8dbb0f2..63a1a1c 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.1.10 +2.1.9 diff --git a/.travis.yml b/.travis.yml index 4fc61ec..515abb5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,13 +7,7 @@ sudo: false matrix: fast_finish: true include: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 3.0" - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes" - - rvm: 2.1.10 - env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes" - - rvm: 2.1.10 + - rvm: 2.1.9 env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes" notifications: email: false diff --git a/Gemfile b/Gemfile index c2664f2..d86770e 100644 --- a/Gemfile +++ b/Gemfile @@ -26,8 +26,7 @@ group :unit_tests do gem 'puppet-lint-version_comparison-check', :require => false gem 'puppetlabs_spec_helper', :require => false gem 'rspec-puppet-facts', :require => false - gem 'rubocop', '~> 0.41.2', :require => false if RUBY_VERSION =~ /^1\.9/ - gem 'rubocop', :require => false if RUBY_VERSION =~ /^2\./ + gem 'rubocop', :require => false end group :development do @@ -37,22 +36,11 @@ group :development do end group :system_tests do - if RUBY_VERSION < '2.2.5' - # beaker 3.1+ requires ruby 2.2.5. Lock to 2.0 - gem 'beaker', '~> 2.0', :require => false - # beaker-rspec 6.0.0 requires beaker 3.0. Lock to 5.0 - gem 'beaker-rspec', '~> 5.0', :require => false - else - gem 'beaker-rspec', :require => false - end - gem 'serverspec', :require => false + gem 'beaker-rspec', :require => false + gem 'serverspec', :require => false # gem 'vagrant-wrapper', :require => false end -# json_pure 2.0.2 added a requirement on ruby >= 2. We pin to json_pure 2.0.1 -# if using ruby 1.x -gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION =~ /^1\./ - if (facterversion = ENV['FACTER_GEM_VERSION']) gem 'facter', facterversion, :require => false else @@ -62,7 +50,7 @@ end if (puppetversion = ENV['PUPPET_GEM_VERSION']) gem 'puppet', puppetversion, :require => false else - gem 'puppet', '~> 3.8', :require => false + gem 'puppet', '~> 4.10', :require => false end # vim:ft=ruby diff --git a/README.md b/README.md index be28f59..5910c69 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ clamav [![Puppet Forge Downloads](https://img.shields.io/puppetforge/dt/edestecd/clamav.svg)](https://forge.puppet.com/edestecd/clamav) [![Puppet Forge Score](https://img.shields.io/puppetforge/f/edestecd/clamav.svg)](https://forge.puppet.com/edestecd/clamav/scores) -####Table of Contents +#### Table of Contents 1. [Overview](#overview) 2. [Module Description - What the module does and why it is useful](#module-description) @@ -20,11 +20,11 @@ clamav 6. [Development - Guide for contributing to the module](#development) 7. [Contributors](#contributors) -##Overview +## Overview Puppet Module to install/configure clamd and freshclam on Debian and RedHat -##Module Description +## Module Description The clamav module provides some classes to install and configure most of the components of clamav. You may also choose to manage only the parts that you need. @@ -38,9 +38,9 @@ This module has the following components that can be managed (or not): * freshclam daemon/cron (dependent on OS) * clamav-milter (RHEL7 and derivatives only for now) -##Setup +## Setup -###What clamav affects +### What clamav affects * clamav/clamd/freshclam package install * clamav/clamd/freshclam config files @@ -48,11 +48,11 @@ This module has the following components that can be managed (or not): * clamav-milter package install, config files, service (optional) * clam user/group (optional) -###Setup Requirements +### Setup Requirements only need to install the module -###Beginning with clamav +### Beginning with clamav Minimal clamav package install for command line use: @@ -60,9 +60,9 @@ Minimal clamav package install for command line use: include clamav ``` -##Usage +## Usage -###Manage the clam and freshclam daemon with stock config +### Manage the clam and freshclam daemon with stock config ```puppet class { 'clamav': @@ -73,7 +73,7 @@ class { 'clamav': } ``` -###Also manage the clam user and group +### Also manage the clam user and group ```puppet class { 'clamav': @@ -86,7 +86,7 @@ class { 'clamav': } ``` -###Customize the clamd and freshclam config +### Customize the clamd and freshclam config ```puppet class { 'clamav': @@ -109,8 +109,8 @@ class { 'clamav': } ``` -###Add clamav-milter support and customize its config (RHEL7 and derivatives only) -####Please note that as of RHEL 7.2 only the TCP socket has been tested successfully +### Add clamav-milter support and customize its config (RHEL7 and derivatives only) +#### Please note that as of RHEL 7.2 only the TCP socket has been tested successfully ```puppet class { 'clamav': @@ -133,7 +133,7 @@ class { 'clamav': } ``` -###Configure with hiera yaml +### Configure with hiera yaml ```puppet include clamav @@ -156,7 +156,7 @@ clamav::freshclam_options: - clam.host2.mydomain.com ``` -##Reference +## Reference ### Classes @@ -165,7 +165,7 @@ clamav::freshclam_options: * clamav::clamd * clamav::freshclam -##Limitations +## Limitations This module has been built on and tested against Puppet 3.8 and higher. While I am sure other versions work, I have not tested them. @@ -173,6 +173,6 @@ While I am sure other versions work, I have not tested them. This module supports modern RedHat and Debian based systems. No plans to support other versions (unless you add it :).. -##Development +## Development Pull Requests welcome diff --git a/Rakefile b/Rakefile index 2e7c38d..091910d 100644 --- a/Rakefile +++ b/Rakefile @@ -18,7 +18,7 @@ exclude_paths = [ Rake::Task[:lint].clear PuppetLint::RakeTask.new :lint do |config| config.ignore_paths = exclude_paths - config.disable_checks = %w(class_inherits_from_params_class 80chars) + config.disable_checks = %w[class_inherits_from_params_class 80chars] config.fail_on_warnings = true end # Puppet-Lint 1.1.0 as well ... @@ -48,17 +48,17 @@ task :success do end desc 'Run all' -task :all => [ - :clean, - :test, - :success +task :all => %i[ + clean + test + success ] desc 'Run rubocop, syntax, lint, and spec tests' -task :test => [ - :rubocop, - :syntax, - :lint, - :metadata_lint, - :spec +task :test => %i[ + rubocop + syntax + lint + metadata_lint + spec ] diff --git a/metadata.json b/metadata.json index 68032e1..2b65da7 100644 --- a/metadata.json +++ b/metadata.json @@ -28,18 +28,14 @@ }, { "operatingsystem": "Debian", - "operatingsystemrelease": ["7", "8"] + "operatingsystemrelease": ["8", "9"] }, { "operatingsystem": "Ubuntu", - "operatingsystemrelease": ["12.04", "14.04"] + "operatingsystemrelease": ["14.04", "16.04"] } ], "requirements": [ - { - "name": "pe", - "version_requirement": ">= 3.0.0 < 5.0.0" - }, { "name": "puppet", "version_requirement": ">= 3.0.0 < 5.0.0"