halite 1.7.0 → 1.8.0

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: 1a37de991e3e0d1627ffdef876685f8eec08df61
4
- data.tar.gz: 6299278206fcadb36f2b6c6b5f6b33b63a563c58
3
+ metadata.gz: fd168969c0914dcf6682b1245ab25654227a79aa
4
+ data.tar.gz: 0b56dedf7b66e2fb3a485d426c9d8f05c16186d0
5
5
  SHA512:
6
- metadata.gz: 3e584b28d05cad1e885c1050c149e0b0541b8157e8493ecdbd9b50bad174379e51f0185b56284f8d50d61ee290ea2f15e2ef5babe02bf91e004b28967ad3f8c5
7
- data.tar.gz: 0fdac57fd61e32efcc2017d937c3db4c58d5ec1673f9db36e73ba6057e5a8fc1697eac98242f398a0e48e2a8c08f6a759b4f22eb2baa4450c4970f1e09801ad4
6
+ metadata.gz: e2bc627bd0db8fbf3606928e8aa4bbd2468a35f76887dfab64c04a1c44e0300f5c2d533d0243a13bb689d22f265327271df1bedb7ff4c2a4ad728bf1670392cf
7
+ data.tar.gz: d26476e368199e290eb4fc78ffd0d93e763c7bf3e148309ae89be7d75c36edf238d92415fc642fd5e94f6b5edf92faa40467890451507bd035f04a36fa7372df
@@ -1,5 +1,11 @@
1
1
  # Halite Changelog
2
2
 
3
+ ## v1.8.0
4
+
5
+ * Give recipes created using the block helper (`recipe do ... end`) a name when
6
+ possible.
7
+ * Fix support for the Berkshelf plugin on Berks 6.1 and above.
8
+
3
9
  ## v1.7.0
4
10
 
5
11
  * Allow specifying which platforms a cookbook supports via gem metadata:
@@ -49,7 +49,7 @@ module Halite
49
49
  []
50
50
  end
51
51
  # Make sure we never add two halite sources.
52
- original_sources.reject {|s| s.is_a?(::Halite::Berkshelf::Source) } + [::Halite::Berkshelf::Source.new]
52
+ original_sources.reject {|s| s.is_a?(::Halite::Berkshelf::Source) } + [::Halite::Berkshelf::Source.new(self)]
53
53
  end
54
54
  end
55
55
 
@@ -27,10 +27,12 @@ module Halite
27
27
  # @since 1.0.0
28
28
  # @api private
29
29
  class Source < ::Berkshelf::Source
30
- def initialize
31
- # Pretend our URL is set even though it isn't used. Otherwise berks
32
- # complains.
33
- super 'https://supermarket.chef.io'
30
+ def initialize(berksfile)
31
+ # 6.1+ mode.
32
+ super(berksfile, {halite: 'halite://'})
33
+ rescue ArgumentError
34
+ # Legacy mode.
35
+ super('halite://')
34
36
  end
35
37
 
36
38
  def build_universe
@@ -61,7 +61,12 @@ module Halite
61
61
  super(*recipe_names) do
62
62
  add_halite_cookbooks(node, @halite_gemspec) if @halite_gemspec
63
63
  if block
64
- recipe = Chef::Recipe.new(nil, nil, run_context)
64
+ cookbook_name = if @halite_gemspec
65
+ Halite::Gem.new(Array(@halite_gemspec).first).cookbook_name + '_spec'
66
+ else
67
+ nil
68
+ end
69
+ recipe = Chef::Recipe.new(cookbook_name, nil, run_context)
65
70
  recipe.instance_exec(&block)
66
71
  end
67
72
  end
@@ -17,5 +17,5 @@
17
17
 
18
18
  module Halite
19
19
  # Halite version.
20
- VERSION = '1.7.0'
20
+ VERSION = '1.8.0'
21
21
  end
@@ -228,29 +228,6 @@ describe Halite::SpecHelper do
228
228
  it { expect(chef_run.halite_test_poise('test')).to be_a(Chef::Resource) }
229
229
  end # /context without step_into
230
230
  end # /context with a Poise resource
231
-
232
- describe 'without step-into there should be no ChefSpec resource-level matcher' do
233
- provider(:halite_test_help)
234
-
235
- context 'helper-created resource' do
236
- resource(:halite_test_helper, step_into: false)
237
- recipe do
238
- halite_test_helper 'test'
239
- end
240
- it { expect { chef_run.halite_test_helper('test' ) }.to raise_error NoMethodError }
241
- end # /context helper-created resource
242
-
243
- context 'helper-created resource with Poise' do
244
- resource(:halite_test_helper_poise, step_into: false) do
245
- include Poise
246
- provides(:halite_test_helper_poise)
247
- end
248
- recipe do
249
- halite_test_helper_poise 'test'
250
- end
251
- it { expect(chef_run.halite_test_helper_poise('test' )).to be_a(Chef::Resource) }
252
- end # /context helper-created resource with Poise
253
- end # describe without step-into there should be no ChefSpec resource-level matcher
254
231
  end # /describe #step_into
255
232
 
256
233
  describe 'patcher' do
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.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Kantrowitz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-07 00:00:00.000000000 Z
11
+ date: 2017-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef