Showing with 99 additions and 27 deletions.
  1. +4 −0 .rubocop.yml
  2. +6 −0 .sync.yml
  3. +9 −6 .travis.yml
  4. +16 −1 CHANGELOG.md
  5. +8 −15 Gemfile
  6. +43 −0 HISTORY.md
  7. +8 −0 appveyor.yml
  8. +4 −4 metadata.json
  9. +1 −1 spec/default_facts.yml
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ AllCops:
Metrics/LineLength:
Description: People have wide screens, use them.
Max: 200
GetText/DecorateString:
Description: We don't want to decorate test output.
Exclude:
- 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
6 changes: 6 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
- release

Gemfile:
optional:
':development':
- gem: 'github_changelog_generator'
git: 'https://github.com/skywinder/github-changelog-generator'
ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018'
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')"
required:
':system_tests':
- gem: 'puppet-module-posix-system-r#{minor_version}'
Expand Down
15 changes: 9 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,36 @@ script:
- 'bundle exec rake $CHECK'
bundler_args: --without system_tests
rvm:
- 2.4.4
- 2.5.0
env:
global:
- BEAKER_PUPPET_COLLECTION=puppet5 PUPPET_GEM_VERSION="~> 5.0"
- BEAKER_PUPPET_COLLECTION=puppet6 PUPPET_GEM_VERSION="~> 6.0"
matrix:
fast_finish: true
include:
-
bundler_args:
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_set=docker/centos-7 BEAKER_TESTMODE=apply
rvm: 2.4.4
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/centos-7 BEAKER_TESTMODE=apply
rvm: 2.5.0
script: bundle exec rake beaker
services: docker
sudo: required
-
bundler_args:
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_set=docker/ubuntu-14.04 BEAKER_TESTMODE=apply
rvm: 2.4.4
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/ubuntu-14.04 BEAKER_TESTMODE=apply
rvm: 2.5.0
script: bundle exec rake beaker
services: docker
sudo: required
-
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
-
env: CHECK=parallel_spec
-
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
rvm: 2.4.4
-
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
rvm: 2.1.9
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
## Release 0.2.1
# Change log

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).

## [0.3.0](https://github.com/puppetlabs/puppetlabs-puppet_conf/tree/0.3.0) (2018-09-27)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-puppet_conf/compare/0.2.1...0.3.0)

### Added

- pdksync - \(FM-7392\) - Puppet 6 Testing Changes [\#40](https://github.com/puppetlabs/puppetlabs-puppet_conf/pull/40) ([pmcmaw](https://github.com/pmcmaw))

## 0.2.1

### Fixed

Expand Down Expand Up @@ -41,3 +53,6 @@ This is the initial release of the puppet_conf task.
## Features
- Provides the following actions get and set.
- Allows specifying the section of the puppet_conf.


\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
23 changes: 8 additions & 15 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

def location_for(place_or_version, fake_version = nil)
if place_or_version =~ %r{\A(git[:@][^#]*)#(.*)}
[fake_version, { git: Regexp.last_match(1), branch: Regexp.last_match(2), require: false }].compact
elsif place_or_version =~ %r{\Afile:\/\/(.*)}
['>= 0', { path: File.expand_path(Regexp.last_match(1)), require: false }]
else
[place_or_version, { require: false }]
end
end
git_url_regex = %r{\A(?<url>(https?|git)[:@][^#]*)(#(?<branch>.*))?}
file_url_regex = %r{\Afile:\/\/(?<path>.*)}

def gem_type(place_or_version)
if place_or_version =~ %r{\Agit[:@]}
:git
elsif !place_or_version.nil? && place_or_version.start_with?('file:')
:file
if place_or_version && (git_url = place_or_version.match(git_url_regex))
[fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact
elsif place_or_version && (file_url = place_or_version.match(file_url_regex))
['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
else
:gem
[place_or_version, { require: false }]
end
end

Expand All @@ -33,14 +26,14 @@ group :development do
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 "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
end

puppet_version = ENV['PUPPET_GEM_VERSION']
puppet_type = gem_type(puppet_version)
facter_version = ENV['FACTER_GEM_VERSION']
hiera_version = ENV['HIERA_GEM_VERSION']

Expand Down
43 changes: 43 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## 0.2.1

### Fixed

- Improve the reliability of finding the `puppet` binary when puppet-agent is installed

## Release 0.2.0
This release uses the PDK convert functionality which in return makes the module PDK compliant.

## Added
- PDK convert [MODULES-6465](https://tickets.puppet.com/browse/MODULES-6465).

## Release 0.1.5
Security release for CVE-2018-6508

### Fixed
- init task vulnerability to arbitrary remote code execution

## Release 0.1.4
Readme update.

## Fixed
- Readme update.
- noop metadata

## Release 0.1.3

### Fixed
- Fixed locales project name.
- Fixed cli description.

## Release 0.1.2
Readme update.

## Fixed
- Readme update.

## Release 0.1.1
This is the initial release of the puppet_conf task.

## Features
- Provides the following actions get and set.
- Allows specifying the section of the puppet_conf.
8 changes: 8 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ environment:
PUPPET_GEM_VERSION: ~> 5.0
RUBY_VERSION: 24-x64
CHECK: parallel_spec
-
PUPPET_GEM_VERSION: ~> 6.0
RUBY_VERSION: 25
CHECK: parallel_spec
-
PUPPET_GEM_VERSION: ~> 6.0
RUBY_VERSION: 25-x64
CHECK: parallel_spec
matrix:
fast_finish: true
install:
Expand Down
8 changes: 4 additions & 4 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "puppetlabs-puppet_conf",
"version": "0.2.1",
"author": "puppet",
"version": "0.3.0",
"author": "puppetlabs",
"summary": "Tasks that manipulates a puppet configuration file",
"license": "Apache-2.0",
"source": "https://github.com/puppetlabs/puppetlabs-puppet_conf",
Expand Down Expand Up @@ -39,11 +39,11 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 5.1.0 < 6.0.0"
"version_requirement": ">= 5.1.0 < 7.0.0"
}
],
"description": "Tasks that manipulates a puppet configuration file",
"pdk-version": "1.7.0",
"template-url": "https://github.com/puppetlabs/pdk-templates",
"template-ref": "1.7.0-0-g57412ed"
"template-ref": "heads/master-0-g8fc95db"
}
2 changes: 1 addition & 1 deletion spec/default_facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Facts specified here will override the values provided by rspec-puppet-facts.
---
concat_basedir: "/tmp"
concat_basedir: ""
ipaddress: "172.16.254.254"
is_pe: false
macaddress: "AA:AA:AA:AA:AA:AA"