Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use new thor say API, which supports :bold

  • Loading branch information...
commit aee9b03b8b10bc67afb2f59cc1a87fd336e15efa 1 parent c037e12
@sferik authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  lib/t/printable.rb
  2. +1 −1  lib/t/search.rb
  3. +1 −1  lib/t/stream.rb
View
2  lib/t/printable.rb
@@ -116,7 +116,7 @@ def print_lists(lists)
def print_status(status)
if STDOUT.tty? && !options['no-color']
- say(" #{Thor::Shell::Color::BOLD}@#{status.user.screen_name}", :yellow)
+ say(" @#{status.user.screen_name}", [:bold, :yellow])
print_wrapped(HTMLEntities.new.decode(status.text), :indent => 3)
else
say(" @#{status.user.screen_name}")
View
2  lib/t/search.rb
@@ -56,7 +56,7 @@ def all(query)
say unless statuses.empty?
statuses.each do |status|
if STDOUT.tty? && !options['no-color']
- say(" #{Thor::Shell::Color::BOLD}@#{status.from_user}", :yellow)
+ say(" @#{status.from_user}", [:bold, :yellow])
print_wrapped(HTMLEntities.new.decode(status.text), :indent => 3)
else
say(" @#{status.from_user}")
View
2  lib/t/stream.rb
@@ -37,7 +37,7 @@ def all
desc "matrix", "Unfortunately, no one can be told what the Matrix is. You have to see it for yourself."
def matrix
client.on_timeline_status do |status|
- print("#{Thor::Shell::Color::BOLD}#{Thor::Shell::Color::GREEN}#{Thor::Shell::Color::ON_BLACK}#{status.text.gsub("\n", '')}#{Thor::Shell::Color::CLEAR}")
+ say(status.text.gsub("\n", ''), [:bold, :green, :on_black])
end
Signal.trap("TERM") do
client.stop
Please sign in to comment.
Something went wrong with that request. Please try again.