cheffish 16.0.2 → 16.0.6

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
  SHA256:
3
- metadata.gz: 6c3c4f0101eecf3d58f4c8d0e67f048427e62856c021540eb51d84f1569388e2
4
- data.tar.gz: c2ab2b550d930ff25636fd8766b75aa11fdd27b9b8da7657ed75ecfc9f0de147
3
+ metadata.gz: c9942d4df141be9174914e00fec17d021ed3531e7bca901a8dcdeb581326ee00
4
+ data.tar.gz: 160fee2c6189559aff41eaa0ad32741996cba3ddd29cb69318da36627d00756a
5
5
  SHA512:
6
- metadata.gz: a5c5fba98d56455fdc236dbc535edfb9e7def8f77d4640f2c7b01fbfecf320b033f9d2fc60b4bea7144866e6dc1b3743c8bb7b99a9fbd31c715eb74a6a42fa2b
7
- data.tar.gz: 11461870b40ed6af669b1f688dd119b49cc0ff6bee8e801c0c047facfb598427c691f846530e9dae9b8df282014a66c32c6475ada7ff3efafe7e5a62a05751b0
6
+ metadata.gz: '08babeb42e2eea142a10a25b1ece32ebb9412de0d623ac5629d7b9173db99640c88a2b511c9ff30994d3784efb809c94b04ae954149332cd6c2c7798e7d44024'
7
+ data.tar.gz: cd0400c6de976a6aaf9b64eea00d2f5114edd53c69474192b89e514e3c0bedb40b02a2bd8ba564ff3047da8002b20c3bc260ae6f115159b8b808dc5a1d2bcf92
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  group :development do
6
- gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "master"
6
+ gem "chefstyle", "1.2.0"
7
7
  gem "rake"
8
8
  gem "rspec", "~> 3.0"
9
9
  end
@@ -14,8 +14,8 @@ if ENV["GEMFILE_MOD"]
14
14
  instance_eval(ENV["GEMFILE_MOD"])
15
15
  else
16
16
  group :development do
17
- gem "chef", "~> 15"
18
- gem "ohai", "~> 15"
17
+ gem "chef", "~> 16"
18
+ gem "ohai", "~> 16"
19
19
  end
20
20
  end
21
21
 
@@ -112,7 +112,7 @@ class Chef
112
112
  end
113
113
 
114
114
  # Determine if data bag is encrypted and if so, what its version is
115
- _first_real_key, first_real_value = (current_resource.raw_data || {}).select { |key, value| key != "id" && !value.nil? }.first
115
+ _first_real_key, first_real_value = (current_resource.raw_data || {}).find { |key, value| key != "id" && !value.nil? }
116
116
  if first_real_value
117
117
  if first_real_value.is_a?(Hash) &&
118
118
  first_real_value["version"].is_a?(Integer) &&
@@ -165,7 +165,7 @@ class Chef
165
165
  end
166
166
 
167
167
  def repo_mode
168
- new_resource.chef_server[:chef_server_url] =~ %r{/organizations/} ? "hosted_everything" : "everything"
168
+ %r{/organizations/}.match?(new_resource.chef_server[:chef_server_url]) ? "hosted_everything" : "everything"
169
169
  end
170
170
 
171
171
  def options
@@ -80,12 +80,11 @@ module Cheffish
80
80
  # add_resource() method.
81
81
  def self.build_resource(type, name, created_at = nil, &resource_attrs_block)
82
82
  created_at ||= caller[0]
83
- result = BasicChefClient.new.tap do |client|
83
+ BasicChefClient.new.tap do |client|
84
84
  client.with_chef_config do
85
85
  client.build_resource(type, name, created_at, &resource_attrs_block)
86
86
  end
87
87
  end
88
- result
89
88
  end
90
89
 
91
90
  def self.inline_resource(provider, provider_action, *resources, &block)
@@ -1,3 +1,3 @@
1
1
  module Cheffish
2
- VERSION = "16.0.2".freeze
2
+ VERSION = "16.0.6".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheffish
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.0.2
4
+ version: 16.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-01 00:00:00.000000000 Z
11
+ date: 2020-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-zero