Skip to content

Instantly share code, notes, and snippets.

@no6v
Created March 25, 2011 03:49
Show Gist options
  • Save no6v/886335 to your computer and use it in GitHub Desktop.
Save no6v/886335 to your computer and use it in GitHub Desktop.
From 32aa94f5636cea4d35ee833d8c3e331303721eb7 Mon Sep 17 00:00:00 2001
From: Nobuhiro IMAI <[email protected]>
Date: Thu, 24 Mar 2011 23:12:10 +0900
Subject: [PATCH] show "[P]" as protected mark
---
lib/earthquake/output.rb | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lib/earthquake/output.rb b/lib/earthquake/output.rb
index 7369470..3d57cb7 100644
--- a/lib/earthquake/output.rb
+++ b/lib/earthquake/output.rb
@@ -99,12 +99,13 @@ module Earthquake
end
mark = item["mark"] || ""
+ protected = item["user"]["protected"] ? "[P]" : ""
status = [
"#{mark}" + "#{statuses.join(" ")}".c(90),
"#{item["user"]["screen_name"].c(user_color)}:",
"#{text}",
- "#{misc} #{source}".c(90)
+ "#{misc} #{source}#{protected}".c(90)
].join(" ")
puts status
end
--
1.7.4.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment