Permalink
Browse files

Right-align comment amounts in subreddit tallies

I think this looks a little bit better.
  • Loading branch information...
mdippery committed Dec 27, 2012
1 parent 2dc313c commit 036cb4c5fe469e6c0cfc3b2cd8d7fd8b388e433c
Showing with 15 additions and 15 deletions.
  1. +13 −13 features/browse.feature
  2. +1 −1 lib/usaidwat/application.rb
  3. +1 −1 lib/usaidwat/version.rb
View
@@ -40,19 +40,19 @@ Feature: Browse comments
When I run `usaidwat -t mipadi`
Then it should pass with:
"""
- apple 6
- AskReddit 61
- battlefield3 2
- books 2
- django 1
- Games 1
- nyc 1
- personalfinance 1
- photography 1
- programming 20
- redditcasual 1
- wikipedia 1
- worldnews 2
+ apple 6
+ AskReddit 61
+ battlefield3 2
+ books 2
+ django 1
+ Games 1
+ nyc 1
+ personalfinance 1
+ photography 1
+ programming 20
+ redditcasual 1
+ wikipedia 1
+ worldnews 2
"""
Scenario: Tally comments when user has no comments
@@ -58,7 +58,7 @@ def tally_comments
subreddits = buckets.keys.sort { |a,b| a.downcase <=> b.downcase }
subreddits.each do |subreddit|
tally = buckets[subreddit]
- printf "%-*s %s\n", longest_subreddit, subreddit, tally
+ printf "%-*s %3d\n", longest_subreddit, subreddit, tally
end
exit 0
end
View
@@ -1,3 +1,3 @@
module USaidWat
- VERSION = "0.1.3"
+ VERSION = "0.1.4dev"
end

0 comments on commit 036cb4c

Please sign in to comment.