halite 1.0.4 → 1.0.5

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: 759f66650fe2e7a304845bd62730aa796c81b4ac
4
- data.tar.gz: bc405024358044f1532672757e589a7f204715c5
3
+ metadata.gz: 9c04dc8c5f3da51f78963e12a57c904e02183253
4
+ data.tar.gz: 36e10a49ccac0e160564144a0c55bdfbef240a97
5
5
  SHA512:
6
- metadata.gz: 370b0aa318e442112bcfb0e80249aebd484325e38aadc3b0a079d5f2517d540c1fbdf235693672bfb931b6a988511b5c820a246ede47499c1713c08427229321
7
- data.tar.gz: d9d42a3c5ccfd23d2dbf4ae361ff64573c125ddd35810ce5a73cd40e7af023bd45bdf06962af3ebe1eba149546f61c996c573a920fcfc047604b080ec5c31944
6
+ metadata.gz: f7099cd0cba999e8244ae605f1867e507601f4650129e79d1d3325e2a77f13049c752a07b8938ba335241dbec366b71b6d312a50de42a9cb0113264ff67ea926
7
+ data.tar.gz: b10f257c96e7a39a9a91aa17375edd3e4ab610c35693d91848b6a2236aac2293ae2ab110cb54db9623e62bab6e8186fabeb99cc6255afd592be763106a7feddf
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.0.5
4
+
5
+ * Fix the spec helper for Chef <= 12.2.
6
+
3
7
  ## v1.0.4
4
8
 
5
9
  * Fixes to work with Chef 12.4.
@@ -68,6 +68,12 @@ module Halite
68
68
  # keys based on the class definition.
69
69
  klass.instance_variable_set(:@halite_original_priority_keys, removed_keys)
70
70
  end
71
+ # Remove from the global node map.
72
+ if defined?(Chef::Resource.node_map)
73
+ removed_keys = remove_from_node_map(Chef::Resource.node_map, klass)
74
+ # Used down in patch_node_map.
75
+ klass.instance_variable_set(:@halite_original_nodemap_keys, removed_keys)
76
+ end
71
77
  end
72
78
 
73
79
  # Patch an object in to a global namespace for the duration of a block.
@@ -125,7 +131,10 @@ module Halite
125
131
  return block.call unless defined?(klass.node_map)
126
132
  begin
127
133
  # Technically this is set to true on >=12.4, but this should work.
128
- klass.node_map.set(name, klass)
134
+ keys = klass.instance_variable_get(:@halite_original_nodemap_keys) | [name.to_sym]
135
+ keys.each do |key|
136
+ klass.node_map.set(key, klass)
137
+ end
129
138
  block.call
130
139
  ensure
131
140
  remove_from_node_map(klass.node_map, klass)
@@ -17,5 +17,5 @@
17
17
 
18
18
  module Halite
19
19
  # Halite version.
20
- VERSION = '1.0.4'
20
+ VERSION = '1.0.5'
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: halite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Kantrowitz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-25 00:00:00.000000000 Z
11
+ date: 2015-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef