console_tweet 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/console_tweet/cli.rb +7 -7
- data/lib/console_tweet/version.rb +1 -1
- metadata +19 -8
data/lib/console_tweet/cli.rb
CHANGED
@@ -32,7 +32,7 @@ module ConsoleTweet
|
|
32
32
|
# (Somewhat primitive, will be expanded) TODO
|
33
33
|
def start
|
34
34
|
ARGV.each do |arg|
|
35
|
-
unless arg.index('-') === 0
|
35
|
+
unless arg.index('-') === 0
|
36
36
|
@commands << arg
|
37
37
|
end
|
38
38
|
end
|
@@ -41,7 +41,7 @@ module ConsoleTweet
|
|
41
41
|
return method_missing(method) unless AllowedMethods.include?(method)
|
42
42
|
self.send(method, @commands[1..@commands.size])
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
# Prompt the user for a PIN using a request token, and see if we can successfully authenticate them
|
46
46
|
def get_access_token
|
47
47
|
@client = TwitterOAuth::Client.new(:consumer_key => ConsumerKey, :consumer_secret => ConsumerSecret)
|
@@ -57,7 +57,7 @@ module ConsoleTweet
|
|
57
57
|
false # Didn't get an access token
|
58
58
|
end
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
61
|
# Display the user's timeline
|
62
62
|
def timeline(*args)
|
63
63
|
load_default_token
|
@@ -70,7 +70,7 @@ module ConsoleTweet
|
|
70
70
|
self.since_id = home_timeline.last['id']
|
71
71
|
end
|
72
72
|
end
|
73
|
-
|
73
|
+
|
74
74
|
# Send a tweet for the user
|
75
75
|
def tweet(*args)
|
76
76
|
load_default_token
|
@@ -123,7 +123,7 @@ module ConsoleTweet
|
|
123
123
|
tokens = {:default => { :token => @access_token.token, :secret => @access_token.secret }}
|
124
124
|
save_tokens(tokens)
|
125
125
|
end
|
126
|
-
|
126
|
+
|
127
127
|
# Returns the 20 most recent @replies / mentions
|
128
128
|
def replies(*args)
|
129
129
|
load_default_token
|
@@ -198,7 +198,7 @@ module ConsoleTweet
|
|
198
198
|
def self.get_input
|
199
199
|
STDIN.gets.strip.chomp
|
200
200
|
end
|
201
|
-
|
201
|
+
|
202
202
|
# Getter for since_id in ~/.twitter file
|
203
203
|
def since_id
|
204
204
|
load_default_token[:since_id]
|
@@ -210,7 +210,7 @@ module ConsoleTweet
|
|
210
210
|
tokens[:since_id] = id
|
211
211
|
save_tokens(:default => tokens)
|
212
212
|
end
|
213
|
-
|
213
|
+
|
214
214
|
# Getter for since_id_replies in ~/.twitter file
|
215
215
|
def since_id_replies
|
216
216
|
load_default_token[:since_id_replies]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: console_tweet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
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:
|
12
|
+
date: 2013-06-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,18 +21,28 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: twitter_oauth
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
31
36
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
37
|
+
version: 0.4.9
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.4.9
|
36
46
|
description: CLI Twitter Client - with OAuth
|
37
47
|
email: john@crepezzi.com
|
38
48
|
executables:
|
@@ -64,8 +74,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
74
|
version: '0'
|
65
75
|
requirements: []
|
66
76
|
rubyforge_project: console_tweet
|
67
|
-
rubygems_version: 1.8.
|
77
|
+
rubygems_version: 1.8.24
|
68
78
|
signing_key:
|
69
79
|
specification_version: 3
|
70
80
|
summary: CLI Twitter Client
|
71
81
|
test_files: []
|
82
|
+
has_rdoc: true
|