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.
Files changed (2) hide show
  1. data/bin/twitterlost +6 -4
  2. metadata +1 -1
@@ -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
- puts lost_followers.map { |u| "LOST: #{u}" }
44
- puts new_followers.map { |u| "NEW: #{u}" }
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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbrady-twitterlost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Brady