generate-puppetfile 0.9.11 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -6
- data/lib/generate_puppetfile/bin.rb +38 -6
- data/lib/generate_puppetfile/optparser.rb +2 -2
- data/lib/generate_puppetfile/version.rb +1 -1
- metadata +30 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf16afea209bd8ac2e30eed90aeb581f0bce4465
|
4
|
+
data.tar.gz: 58974916249c3e57b4c91f615bea19a2ac9a463c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccf96edd51e4c63a367ba622d35b05f5e46f575d5bcd2132c40e0693f09f0794e2518119e5d6c1991e46986e2433f5d13ced307268a63584bf99d2bd82a02688
|
7
|
+
data.tar.gz: dbd28f66578958bfa335fbaa9716df6a3cd1c0e09f4458584bb2eae794f7c6dcdc75795bcdf9e96ad1e4ade7f8dd31b46c7843d637ff428e832d0f496ed2e891
|
data/README.md
CHANGED
@@ -24,16 +24,16 @@ Your Puppetfile has been generated. Copy and paste between the markers:
|
|
24
24
|
forge 'http://forge.puppetlabs.com'
|
25
25
|
|
26
26
|
# Modules discovered by generate-puppetfile
|
27
|
-
|
28
27
|
mod 'echocat/nfs', '1.7.1'
|
29
28
|
mod 'herculesteam/augeasproviders_core', '2.1.2'
|
30
29
|
mod 'herculesteam/augeasproviders_shellvar', '2.2.0'
|
31
30
|
mod 'puppetlabs/concat', '1.2.4'
|
32
31
|
mod 'puppetlabs/stdlib', '4.9.0'
|
33
32
|
mod 'rnelson0/certs', '0.6.2'
|
34
|
-
|
35
33
|
# Discovered elements from existing Puppetfile
|
36
|
-
|
34
|
+
# Modules from github
|
35
|
+
mod 'lab_config',
|
36
|
+
:git => 'git@github.com:puppetinabox/lab_config.git'
|
37
37
|
=======================================================================
|
38
38
|
|
39
39
|
```
|
@@ -51,7 +51,6 @@ Your Puppetfile has been generated. Copy and paste between the markers:
|
|
51
51
|
forge 'http://forge.puppetlabs.com'
|
52
52
|
|
53
53
|
# Modules discovered by generate-puppetfile
|
54
|
-
|
55
54
|
mod 'ajjahn/dhcp', '0.2.0'
|
56
55
|
mod 'croddy/make', '0.0.5'
|
57
56
|
mod 'garethr/erlang', '0.3.0'
|
@@ -94,16 +93,19 @@ mod 'thias/bind', '0.5.1'
|
|
94
93
|
mod 'yguenane/augeas', '0.1.1'
|
95
94
|
mod 'yguenane/ygrpms', '0.1.0'
|
96
95
|
mod 'zack/r10k', '3.1.1'
|
97
|
-
|
98
96
|
# Discovered elements from existing Puppetfile
|
99
97
|
# Modules from the Puppet Forge
|
100
98
|
# Modules from Github
|
101
99
|
mod 'lab_config',
|
102
100
|
:git => 'git@github.com:puppetinabox/lab_config.git'
|
103
|
-
|
104
101
|
=======================================================================
|
105
102
|
```
|
106
103
|
|
104
|
+
## Changes
|
105
|
+
Documentation of important pre-1.0.0 changes
|
106
|
+
|
107
|
+
* *0.10.0*: `--fixtures` has been replaced with `--create-fixtures`. `-f` is still an alias for this argument.
|
108
|
+
|
107
109
|
## Limitations
|
108
110
|
|
109
111
|
* Parsing of an existing Puppetfile is naive. Anything that doesn't look like a forge module is preserved and then added to the end of the new Puppetfile. Verify that no ordering errors are introduced before using the new file.
|
@@ -277,12 +277,44 @@ forge 'http://forge.puppetlabs.com'
|
|
277
277
|
def generate_fixtures_data
|
278
278
|
puts "\nGenerating .fixtures.yml using module name #{@options[:modulename]}" unless @options[:silent]
|
279
279
|
|
280
|
-
#
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
280
|
+
# Determine if there are symlinks, either for the default modulename, or for anything in the modulepath
|
281
|
+
symlinks = []
|
282
|
+
modulepath = ''
|
283
|
+
if (File.exists?('environment.conf') and environment_conf = File.read('environment.conf'))
|
284
|
+
puts "\nGenerating .fixtures.yml for a controlrepo." unless @options[:silent]
|
285
|
+
|
286
|
+
environment_conf.split("\n").each do |line|
|
287
|
+
modulepath = (line.split('='))[1].gsub(/\s+/,'') if line =~ /^modulepath/
|
288
|
+
end
|
289
|
+
|
290
|
+
paths = modulepath.split(':').delete_if { |path| path =~ /^\$/ }
|
291
|
+
paths.each do |path|
|
292
|
+
Dir["#{path}/*"].each do |module_location|
|
293
|
+
module_name = File.basename(module_location)
|
294
|
+
module_path = module_location
|
295
|
+
symlinks << {
|
296
|
+
:name => module_name,
|
297
|
+
:path => '"#{source_dir}/' + module_path + '"',
|
298
|
+
}
|
299
|
+
end
|
300
|
+
end
|
301
|
+
else
|
302
|
+
puts "\nGenerating .fixtures.yml using module name #{@options[:modulename]}." unless @options[:silent]
|
303
|
+
|
304
|
+
symlinks << {
|
305
|
+
:name => @options[:modulename],
|
306
|
+
:path => '"#{source_dir}"',
|
307
|
+
}
|
308
|
+
end
|
309
|
+
|
310
|
+
# Header for fixtures file creates symlinks for the controlrepo's modulepath, or for the current module"
|
311
|
+
fixtures_data = "fixtures:\n"
|
312
|
+
if symlinks
|
313
|
+
fixtures_data += " symlinks:\n"
|
314
|
+
symlinks.each do |symlink|
|
315
|
+
fixtures_data += " #{symlink[:name]}: #{symlink[:path]}\n"
|
316
|
+
end
|
317
|
+
end
|
286
318
|
|
287
319
|
fixtures_data += " forge_modules:\n" if @module_data != {}
|
288
320
|
@module_data.keys.each do |modulename|
|
@@ -28,11 +28,11 @@ module GeneratePuppetfile
|
|
28
28
|
options[:create_puppetfile] = true
|
29
29
|
end
|
30
30
|
|
31
|
-
opts.on('-f', '--fixtures', 'Create a .fixtures.yml file in the working directory.
|
31
|
+
opts.on('-f', '--create-fixtures', 'Create a .fixtures.yml file in the working directory. This works in a module directory or at the top if your controlrepo..') do
|
32
32
|
options[:create_fixtures] = true
|
33
33
|
end
|
34
34
|
|
35
|
-
opts.on('-m', '--modulename NAME', "Name of the module the fixtures file will be used with. Optional. Defaults to 'profile'.") do |name|
|
35
|
+
opts.on('-m', '--modulename NAME', "Name of the module the fixtures file will be used with. Optional, for use with --create-fixtures when used in a module directory. Defaults to 'profile'. ") do |name|
|
36
36
|
options[:modulename] = name
|
37
37
|
end
|
38
38
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: generate-puppetfile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Nelson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-11-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|
@@ -109,6 +109,34 @@ dependencies:
|
|
109
109
|
- - '='
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: 0.39.0
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: github_changelog_generator
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: multi_json
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - '>='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - '>='
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
112
140
|
description: Generate a Puppetfile for use with r10k based on an existing file or
|
113
141
|
a list of modules.
|
114
142
|
email: rnelson0@gmail.com
|
@@ -148,4 +176,3 @@ signing_key:
|
|
148
176
|
specification_version: 4
|
149
177
|
summary: Generate a Puppetfile
|
150
178
|
test_files: []
|
151
|
-
has_rdoc:
|