Skip to content

Commit a63e8a9

Browse files
committed
Update concat to 30fbfe1
30fbfe1 Merge pull request #277 from buzzdeee/concat_order_verification_fix a3d8632 Merge pull request #230 from duritong/set_group_for_fragments b897904 When testing the order parameter on sanity, make sure that pattern matching is only exercised on strings. Integers don't like that. 0aa6c63 set group of fragments to gid eb04c55 Merge pull request #275 from mhaskel/validate_order 2ca56da Add validation for order parameter 2d60bcb Merge pull request #270 from raphink/dev/is_pe 9e1a8f8 Merge pull request #274 from puppetlabs/revert-273-fix_strict_vars 410e180 Revert "Lookup is_pe fact with getvar" a4133c4 Merge pull request #273 from cmurphy/fix_strict_vars 59d7a3a Lookup is_pe fact with getvar 9b3f4b3 Merge pull request #271 from nibalizer/master 0e0dc74 Removing travis badge 6a0e9cc Check if $is_pe exists before using it f6e9f0a Merge pull request #269 from mhaskel/merge_1.2.x_into_master 3173e96 1.2.0 prep c7c0e4a Merge pull request #266 from mhaskel/remove_shell 7eb14b7 Remove shell script 20d0a5f Merge pull request #265 from mhaskel/validation_test_fix 36ff0ea The validation acceptance test is very Linux specific 164a9a0 Merge pull request #263 from cmurphy/fix_validate_cmd a198e5d Fix validate_cmd file resource parameter 3a634af Merge pull request #243 from jmkeyes/add-validation-command bccd7ed Merge pull request #262 from cyberious/master 520287f Fix Solaris 10 errors in tests and more issues with Windows checks of owner 88869c6 Merge pull request #260 from cyberious/master b9b13d2 Currently sorting by numeric and the ruby file is not supported, this fixes that 7bc211c MODULES-1764 Fix missing method for check_is_owned_by for windows 40200a6 Merge pull request #261 from mhaskel/merge_1.1.x_to_master 3b2e37a MODULES-1456 - make sure ruby is in path on PE fa5c1cf Merge pull request #249 from nosolutions/master 9036086 Merge pull request #258 from cmurphy/rspec aacf1bd Pin rspec gems 2518958 Merge pull request #256 from cyberious/BeakerRspecPin 7d49b5f Beaker-Rspec broken on Windows, enable ability to pin to older version until fixed be93344 Merge pull request #255 from hunner/fix_pending cff25a8 Fix pending tests 7ed3f56 Merge pull request #254 from cmurphy/master ce90edc Add IntelliJ files to the ignore list aab8e17 Merge pull request #250 from laurenrother/summary dbf3124 Merge pull request #252 from cmurphy/master ee87c65 Add json gem 440a6b7 Update .travis.yml, Gemfile, Rakefile, and CONTRIBUTING.md 8fb09fb Merge pull request #251 from cmurphy/puppet_27 6f1e97a Define travis matrix in .sync.yml 027484d Add metadata summary per FM-1523 4fc1dfc use concatfragments.rb on AIX 708def1 Merge pull request #248 from mhaskel/merge_1.1.x d3446f6 Merge remote-tracking branch 'upstream/1.1.x' into merge_1.1.x 351d5f6 Merge pull request #247 from mhaskel/work_around_cert_issues dc9f4b3 Use a path that works on both 32 and 64-bit windows 0133d3a Add acceptance test for validate_cmd parameter. 79c5e45 Add unit tests for validate_cmd parameter. 09a01d8 Ensure validate_cmd is a string and fail explicitly otherwise. 5f5b892 Merge pull request #245 from mhaskel/merge_1.1.x 0613485 Merge remote-tracking branch 'upstream/1.1.x' into merge_1.1.x b69246a Merge pull request #244 from mhaskel/work_around_cert_issues c79d81a Work around cert issues on solaris and windows 5619355 Support running a validation command on the destination file. d97a047 Merge pull request #231 from GeoffWilliams/poison_exec_defaults_fix 520224f Merge pull request #242 from mhaskel/test ab06c2b Merge pull request #241 from cyberious/InstallCert 8cb4c24 Use apply manifest instead of timeout transaction if it does hang 75dd725 Merge pull request #240 from mhaskel/1.1.2-prep ea3d6e3 1.1.2 prep 73c7896 Merge pull request #239 from mhaskel/pull_master_to_1.1.x fe9730a Merge pull request #238 from mhaskel/windows_cert_fix 624ae75 Install certs on windows ed6efe8 Reset poisoned defaults from Exec
1 parent 1f9aa29 commit a63e8a9

