diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-02-24 17:32:52 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-02-28 11:19:48 -0800 |
commit | ec52255d450f04055ae3a558043874f8eae97cfa (patch) | |
tree | 1beca070cfee6afc14cd6d5fede16744be01d79f /lib | |
parent | 83ea603889231310af768b0689a677f56d1dd448 (diff) | |
download | chef-ec52255d450f04055ae3a558043874f8eae97cfa.tar.gz |
Chef-13: chef_gem no longer runs at compile time by default
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/application.rb | 9 | ||||
-rw-r--r-- | lib/chef/deprecated.rb | 12 | ||||
-rw-r--r-- | lib/chef/resource/chef_gem.rb | 13 |
3 files changed, 6 insertions, 28 deletions
diff --git a/lib/chef/application.rb b/lib/chef/application.rb index ab19e6571e..86078300c2 100644 --- a/lib/chef/application.rb +++ b/lib/chef/application.rb @@ -1,7 +1,7 @@ # # Author:: AJ Christensen (<aj@chef.io>) # Author:: Mark Mzyk (mmzyk@chef.io) -# Copyright:: Copyright 2008-2016, Chef Software, Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -48,7 +48,6 @@ class Chef configure_chef configure_logging configure_encoding - emit_warnings end # Get this party started @@ -332,12 +331,6 @@ class Chef ENV end - def emit_warnings - if Chef::Config[:chef_gem_compile_time] - Chef.deprecated :chef_gem_compile_time, "setting chef_gem_compile_time to true is deprecated" - end - end - class << self def debug_stacktrace(e) message = "#{e.class}: #{e}\n#{e.backtrace.join("\n")}" diff --git a/lib/chef/deprecated.rb b/lib/chef/deprecated.rb index e5026d2317..25eea5b5ec 100644 --- a/lib/chef/deprecated.rb +++ b/lib/chef/deprecated.rb @@ -1,5 +1,5 @@ #-- -# Copyright:: Copyright 2016 Chef Software, Inc. +# Copyright:: Copyright 2016-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -86,15 +86,7 @@ class Chef end end - class ChefGemCompileTime < Base - def id - 3 - end - - def target - "chef_gem_compile_time.html" - end - end + # id 3 has been deleted class Attributes < Base def id diff --git a/lib/chef/resource/chef_gem.rb b/lib/chef/resource/chef_gem.rb index 5f51c9e208..7025d74e58 100644 --- a/lib/chef/resource/chef_gem.rb +++ b/lib/chef/resource/chef_gem.rb @@ -1,6 +1,6 @@ # # Author:: Bryan McLellan <btm@loftninjas.org> -# Copyright:: Copyright 2012-2016, Chef Software Inc. +# Copyright:: Copyright 2012-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -28,17 +28,10 @@ class Chef callbacks: { "The chef_gem resource is restricted to the current gem environment, use gem_package to install to other environments." => proc { |v| v == "#{RbConfig::CONFIG['bindir']}/gem" }, } - property :compile_time, [ true, false, nil ], default: lazy { Chef::Config[:chef_gem_compile_time] }, desired_state: false + property :compile_time, [ true, false ], default: false, desired_state: false def after_created - # Chef::Resource.run_action: Caveat: this skips Chef::Runner.run_action, where notifications are handled - # Action could be an array of symbols, but probably won't (think install + enable for a package) - if compile_time.nil? - message = "#{self} chef_gem compile_time installation is deprecated. Please set `compile_time false` on the resource to use the new behavior, or set `compile_time true` on the resource if compile_time behavior is required." - Chef.deprecated :chef_gem_compile_time, message - end - - if compile_time || compile_time.nil? + if compile_time Array(action).each do |action| run_action(action) end |