halite 1.8.0 → 1.8.1

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: fd168969c0914dcf6682b1245ab25654227a79aa
4
- data.tar.gz: 0b56dedf7b66e2fb3a485d426c9d8f05c16186d0
3
+ metadata.gz: 49aedfb0b8e2389780d6a97f5f523d372e225fae
4
+ data.tar.gz: '0930bf0f08820b2d2e621133952b4879c245e6d8'
5
5
  SHA512:
6
- metadata.gz: e2bc627bd0db8fbf3606928e8aa4bbd2468a35f76887dfab64c04a1c44e0300f5c2d533d0243a13bb689d22f265327271df1bedb7ff4c2a4ad728bf1670392cf
7
- data.tar.gz: d26476e368199e290eb4fc78ffd0d93e763c7bf3e148309ae89be7d75c36edf238d92415fc642fd5e94f6b5edf92faa40467890451507bd035f04a36fa7372df
6
+ metadata.gz: 35b55222efbb56e756a5359999067e97e11a42d0321cb878a1fc7c4f2852c6e406b7728fbebcbec78d0ab24dde0c756cd30cdcc2fa5bb1a51ab8223220c28ab0
7
+ data.tar.gz: 5db26bade528b684f606d7c22989e13a5f386c1745c3296acd5c1f9f4cbd4257008a16e0c73fc5b88ce72b7472ce891541258b3448ddf9fbe382df93d29839f1
@@ -1,21 +1,34 @@
1
1
  sudo: false
2
2
  cache: bundler
3
3
  language: ruby
4
- rvm:
5
- - "2.3.3"
6
- # - "2.4.1"
7
- gemfile:
8
- - gemfiles/chef-12.0.gemfile
9
- - gemfiles/chef-12.1.gemfile
10
- - gemfiles/chef-12.2.gemfile
11
- - gemfiles/chef-12.3.gemfile
12
- - gemfiles/chef-12.4.0.gemfile
13
- - gemfiles/chef-12.4.gemfile
14
- - gemfiles/chef-12.5.gemfile
15
- - gemfiles/chef-12.6.gemfile
16
- - gemfiles/chef-12.7.gemfile
17
- - gemfiles/chef-12.gemfile
18
- - gemfiles/master.gemfile
4
+ matrix:
5
+ include:
6
+ - rvm: 2.3.1
7
+ gemfile: gemfiles/chef-12.gemfile
8
+ - rvm: 2.4.3
9
+ gemfile: gemfiles/chef-13.gemfile
10
+ - rvm: 2.1.4
11
+ gemfile: gemfiles/chef-12.0.gemfile
12
+ - rvm: 2.1.4
13
+ gemfile: gemfiles/chef-12.1.gemfile
14
+ - rvm: 2.1.4
15
+ gemfile: gemfiles/chef-12.2.gemfile
16
+ - rvm: 2.1.4
17
+ gemfile: gemfiles/chef-12.3.gemfile
18
+ - rvm: 2.1.6
19
+ gemfile: gemfiles/chef-12.4.gemfile
20
+ - rvm: 2.1.6
21
+ gemfile: gemfiles/chef-12.4.0.gemfile
22
+ - rvm: 2.1.6
23
+ gemfile: gemfiles/chef-12.5.gemfile
24
+ - rvm: 2.1.6
25
+ gemfile: gemfiles/chef-12.6.gemfile
26
+ - rvm: 2.1.6
27
+ gemfile: gemfiles/chef-12.7.gemfile
28
+ - rvm: 2.4.3
29
+ gemfile: gemfiles/chef-13.7.6.gemfile
30
+ - rvm: 2.5.0
31
+ gemfile: gemfiles/master.gemfile
19
32
  env:
20
33
  global:
21
34
  - USE_SYSTEM_GECODE=true
@@ -29,3 +42,4 @@ before_install:
29
42
  - bundle config --local path ${BUNDLE_PATH:-vendor/bundle}
30
43
  install: bundle update --jobs=3 --retry=3
31
44
  script: bundle exec rake integration
45
+
@@ -1,5 +1,9 @@
1
1
  # Halite Changelog
2
2
 
