twat 0.3.4 → 0.3.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 (4) hide show
  1. data/README +20 -3
  2. data/lib/twat.rb +1 -1
  3. data/lib/twat/actions.rb +7 -3
  4. metadata +6 -6
data/README CHANGED
@@ -1,8 +1,25 @@
1
1
  = Twat
2
2
 
3
- Twat is a barebones cli interface to twitter, to let me tweet from my shell,
4
- where I do nearly everything. If it's useful to one person other than me then
5
- it's far exceeded my expectations.
3
+ Like twitter? Hate GUIs? twat might be for you.
4
+
5
+ in it's simplest form, twat is a tweeting thing. I wrote it so I could
6
+ tweet from my hacktop at a conference.
7
+
8
+ twat tweet goes here.
9
+
10
+ simple. You'll need to hide metacharacters from your shell though. It
11
+ can also do other neat things:
12
+
13
+ twat -l [count]
14
+
15
+ will get you 10 (or count) items from your news feed. You can have
16
+ multiple accounts to specify with -n [account]. You can add more (-a).
17
+ You can delete them.
18
+
19
+ You can even stalk users with twat -u USER. Twat does everything.
20
+
21
+ (Actually twat doesn't do lots of things, in truth, if one other person
22
+ than me finds it useful, it will have far exceeded my expections)
6
23
 
7
24
  == Release status
8
25
 
@@ -27,7 +27,7 @@ end
27
27
  module Twat
28
28
  VERSION_MAJOR = 0
29
29
  VERSION_MINOR = 3
30
- VERSION_PATCH = 4
30
+ VERSION_PATCH = 5
31
31
 
32
32
  VERSION = "#{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_PATCH}"
33
33
  class Twat
@@ -55,9 +55,13 @@ module Twat
55
55
 
56
56
  def user_feed
57
57
  twitter_auth
58
- # Fix :default case
59
- Twitter.user_timeline(opts[:user]).first.tap do |tweet|
60
- puts "#{tweet.user.screen_name.bold.cyan}: #{tweet.text}"
58
+
59
+ begin
60
+ Twitter.user_timeline(opts[:user]).first.tap do |tweet|
61
+ puts "#{tweet.user.screen_name.bold.cyan}: #{tweet.text}"
62
+ end
63
+ rescue Twitter::NotFound
64
+ puts "#{opts[:user].bold.red} doesn't appear to be a valid user"
61
65
  end
62
66
  end
63
67
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-29 00:00:00.000000000Z
12
+ date: 2011-09-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: twitter
16
- requirement: &81879400 !ruby/object:Gem::Requirement
16
+ requirement: &82825950 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *81879400
24
+ version_requirements: *82825950
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: oauth
27
- requirement: &81879100 !ruby/object:Gem::Requirement
27
+ requirement: &82825650 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *81879100
35
+ version_requirements: *82825650
36
36
  description: Command line tool for tweeting and whatnot
37
37
  email:
38
38
  - richo@psych0tik.net