compat_resource 12.5.25 → 12.5.26

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: e5dfb347c43cb92ce7d991d612a9f16618745b64
4
- data.tar.gz: 2d06d99a83ba561c9fcadff17337efe3cd7ba02f
3
+ metadata.gz: ea7089f93018397f0b5c46a78d8dc7003bd78941
4
+ data.tar.gz: ba7c3dd73c1f86be86475a737d8a9fdb0946e9ee
5
5
  SHA512:
6
- metadata.gz: 9d0cdfe5d8e82073a7b37672b976c98746b235cf691faacdfd5cb098e5e3578850efa0e1f6c30f49ffec3039d15f69b5eb2764dbe139573f25ecc538e834ef22
7
- data.tar.gz: b5ed330998b09e77a3bb0f2d5004fc10411ece0d25e4fc6647f696e240b6ed908c1ed468631be5476716b320bfc42bec87be76d6419b8ba91d5acc41eb1c222f
6
+ metadata.gz: 52a459b48397a9d3e942aa4d1f9680aff68a655026c402a85edcc14deb85791659871cc143fdeed83df47f7c86b2c77a6150fdaf57aa23b8fd15c9c98f8e708e
7
+ data.tar.gz: 349fc6e3b360941539629a8f5b2252dc2e64addebe0ee9c8f6fa86f5649b84077d8baaf095d380450d6a91e6f71294fb494ed7ccff75045d56062cacac7e790b
data/Rakefile CHANGED
@@ -25,7 +25,6 @@ CHEF_FILES = %w(
25
25
  chef/resource
26
26
  chef/resource_builder
27
27
  chef/resource/action_class
28
- chef/log
29
28
  )
