compat_resource 12.5.21 → 12.5.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -0
- data/files/lib/chef_compat/copied_from_chef/chef/log.rb +69 -0
- data/files/lib/chef_compat/copied_from_chef/chef/property.rb +1 -0
- data/files/lib/chef_compat/copied_from_chef/chef/resource_builder.rb +1 -0
- data/files/lib/compat_resource/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56f5605c8ca73b413ec75b669cf3549c4de2f505
|
4
|
+
data.tar.gz: f921bee4348789f9273c7f2b957e6ecd2f27e0d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed1175035f86084a16308023862e78a0fb629e69658a535a00eca05655e46b70c4057af23eb22f2131f75ac7ef46a4fccfde1eb080b09a6debbb217207898ad0
|
7
|
+
data.tar.gz: 436e9ccc5fedd5f05c6968f7f8b16b0e335fc85fbc4408bcc6348b15d8d85fa264d13ac2360ba596a58271c84b370b884b4062ebce13c737df9be7e9006f0864
|
data/Rakefile
CHANGED
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'chef_compat/copied_from_chef'
|
2
|
+
class Chef
|
3
|
+
module ::ChefCompat
|
4
|
+
module CopiedFromChef
|
5
|
+
#
|
6
|
+
# Author:: Adam Jacob (<adam@opscode.com>)
|
7
|
+
# Author:: AJ Christensen (<@aj@opscode.com>)
|
8
|
+
# Author:: Christopher Brown (<cb@opscode.com>)
|
9
|
+
# Copyright:: Copyright (c) 2008 Opscode, Inc.
|
10
|
+
# License:: Apache License, Version 2.0
|
11
|
+
#
|
12
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
13
|
+
# you may not use this file except in compliance with the License.
|
14
|
+
# You may obtain a copy of the License at
|
15
|
+
#
|
16
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
17
|
+
#
|
18
|
+
# Unless required by applicable law or agreed to in writing, software
|
19
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
20
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
21
|
+
# See the License for the specific language governing permissions and
|
22
|
+
# limitations under the License.
|
23
|
+
|
24
|
+
|
25
|
+
class Chef < (defined?(::Chef) ? ::Chef : Object)
|
26
|
+
class Log < (defined?(::Chef::Log) ? ::Chef::Log : Object)
|
27
|
+
extend Mixlib::Log
|
28
|
+
|
29
|
+
# Force initialization of the primary log device (@logger)
|
30
|
+
init(MonoLogger.new(STDOUT))
|
31
|
+
|
32
|
+
class Formatter < (defined?(::Chef::Log::Formatter) ? ::Chef::Log::Formatter : Object)
|
33
|
+
def self.show_time=(*args)
|
34
|
+
Mixlib::Log::Formatter.show_time = *args
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Get the location of the caller (from the recipe). Grabs the first caller
|
40
|
+
# that is *not* in the chef gem proper (allowing us to weed out internal
|
41
|
+
# calls and give the user a more useful perspective).
|
42
|
+
#
|
43
|
+
# @return [String] The location of the caller (file:line#) from caller(0..20), or nil if no non-chef caller is found.
|
44
|
+
#
|
45
|
+
def self.caller_location
|
46
|
+
# Pick the first caller that is *not* part of the Chef gem, that's the
|
47
|
+
# thing the user wrote.
|
48
|
+
chef_gem_path = File.expand_path("../..", __FILE__)
|
49
|
+
caller(0..20).select { |c| !c.start_with?(chef_gem_path) }.first
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.deprecation(msg=nil, location=caller(2..2)[0], &block)
|
53
|
+
if msg
|
54
|
+
msg << " at #{Array(location).join("\n")}"
|
55
|
+
msg = msg.join("") if msg.respond_to?(:join)
|
56
|
+
end
|
57
|
+
if Chef::Config[:treat_deprecation_warnings_as_errors]
|
58
|
+
error(msg, &block)
|
59
|
+
raise Chef::Exceptions::DeprecatedFeatureError.new(msg)
|
60
|
+
else
|
61
|
+
warn(msg, &block)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compat_resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.5.
|
4
|
+
version: 12.5.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Keiser
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- files/lib/chef_compat/copied_from_chef/chef/delayed_evaluator.rb
|
97
97
|
- files/lib/chef_compat/copied_from_chef/chef/dsl/declare_resource.rb
|
98
98
|
- files/lib/chef_compat/copied_from_chef/chef/dsl/recipe.rb
|
99
|
+
- files/lib/chef_compat/copied_from_chef/chef/log.rb
|
99
100
|
- files/lib/chef_compat/copied_from_chef/chef/mixin/params_validate.rb
|
100
101
|
- files/lib/chef_compat/copied_from_chef/chef/mixin/properties.rb
|
101
102
|
- files/lib/chef_compat/copied_from_chef/chef/property.rb
|