Module: Mina::Flowdock::Plugin
- Defined in:
- lib/mina/flowdock/plugin.rb
Instance Method Summary collapse
- #erb_string(string, b = binding) ⇒ Object
- #flowdock_message ⇒ Object
- #flowdock_message_subject ⇒ Object
- #git_config ⇒ Object
- #print_local_debug(msg) ⇒ Object
-
#print_local_status(msg) ⇒ Object
Prints a status message.
- #print_notification_debug(flow) ⇒ Object
Instance Method Details
#erb_string(string, b = binding) ⇒ Object
26 27 28 29 30 |
# File 'lib/mina/flowdock/plugin.rb', line 26 def erb_string(string, b = binding) require "erb" erb = ERB.new(string) erb.result b end |
#flowdock_message ⇒ Object
18 19 20 |
# File 'lib/mina/flowdock/plugin.rb', line 18 def erb_string(settings.send :flowdock_message) end |
#flowdock_message_subject ⇒ Object
14 15 16 |
# File 'lib/mina/flowdock/plugin.rb', line 14 def erb_string(settings.send :flowdock_message_subject) end |
#git_config ⇒ Object
22 23 24 |
# File 'lib/mina/flowdock/plugin.rb', line 22 def git_config Grit::Config.new(Grit::Repo.new(".")) end |
#print_local_debug(msg) ⇒ Object
42 43 44 |
# File 'lib/mina/flowdock/plugin.rb', line 42 def print_local_debug(msg) puts " #{color(">>", 32)} #{color(msg, 32)}" end |
#print_local_status(msg) ⇒ Object
Prints a status message. (<-----)
48 49 50 51 |
# File 'lib/mina/flowdock/plugin.rb', line 48 def print_local_status(msg) puts "" if verbose_mode? puts "#{color('<-----', 32)} #{msg}" end |
#print_notification_debug(flow) ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/mina/flowdock/plugin.rb', line 32 def print_notification_debug(flow) flow = "flow: #{flow.api_token} [#{flow.project}]" subj = "subject: #{}" msg = "message: #{}" [flow, subj, msg].each do |debug| print_local_debug(debug) end end |