tweetable 0.1.11 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/tweetable/user.rb +7 -4
- data/tweetable.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.13
|
data/lib/tweetable/user.rb
CHANGED
@@ -30,16 +30,19 @@ module Tweetable
|
|
30
30
|
|
31
31
|
def update_all(force = false)
|
32
32
|
return unless needs_update?(force)
|
33
|
-
|
33
|
+
|
34
|
+
update_info if self.config[:include_on_update].include?(:info)
|
34
35
|
update_friend_ids if self.config[:include_on_update].include?(:friend_ids)
|
35
36
|
update_follower_ids if self.config[:include_on_update].include?(:follower_ids)
|
36
37
|
update_friend_messages if self.config[:include_on_update].include?(:friend_messages)
|
38
|
+
|
37
39
|
self.update(:updated_at => Time.now.utc.to_s)
|
40
|
+
|
38
41
|
self.config[:include_on_update].include?(:messages) ? update_messages : [] # return newly found messages
|
39
42
|
end
|
40
43
|
|
41
44
|
def update_info
|
42
|
-
uid = self.user_id.blank? ? self.screen_name : self.user_id
|
45
|
+
uid = self.screen_name # self.user_id.blank? ? self.screen_name : self.user_id
|
43
46
|
info = self.client.user(uid)
|
44
47
|
|
45
48
|
self.user_id = info[:id]
|
@@ -61,7 +64,7 @@ module Tweetable
|
|
61
64
|
end
|
62
65
|
|
63
66
|
def update_messages(options = {})
|
64
|
-
most_recent_message = self.messages.
|
67
|
+
most_recent_message = self.messages.sort(:order => 'DESC', :by => :message_id).first
|
65
68
|
options.merge!(:count => self.config[:max_message_count], :screen_name => self.screen_name)
|
66
69
|
options[:since_id] = most_recent_message.message_id if most_recent_message
|
67
70
|
|
@@ -70,7 +73,7 @@ module Tweetable
|
|
70
73
|
end
|
71
74
|
|
72
75
|
def update_friend_messages(options = {})
|
73
|
-
most_recent_message = self.friend_messages.
|
76
|
+
most_recent_message = self.friend_messages.sort(:order => 'DESC', :by => :message_id).first
|
74
77
|
options.merge!(:count => self.config[:max_message_count], :screen_name => self.screen_name)
|
75
78
|
options[:since_id] = most_recent_message.message_id if most_recent_message
|
76
79
|
|
data/tweetable.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{tweetable}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.13"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Peter T. Brown"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-10-18}
|
13
13
|
s.description = %q{Track twitter messages and users in memory using Redis}
|
14
14
|
s.email = %q{peter@flippyhead.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tweetable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 13
|
10
|
+
version: 0.1.13
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Peter T. Brown
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-18 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|