Showing with 49 additions and 30 deletions.
  1. +1 −3 .fixtures.yml
  2. +1 −0 .gitignore
  3. +6 −2 .rubocop.yml
  4. +2 −2 .travis.yml
  5. +8 −1 CHANGELOG.md
  6. +11 −10 Gemfile
  7. +1 −1 README.md
  8. +2 −1 Rakefile
  9. +1 −0 appveyor.yml
  10. +7 −7 metadata.json
  11. +0 −2 spec/default_facts.yml
  12. +2 −0 spec/default_module_facts.yml
  13. +7 −1 spec/spec_helper.rb
4 changes: 1 addition & 3 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ fixtures:
repo: "https://github.com/puppetlabs/puppetlabs-yumrepo_core.git"
puppet_version: ">= 6.0.0"
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
apt:
repo: "https://github.com/puppetlabs/puppetlabs-apt.git"
ref: '6.0.0'
apt: "https://github.com/puppetlabs/puppetlabs-apt.git"
powershell: "https://github.com/puppetlabs/puppetlabs-powershell.git"
archive: "https://github.com/voxpupuli/puppet-archive.git"
symlinks:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
.project
.envrc
/inventory.yaml
.vscode/
8 changes: 6 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
require: rubocop-rspec
require:
- rubocop-rspec
- rubocop-i18n
AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.1'
Expand All @@ -19,10 +21,12 @@ AllCops:
Metrics/LineLength:
Description: People have wide screens, use them.
Max: 200
GetText:
Enabled: false
GetText/DecorateString:
Description: We don't want to decorate test output.
Exclude:
- spec/*
- spec/**/*
RSpec/BeforeAfterAll:
Description: Beware of using after(:all) as it may cause state to leak between tests.
A necessary evil in acceptance testing.
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
dist: trusty
dist: xenial
language: ruby
cache: bundler
before_install:
Expand Down Expand Up @@ -51,4 +51,4 @@ deploy:
on:
tags: true
all_branches: true
condition: "$DEPLOY_TO_FORGE = yes"
condition: "$DEPLOY_TO_FORGE = yes"
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ Changelog
=========

## Unreleased
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v4.0.4...HEAD)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v4.0.5...HEAD)

## [v4.0.5](https://github.com/pcfens/puppet-filebeat/tree/v4.0.5)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v4.0.4...v4.0.5)

- Update metadata for apt and stdlib modules [\#220](https://github.com/pcfens/puppet-filebeat/pull/220)
- Fix README typo [\#221](https://github.com/pcfens/puppet-filebeat/pull/221)


## [v4.0.4](https://github.com/pcfens/puppet-filebeat/tree/v4.0.4)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v4.0.3...v4.0.4)
Expand Down
21 changes: 11 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@ ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')

group :development do
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
end

puppet_version = ENV['PUPPET_GEM_VERSION']
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ with required configurations.

### Upgrading to Filebeat 7.x

To upgrade to Filebeat 7.x, simply set `$filebeat::major_version` to `6` and `$filebeat::package_ensure` to `latest` (or whichever version of 7.x you want, just not present).
To upgrade to Filebeat 7.x, simply set `$filebeat::major_version` to `7` and `$filebeat::package_ensure` to `latest` (or whichever version of 7.x you want, just not present).

You'll also need to change instances of `filebeat::prospector` to `filebeat::input` when upgrading to version 4.x of
this module.
Expand Down
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-syntax/tasks/puppet-syntax'
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
Expand All @@ -14,7 +15,7 @@ end

def changelog_project
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil || JSON.load(File.read('metadata.json'))['name']
returnVal = nil || JSON.load(File.read('metadata.json'))['source'].match(%r{.*/([^/]*)})[1]
raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator project:#{returnVal}"
returnVal
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: 1.1.x.{build}
branches:
only:
- master
- release
skip_commits:
message: /^\(?doc\)?.*/
clone_depth: 10
Expand Down
14 changes: 7 additions & 7 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pcfens-filebeat",
"version": "4.0.4",
"version": "4.0.5",
"author": "pcfens",
"summary": "A module to install and manage the filebeat log shipper",
"license": "Apache-2.0",
Expand All @@ -10,19 +10,19 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">=4.13.0 < 6.0.0"
"version_requirement": ">=4.13.0 < 7.0.0"
},
{
"name": "puppetlabs/apt",
"version_requirement": ">=2.0.0 < 7.0.0"
"version_requirement": ">=2.0.0 < 8.0.0"
},
{
"name": "puppetlabs/powershell",
"version_requirement": ">= 1.0.1 < 3.0.0"
},
{
"name": "puppet/archive",
"version_requirement": ">= 0.5.0 < 4.0.0"
"version_requirement": ">= 0.5.0 < 5.0.0"
},
{
"name": "puppetlabs/yumrepo_core",
Expand Down Expand Up @@ -106,7 +106,7 @@
"elasticsearch",
"elastic"
],
"pdk-version": "1.10.0",
"template-url": "file:///opt/puppetlabs/pdk/share/cache/pdk-templates.git#1.10.0",
"template-ref": "1.10.0-0-gbba9ac3"
"pdk-version": "1.12.0",
"template-url": "pdk-default#1.12.0",
"template-ref": "1.12.0-0-g55d9ae2"
}
2 changes: 0 additions & 2 deletions spec/default_facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#
# Facts specified here will override the values provided by rspec-puppet-facts.
---
concat_basedir: "/tmp"
ipaddress: "172.16.254.254"
is_pe: false
macaddress: "AA:AA:AA:AA:AA:AA"
filebeat_version: undef
2 changes: 2 additions & 0 deletions spec/default_module_facts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
filebeat_version: undef
concat_basedir: "/tmp"
8 changes: 7 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
end
end

# read default_facts and merge them over what is provided by facterdb
default_facts.each do |fact, value|
add_custom_fact fact, value
end

RSpec.configure do |c|
c.fail_fast = true
c.default_facts = default_facts
c.before :each do
# set to strictest setting for testing
Expand All @@ -38,6 +42,8 @@
end
end

# Ensures that a module is defined
# @param module_name Name of the module
def ensure_module_defined(module_name)
module_name.split('::').reduce(Object) do |last_module, next_module|
last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module, false)
Expand Down