devstructure 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/devstructure/blueprint.rb +34 -2
- metadata +4 -4
@@ -149,7 +149,14 @@ EOF
|
|
149
149
|
puts "#{command} >#{pathname} <<#{eof}"
|
150
150
|
puts content
|
151
151
|
puts eof
|
152
|
-
end
|
152
|
+
end if files
|
153
|
+
|
154
|
+
# Source tarballs.
|
155
|
+
sources.sort.each do |dirname, filename|
|
156
|
+
puts "wget http://s3.amazonaws.com/blueprint-sources/#{filename}"
|
157
|
+
puts "tar xf #{filename} -C #{dirname}"
|
158
|
+
puts "rm #{filename}"
|
159
|
+
end if sources
|
153
160
|
|
154
161
|
end
|
155
162
|
|
@@ -217,6 +224,18 @@ EOF
|
|
217
224
|
}
|
218
225
|
manifest[manager] << Package.new(package, options)
|
219
226
|
|
227
|
+
# Other gems use exec resources.
|
228
|
+
when /rubygems/
|
229
|
+
manifest[manager] << Exec.new(
|
230
|
+
sprintf("#{command}", package, version),
|
231
|
+
:creates =>
|
232
|
+
"/usr/lib/ruby/gems/#{ruby_version}/gems/#{package}-#{version}",
|
233
|
+
:require => [
|
234
|
+
Puppet::Class[managers[manager]],
|
235
|
+
Package[manager],
|
236
|
+
]
|
237
|
+
)
|
238
|
+
|
220
239
|
when /python/
|
221
240
|
manifest[manager] << Exec.new(sprintf("#{command}", package),
|
222
241
|
:require => [
|
@@ -239,7 +258,7 @@ EOF
|
|
239
258
|
)
|
240
259
|
|
241
260
|
# System files.
|
242
|
-
if 0 < files.length
|
261
|
+
if files && 0 < files.length
|
243
262
|
manifest << Package.defaults(
|
244
263
|
:before => files.sort.map { |pathname, content|
|
245
264
|
Puppet::File[pathname]
|
@@ -262,6 +281,19 @@ EOF
|
|
262
281
|
end
|
263
282
|
end
|
264
283
|
|
284
|
+
# Source tarballs.
|
285
|
+
if sources && 0 < sources.length
|
286
|
+
manifest << Package.defaults(
|
287
|
+
:before => sources.sort.map { |dirname, filename| Exec[pathname] }
|
288
|
+
)
|
289
|
+
sources.sort.each do |dirname, filename|
|
290
|
+
manifest << Exec.new(filename,
|
291
|
+
:command => "/bin/sh -c 'wget http://s3.amazonaws.com/blueprint-sources/#{filename}; tar xf #{filename}; rm #{filename}'",
|
292
|
+
:cwd => dirname
|
293
|
+
)
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
265
297
|
puts manifest
|
266
298
|
end
|
267
299
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devstructure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Richard Crowley
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-28 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|