35 files changed

+492
-419
lines changed

Puppetfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ mod 'common',
2323
:git => 'https://github.com/purpleidea/puppet-common.git'
2424

2525
mod 'concat',
26-
:commit => '644fb1b6dc8b64accc4d1208d6127b79a08a38b7',
26+
:commit => '30fbfe11aaf6d9d90e2cbf8cb5e20f2bd7748123',
2727
:git => 'https://github.com/puppetlabs/puppetlabs-concat.git'
2828

2929
mod 'firewall',

concat/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ spec/fixtures/
55
.vagrant/
66
.bundle/
77
coverage/
8+
.idea/
9+
*.iml

concat/.sync.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
---
2+
.travis.yml:
3+
includes:
4+
- rvm: 1.8.7
5+
env: PUPPET_GEM_VERSION="~> 3.0"
6+
- rvm: 1.9.3
7+
env: PUPPET_GEM_VERSION="~> 3.0"
8+
- rvm: 2.0.0
9+
env: PUPPET_GEM_VERSION="~> 3.0"

concat/.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
language: ruby
3-
bundler_args: --without development
3+
bundler_args: --without system_tests
44
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
55
matrix:
66
fast_finish: true

concat/CHANGELOG.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
1-
##2014-09-10 - Supported Release 1.1.1
1+
##2015-02-17 - Supported Release 1.2.0
2+
###Summary
3+
4+
This release includes a number of bugfixes and adds support for running a validation command when using puppet >= 3.5.0.
5+
6+
####Features
7+
- Support running a validation command for Puppet >= 3.5.0
28

9+
####Bugfixes
10+
- Reset poisoned defaults from Exec
11+
- Use concatfragments.rb on AIX since it doesn't support print0
12+
- Make sure ruby is in the path for PE (MODULES-1456)
13+
- Fix missing method for check_is_owned_by for windows (MODULES-1764)
14+
- Fix sort by numeric
15+
16+
##2014-10-28 - Supported Release 1.1.2
17+
###Summary
18+
19+
This release includes bugfixes and test improvements. The module was tested against SLES10 and SLES12 and found to work against those platforms with no module improvements. Metadata was updated to include those as supported platforms.
20+
21+
####Bugfixes
22+
- newline didn't work for Windows and Solaris. This has been fixed.
23+
- Install certs on Windows for acceptance tests
24+
- Update tests to work with strict variables (no module updates were required)
25+
- Update tests to work on Windows
26+
- Fix typo in CHANGELOG.md
27+
28+
##2014-09-10 - Supported Release 1.1.1
329
###Summary
430

531
This is a bugfix release, and the first supported release of the 1.1.x series.
@@ -19,7 +45,6 @@ This is a bugfix release, and the first supported release of the 1.1.x series.
1945
- Synchronized files for more consistency across modules via modulesync
2046

2147
##2014-05-14 - Release 1.1.0
22-
2348
###Summary
2449

2550
This release is primarily a bugfix release since 1.1.0-rc1.
@@ -34,7 +59,6 @@ This release is primarily a bugfix release since 1.1.0-rc1.
3459
- Fix newlines
3560

3661
##2014-01-03 - Release 1.1.0-rc1
37-
3862
###Summary
3963

