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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/halite/berkshelf/helper.rb +1 -1
- data/lib/halite/berkshelf/source.rb +6 -4
- data/lib/halite/spec_helper/runner.rb +6 -1
- data/lib/halite/version.rb +1 -1
- data/spec/spec_helper_spec.rb +0 -23
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd168969c0914dcf6682b1245ab25654227a79aa
|
4
|
+
data.tar.gz: 0b56dedf7b66e2fb3a485d426c9d8f05c16186d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2bc627bd0db8fbf3606928e8aa4bbd2468a35f76887dfab64c04a1c44e0300f5c2d533d0243a13bb689d22f265327271df1bedb7ff4c2a4ad728bf1670392cf
|
7
|
+
data.tar.gz: d26476e368199e290eb4fc78ffd0d93e763c7bf3e148309ae89be7d75c36edf238d92415fc642fd5e94f6b5edf92faa40467890451507bd035f04a36fa7372df
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
32
|
-
|
33
|
-
|
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
|
-
|
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
|
data/lib/halite/version.rb
CHANGED
data/spec/spec_helper_spec.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2017-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|