Module: BundleOnly::Messages::Common
- Defined in:
- lib/bundle-only/messages.rb
Class Method Summary collapse
- .output_post_install_messages(messages) ⇒ Object
- .output_without_groups_message(command) ⇒ Object
- .print_post_install_message(name, msg) ⇒ Object
- .without_groups_message(command) ⇒ Object
Class Method Details
.output_post_install_messages(messages) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/bundle-only/messages.rb', line 26 def self.() return if Bundler.settings['ignore_messages'] .to_a.each do |name, msg| (name, msg) unless Bundler.settings["ignore_messages.#{name}"] end end |
.output_without_groups_message(command) ⇒ Object
39 40 41 42 43 |
# File 'lib/bundle-only/messages.rb', line 39 def self.(command) return if Bundler.settings[:without].empty? Bundler.ui.confirm (command) end |
.print_post_install_message(name, msg) ⇒ Object
34 35 36 37 |
# File 'lib/bundle-only/messages.rb', line 34 def self.(name, msg) Bundler.ui.confirm "Post-install message from #{name}:" Bundler.ui.info msg end |
.without_groups_message(command) ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/bundle-only/messages.rb', line 45 def self.(command) command_in_past_tense = command == :install ? 'installed' : 'updated' groups = Bundler.settings[:without] group_list = [groups[0...-1].join(', '), groups[-1..-1]] .reject { |s| s.to_s.empty? }.join(' and ') group_str = groups.size == 1 ? 'group' : 'groups' "Gems in the #{group_str} #{group_list} were not #{command_in_past_tense}." end |