4064
This release of concat was 90% written by Joshua Hoblitt, and the module team
@@ -124,7 +148,6 @@ This is a supported release. No functional changes were made from 1.0.1.
124148

125149

126150
##2014-02-12 - 1.0.1
127-
128151
###Summary
129152

130153
Minor bugfixes for sorting of fragments and ordering of resources.
@@ -137,7 +160,6 @@ fragments.
137160

138161

139162
##2013-08-09 - 1.0.0
140-
141163
###Summary
142164

143165
Many new features and bugfixes in this release, and if you're a heavy concat

concat/CONTRIBUTING.md

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ Checklist (and a short version for the impatient)
4141

4242
* Pre-requisites:
4343

44-
- Sign the [Contributor License Agreement](https://cla.puppetlabs.com/)
45-
4644
- Make sure you have a [GitHub account](https://github.com/join)
4745

48-
- [Create a ticket](http://projects.puppetlabs.com/projects/modules/issues/new), or [watch the ticket](http://projects.puppetlabs.com/projects/modules/issues) you are patching for.
46+
- [Create a ticket](https://tickets.puppetlabs.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppetlabs.com/browse/) you are patching for.
4947

5048
* Preferred method:
5149

@@ -94,17 +92,7 @@ The long version
9492
whitespace or other "whitespace errors". You can do this by
9593
running "git diff --check" on your changes before you commit.
9694

97-
2. Sign the Contributor License Agreement
98-
99-
Before we can accept your changes, we do need a signed Puppet
100-
Labs Contributor License Agreement (CLA).
101-
102-
You can access the CLA via the [Contributor License Agreement link](https://cla.puppetlabs.com/)
103-
104-
If you have any questions about the CLA, please feel free to
105-
contact Puppet Labs via email at cla-submissions@puppetlabs.com.
106-
107-
3. Sending your patches
95+
2. Sending your patches
10896

10997
To submit your changes via a GitHub pull request, we _highly_
11098
recommend that you have them on a topic branch, instead of
@@ -124,7 +112,7 @@ The long version
124112
in order to open a pull request.
125113

126114

127-
4. Update the related GitHub issue.
115+
3. Update the related GitHub issue.
128116

129117
If there is a GitHub issue associated with the change you
130118
submitted, then you should update the ticket to include the
@@ -220,14 +208,12 @@ review.
220208
Additional Resources
221209
====================
222210

223-
* [Getting additional help](http://projects.puppetlabs.com/projects/puppet/wiki/Getting_Help)
211+
* [Getting additional help](http://puppetlabs.com/community/get-help)
224212

225213
* [Writing tests](http://projects.puppetlabs.com/projects/puppet/wiki/Development_Writing_Tests)
226214

227215
* [Patchwork](https://patchwork.puppetlabs.com)
228216

229-
* [Contributor License Agreement](https://projects.puppetlabs.com/contributor_licenses/sign)
230-
231217
* [General GitHub documentation](http://help.github.com/)
232218

233219
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)

concat/Gemfile

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,44 @@
11
source ENV['GEM_SOURCE'] || "https://rubygems.org"
22

3-
group :development, :test do
3+
def location_for(place, fake_version = nil)
4+
if place =~ /^(git:[^#]*)#(.*)/
5+
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
6+
elsif place =~ /^file:\/\/(.*)/
7+
['>= 0', { :path => File.expand_path($1), :require => false }]
8+
else
9+
[place, { :require => false }]
10+
end
11+
end
12+
13+
group :development, :unit_tests do
414
gem 'rake', :require => false
5-
gem 'rspec-puppet', :require => false
15+
gem 'rspec-core', '3.1.7', :require => false
16+
gem 'rspec-puppet', '~> 1.0', :require => false
617
gem 'puppetlabs_spec_helper', :require => false
7-
gem 'serverspec', :require => false
8-
gem 'puppet-lint', '0.3.2', :require => false
9-
gem 'beaker', :require => false
10-
gem 'beaker-rspec', :require => false
11-
gem 'pry', :require => false
18+
gem 'puppet-lint', :require => false
1219
gem 'simplecov', :require => false
20+
gem 'puppet_facts', :require => false
21+
gem 'json', :require => false
22+
end
23+
24+
beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
25+
group :system_tests do
26+
if beaker_rspec_version
27+
gem 'beaker-rspec', *location_for(beaker_rspec_version)
28+
else
29+
gem 'beaker-rspec', :require => false
30+
end
31+
gem 'serverspec', :require => false
1332
end
1433

1534
if facterversion = ENV['FACTER_GEM_VERSION']
16-
gem 'facter', facterversion, :require => false
35+
gem 'facter', *location_for(facterversion)
1736
else
1837
gem 'facter', :require => false
1938
end
2039

2140
if puppetversion = ENV['PUPPET_GEM_VERSION']
22-
gem 'puppet', puppetversion, :require => false
41+
gem 'puppet', *location_for(puppetversion)
2342
else
2443
gem 'puppet', :require => false
2544
end

concat/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#Concat
22

3-
[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-concat.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-concat)
4-
53
####Table of Contents
64

75
1. [Overview](#overview)
@@ -216,6 +214,14 @@ Ensure there's a newline at the end of the fragments.
216214
- ensure_newline => true
217215
- ensure_newline => false
218216

217+
#####`validate_cmd`
218+
Ensure the destination file passes the following validation command.
219+
Only supported on Puppet >= 3.5.0.
220+
221+
######Example
222+
- validate_cmd => '/usr/sbin/apache2 -t -f %'
223+
- validate_cmd => '/usr/sbin/visudo -c -f %'
224+
219225
####concat::fragment
220226

221227
#####`target`

concat/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ require 'puppetlabs_spec_helper/rake_tasks'
22
require 'puppet-lint/tasks/puppet-lint'
33

44
PuppetLint.configuration.fail_on_warnings
5+
PuppetLint.configuration.send('relative')
56
PuppetLint.configuration.send('disable_80chars')
67
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
7-
PuppetLint.configuration.send('disable_class_parameter_defaults')
88
PuppetLint.configuration.send('disable_documentation')
99
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
1010
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

concat/files/concatfragments.rb

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
require 'fileutils'
4141

4242
settings = {
43-
:outfile => "",
44-
:workdir => "",
45-
:test => false,
46-
:force => false,
47-
:warn => "",
48-
:sortarg => "",
49-
:newline => false
43+
:outfile => "",
44+
:workdir => "",
45+
:test => false,
46+
:force => false,
47+
:warn => "",
48+
:sortarg => "",
49+
:newline => false
5050
}
5151

5252
OptionParser.new do |opts|
@@ -116,15 +116,18 @@
116116
Dir.chdir(settings[:workdir])
117117

118118
if settings[:warn].empty?
119-
File.open("fragments.concat", 'w') {|f| f.write("") }
119+
File.open("fragments.concat", 'w') { |f| f.write("") }
120120
else
121-
File.open("fragments.concat", 'w') {|f| f.write("#{settings[:warn]}\n") }
121+
File.open("fragments.concat", 'w') { |f| f.write("#{settings[:warn]}\n") }
122122
end
123123

124124
# find all the files in the fragments directory, sort them numerically and concat to fragments.concat in the working dir
125125
open('fragments.concat', 'a') do |f|
126-
Dir.entries("fragments").sort.each{ |entry|
127-
126+
fragments = Dir.entries("fragments").sort
127+
if settings[:sortarg] == '-n'
128+
fragments = fragments.sort_by { |v| v.split('_').map(&:to_i) }
129+
end
130+
fragments.each { |entry|
128131
if File.file?(File.join("fragments", entry))
129132
f << File.read(File.join("fragments", entry))
130133

0 commit comments

Comments
 (0)