30
29
  SPEC_FILES = %w(
31
30
  unit/mixin/properties_spec.rb
@@ -21,7 +21,6 @@ module CopiedFromChef
21
21
  #
22
22
 
23
23
  require 'chef_compat/copied_from_chef/chef/delayed_evaluator'
24
- require 'chef_compat/copied_from_chef/chef/log'
25
24
 
26
25
  class Chef < (defined?(::Chef) ? ::Chef : Object)
27
26
  #
@@ -152,7 +152,6 @@ super if defined?(::Chef::ResourceBuilder)
152
152
  end
153
153
 
154
154
  require 'chef_compat/copied_from_chef/chef/resource'
155
- require 'chef_compat/copied_from_chef/chef/log'
156
155
  end
157
156
  end
158
157
  end
@@ -1,4 +1,5 @@
1
1
  require 'chef_compat/monkeypatches/chef'
2
+ require 'chef_compat/monkeypatches/chef/log'
2
3
  require 'chef_compat/monkeypatches/chef/recipe'
3
4
  require 'chef_compat/monkeypatches/chef/resource'
4
5
  require 'chef_compat/monkeypatches/chef/provider'
@@ -0,0 +1,22 @@
1
+ require 'chef/log'
2
+
3
+ module ChefCompat
4
+ module Monkeypatches
5
+ module Log
6
+ def caller_location
7
+ # Pick the first caller that is *not* part of the Chef gem, that's the
8
+ # thing the user wrote.
9
+ @compat_resource_filter_paths ||=
10
+ Gem.loaded_specs['chef'].require_paths.map { |p| File.join(Gem.loaded_specs['chef'].full_gem_path, p) } +
11
+ Gem.loaded_specs['compat_resource'].require_paths.map { |p| File.join(Gem.loaded_specs['compat_resource'].full_gem_path, p) }
12
+ puts caller.select { |c| !@compat_resource_filter_paths.any? { |path| c.start_with?(path) } }
13
+
14
+ caller.select { |c| !@compat_resource_filter_paths.any? { |path| c.start_with?(path) } }.first
15
+ end
16
+ end
17
+ end
18
+ end
19
+
20
+ class<<::Chef::Log
21
+ prepend ChefCompat::Monkeypatches::Log
22
+ end
@@ -1,3 +1,3 @@
1
1
  module CompatResource
2
- VERSION = '12.5.25'
2
+ VERSION = '12.5.26'
3
3
  end
@@ -1,9 +1,10 @@
1
- GEM
1
+ GIT
2
+ remote: git://github.com/chef/chef.git
3
+ revision: 5f51f93f71cdee3ed598b38cecd8f5fa1a585f49
2
4
  specs:
3
- builder (3.2.2)
4
- chef (12.4.3)
5
- chef-config (= 12.4.3)
6
- chef-zero (~> 4.2, >= 4.2.2, < 4.3.0)
5
+ chef (12.6.0)
6
+ chef-config (= 12.6.0)
7
+ chef-zero (~> 4.4.0, >= 4.2.2)
7
8
  diff-lcs (~> 1.2, >= 1.2.4)
8
9
  erubis (~> 2.7)
9
10
  ffi-yajl (~> 2.2)
@@ -11,25 +12,30 @@ GEM
11
12
  mixlib-authentication (~> 1.3)
12
13
  mixlib-cli (~> 1.4)
13
14
  mixlib-log (~> 1.3)
14
- mixlib-shellout (>= 2.0.0.rc.0, < 2.2)
15
+ mixlib-shellout (~> 2.0)
15
16
  net-ssh (~> 2.6)
16
17
  net-ssh-multi (~> 1.1)
17
- ohai (~> 8.0, < 8.6)
18
+ ohai (>= 8.6.0.alpha.1, < 9)
18
19
  plist (~> 3.1.0)
20
+ proxifier (~> 1.0)
19
21
  pry (~> 0.9)
20
- rspec-core (~> 3.2)
21
- rspec-expectations (~> 3.2)
22
- rspec-mocks (~> 3.2)
22
+ rspec-core (~> 3.4)
23
+ rspec-expectations (~> 3.4)
24
+ rspec-mocks (~> 3.4)
23
25
  rspec_junit_formatter (~> 0.2.0)
24
26
  serverspec (~> 2.7)
25
27
  specinfra (~> 2.10)
26
28
  syslog-logger (~> 1.6)
27
- chef-config (12.4.3)
29
+ chef-config (12.6.0)
28
30
  mixlib-config (~> 2.0)
29
31
  mixlib-shellout (~> 2.0)
30
- chef-zero (4.2.3)
31
- ffi-yajl (>= 1.1, < 3.0)
32
- hashie (~> 2.0)
32
+
33
+ GEM
34
+ specs:
35
+ builder (3.2.2)
36
+ chef-zero (4.4.0)
37
+ ffi-yajl (~> 2.2)
38
+ hashie (>= 2.0, < 4.0)
33
39
  mixlib-log (~> 1.3)
34
40
  rack
35
41
  uuidtools (~> 2.1)
@@ -39,18 +45,17 @@ GEM
39
45
  ffi (1.9.10)
40
46
  ffi-yajl (2.2.2)
41
47
  libyajl2 (~> 1.2)
42
- hashie (2.1.2)
48
+ hashie (3.4.3)
43
49
  highline (1.7.8)
44
50
  ipaddress (0.8.0)
45
51
  libyajl2 (1.2.0)
46
52
  method_source (0.8.2)
47
- mime-types (2.99)
48
53
  mixlib-authentication (1.3.0)
49
54
  mixlib-log
50
55
  mixlib-cli (1.5.0)
51
56
  mixlib-config (2.2.1)
52
57
  mixlib-log (1.6.0)
53
- mixlib-shellout (2.1.0)
58
+ mixlib-shellout (2.2.5)
54
59
  multi_json (1.11.2)
55
60
  net-scp (1.2.1)
56
61
  net-ssh (>= 2.6.5)
@@ -61,11 +66,11 @@ GEM
61
66
  net-ssh (>= 2.6.5)
62
67
  net-ssh-gateway (>= 1.2.0)
63
68
  net-telnet (0.1.1)
64
- ohai (8.5.1)
69
+ ohai (8.8.1)
70
+ chef-config (>= 12.5.0.alpha.1, < 13)
65
71
  ffi (~> 1.9)
66
72
  ffi-yajl (~> 2.2)
67
73
  ipaddress
68
- mime-types (~> 2.0)
69
74
  mixlib-cli
70
75
  mixlib-config (~> 2.0)
71
76
  mixlib-log
@@ -74,6 +79,7 @@ GEM
74
79
  systemu (~> 2.6.4)
75
80
  wmi-lite (~> 1.0)
76
81
  plist (3.1.0)
82
+ proxifier (1.0.3)
77
83
  pry (0.10.3)
78
84
  coderay (~> 1.1.0)
79
85
  method_source (~> 0.8.1)
@@ -120,7 +126,7 @@ PLATFORMS
120
126
  ruby
121
127
 
122
128
  DEPENDENCIES
123
- chef (~> 12.4.0)
129
+ chef!
124
130
 
125
131
  BUNDLED WITH
126
132
  1.10.6
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.25
4
+ version: 12.5.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
@@ -96,7 +96,6 @@ 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
100
99
  - files/lib/chef_compat/copied_from_chef/chef/mixin/params_validate.rb
101
100
  - files/lib/chef_compat/copied_from_chef/chef/mixin/properties.rb
102
101
  - files/lib/chef_compat/copied_from_chef/chef/property.rb
@@ -108,6 +107,7 @@ files:
108
107
  - files/lib/chef_compat/monkeypatches.rb
109
108
  - files/lib/chef_compat/monkeypatches/chef.rb
110
109
  - files/lib/chef_compat/monkeypatches/chef/exceptions.rb
110
+ - files/lib/chef_compat/monkeypatches/chef/log.rb
111
111
  - files/lib/chef_compat/monkeypatches/chef/provider.rb
112
112
  - files/lib/chef_compat/monkeypatches/chef/recipe.rb
113
113
  - files/lib/chef_compat/monkeypatches/chef/resource.rb
@@ -1,69 +0,0 @@
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