amigrind 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7a9d89cbc7520546b9d4017c183a1b10b975956
4
- data.tar.gz: af3416e9b2098998d87af4b375daf5d28d719776
3
+ metadata.gz: ef43501b7985989e5a5efcd8cc53d09ddc6506f5
4
+ data.tar.gz: 391a5874af73e5a884e39d1c2fd16891c137d440
5
5
  SHA512:
6
- metadata.gz: 523fad834fc81d3acd1e3f232e5afe229a8cc7b128a15d52fcc0d71daaa4c5b7d61be82bda3b1fbcc940d6d1521310ccc3c0ccd5a6d70dcabc8f40c058a889ca
7
- data.tar.gz: e6a2930250dd49896d27de722558383d74c03c73a1b062773bf2bfab11a6c9a3620d079f6238b66ab00c0ca415de064a803cadab18a7e7de8e50e9b843ad236d
6
+ metadata.gz: eeb0a199598540ed92a2bd5d9d3a4c9a22b2b6167868952cfc9101dffc59715e010c97e627e46838a98f1cc7025a2c1e3e8cbce51fef343ec39c872eb21b4314
7
+ data.tar.gz: de995a999fd4036a113887c9044471404b0035b452641d178f905fa2b48b3ef33ec259b4631b6ef3ef7566aee2155ad2eac974c1c28b5bd02ea4adfc2b257efa
@@ -78,7 +78,8 @@ module Amigrind
78
78
  end
79
79
 
80
80
  def provisioner(name, provisioner_class, weight: nil, &block)
81
- weight ||= (@blueprint.provisioners.max_by(&:weight) || 0) + 1
81
+ highest_provisioner = @blueprint.provisioners.max_by(&:weight)
82
+ weight ||= (highest_provisioner.nil? ? 0 : highest_provisioner.weight) + 1
82
83
 
83
84
  raise "'name' must be a String or Symbol." \
84
85
  unless name.is_a?(String) || name.is_a?(Symbol)
@@ -1,3 +1,3 @@
1
1
  module Amigrind
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amigrind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ed Ropple
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-07 00:00:00.000000000 Z
11
+ date: 2016-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler