beaker_puppet_helpers 1.0.1 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ff13e8fb03a324201a2a00459816f96fb65b4ee3b658bd685f4d820fd7f36b6
4
- data.tar.gz: 38ad4707104592a508f9a8a0635ab099cd7fe72490dc530eebbc545db33502fe
3
+ metadata.gz: d28abba553fcbffcbb66b9a3c822f7b287489ea2f6178b99f2a39b074cda9bf2
4
+ data.tar.gz: 252d2c337b2d98674bb4e1c9ad7738db7026de09c257a4e198b782489f585e6c
5
5
  SHA512:
6
- metadata.gz: 28bf14e5400707a070dff651528a6914bc10514f561f25704b884feba002c5ed9e14d95cd6cf03f5dc628351f40643bc560938ea897405cde13cea978018f9ff
7
- data.tar.gz: 22c07ea4a35af6bb391966b5a24e3e4afcb30e53e6fd6d546aaec898f67993350d5e6f6df18e6c1c89dda45c6675ffeec1c59b3957629913e236861ee14452f7
6
+ metadata.gz: 673fca50dfbe74636f9742007806293adda15db06ce871a654f0d8a7325c182eefc08737a7dfd98222a5ead19d13ad17ff15646ba2e44a12a58f8aba7b9ac03c
7
+ data.tar.gz: 3819be2fbf16501df9229a7d6b3b727643fbf4a7c9de2b20b6214855f4d866d173951f841badf63fa651287901cd23153783ab2d65fce874068c668e2d7da693
@@ -1,6 +1,10 @@
1
1
  name: CI
2
2
 
3
- on: pull_request
3
+ on:
4
+ pull_request: {}
5
+ push:
6
+ branches:
7
+ - master
4
8
 
5
9
  env:
6
10
  BEAKER_HYPERVISOR: docker
