devstructure 0.5.2 → 0.5.3
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.
- data/lib/devstructure/blueprint.rb +18 -26
- metadata +4 -4
@@ -208,13 +208,16 @@ EOF
|
|
208
208
|
# encountered.
|
209
209
|
walk(
|
210
210
|
:before => lambda { |manager, command|
|
211
|
-
io.puts "apt-get update" if "apt" == manager
|
211
|
+
io.puts "apt-get -q update" if "apt" == manager
|
212
212
|
},
|
213
213
|
:package => lambda { |manager, command, package, version|
|
214
214
|
return if manager == package
|
215
215
|
io.printf "#{command}\n", package, version
|
216
|
-
if "apt" == manager
|
217
|
-
|
216
|
+
if "apt" == manager \
|
217
|
+
&& package =~ /^rubygems(\d+\.\d+(?:\.\d+)?)$/ \
|
218
|
+
&& "1.8" == $1
|
219
|
+
io.puts \
|
220
|
+
"/usr/bin/gem#{$1} install --no-rdoc --no-ri rubygems-update"
|
218
221
|
io.puts "/usr/bin/ruby#{$1} $(PATH=\"$PATH:/var/lib/gems/#{
|
219
222
|
$1}/bin\" which update_rubygems)"
|
220
223
|
end
|
@@ -323,7 +326,7 @@ EOF
|
|
323
326
|
p = packages[manager]["_packages"]
|
324
327
|
return if 0 == p.length || 1 == p.length && p[manager]
|
325
328
|
if "apt" == manager
|
326
|
-
manifest << Puppet::Exec.new("apt-get update",
|
329
|
+
manifest << Puppet::Exec.new("apt-get -q update",
|
327
330
|
:before => Puppet::Class["apt"])
|
328
331
|
end
|
329
332
|
},
|
@@ -343,27 +346,16 @@ EOF
|
|
343
346
|
|
344
347
|
# However, if this package happens to be RubyGems, we introduce
|
345
348
|
# a couple of new resources that update it to the latest version.
|
346
|
-
if package =~ /^rubygems(\d+\.\d+(?:\.\d+)?)$/
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
:ensure => :latest
|
353
|
-
)
|
354
|
-
Puppet::Package["rubygems-update"]
|
355
|
-
else
|
356
|
-
manifest[manager] << Puppet::Exec.new(
|
357
|
-
"/usr/bin/gem#{v} install --no-rdoc --no-ri rubygems-update",
|
358
|
-
:alias => "rubygems-update-#{v}",
|
359
|
-
:require => Puppet::Package["rubygems#{v}"]
|
360
|
-
)
|
361
|
-
Puppet::Exec["rubygems-update-#{v}"]
|
362
|
-
end
|
349
|
+
if package =~ /^rubygems(\d+\.\d+(?:\.\d+)?)$/ && "1.8" == $1
|
350
|
+
manifest[manager] << Puppet::Package.new("rubygems-update",
|
351
|
+
:require => Puppet::Package["rubygems1.8"],
|
352
|
+
:provider => :gem,
|
353
|
+
:ensure => :latest
|
354
|
+
)
|
363
355
|
manifest[manager] << Puppet::Exec.new(
|
364
356
|
"/bin/sh -c '/usr/bin/ruby#{v} $(PATH=$PATH:/var/lib/gems/#{
|
365
357
|
v}/bin which update_rubygems)'",
|
366
|
-
:require =>
|
358
|
+
:require => Puppet::Package["rubygems-update"]
|
367
359
|
)
|
368
360
|
end
|
369
361
|
|
@@ -384,7 +376,7 @@ EOF
|
|
384
376
|
# but follow a predictable enough directory layout that we can
|
385
377
|
# avoid running the `gem` command after the first run with an
|
386
378
|
# inexpensive check to see if the directory exists.
|
387
|
-
when /
|
379
|
+
when /ruby/
|
388
380
|
manifest[manager] << Puppet::Exec.new(
|
389
381
|
sprintf(command, package, version),
|
390
382
|
:creates =>
|
@@ -491,7 +483,7 @@ EOF
|
|
491
483
|
# code generator but passed off to the cookbook.
|
492
484
|
walk(
|
493
485
|
:before => lambda { |manager, command|
|
494
|
-
cookbook.execute "apt-get update" if "apt" == manager
|
486
|
+
cookbook.execute "apt-get -q update" if "apt" == manager
|
495
487
|
},
|
496
488
|
:package => lambda { |manager, command, package, version|
|
497
489
|
return if manager == package
|
@@ -504,7 +496,7 @@ EOF
|
|
504
496
|
# install.
|
505
497
|
when "apt"
|
506
498
|
cookbook.apt_package package, :version => version
|
507
|
-
if package =~ /^rubygems(\d+\.\d+(?:\.\d+)?)$/
|
499
|
+
if package =~ /^rubygems(\d+\.\d+(?:\.\d+)?)$/ && "1.8" == $1
|
508
500
|
v = $1
|
509
501
|
cookbook.gem_package "rubygems-update",
|
510
502
|
:gem_binary => "/usr/bin/gem#{v}"
|
@@ -517,7 +509,7 @@ EOF
|
|
517
509
|
# can be managed by the builtin `package` resource type because
|
518
510
|
# Opscode thoughtfully allows specifying the `gem` command
|
519
511
|
# to run for each resource individually.
|
520
|
-
when /
|
512
|
+
when /ruby(?:gems)?(\d+\.\d+(?:\.\d+)?)(?:-dev)?/
|
521
513
|
v = $1
|
522
514
|
cookbook.gem_package package,
|
523
515
|
:gem_binary => "/usr/bin/gem#{v}",
|
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: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 3
|
10
|
+
version: 0.5.3
|
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-11-
|
18
|
+
date: 2010-11-04 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|