puppet-module 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.markdown +8 -0
- data/VERSION +1 -1
- data/lib/puppet/module/tool/applications/application.rb +10 -7
- data/lib/puppet/module/tool/applications/unpacker.rb +17 -10
- data/spec/unit/semver_spec.rb +33 -0
- metadata +116 -124
- data/templates/generator/files/README.markdown +0 -22
- data/templates/generator/lib/facter/README.markdown +0 -22
- data/templates/generator/lib/puppet/parser/functions/README.markdown +0 -17
- data/templates/generator/lib/puppet/provider/README.markdown +0 -14
- data/templates/generator/lib/puppet/type/README.markdown +0 -14
- data/templates/generator/manifests/README.markdown +0 -28
- data/templates/generator/spec/README.markdown +0 -7
- data/templates/generator/spec/unit/puppet/provider/README.markdown +0 -4
- data/templates/generator/spec/unit/puppet/type/README.markdown +0 -4
- data/templates/generator/templates/README.markdown +0 -23
data/CHANGES.markdown
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
puppet-module changes
|
2
2
|
=====================
|
3
3
|
|
4
|
+
r0.3.4
|
5
|
+
------
|
6
|
+
|
7
|
+
* Add ability to install modules with hyphens
|
8
|
+
* Add check for symlink when installing
|
9
|
+
* Install modules to their name not "full name"
|
10
|
+
* Add semantic version support
|
11
|
+
|
4
12
|
r0.3.1
|
5
13
|
------
|
6
14
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.4
|
@@ -65,19 +65,22 @@ module Puppet::Module::Tool
|
|
65
65
|
# Note: Must have @filename set to use this
|
66
66
|
def parse_filename!
|
67
67
|
@release_name = File.basename(@filename,'.tar.gz')
|
68
|
-
|
68
|
+
match = /^(.*?)-(.*?)-(\d+\.\d+\.\d+.*?)$/.match(@release_name)
|
69
|
+
if match then
|
70
|
+
@username, @module_name, @version = match.captures
|
71
|
+
else
|
72
|
+
abort "Could not parse filename to obtain the username, module name and version. (#{@release_name})"
|
73
|
+
end
|
69
74
|
@full_name = [@username, @module_name].join('-')
|
70
75
|
unless @username && @module_name
|
71
76
|
abort "Username and Module name not provided"
|
72
77
|
end
|
73
|
-
|
74
|
-
|
75
|
-
rescue ArgumentError => e
|
76
|
-
abort "Invalid version format: #{@version}"
|
78
|
+
if @version !~ /^(\d+)\.(\d+)\.(\d+)([a-zA-Z][a-zA-Z0-9-]*){0,1}$/ then
|
79
|
+
abort "Invalid version format: #{@version} (Semantic Versions are acceptable: http://semver.org)"
|
77
80
|
end
|
78
81
|
end
|
79
82
|
end
|
80
|
-
|
83
|
+
|
81
84
|
end
|
82
|
-
|
85
|
+
|
83
86
|
end
|
@@ -19,7 +19,16 @@ module Puppet::Module::Tool
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def run
|
22
|
-
|
22
|
+
# Check if the module directory already exists.
|
23
|
+
if File.exist?(@module_name) || File.symlink?(@module_name) then
|
24
|
+
if force? then
|
25
|
+
FileUtils.rm_rf @module_name rescue nil
|
26
|
+
else
|
27
|
+
check_clobber!
|
28
|
+
# JJM 2011-06-20 And remove it anyway (This is a dumb way to do it, but... it works.)
|
29
|
+
FileUtils.rm_rf @module_name rescue nil
|
30
|
+
end
|
31
|
+
end
|
23
32
|
build_dir = Puppet::Module::Tool::Cache.base_path + "tmp-unpacker-#{Digest::SHA1.hexdigest(@filename.basename.to_s)}"
|
24
33
|
build_dir.mkpath
|
25
34
|
begin
|
@@ -31,21 +40,19 @@ module Puppet::Module::Tool
|
|
31
40
|
end
|
32
41
|
# grab the first directory
|
33
42
|
extracted = build_dir.children.detect { |c| c.directory? }
|
34
|
-
|
35
|
-
|
36
|
-
end
|
37
|
-
FileUtils.cp_r extracted, @full_name
|
43
|
+
# Nothing should exist at this point named @module_name
|
44
|
+
FileUtils.cp_r extracted, @module_name
|
38
45
|
tag_revision
|
39
46
|
ensure
|
40
47
|
build_dir.rmtree
|
41
48
|
end
|
42
|
-
say "Installed #{@release_name.inspect} into directory: #{@
|
49
|
+
say "Installed #{@release_name.inspect} into directory: #{@module_name}"
|
43
50
|
end
|
44
51
|
|
45
52
|
private
|
46
53
|
|
47
54
|
def tag_revision
|
48
|
-
File.open("#{@
|
55
|
+
File.open("#{@module_name}/REVISION", 'w') do |f|
|
49
56
|
f.puts "module: #{@username}/#{@module_name}"
|
50
57
|
f.puts "version: #{@version}"
|
51
58
|
f.puts "url: file://#{@filename.realpath}"
|
@@ -54,9 +61,9 @@ module Puppet::Module::Tool
|
|
54
61
|
end
|
55
62
|
|
56
63
|
def check_clobber!
|
57
|
-
if File.
|
58
|
-
header "Existing module '#{@
|
59
|
-
response = prompt "Overwrite module installed at ./#{@
|
64
|
+
if (File.exist?(@module_name) || File.symlink?(@module_name)) && !force?
|
65
|
+
header "Existing module '#{@module_name}' found"
|
66
|
+
response = prompt "Overwrite module installed at ./#{@module_name}? [y/N]"
|
60
67
|
unless response =~ /y/i
|
61
68
|
abort "Aborted installation."
|
62
69
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Tested this spec test with rspec 2.5.1
|
2
|
+
|
3
|
+
require 'puppet/module/tool'
|
4
|
+
|
5
|
+
describe Puppet::Module::Tool::Applications::Application do
|
6
|
+
|
7
|
+
describe 'app' do
|
8
|
+
|
9
|
+
good_versions = %w{ 1.2.4 0.0.1 0.0.0 0.0.2git-8-g3d316d1 0.0.3b1 10.100.10000
|
10
|
+
0.1.2rc1 0.1.2dev-1 0.1.2svn12345 }
|
11
|
+
bad_versions = %w{ 0.1.2-3 0.1 0 0.1.2.3 dev }
|
12
|
+
|
13
|
+
before do
|
14
|
+
@app = Class.new(described_class).new
|
15
|
+
end
|
16
|
+
|
17
|
+
good_versions.each do |ver|
|
18
|
+
it "should accept version string #{ver}" do
|
19
|
+
@app.instance_eval("@filename=%q{puppetlabs-ntp-#{ver}}")
|
20
|
+
@app.parse_filename!
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
bad_versions.each do |ver|
|
25
|
+
it "should not accept version string #{ver}" do
|
26
|
+
@app.instance_eval("@filename=%q{puppetlabs-ntp-#{ver}}")
|
27
|
+
lambda { @app.parse_filename! }.should raise_error
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-module
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 4
|
10
|
+
version: 0.3.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Igal Koshevoy
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-10 00:00:00 +10:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -34,158 +34,149 @@ files:
|
|
34
34
|
- Rakefile
|
35
35
|
- VERSION
|
36
36
|
- bin/puppet-module
|
37
|
-
- lib/puppet/module/tool.rb
|
37
|
+
- lib/puppet/module/tool/checksums.rb
|
38
|
+
- lib/puppet/module/tool/applications.rb
|
39
|
+
- lib/puppet/module/tool/contents_description.rb
|
38
40
|
- lib/puppet/module/tool/utils.rb
|
39
|
-
- lib/puppet/module/tool/
|
41
|
+
- lib/puppet/module/tool/cache.rb
|
40
42
|
- lib/puppet/module/tool/applications/releaser.rb
|
41
|
-
- lib/puppet/module/tool/applications/
|
43
|
+
- lib/puppet/module/tool/applications/freezer.rb
|
44
|
+
- lib/puppet/module/tool/applications/cleaner.rb
|
42
45
|
- lib/puppet/module/tool/applications/checksummer.rb
|
43
46
|
- lib/puppet/module/tool/applications/generator.rb
|
44
|
-
- lib/puppet/module/tool/applications/cleaner.rb
|
45
|
-
- lib/puppet/module/tool/applications/freezer.rb
|
46
|
-
- lib/puppet/module/tool/applications/builder.rb
|
47
|
-
- lib/puppet/module/tool/applications/searcher.rb
|
48
47
|
- lib/puppet/module/tool/applications/application.rb
|
48
|
+
- lib/puppet/module/tool/applications/builder.rb
|
49
|
+
- lib/puppet/module/tool/applications/unpacker.rb
|
49
50
|
- lib/puppet/module/tool/applications/registrar.rb
|
51
|
+
- lib/puppet/module/tool/applications/unreleaser.rb
|
52
|
+
- lib/puppet/module/tool/applications/searcher.rb
|
50
53
|
- lib/puppet/module/tool/applications/installer.rb
|
51
|
-
- lib/puppet/module/tool/skeleton.rb
|
52
|
-
- lib/puppet/module/tool/dependency.rb
|
53
|
-
- lib/puppet/module/tool/checksums.rb
|
54
|
-
- lib/puppet/module/tool/repository.rb
|
55
|
-
- lib/puppet/module/tool/applications.rb
|
56
54
|
- lib/puppet/module/tool/utils/settings.rb
|
57
|
-
- lib/puppet/module/tool/utils/uri.rb
|
58
55
|
- lib/puppet/module/tool/utils/interrogation.rb
|
56
|
+
- lib/puppet/module/tool/utils/uri.rb
|
59
57
|
- lib/puppet/module/tool/metadata.rb
|
58
|
+
- lib/puppet/module/tool/repository.rb
|
60
59
|
- lib/puppet/module/tool/cli.rb
|
61
|
-
- lib/puppet/module/tool/
|
60
|
+
- lib/puppet/module/tool/dependency.rb
|
62
61
|
- lib/puppet/module/tool/modulefile.rb
|
63
|
-
- lib/puppet/module/tool/
|
64
|
-
-
|
62
|
+
- lib/puppet/module/tool/skeleton.rb
|
63
|
+
- lib/puppet/module/tool.rb
|
65
64
|
- templates/generator/metadata.json
|
66
|
-
- templates/generator/templates/README.markdown
|
67
65
|
- templates/generator/tests/init.pp.erb
|
68
|
-
- templates/generator/spec/spec.opts
|
69
|
-
- templates/generator/spec/README.markdown
|
70
66
|
- templates/generator/spec/spec_helper.rb
|
71
|
-
- templates/generator/spec/
|
72
|
-
- templates/generator/
|
73
|
-
- templates/generator/lib/facter/README.markdown
|
74
|
-
- templates/generator/lib/puppet/parser/functions/README.markdown
|
75
|
-
- templates/generator/lib/puppet/type/README.markdown
|
76
|
-
- templates/generator/lib/puppet/provider/README.markdown
|
77
|
-
- templates/generator/manifests/README.markdown
|
78
|
-
- templates/generator/manifests/init.pp.erb
|
79
|
-
- templates/generator/files/README.markdown
|
67
|
+
- templates/generator/spec/spec.opts
|
68
|
+
- templates/generator/README.erb
|
80
69
|
- templates/generator/Modulefile.erb
|
81
|
-
-
|
82
|
-
- vendor/
|
83
|
-
- vendor/
|
84
|
-
- vendor/
|
85
|
-
- vendor/
|
86
|
-
- vendor/
|
87
|
-
- vendor/
|
88
|
-
- vendor/
|
89
|
-
- vendor/
|
90
|
-
- vendor/
|
91
|
-
- vendor/
|
92
|
-
- vendor/
|
70
|
+
- templates/generator/manifests/init.pp.erb
|
71
|
+
- vendor/multipart-post-1.0/README.txt
|
72
|
+
- vendor/multipart-post-1.0/Rakefile
|
73
|
+
- vendor/multipart-post-1.0/test/test_composite_io.rb
|
74
|
+
- vendor/multipart-post-1.0/test/net/http/post/test_multipart.rb
|
75
|
+
- vendor/multipart-post-1.0/lib/composite_io.rb
|
76
|
+
- vendor/multipart-post-1.0/lib/parts.rb
|
77
|
+
- vendor/multipart-post-1.0/lib/net/http/post/multipart.rb
|
78
|
+
- vendor/multipart-post-1.0/lib/multipartable.rb
|
79
|
+
- vendor/multipart-post-1.0/Manifest.txt
|
80
|
+
- vendor/facets-2.8.2-partial/lib/facets/kernel/tap.rb
|
81
|
+
- vendor/facets-2.8.2-partial/lib/facets/kernel/returning.rb
|
82
|
+
- vendor/thor-852190ae/REVISION
|
93
83
|
- vendor/thor-852190ae/spec/fixtures/bundle/main.thor
|
94
84
|
- vendor/thor-852190ae/spec/fixtures/bundle/execute.rb
|
95
|
-
- vendor/thor-852190ae/spec/fixtures/doc/config.rb
|
96
|
-
- vendor/thor-852190ae/spec/fixtures/doc/README
|
97
|
-
- vendor/thor-852190ae/spec/fixtures/doc/%file_name%.rb.tt
|
98
|
-
- vendor/thor-852190ae/spec/fixtures/script.thor
|
99
85
|
- vendor/thor-852190ae/spec/fixtures/application.rb
|
86
|
+
- vendor/thor-852190ae/spec/fixtures/task.thor
|
100
87
|
- vendor/thor-852190ae/spec/fixtures/group.thor
|
88
|
+
- vendor/thor-852190ae/spec/fixtures/script.thor
|
89
|
+
- vendor/thor-852190ae/spec/fixtures/doc/config.rb
|
90
|
+
- vendor/thor-852190ae/spec/fixtures/doc/%file_name%.rb.tt
|
91
|
+
- vendor/thor-852190ae/spec/fixtures/doc/README
|
92
|
+
- vendor/thor-852190ae/spec/fixtures/invoke.thor
|
93
|
+
- vendor/thor-852190ae/spec/runner_spec.rb
|
94
|
+
- vendor/thor-852190ae/spec/shell_spec.rb
|
101
95
|
- vendor/thor-852190ae/spec/base_spec.rb
|
102
|
-
- vendor/thor-852190ae/spec/
|
103
|
-
- vendor/thor-852190ae/spec/
|
96
|
+
- vendor/thor-852190ae/spec/group_spec.rb
|
97
|
+
- vendor/thor-852190ae/spec/core_ext/ordered_hash_spec.rb
|
98
|
+
- vendor/thor-852190ae/spec/core_ext/hash_with_indifferent_access_spec.rb
|
99
|
+
- vendor/thor-852190ae/spec/invocation_spec.rb
|
100
|
+
- vendor/thor-852190ae/spec/task_spec.rb
|
101
|
+
- vendor/thor-852190ae/spec/actions_spec.rb
|
104
102
|
- vendor/thor-852190ae/spec/parser/arguments_spec.rb
|
103
|
+
- vendor/thor-852190ae/spec/parser/argument_spec.rb
|
105
104
|
- vendor/thor-852190ae/spec/parser/options_spec.rb
|
106
105
|
- vendor/thor-852190ae/spec/parser/option_spec.rb
|
107
|
-
- vendor/thor-852190ae/spec/
|
108
|
-
- vendor/thor-852190ae/spec/
|
109
|
-
- vendor/thor-852190ae/spec/invocation_spec.rb
|
110
|
-
- vendor/thor-852190ae/spec/actions/create_file_spec.rb
|
106
|
+
- vendor/thor-852190ae/spec/thor_spec.rb
|
107
|
+
- vendor/thor-852190ae/spec/spec_helper.rb
|
111
108
|
- vendor/thor-852190ae/spec/actions/directory_spec.rb
|
112
|
-
- vendor/thor-852190ae/spec/actions/empty_directory_spec.rb
|
113
109
|
- vendor/thor-852190ae/spec/actions/file_manipulation_spec.rb
|
110
|
+
- vendor/thor-852190ae/spec/actions/empty_directory_spec.rb
|
111
|
+
- vendor/thor-852190ae/spec/actions/create_file_spec.rb
|
114
112
|
- vendor/thor-852190ae/spec/actions/inject_into_file_spec.rb
|
113
|
+
- vendor/thor-852190ae/spec/spec.opts
|
115
114
|
- vendor/thor-852190ae/spec/util_spec.rb
|
116
|
-
- vendor/thor-852190ae/spec/
|
115
|
+
- vendor/thor-852190ae/spec/rake_compat_spec.rb
|
116
|
+
- vendor/thor-852190ae/spec/shell/color_spec.rb
|
117
|
+
- vendor/thor-852190ae/spec/shell/basic_spec.rb
|
118
|
+
- vendor/thor-852190ae/CHANGELOG.rdoc
|
119
|
+
- vendor/thor-852190ae/bin/thor
|
120
|
+
- vendor/thor-852190ae/bin/rake2thor
|
117
121
|
- vendor/thor-852190ae/thor.gemspec
|
122
|
+
- vendor/thor-852190ae/README.rdoc
|
123
|
+
- vendor/thor-852190ae/Thorfile
|
124
|
+
- vendor/thor-852190ae/LICENSE
|
118
125
|
- vendor/thor-852190ae/lib/thor.rb
|
119
|
-
- vendor/thor-852190ae/lib/thor/
|
120
|
-
- vendor/thor-852190ae/lib/thor/
|
121
|
-
- vendor/thor-852190ae/lib/thor/shell/basic.rb
|
122
|
-
- vendor/thor-852190ae/lib/thor/util.rb
|
123
|
-
- vendor/thor-852190ae/lib/thor/runner.rb
|
126
|
+
- vendor/thor-852190ae/lib/thor/actions.rb
|
127
|
+
- vendor/thor-852190ae/lib/thor/group.rb
|
124
128
|
- vendor/thor-852190ae/lib/thor/rake_compat.rb
|
125
|
-
- vendor/thor-852190ae/lib/thor/
|
126
|
-
- vendor/thor-852190ae/lib/thor/core_ext/ordered_hash.rb
|
129
|
+
- vendor/thor-852190ae/lib/thor/base.rb
|
127
130
|
- vendor/thor-852190ae/lib/thor/core_ext/file_binary_read.rb
|
128
|
-
- vendor/thor-852190ae/lib/thor/
|
131
|
+
- vendor/thor-852190ae/lib/thor/core_ext/ordered_hash.rb
|
132
|
+
- vendor/thor-852190ae/lib/thor/core_ext/hash_with_indifferent_access.rb
|
133
|
+
- vendor/thor-852190ae/lib/thor/invocation.rb
|
129
134
|
- vendor/thor-852190ae/lib/thor/parser/options.rb
|
130
|
-
- vendor/thor-852190ae/lib/thor/parser/option.rb
|
131
|
-
- vendor/thor-852190ae/lib/thor/parser/argument.rb
|
132
135
|
- vendor/thor-852190ae/lib/thor/parser/arguments.rb
|
133
|
-
- vendor/thor-852190ae/lib/thor/
|
134
|
-
- vendor/thor-852190ae/lib/thor/
|
135
|
-
- vendor/thor-852190ae/lib/thor/error.rb
|
136
|
-
- vendor/thor-852190ae/lib/thor/group.rb
|
137
|
-
- vendor/thor-852190ae/lib/thor/invocation.rb
|
138
|
-
- vendor/thor-852190ae/lib/thor/actions/inject_into_file.rb
|
139
|
-
- vendor/thor-852190ae/lib/thor/actions/empty_directory.rb
|
136
|
+
- vendor/thor-852190ae/lib/thor/parser/argument.rb
|
137
|
+
- vendor/thor-852190ae/lib/thor/parser/option.rb
|
140
138
|
- vendor/thor-852190ae/lib/thor/actions/directory.rb
|
141
139
|
- vendor/thor-852190ae/lib/thor/actions/file_manipulation.rb
|
140
|
+
- vendor/thor-852190ae/lib/thor/actions/empty_directory.rb
|
142
141
|
- vendor/thor-852190ae/lib/thor/actions/create_file.rb
|
143
|
-
- vendor/thor-852190ae/lib/thor/
|
144
|
-
- vendor/thor-852190ae/lib/thor/
|
145
|
-
- vendor/thor-852190ae/
|
146
|
-
- vendor/thor-852190ae/
|
147
|
-
- vendor/thor-852190ae/
|
148
|
-
- vendor/thor-852190ae/
|
149
|
-
- vendor/thor-852190ae/
|
150
|
-
- vendor/thor-852190ae/
|
151
|
-
- vendor/
|
152
|
-
- vendor/
|
153
|
-
- vendor/multipart-post-1.0/Rakefile
|
154
|
-
- vendor/multipart-post-1.0/lib/multipartable.rb
|
155
|
-
- vendor/multipart-post-1.0/lib/composite_io.rb
|
156
|
-
- vendor/multipart-post-1.0/lib/parts.rb
|
157
|
-
- vendor/multipart-post-1.0/lib/net/http/post/multipart.rb
|
158
|
-
- vendor/multipart-post-1.0/Manifest.txt
|
159
|
-
- vendor/multipart-post-1.0/README.txt
|
160
|
-
- vendor/facets-2.8.2-partial/lib/facets/kernel/returning.rb
|
161
|
-
- vendor/facets-2.8.2-partial/lib/facets/kernel/tap.rb
|
162
|
-
- spec/spec.opts
|
163
|
-
- spec/spec_helper.rb
|
142
|
+
- vendor/thor-852190ae/lib/thor/actions/inject_into_file.rb
|
143
|
+
- vendor/thor-852190ae/lib/thor/task.rb
|
144
|
+
- vendor/thor-852190ae/lib/thor/error.rb
|
145
|
+
- vendor/thor-852190ae/lib/thor/util.rb
|
146
|
+
- vendor/thor-852190ae/lib/thor/shell.rb
|
147
|
+
- vendor/thor-852190ae/lib/thor/runner.rb
|
148
|
+
- vendor/thor-852190ae/lib/thor/version.rb
|
149
|
+
- vendor/thor-852190ae/lib/thor/parser.rb
|
150
|
+
- vendor/thor-852190ae/lib/thor/shell/basic.rb
|
151
|
+
- vendor/thor-852190ae/lib/thor/shell/color.rb
|
164
152
|
- spec/fixtures/releases/jamtur01-apache/metadata.json
|
165
|
-
- spec/fixtures/releases/jamtur01-apache/templates/vhost-default.conf.erb
|
166
|
-
- spec/fixtures/releases/jamtur01-apache/tests/init.pp
|
167
|
-
- spec/fixtures/releases/jamtur01-apache/tests/apache.pp
|
168
|
-
- spec/fixtures/releases/jamtur01-apache/tests/ssl.pp
|
169
|
-
- spec/fixtures/releases/jamtur01-apache/tests/php.pp
|
170
153
|
- spec/fixtures/releases/jamtur01-apache/tests/dev.pp
|
171
154
|
- spec/fixtures/releases/jamtur01-apache/tests/vhost.pp
|
155
|
+
- spec/fixtures/releases/jamtur01-apache/tests/php.pp
|
156
|
+
- spec/fixtures/releases/jamtur01-apache/tests/apache.pp
|
157
|
+
- spec/fixtures/releases/jamtur01-apache/tests/ssl.pp
|
158
|
+
- spec/fixtures/releases/jamtur01-apache/tests/init.pp
|
159
|
+
- spec/fixtures/releases/jamtur01-apache/files/httpd
|
160
|
+
- spec/fixtures/releases/jamtur01-apache/files/test.vhost
|
172
161
|
- spec/fixtures/releases/jamtur01-apache/Modulefile
|
173
|
-
- spec/fixtures/releases/jamtur01-apache/
|
162
|
+
- spec/fixtures/releases/jamtur01-apache/templates/vhost-default.conf.erb
|
174
163
|
- spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
|
175
|
-
- spec/fixtures/releases/jamtur01-apache/
|
176
|
-
- spec/fixtures/releases/jamtur01-apache/manifests/ssl.pp
|
177
|
-
- spec/fixtures/releases/jamtur01-apache/manifests/php.pp
|
178
|
-
- spec/fixtures/releases/jamtur01-apache/manifests/params.pp
|
164
|
+
- spec/fixtures/releases/jamtur01-apache/lib/puppet/type/a2mod.rb
|
179
165
|
- spec/fixtures/releases/jamtur01-apache/manifests/dev.pp
|
180
166
|
- spec/fixtures/releases/jamtur01-apache/manifests/vhost.pp
|
181
|
-
- spec/fixtures/releases/jamtur01-apache/
|
182
|
-
- spec/fixtures/releases/jamtur01-apache/
|
183
|
-
- spec/
|
184
|
-
- spec/
|
167
|
+
- spec/fixtures/releases/jamtur01-apache/manifests/params.pp
|
168
|
+
- spec/fixtures/releases/jamtur01-apache/manifests/php.pp
|
169
|
+
- spec/fixtures/releases/jamtur01-apache/manifests/ssl.pp
|
170
|
+
- spec/fixtures/releases/jamtur01-apache/manifests/init.pp
|
171
|
+
- spec/spec_helper.rb
|
172
|
+
- spec/spec.opts
|
185
173
|
- spec/support/stub_http_support.rb
|
174
|
+
- spec/support/output_support.rb
|
186
175
|
- spec/support/testdir_support.rb
|
187
176
|
- spec/unit/application_spec.rb
|
188
177
|
- spec/unit/repository_spec.rb
|
178
|
+
- spec/unit/semver_spec.rb
|
179
|
+
- spec/integration/cli_spec.rb
|
189
180
|
has_rdoc: true
|
190
181
|
homepage: http://github.com/puppetlabs/puppet-module-tool
|
191
182
|
licenses: []
|
@@ -237,30 +228,31 @@ signing_key:
|
|
237
228
|
specification_version: 3
|
238
229
|
summary: The Puppet Module Tool manages Puppet modules
|
239
230
|
test_files:
|
240
|
-
- spec/spec.opts
|
241
|
-
- spec/spec_helper.rb
|
242
231
|
- spec/fixtures/releases/jamtur01-apache/metadata.json
|
243
|
-
- spec/fixtures/releases/jamtur01-apache/templates/vhost-default.conf.erb
|
244
|
-
- spec/fixtures/releases/jamtur01-apache/tests/init.pp
|
245
|
-
- spec/fixtures/releases/jamtur01-apache/tests/apache.pp
|
246
|
-
- spec/fixtures/releases/jamtur01-apache/tests/ssl.pp
|
247
|
-
- spec/fixtures/releases/jamtur01-apache/tests/php.pp
|
248
232
|
- spec/fixtures/releases/jamtur01-apache/tests/dev.pp
|
249
233
|
- spec/fixtures/releases/jamtur01-apache/tests/vhost.pp
|
234
|
+
- spec/fixtures/releases/jamtur01-apache/tests/php.pp
|
235
|
+
- spec/fixtures/releases/jamtur01-apache/tests/apache.pp
|
236
|
+
- spec/fixtures/releases/jamtur01-apache/tests/ssl.pp
|
237
|
+
- spec/fixtures/releases/jamtur01-apache/tests/init.pp
|
238
|
+
- spec/fixtures/releases/jamtur01-apache/files/httpd
|
239
|
+
- spec/fixtures/releases/jamtur01-apache/files/test.vhost
|
250
240
|
- spec/fixtures/releases/jamtur01-apache/Modulefile
|
251
|
-
- spec/fixtures/releases/jamtur01-apache/
|
241
|
+
- spec/fixtures/releases/jamtur01-apache/templates/vhost-default.conf.erb
|
252
242
|
- spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
|
253
|
-
- spec/fixtures/releases/jamtur01-apache/
|
254
|
-
- spec/fixtures/releases/jamtur01-apache/manifests/ssl.pp
|
255
|
-
- spec/fixtures/releases/jamtur01-apache/manifests/php.pp
|
256
|
-
- spec/fixtures/releases/jamtur01-apache/manifests/params.pp
|
243
|
+
- spec/fixtures/releases/jamtur01-apache/lib/puppet/type/a2mod.rb
|
257
244
|
- spec/fixtures/releases/jamtur01-apache/manifests/dev.pp
|
258
245
|
- spec/fixtures/releases/jamtur01-apache/manifests/vhost.pp
|
259
|
-
- spec/fixtures/releases/jamtur01-apache/
|
260
|
-
- spec/fixtures/releases/jamtur01-apache/
|
261
|
-
- spec/
|
262
|
-
- spec/
|
246
|
+
- spec/fixtures/releases/jamtur01-apache/manifests/params.pp
|
247
|
+
- spec/fixtures/releases/jamtur01-apache/manifests/php.pp
|
248
|
+
- spec/fixtures/releases/jamtur01-apache/manifests/ssl.pp
|
249
|
+
- spec/fixtures/releases/jamtur01-apache/manifests/init.pp
|
250
|
+
- spec/spec_helper.rb
|
251
|
+
- spec/spec.opts
|
263
252
|
- spec/support/stub_http_support.rb
|
253
|
+
- spec/support/output_support.rb
|
264
254
|
- spec/support/testdir_support.rb
|
265
255
|
- spec/unit/application_spec.rb
|
266
256
|
- spec/unit/repository_spec.rb
|
257
|
+
- spec/unit/semver_spec.rb
|
258
|
+
- spec/integration/cli_spec.rb
|
@@ -1,22 +0,0 @@
|
|
1
|
-
Files
|
2
|
-
=====
|
3
|
-
|
4
|
-
Puppet comes with both a client and server for copying files around. The file
|
5
|
-
serving function is provided as part of the central Puppet daemon,
|
6
|
-
puppetmasterd, and the client function is used through the source attribute of
|
7
|
-
file objects. Learn more at
|
8
|
-
http://projects.puppetlabs.com/projects/puppet/wiki/File_Serving_Configuration
|
9
|
-
|
10
|
-
You can use managed files like this:
|
11
|
-
|
12
|
-
class myclass {
|
13
|
-
package { mypackage: ensure => latest }
|
14
|
-
service { myservice: ensure => running }
|
15
|
-
file { "/etc/myfile":
|
16
|
-
source => "puppet://$servername/modules/mymodule/myfile"
|
17
|
-
}
|
18
|
-
}
|
19
|
-
|
20
|
-
The files are searched for in:
|
21
|
-
|
22
|
-
$modulepath/mymodule/files/myfile
|
@@ -1,22 +0,0 @@
|
|
1
|
-
Facter
|
2
|
-
======
|
3
|
-
|
4
|
-
Define facts in this directory.
|
5
|
-
|
6
|
-
Sometimes you need to be able to write conditional expressions based
|
7
|
-
on site-specific data that just isn’t available via Facter. The
|
8
|
-
solution may be to add a fact to Facter. These additional facts can
|
9
|
-
then be distributed to Puppet clients and are available for use in
|
10
|
-
manifests. Learn more at
|
11
|
-
http://projects.puppetlabs.com/projects/puppet/wiki/Adding_Facts
|
12
|
-
|
13
|
-
File paths should match the fact name; for example, a fact
|
14
|
-
`hardware_platform`, defined like this:
|
15
|
-
|
16
|
-
Facter.add("hardware_platform") do
|
17
|
-
setcode do
|
18
|
-
%x{/bin/uname -i}.chomp
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
Should be found in `hardware_platform.rb` in this directory.
|
@@ -1,17 +0,0 @@
|
|
1
|
-
Functions
|
2
|
-
=========
|
3
|
-
|
4
|
-
Define functions in this directory.
|
5
|
-
|
6
|
-
File paths should match the function name; for example, a function
|
7
|
-
`myfunction`, defined like this:
|
8
|
-
|
9
|
-
Puppet::Parser::Functions::newfunction(
|
10
|
-
:myfunction,
|
11
|
-
:type => :statement,
|
12
|
-
:doc => "Documentation here."
|
13
|
-
) do |vals|
|
14
|
-
# ...
|
15
|
-
end
|
16
|
-
|
17
|
-
Should be found in `myfunction.rb` in this directory.
|
@@ -1,14 +0,0 @@
|
|
1
|
-
Providers
|
2
|
-
=========
|
3
|
-
|
4
|
-
Define providers under this directory.
|
5
|
-
|
6
|
-
File paths should match the resource type name and provider name; for
|
7
|
-
example, a provider `myprovider` for a resource type `mytype`, defined like this:
|
8
|
-
|
9
|
-
Puppet::Type.type(:mytype).provide(:myprovider) do
|
10
|
-
desc "Documentation here"
|
11
|
-
# ...
|
12
|
-
end
|
13
|
-
|
14
|
-
Should be found in `mytype/myprovider.rb` under this directory.
|
@@ -1,14 +0,0 @@
|
|
1
|
-
Resource Types
|
2
|
-
==============
|
3
|
-
|
4
|
-
Define resource types in this directory.
|
5
|
-
|
6
|
-
Filenames should match the resource type name; for example, a resource
|
7
|
-
type `mytype`, defined like this:
|
8
|
-
|
9
|
-
Puppet::Type.newtype(:mytype) do
|
10
|
-
@doc = "Documentation here."
|
11
|
-
# ...
|
12
|
-
end
|
13
|
-
|
14
|
-
Should be found in `mytype.rb`
|
@@ -1,28 +0,0 @@
|
|
1
|
-
Manifests
|
2
|
-
=========
|
3
|
-
|
4
|
-
Module manifest files belong in this directory.
|
5
|
-
|
6
|
-
`init.pp` defines how the module will carry out its tasks in this file.
|
7
|
-
|
8
|
-
Add additional definitions in this directory. Their file paths should match the
|
9
|
-
definition name; for example, a definition `mydefinition`, defined like this:
|
10
|
-
|
11
|
-
# Definition: mydefinition
|
12
|
-
#
|
13
|
-
# This is the mydefinition in the mymodule module.
|
14
|
-
#
|
15
|
-
# Parameters:
|
16
|
-
#
|
17
|
-
# Actions:
|
18
|
-
#
|
19
|
-
# Requires:
|
20
|
-
#
|
21
|
-
# Sample Usage:
|
22
|
-
#
|
23
|
-
# [Remember: No empty lines between comments and class definition]
|
24
|
-
define mydefinition {
|
25
|
-
# ...
|
26
|
-
}
|
27
|
-
|
28
|
-
Should be found in `mydefinition.pp` in this directory.
|
@@ -1,23 +0,0 @@
|
|
1
|
-
Templates
|
2
|
-
=========
|
3
|
-
|
4
|
-
Puppet supports templates and templating via ERB, which is part of the Ruby
|
5
|
-
standard library and is used for many other projects including Ruby on Rails.
|
6
|
-
Templates allow you to manage the content of template files, for example
|
7
|
-
configuration files that cannot yet be managed as a Puppet type. Learn more at
|
8
|
-
http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Templating
|
9
|
-
|
10
|
-
You can use templates like this:
|
11
|
-
|
12
|
-
class myclass {
|
13
|
-
package { mypackage: ensure => latest }
|
14
|
-
service { myservice: ensure => running }
|
15
|
-
file { "/etc/myfile":
|
16
|
-
content => template("mymodule/myfile.erb")
|
17
|
-
}
|
18
|
-
}
|
19
|
-
|
20
|
-
The templates are searched for in:
|
21
|
-
|
22
|
-
$templatedir/mymodule/myfile.erb
|
23
|
-
$modulepath/mymodule/templates/myfile.erb
|