twat 0.3.3 → 0.3.4
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/TODO +2 -0
- data/lib/twat/actions.rb +12 -0
- data/lib/twat/argparse.rb +4 -0
- data/lib/twat/exceptions.rb +1 -0
- data/lib/twat.rb +2 -2
- metadata +6 -6
data/TODO
CHANGED
data/lib/twat/actions.rb
CHANGED
@@ -53,10 +53,22 @@ module Twat
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
def user_feed
|
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}"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
56
64
|
def version
|
57
65
|
puts "twat: #{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_PATCH}"
|
58
66
|
end
|
59
67
|
|
68
|
+
def method_missing
|
69
|
+
raise NoSuchCommand
|
70
|
+
end
|
71
|
+
|
60
72
|
private
|
61
73
|
|
62
74
|
def twitter_auth
|
data/lib/twat/argparse.rb
CHANGED
@@ -38,6 +38,10 @@ module Twat
|
|
38
38
|
end #}}}
|
39
39
|
opts.on('-v', '--version', 'Display version info') do #{{{ --version
|
40
40
|
options[:action] = :version
|
41
|
+
end
|
42
|
+
opts.on('-u', '--user [USER]', 'Display current status for USER (Defaults to your default account)') do |user| #{{{ --user USER
|
43
|
+
options[:user] = (user || :default)
|
44
|
+
options[:action] = :user_feed
|
41
45
|
end #}}}
|
42
46
|
end
|
43
47
|
|
data/lib/twat/exceptions.rb
CHANGED
data/lib/twat.rb
CHANGED
@@ -27,7 +27,7 @@ end
|
|
27
27
|
module Twat
|
28
28
|
VERSION_MAJOR = 0
|
29
29
|
VERSION_MINOR = 3
|
30
|
-
VERSION_PATCH =
|
30
|
+
VERSION_PATCH = 4
|
31
31
|
|
32
32
|
VERSION = "#{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_PATCH}"
|
33
33
|
class Twat
|
@@ -43,7 +43,7 @@ module Twat
|
|
43
43
|
rescue NoSuchAccount
|
44
44
|
puts "No such account"
|
45
45
|
opts.usage
|
46
|
-
rescue
|
46
|
+
rescue NoSuchCommand
|
47
47
|
puts "No such command"
|
48
48
|
opts.usage
|
49
49
|
rescue NoConfigFile
|
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
|
+
version: 0.3.4
|
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-
|
12
|
+
date: 2011-09-29 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: twitter
|
16
|
-
requirement: &
|
16
|
+
requirement: &81879400 !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: *
|
24
|
+
version_requirements: *81879400
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: oauth
|
27
|
-
requirement: &
|
27
|
+
requirement: &81879100 !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: *
|
35
|
+
version_requirements: *81879100
|
36
36
|
description: Command line tool for tweeting and whatnot
|
37
37
|
email:
|
38
38
|
- richo@psych0tik.net
|