jugyo-termtter 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/termtter.rb +3 -3
- data/test/test_termtter.rb +6 -0
- metadata +1 -1
data/lib/termtter.rb
CHANGED
@@ -10,7 +10,7 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
10
10
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
11
11
|
|
12
12
|
module Termtter
|
13
|
-
VERSION = '0.3.
|
13
|
+
VERSION = '0.3.3'
|
14
14
|
|
15
15
|
class CommandNotFound < StandardError; end
|
16
16
|
|
@@ -127,7 +127,7 @@ module Termtter
|
|
127
127
|
status = Status.new
|
128
128
|
%w(
|
129
129
|
id text created_at truncated in_reply_to_status_id in_reply_to_user_id
|
130
|
-
user/id user/name user/screen_name
|
130
|
+
user/id user/name user/screen_name user/url user/profile_image_url
|
131
131
|
).each do |key|
|
132
132
|
method = "#{key.gsub('/', '_')}=".to_sym
|
133
133
|
status.send(method, node.xpath(key).text)
|
@@ -214,7 +214,7 @@ module Termtter
|
|
214
214
|
class Status
|
215
215
|
%w(
|
216
216
|
id text created_at truncated in_reply_to_status_id in_reply_to_user_id
|
217
|
-
user_id user_name user_screen_name
|
217
|
+
user_id user_name user_screen_name user_url user_profile_image_url
|
218
218
|
).each do |attr|
|
219
219
|
attr_accessor attr.to_sym
|
220
220
|
end
|
data/test/test_termtter.rb
CHANGED
@@ -20,15 +20,21 @@ class TestTermtter < Test::Unit::TestCase
|
|
20
20
|
statuses = swap_open('friends_timeline.xml') { @termtter.get_timeline('') }
|
21
21
|
|
22
22
|
assert_equal 3, statuses.size
|
23
|
+
|
23
24
|
assert_equal '102', statuses[0].user_id
|
24
25
|
assert_equal 'test2', statuses[0].user_screen_name
|
25
26
|
assert_equal 'Test User 2', statuses[0].user_name
|
26
27
|
assert_equal 'texttext 2', statuses[0].text
|
28
|
+
assert_equal 'http://twitter.com/test2', statuses[0].user_url
|
29
|
+
assert_equal 'http://xxx2', statuses[0].user_profile_image_url
|
27
30
|
assert_equal 'Thu Dec 25 22:19:57 +0900 2008', statuses[0].created_at.to_s
|
31
|
+
|
28
32
|
assert_equal '100', statuses[2].user_id
|
29
33
|
assert_equal 'test0', statuses[2].user_screen_name
|
30
34
|
assert_equal 'Test User 0', statuses[2].user_name
|
31
35
|
assert_equal 'texttext 0', statuses[2].text
|
36
|
+
assert_equal 'http://twitter.com/test0', statuses[2].user_url
|
37
|
+
assert_equal 'http://xxx0', statuses[2].user_profile_image_url
|
32
38
|
assert_equal 'Thu Dec 25 22:10:57 +0900 2008', statuses[2].created_at.to_s
|
33
39
|
end
|
34
40
|
|