data/CHANGELOG.md CHANGED
@@ -2,7 +2,29 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [1.0.1](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.0.1) (2023-05-09)
5
+ ## [1.1.1](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.1.1) (2023-06-16)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.1.0...1.1.1)
8
+
9
+ **Fixed bugs:**
10
+
11
+ - fix typo in EL package selection [\#32](https://github.com/voxpupuli/beaker_puppet_helpers/pull/32) ([bastelfreak](https://github.com/bastelfreak))
12
+
13
+ **Merged pull requests:**
14
+
15
+ - CI: Run on PRs+merges to master [\#33](https://github.com/voxpupuli/beaker_puppet_helpers/pull/33) ([bastelfreak](https://github.com/bastelfreak))
16
+ - README.md: Correct link to CI jobs [\#30](https://github.com/voxpupuli/beaker_puppet_helpers/pull/30) ([bastelfreak](https://github.com/bastelfreak))
17
+ - GCG: Add faraday-retry dep [\#29](https://github.com/voxpupuli/beaker_puppet_helpers/pull/29) ([bastelfreak](https://github.com/bastelfreak))
18
+
19
+ ## [1.1.0](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.1.0) (2023-06-01)
20
+
21
+ [Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.0.1...1.1.0)
22
+
23
+ **Implemented enhancements:**
24
+
25
+ - Add support for `--show_diff` [\#27](https://github.com/voxpupuli/beaker_puppet_helpers/pull/27) ([smortex](https://github.com/smortex))
26
+
27
+ ## [1.0.1](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.0.1) (2023-05-10)
6
28
 
7
29
  [Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.0.0...1.0.1)
8
30
 
data/Gemfile CHANGED
@@ -28,5 +28,6 @@ when 'vagrant', 'vagrant_libvirt'
28
28
  end
29
29
 
30
30
  group :release do
31
+ gem 'faraday-retry', require: false
31
32
  gem 'github_changelog_generator', require: false
32
33
  end
data/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Beaker Puppet Helpers
2
2
 
3
+ [![License](https://img.shields.io/github/license/voxpupuli/beaker_puppet_helpers.svg)](https://github.com/voxpupuli/beaker_puppet_helpers/blob/master/LICENSE)
4
+ [![Test](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/test.yml)
5
+ [![Release](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/release.yml)
6
+ [![RubyGem Version](https://img.shields.io/gem/v/beaker_puppet_helpers.svg)](https://rubygems.org/gems/beaker_puppet_helpers)
7
+ [![RubyGem Downloads](https://img.shields.io/gem/dt/beaker_puppet_helpers.svg)](https://rubygems.org/gems/beaker_puppet_helpers)
8
+
3
9
  The purpose of this library is to hold Puppet-specific info & DSL methods.
4
10
  This includes all helper & installer methods.
5
11
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'beaker_puppet_helpers'
5
- s.version = '1.0.1'
5
+ s.version = '1.1.1'
6
6
  s.authors = ['Vox Pupuli']
7
7
  s.email = ['voxpupuli@groups.io']
8
8
  s.homepage = 'https://github.com/voxpupuli/beaker_puppet_helpers'
@@ -89,10 +89,15 @@ module BeakerPuppetHelpers
89
89
  #
90
90
  # @option opts [String] :hiera_config The path of the hiera.yaml configuration.
91
91
  #
92
- # @option opts [String] :debug (false) If this option exists,
92
+ # @option opts [Boolean] :debug (false) If this option exists,
93
93
  # the "--debug" command line parameter
94
94
  # will be passed to the 'puppet apply' command.
95
- # @option opts [Boolean] :run_in_parallel Whether to run on each host in parallel.
95
+ #
96
+ # @option opts [Boolean] :run_in_parallel Whether to run on each host in parallel.
97
+ #
98
+ # @option opts [Boolean] :show_diff (false) If this option exists,
99
+ # the "--show_diff=true" command line parameter
100
+ # will be passed to the 'puppet apply' command.
96
101
  #
97
102
  # @param [Block] block This method will yield to a block of code passed
98
103
  # by the caller; this can be used for additional
@@ -118,6 +123,7 @@ module BeakerPuppetHelpers
118
123
  puppet_apply_opts[:modulepath] = opts[:modulepath] if opts[:modulepath]
119
124
  puppet_apply_opts[:hiera_config] = opts[:hiera_config] if opts[:hiera_config]
120
125
  puppet_apply_opts[:noop] = nil if opts[:noop]
126
+ puppet_apply_opts[:show_diff] = nil if opts[:show_diff]
121
127
 
122
128
  # From puppet help:
123
129
  # "... an exit code of '2' means there were changes, an exit code of
@@ -78,7 +78,7 @@ module BeakerPuppetHelpers
78
78
  # @return [String] The Puppet package name
79
79
  def self.puppet_package_name(host, prefer_aio: true)
80
80
  case host['packaging_platform'].split('-', 3).first
81
- when /el-|fedora|sles|cisco_|debian|ubuntu/
81
+ when /el|fedora|sles|cisco_|debian|ubuntu/
82
82
  prefer_aio ? 'puppet-agent' : 'puppet'
83
83
  when /freebsd/
84
84
  'sysutils/puppet'
@@ -166,6 +166,14 @@ describe BeakerPuppetHelpers::DSL do
166
166
 
167
167
  dsl.apply_manifest_on(agent, 'class { "boo": }', debug: true)
168
168
  end
169
+
170
+ it 'can set the --show_diff flag' do
171
+ expect(dsl).to receive(:create_remote_file).and_return(true)
172
+ expect(Beaker::PuppetCommand).to receive(:new).with('apply', anything, include(show_diff: nil)).and_return('puppet_command')
173
+ expect(dsl).to receive(:on).with(agent, 'puppet_command', acceptable_exit_codes: [0])
174
+
175
+ dsl.apply_manifest_on(agent, 'class { "boo": }', show_diff: true)
176
+ end
169
177
  end
170
178
 
171
179
  describe '#apply_manifest' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker_puppet_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-10 00:00:00.000000000 Z
11
+ date: 2023-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: beaker