scaffold 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +5 -3
- data/lib/scaffold.rb +4 -1
- data/lib/scaffold/generator.rb +12 -14
- data/{templates → lib/scaffold/templates}/function/function.rb +0 -0
- data/{templates → lib/scaffold/templates}/module/README +0 -0
- data/{templates → lib/scaffold/templates}/module/manifests/class.pp +0 -0
- data/{templates → lib/scaffold/templates}/module/manifests/define.pp +0 -0
- data/{templates → lib/scaffold/templates}/module/manifests/init.pp +0 -0
- data/lib/scaffold/templates/module/metadata.json +7 -0
- data/{templates → lib/scaffold/templates}/module/tests/init.pp +0 -0
- data/{templates → lib/scaffold/templates}/puppet/fileserver.conf +0 -0
- data/{templates → lib/scaffold/templates}/puppet/manifests/nodes/node.pp +0 -0
- data/{templates → lib/scaffold/templates}/puppet/manifests/site.pp +0 -0
- data/{templates → lib/scaffold/templates}/puppet/puppet.conf +0 -0
- data/{templates → lib/scaffold/templates}/type/provider.rb +0 -0
- data/{templates → lib/scaffold/templates}/type/type.rb +0 -0
- metadata +18 -31
data/README.rdoc
CHANGED
@@ -11,9 +11,11 @@ A simple templating scaffolding system for Puppet
|
|
11
11
|
Creates:
|
12
12
|
|
13
13
|
* Modules - using the first module directory in the modulepath
|
14
|
+
* Nodes - creates them in Puppet's confdir and assumed you've used Scaffold's config template
|
14
15
|
* Class in a module
|
15
16
|
* Definition in a module
|
16
17
|
* Functions - in a specific module
|
18
|
+
* Types & Providers - in a specific module
|
17
19
|
* Puppet configuration - creates a base configuration in Puppet's confdir
|
18
20
|
|
19
21
|
== SYNOPSIS:
|
@@ -41,12 +43,12 @@ Create Puppet configuration:
|
|
41
43
|
|
42
44
|
== REQUIREMENTS:
|
43
45
|
|
44
|
-
* templater
|
45
|
-
* Puppet
|
46
|
+
* templater (installed as a dependency)
|
47
|
+
* Puppet (not installed with scaffold)
|
46
48
|
|
47
49
|
== INSTALL:
|
48
50
|
|
49
|
-
$ gem install
|
51
|
+
$ gem install scaffold
|
50
52
|
|
51
53
|
== LICENSE:
|
52
54
|
|
data/lib/scaffold.rb
CHANGED
data/lib/scaffold/generator.rb
CHANGED
@@ -15,29 +15,27 @@ module Scaffold
|
|
15
15
|
first_argument :module_name, :required => true, :desc => "Your module name."
|
16
16
|
|
17
17
|
def self.source_root
|
18
|
-
File.
|
18
|
+
File.join(File.dirname(__FILE__), 'templates/module')
|
19
19
|
end
|
20
20
|
|
21
21
|
# Create all subsdirectories
|
22
|
-
empty_directory :manifests_directory do |d|
|
23
|
-
d.destination = "#{module_name}/manifests"
|
24
|
-
end
|
25
22
|
empty_directory :files_directory do |d|
|
26
23
|
d.destination = "#{module_name}/files"
|
27
24
|
end
|
28
25
|
empty_directory :templates_directory do |d|
|
29
26
|
d.destination = "#{module_name}/templates"
|
30
27
|
end
|
31
|
-
empty_directory :tests_directory do |d|
|
32
|
-
d.destination = "#{module_name}/tests"
|
33
|
-
end
|
34
28
|
empty_directory :lib_directory do |d|
|
35
29
|
d.destination = "#{module_name}/lib/puppet/parser/functions"
|
36
30
|
end
|
37
31
|
empty_directory :libfacter_directory do |d|
|
38
32
|
d.destination = "#{module_name}/lib/facter"
|
39
33
|
end
|
40
|
-
|
34
|
+
|
35
|
+
file :metadata_file do |f|
|
36
|
+
f.source = "#{source_root}/metadata.json"
|
37
|
+
f.destination = "#{module_name}/metadata.json"
|
38
|
+
end
|
41
39
|
template :readme_file do |f|
|
42
40
|
f.source = "#{source_root}/README"
|
43
41
|
f.destination = "#{module_name}/README"
|
@@ -61,7 +59,7 @@ module Scaffold
|
|
61
59
|
first_argument :node_name, :required => true, :desc => "Your node name."
|
62
60
|
|
63
61
|
def self.source_root
|
64
|
-
File.
|
62
|
+
File.join(File.dirname(__FILE__), 'templates/puppet')
|
65
63
|
end
|
66
64
|
|
67
65
|
# Create all subsdirectories
|
@@ -85,7 +83,7 @@ module Scaffold
|
|
85
83
|
second_argument :class_name, :required => true, :desc => "Your class name."
|
86
84
|
|
87
85
|
def self.source_root
|
88
|
-
File.
|
86
|
+
File.join(File.dirname(__FILE__), 'templates/module')
|
89
87
|
end
|
90
88
|
|
91
89
|
template :class_file do |f|
|
@@ -103,7 +101,7 @@ module Scaffold
|
|
103
101
|
second_argument :define_name, :required => true, :desc => "Your definition name."
|
104
102
|
|
105
103
|
def self.source_root
|
106
|
-
File.
|
104
|
+
File.join(File.dirname(__FILE__), 'templates/module')
|
107
105
|
end
|
108
106
|
|
109
107
|
template :class_file do |f|
|
@@ -122,7 +120,7 @@ module Scaffold
|
|
122
120
|
third_argument :type, :required => :true, :default => "statement", :desc => "The type of function."
|
123
121
|
|
124
122
|
def self.source_root
|
125
|
-
File.
|
123
|
+
File.join(File.dirname(__FILE__), 'templates/function')
|
126
124
|
end
|
127
125
|
|
128
126
|
# Create all subsdirectories
|
@@ -145,7 +143,7 @@ module Scaffold
|
|
145
143
|
second_argument :type_name, :required => true, :desc => "Your type name."
|
146
144
|
|
147
145
|
def self.source_root
|
148
|
-
File.
|
146
|
+
File.join(File.dirname(__FILE__), 'templates/type')
|
149
147
|
end
|
150
148
|
|
151
149
|
# Create all subsdirectories
|
@@ -174,7 +172,7 @@ module Scaffold
|
|
174
172
|
DESC
|
175
173
|
|
176
174
|
def self.source_root
|
177
|
-
File.
|
175
|
+
File.join(File.dirname(__FILE__), 'templates/puppet')
|
178
176
|
end
|
179
177
|
|
180
178
|
# Create all subsdirectories
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- James Turnbull
|
@@ -14,27 +14,13 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-07 00:00:00 +10:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
21
|
-
name: puppet
|
22
|
-
prerelease: false
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 0
|
29
|
-
- 24
|
30
|
-
- 8
|
31
|
-
version: 0.24.8
|
32
|
-
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
20
|
- !ruby/object:Gem::Dependency
|
35
21
|
name: templater
|
36
22
|
prerelease: false
|
37
|
-
requirement: &
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
38
24
|
requirements:
|
39
25
|
- - ">="
|
40
26
|
- !ruby/object:Gem::Version
|
@@ -44,7 +30,7 @@ dependencies:
|
|
44
30
|
- 0
|
45
31
|
version: 0.5.0
|
46
32
|
type: :runtime
|
47
|
-
version_requirements: *
|
33
|
+
version_requirements: *id001
|
48
34
|
description: Scaffold allows you to create basic Puppet configuration, modules, nodes, classes, functions and types.
|
49
35
|
email: james@lovedthanlost.net
|
50
36
|
executables:
|
@@ -58,20 +44,21 @@ files:
|
|
58
44
|
- Rakefile
|
59
45
|
- README.rdoc
|
60
46
|
- bin/scaffold
|
47
|
+
- lib/scaffold/templates/module/metadata.json
|
48
|
+
- lib/scaffold/templates/module/tests/init.pp
|
49
|
+
- lib/scaffold/templates/module/manifests/class.pp
|
50
|
+
- lib/scaffold/templates/module/manifests/define.pp
|
51
|
+
- lib/scaffold/templates/module/manifests/init.pp
|
52
|
+
- lib/scaffold/templates/module/README
|
53
|
+
- lib/scaffold/templates/function/function.rb
|
54
|
+
- lib/scaffold/templates/puppet/fileserver.conf
|
55
|
+
- lib/scaffold/templates/puppet/manifests/site.pp
|
56
|
+
- lib/scaffold/templates/puppet/manifests/nodes/node.pp
|
57
|
+
- lib/scaffold/templates/puppet/puppet.conf
|
58
|
+
- lib/scaffold/templates/type/provider.rb
|
59
|
+
- lib/scaffold/templates/type/type.rb
|
61
60
|
- lib/scaffold/generator.rb
|
62
61
|
- lib/scaffold.rb
|
63
|
-
- templates/module/tests/init.pp
|
64
|
-
- templates/module/manifests/class.pp
|
65
|
-
- templates/module/manifests/define.pp
|
66
|
-
- templates/module/manifests/init.pp
|
67
|
-
- templates/module/README
|
68
|
-
- templates/function/function.rb
|
69
|
-
- templates/puppet/fileserver.conf
|
70
|
-
- templates/puppet/manifests/site.pp
|
71
|
-
- templates/puppet/manifests/nodes/node.pp
|
72
|
-
- templates/puppet/puppet.conf
|
73
|
-
- templates/type/provider.rb
|
74
|
-
- templates/type/type.rb
|
75
62
|
has_rdoc: true
|
76
63
|
homepage: http://github.com/jamtur01/puppet-scaffold
|
77
64
|
licenses: []
|