3
+ ## v1.8.1
4
+
5
+ * Fix compatibility with new Chef API for unregistering resources.
6
+
3
7
  ## v1.8.0
4
8
 
5
9
  * Give recipes created using the block helper (`recipe do ... end`) a name when
data/README.md CHANGED
@@ -77,7 +77,7 @@ optional:
77
77
 
78
78
  ```ruby
79
79
  require 'halite/rake_helper'
80
- Halite::RakeHelper.install_tasks(
80
+ Halite::RakeHelper.install(
81
81
  gem_name: 'name', # Name of the gem to convert
82
82
  base: File.basename(__FILE__), # Base folder for the gem
83
83
  )
@@ -0,0 +1,21 @@
1
+ #
2
+ # Copyright 2015, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../Gemfile', __FILE__)
18
+
19
+ # this tests a very specific node_map edge case that existed only in 13.7.16 in
20
+ # the released gem line and which affected halite.
21
+ gem 'chef', '= 13.7.16'
@@ -0,0 +1,19 @@
1
+ #
2
+ # Copyright 2015, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 13.7'
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
34
34
  spec.require_paths = %w{lib}
35
35
 
36
- spec.add_dependency 'chef', '>= 12.0', '< 14.0'
36
+ spec.add_dependency 'chef', '>= 12.0', '< 15'
37
37
  spec.add_dependency 'stove', '~> 5.0'
38
38
  spec.add_dependency 'bundler' # Used for Bundler.load_gemspec
39
39
  spec.add_dependency 'thor' # Used for Thor::Shell
@@ -247,6 +247,9 @@ module Halite
247
247
  # @param value [Object] Value to remove.
248
248
  # @return [Array<Symbol>]
249
249
  def self.remove_from_node_map(node_map, value)
250
+ # Chef sometime after 13.7.16 supports Chef::NodeMap#delete_class
251
+ return node_map.delete_class(value).keys if node_map.respond_to?(:delete_class)
252
+
250
253
  # Sigh.
251
254
  removed_keys = []
252
255
  # 12.4.1+ switched this to a private accessor and lazy init.
@@ -257,11 +260,14 @@ module Halite
257
260
  end
258
261
  map.each do |key, matchers|
259
262
  matchers.delete_if do |matcher|
263
+ # in 13.7.16 the :value key in the hash was renamed to :klass
264
+ vkey = matcher.key?(:klass) ? :klass : :value
265
+
260
266
  # In 12.4+ this value is an array of classes, before that it is the class.
261
- if matcher[:value].is_a?(Array)
262
- matcher[:value].include?(value)
267
+ if matcher[vkey].is_a?(Array)
268
+ matcher[vkey].include?(value)
263
269
  else
264
- matcher[:value] == value
270
+ matcher[vkey] == value
265
271
  end && removed_keys << key # Track removed keys in a hacky way.
266
272
  end
267
273
  # Clear empty matchers entirely.
@@ -17,5 +17,5 @@
17
17
 
18
18
  module Halite
19
19
  # Halite version.
20
- VERSION = '1.8.0'
20
+ VERSION = '1.8.1'
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.8.0
4
+ version: 1.8.1
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-08-13 00:00:00.000000000 Z
11
+ date: 2018-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '12.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '14.0'
22
+ version: '15'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '12.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '14.0'
32
+ version: '15'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: stove
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -140,6 +140,8 @@ files:
140
140
  - gemfiles/chef-12.6.gemfile
141
141
  - gemfiles/chef-12.7.gemfile
142
142
  - gemfiles/chef-12.gemfile
143
+ - gemfiles/chef-13.7.16.gemfile
144
+ - gemfiles/chef-13.gemfile
143
145
  - gemfiles/master.gemfile
144
146
  - halite.gemspec
145
147
  - lib/berkshelf/halite.rb
@@ -241,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
243
  version: '0'
242
244
  requirements: []
243
245
  rubyforge_project:
244
- rubygems_version: 2.6.11
246
+ rubygems_version: 2.6.13
245
247
  signing_key:
246
248
  specification_version: 4
247
249
  summary: A set of helpers to write Chef cookbooks as Ruby gems.