aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/cli/common.rb
diff options
context:
space:
mode:
authorJason King <jk@handle.it>2016-12-07 16:29:12 -0700
committerJason King <jk@handle.it>2016-12-08 12:43:37 -0700
commit9c35eaedb633be92e41ec566beb323bf6a3b0482 (patch)
treef5b1f4f222ee450f7297214f1c9ac1e250ff4a4a /lib/bundler/cli/common.rb
parent1f10c7f07fdbe5b664272d54657b5687bc881810 (diff)
downloadbundler-9c35eaedb633be92e41ec566beb323bf6a3b0482.tar.gz
DRY up some duplication between install and update
Diffstat (limited to 'lib/bundler/cli/common.rb')
-rw-r--r--lib/bundler/cli/common.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index 40a429ba..c1e108d7 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -1,6 +1,23 @@
# frozen_string_literal: true
module Bundler
module CLI::Common
+ def self.output_post_install_messages(messages)
+ return if Bundler.settings["ignore_messages"]
+ messages.to_a.each do |name, msg|
+ print_post_install_message(name, msg) unless Bundler.settings["ignore_messages.#{name}"]
+ end
+ end
+
+ def self.print_post_install_message(name, msg)
+ Bundler.ui.confirm "Post-install message from #{name}:"
+ Bundler.ui.info msg
+ end
+
+ def self.output_without_groups_message
+ return unless Bundler.settings.without.any?
+ Bundler.ui.confirm without_groups_message
+ end
+
def self.without_groups_message
groups = Bundler.settings.without
group_list = [groups[0...-1].join(", "), groups[-1..-1]].