diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-04-07 12:38:26 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-04-07 12:38:26 -0700 |
commit | b88f264e815f8a4f890eb0103d017fa7b40679ae (patch) | |
tree | 26274f9e75f2969aa91d50c68dc831bdc9f97ef1 /lib/chef/cookbook | |
parent | fcbfe72f1178d308aef2a48cbcc55167f06f198e (diff) | |
download | chef-b88f264e815f8a4f890eb0103d017fa7b40679ae.tar.gz |
remove now-unused code
Diffstat (limited to 'lib/chef/cookbook')
-rw-r--r-- | lib/chef/cookbook/gem_installer.rb | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/lib/chef/cookbook/gem_installer.rb b/lib/chef/cookbook/gem_installer.rb index 6957dc1077..4b41951fe4 100644 --- a/lib/chef/cookbook/gem_installer.rb +++ b/lib/chef/cookbook/gem_installer.rb @@ -66,60 +66,6 @@ class Chef events.cookbook_gem_finished end - - # Bundler::UI object so that we can intercept and log the output - # of the in-memory bundle install that we are going to do. - # - class ChefBundlerUI < Bundler::UI::Silent - attr_accessor :events - - def initialize(events) - @events = events - super() - end - - def confirm(msg, newline = nil) - # looks like "Installing time_ago_in_words 0.1.1" when installing - if msg =~ /Installing\s+(\S+)\s+(\S+)/ - events.cookbook_gem_installing($1, $2) - end - Chef::Log.info(msg) - end - - def error(msg, newline = nil) - Chef::Log.error(msg) - end - - def debug(msg, newline = nil) - Chef::Log.debug(msg) - end - - def info(msg, newline = nil) - # looks like "Using time_ago_in_words 0.1.1" when using, plus other misc output - if msg =~ /Using\s+(\S+)\s+(\S+)/ - events.cookbook_gem_using($1, $2) - end - Chef::Log.info(msg) - end - - def warn(msg, newline = nil) - Chef::Log.warn(msg) - end - end - - private - - # Helper to handle older bundler versions that do not support injecting the UI - # object. On older bundler versions, we work, but you get no output other than - # on STDOUT. - # - def inline_gemfile(&block) - # requires https://github.com/bundler/bundler/pull/4245 - gemfile(true, ui: ChefBundlerUI.new(events), &block) - rescue ArgumentError # Method#arity doesn't inspect optional arguments, so we rescue - # requires bundler 1.10.0 - gemfile(true, &block) - end end end end |