dbrady-twitterlost 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/twitterlost +6 -4
- metadata +1 -1
data/bin/twitterlost
CHANGED
@@ -40,11 +40,13 @@ if File.exists?(yaml_file)
|
|
40
40
|
|
41
41
|
puts "You have #{followers.size} followers. Since the last time this program was run you lost #{lost_followers.size} followers and gained #{new_followers.size} new ones."
|
42
42
|
|
43
|
-
|
44
|
-
|
43
|
+
longest_lost, longest_new = lost_followers.map { |u| u.size }.max, new_followers.map { |u| u.size }.max
|
44
|
+
|
45
|
+
puts lost_followers.map { |u| "LOST: %-#{longest_lost}s http://twitter.com/#{u}" % u}
|
46
|
+
puts new_followers.map { |u| "NEW: %-#{longest_new}s http://twitter.com/#{u}" % u}
|
45
47
|
|
46
|
-
File.new(File.join(base_dir, "followers.txt"), "w").puts followers
|
47
|
-
File.new(File.join(base_dir, "lost.txt"), "a").puts lost_followers if lost_followers.any?
|
48
|
+
File.new(File.join(base_dir, "followers.txt"), "w").puts followers.map {|f| "#{f}"}
|
49
|
+
File.new(File.join(base_dir, "lost.txt"), "a").puts lost_followers.map {|f| "#{f}"} if lost_followers.any?
|
48
50
|
else
|
49
51
|
puts <<HELP
|
50
52
|
Welcome to Twitterlost! I cannot find your twitter.yml file.
|