stars 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -11,34 +11,41 @@ So anyway, I spend a lot of time on the command line, and switching over to the
11
11
 
12
12
  Install with `gem install stars`, then do a quick `stars`, fill in your Twitter username, and let it do its sultry magic. This is me lately:
13
13
 
14
- +-------+-------------+--------------------------------------------------------+
15
- | Stars | Time | Your Funnies |
16
- +-------+-------------+--------------------------------------------------------+
17
- | * | 10 days ago | "Any Flash developers I meet I try to arrange their... |
18
- | * * | 10 days ago | Why doesn't digg do fulltext RSS feeds on their dev... |
19
- | * | 10 days ago | I can't wait until the US relaxes its patent system... |
20
- | * | 9 days ago | If this happens to be Twitter's 10,000,000,000th tw... |
21
- | * | 8 days ago | Are any of you ladies from my dreams? No really, i... |
22
- | * * | 7 days ago | I have a severe sore throat. Or, if I said that ou... |
23
- | * * | 7 days ago | Way too many Scientology ads on Muni buses. It wor... |
24
- | * | 7 days ago | Napping didn't fix this cold; I feel a bit worse. M... |
25
- | * | 6 days ago | God I leave the room for one minute and the girls o... |
26
- | * | 6 days ago | Man, Avatar really fucked Up. |
27
- | * | 5 days ago | I'd play out here, but the west coast is all about ... |
28
- | * | 5 days ago | I just want to know who moved my Maps app to my iPh... |
29
- | * | 5 days ago | just about finished my thesis on generating free en... |
30
- | * * | 3 days ago | You change your Facebook pic, that syncs to my iPho... |
31
- | * | 2 days ago | Going to totally refork and rework my dotfiles soon... |
32
- | * | 2 days ago | Oh hey, a year or so of my beer consumption: http:/... |
33
- | * | 1 day ago | In another life I want to be a pop star heartthrob ... |
34
- | * * | 1 day ago | I pre-ordered an iPad, checked into lunch, and now ... |
35
- +-------+-------------+--------------------------------------------------------+
14
+ +---------+-------------+--------------------------------------------------------+
15
+ | Stars | Time | Your Funnies |
16
+ +---------+-------------+--------------------------------------------------------+
17
+ | * * | 11 days ago | I have a severe sore throat. Or, if I said that ou... |
18
+ | * * | 11 days ago | Way too many Scientology ads on Muni buses. It wor... |
19
+ | * | 11 days ago | Napping didn't fix this cold; I feel a bit worse. M... |
20
+ | * | 10 days ago | God I leave the room for one minute and the girls o... |
21
+ | * | 10 days ago | Man, Avatar really fucked Up. |
22
+ | * | 9 days ago | I'd play out here, but the west coast is all about ... |
23
+ | * | 9 days ago | I just want to know who moved my Maps app to my iPh... |
24
+ | * * | 9 days ago | just about finished my thesis on generating free en... |
25
+ | * * * | 7 days ago | You change your Facebook pic, that syncs to my iPho... |
26
+ | * | 6 days ago | Going to totally refork and rework my dotfiles soon... |
27
+ | * | 6 days ago | Oh hey, a year or so of my beer consumption: http:/... |
28
+ | * * | 5 days ago | In another life I want to be a pop star heartthrob ... |
29
+ | * * * | 5 days ago | I pre-ordered an iPad, checked into lunch, and now ... |
30
+ | * * * * | 3 days ago | I wouldn't say I'm "saving daylight" as much as I'm... |
31
+ | * x 13 | 3 days ago | So for the seven of us that are both nerdy *and* va... |
32
+ | * * * | 2 days ago | Just got my third free replacement earbuds from the... |
33
+ | * | 2 days ago | Oh, they're doing a MacGruber movie. This makes sen... |
34
+ | * | 2 days ago | At the MySQL + Rails combined meetup. I don't want ... |
35
+ +---------+-------------+--------------------------------------------------------+
36
36
 
37
37
  You can tell from the relative dearth of stars that I'm in my *screw followers I'm important so here's what I had for lunch* phase. Don't worry; I'll become a star whore again and tweet pop culture references in relation to presidential penile size soon enough.
38
38
 
39
+ You can also specify which user you want to run the query against by passing it in as your one argument. This value is saved for he future, too. For example:
40
+
41
+ stars holman # generates @holman's stars
42
+ stars # generates @holman's stars
43
+ stars goodtutorials # generates @goodtutorials' stars
44
+ stars # generates @goodtutorials' stars
45
+
39
46
  ## state of affairs
40
47
 
41
- This was a one-night hack thing; ideally it'd be cool to allow some username switching, maybe retain some "this was read" state, and improve the formatting (if only "★" worked better in a fixed-width environment, AMIRITE?). All in due time. I mean, for you to fork and do it yourself, I mean.
48
+ This was a one-night hack thing; ideally it'd be cool to maybe retain some "this was read" state, and improve the formatting (if only "★" worked better in a fixed-width environment, AMIRITE?). All in due time. I mean, for you to fork and do it yourself, I mean.
42
49
 
43
50
  ## who
44
51
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/bin/stars CHANGED
@@ -6,4 +6,5 @@ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
6
6
 
7
7
  require 'stars'
8
8
 
9
- Stars::Client.load!
9
+ username = ARGV ? ARGV[0] : nil
10
+ Stars::Client.load!(username)
data/lib/stars/client.rb CHANGED
@@ -1,8 +1,10 @@
1
1
  module Stars
2
2
  class Client
3
3
 
4
- def self.load!
4
+ def self.load!(new_username=nil)
5
+ remember_username(new_username) if new_username
5
6
  favstar = Stars::Favstar.new(username)
7
+ puts "\n ★ by @#{username}"
6
8
  puts Stars::Formatter.new(favstar.recent)
7
9
  end
8
10
 
data/stars.gemspec CHANGED
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{stars}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Zach Holman"]
12
- s.date = %q{2010-03-14}
12
+ s.date = %q{2010-03-18}
13
13
  s.default_executable = %q{stars}
14
14
  s.description = %q{Recent favstar faves on your command line.}
15
15
  s.email = %q{github.com@zachholman.com}
data/test/test_client.rb CHANGED
@@ -2,10 +2,16 @@ require 'helper'
2
2
 
3
3
  class TestClient < Test::Unit::TestCase
4
4
 
5
- def test_load
5
+ def test_load_with_username
6
6
  mock(Stars::Formatter).new.with_any_args
7
- mock(Stars::Client).puts.with_any_args
8
- Stars::Client.load!
7
+ mock(Stars::Client).puts.times(any_times).with_any_args
8
+ Stars::Client.load!('holman')
9
+ end
10
+
11
+ def test_load_without_username
12
+ mock(Stars::Formatter).new.with_any_args
13
+ mock(Stars::Client).puts.times(any_times).with_any_args
14
+ Stars::Client.load!(nil)
9
15
  end
10
16
 
11
17
  def test_username_when_exists
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Zach Holman
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-14 00:00:00 -08:00
17
+ date: 2010-03-18 00:00:00 -07:00
18
18
  default_executable: stars
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency