devstructure 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/devstructure/blueprint.rb +6 -5
  2. metadata +4 -4
@@ -45,6 +45,7 @@ class DevStructure::Blueprint < Hash
45
45
  :package => lambda { |manager, command, package, version|
46
46
  return if b.packages[package]
47
47
  versions = [b.packages[manager]["_packages"][package]].flatten
48
+ versions.reject! { |v| v.nil? }
48
49
  [version].flatten.each { |v| versions.delete v }
49
50
  case versions.length
50
51
  when 0
@@ -63,7 +64,7 @@ class DevStructure::Blueprint < Hash
63
64
  b.walk(
64
65
  :package => lambda { |manager, command, package, version|
65
66
  return unless b.packages[package]
66
- test = if package =~ /^rubygems(\d+\.\d+)$/
67
+ test = if package =~ /^rubygems(\d+\.\d+(?:\.\d+)?)$/
67
68
  b.packages["rubygems-update"]
68
69
  else
69
70
  b.packages[package]
@@ -89,7 +90,7 @@ class DevStructure::Blueprint < Hash
89
90
  case manager
90
91
 
91
92
  # Match a version of ruby*-dev to a version of rubygems*.
92
- when /^rubygems(\d+\.\d+)$/
93
+ when /^rubygems(\d+\.\d+(?:\.\d+)?)$/
93
94
  b.packages["apt"]["_packages"]["ruby#{$1}-dev"] =
94
95
  packages["apt"]["_packages"]["ruby#{$1}-dev"]
95
96
 
@@ -129,7 +130,7 @@ EOF
129
130
  :package => lambda { |manager, command, package, version|
130
131
  return if manager == package
131
132
  printf "#{command}\n", package, version
132
- if "rubygems-update" == package && command =~ /gem(\d+\.\d+) install/
133
+ if "rubygems-update" == package && command =~ /gem(\d+\.\d+(?:\.\d+)?) install/
133
134
  puts "PATH=\"$PATH:/var/lib/gems/#{$1}/bin\" update_rubygems"
134
135
  end
135
136
  }
@@ -177,7 +178,7 @@ EOF
177
178
  return if 0 == p.length || 1 == p.length && p[manager]
178
179
  },
179
180
  :package => lambda { |manager, command, package, version|
180
- command =~ /gem(\d+\.\d+) install/
181
+ command =~ /gem(\d+\.\d+(?:\.\d+)?) install/
181
182
  ruby_version = $1
182
183
  case manager
183
184
  when "apt"
@@ -231,7 +232,7 @@ EOF
231
232
  return if 0 == p.length || 1 == p.length && manager == p.keys.first
232
233
 
233
234
  # Update RubyGems if we're through with gems in Debian's location.
234
- return unless manager =~ /^rubygems\d+\.\d+$/
235
+ return unless manager =~ /^rubygems\d+\.\d+(?:\.\d+)?$/
235
236
  return unless p["rubygems-update"]
236
237
  manifest[manager] << Exec.new("update_rubygems",
237
238
  :subscribe => Package["rubygems-update"],
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: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
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-06-24 00:00:00 +00:00
18
+ date: 2010-06-27 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency