| Conditions | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | 1 | module Textris |
|
| 6 | 1 | def deliver(to) |
|
| 7 | 15 | log :info, "Sent text to #{Phony.format(to)}" |
|
| 8 | 14 | log :debug, "Texter: #{message.texter || 'UnknownTexter'}" + "#" + |
|
| 9 | "#{message.action || 'unknown_action'}" |
||
| 10 | 14 | log :debug, "Date: #{Time.now}" |
|
| 11 | 14 | log :debug, "From: #{message.from || 'unknown'}" |
|
| 12 | 42 | log :debug, "To: #{message.to.map { |i| Phony.format(to) }.join(', ')}" |
|
| 13 | 14 | log :debug, "Content: #{message.content}" |
|
| 14 | 14 | (message.media_urls || []).each_with_index do |media_url, index| |
|
| 15 | 4 | logged_message = index == 0 ? "Media URLs: " : " " |
|
| 16 | 4 | logged_message << media_url |
|
| 17 | 4 | log :debug, logged_message |
|
| 18 | end |
||
| 19 | end |
||
| 20 | |||
| 35 |