pupil 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/README.md +3 -3
- data/VERSION +1 -1
- data/lib/pupil/schemes.rb +7 -7
- data/pupil.gemspec +1 -1
- metadata +15 -15
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -71,9 +71,9 @@ Using Streaming API
|
|
71
71
|
|
72
72
|
# Userstream
|
73
73
|
stream.start :userstream do |status|
|
74
|
-
puts status.
|
75
|
-
if status.
|
76
|
-
puts "#{status.
|
74
|
+
puts status.event #=> Show type of status
|
75
|
+
if status.event == :retweeted
|
76
|
+
puts "#{status.user.screen_name} : #{status.text}"
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/lib/pupil/schemes.rb
CHANGED
@@ -74,7 +74,7 @@ class Pupil
|
|
74
74
|
@protected = j["protected"]
|
75
75
|
@screen_name = j["screen_name"]
|
76
76
|
@show_all_inline_media = j["show_all_inline_media"]
|
77
|
-
@status = Status.new j["status"]
|
77
|
+
@status = Pupil::Status.new j["status"] rescue nil
|
78
78
|
@statuses_count = j["statuses_count"]
|
79
79
|
@time_zone = j["time_zone"]
|
80
80
|
@url = j["url"]
|
@@ -138,7 +138,7 @@ class Pupil
|
|
138
138
|
@source = {:url => $1, :name => $2}
|
139
139
|
@text = j["text"]
|
140
140
|
@truncated = j["truncated"]
|
141
|
-
@user = User.new j["user"]
|
141
|
+
@user = Pupil::User.new j["user"] rescue nil
|
142
142
|
end
|
143
143
|
end
|
144
144
|
|
@@ -166,7 +166,7 @@ class Pupil
|
|
166
166
|
@uri = element.elements['uri'].text()
|
167
167
|
@following = element.elements['following'].text()
|
168
168
|
@mode = element.elements['mode'].text()
|
169
|
-
@user = User.new(element.elements['user'])
|
169
|
+
@user = Pupil::User.new(element.elements['user'])
|
170
170
|
end
|
171
171
|
end
|
172
172
|
|
@@ -177,8 +177,8 @@ class Pupil
|
|
177
177
|
|
178
178
|
def initialize(element)
|
179
179
|
@user_mentions = UserMention.new(element.elements['user_mention'])
|
180
|
-
@urls = URL.new(element.elements['urls'])
|
181
|
-
@hashtags = Hashtag.new(element.elements['hashtags'])
|
180
|
+
@urls = Pupil::URL.new(element.elements['urls'])
|
181
|
+
@hashtags = Pupil::Hashtag.new(element.elements['hashtags'])
|
182
182
|
end
|
183
183
|
end
|
184
184
|
|
@@ -213,8 +213,8 @@ class Pupil
|
|
213
213
|
@created_at = element.elements['created_at'].text()
|
214
214
|
@sender_screen_name = element.elements['sender_screen_name'].text()
|
215
215
|
@recipient_screen_name= element.elements['recipient_screen_name'].text()
|
216
|
-
@sender = User.new(element.elements['sender'])
|
217
|
-
@recipient = User.new(element.elements['recipient'])
|
216
|
+
@sender = Pupil::User.new(element.elements['sender'])
|
217
|
+
@recipient = Pupil::User.new(element.elements['recipient'])
|
218
218
|
end
|
219
219
|
end
|
220
220
|
end
|
data/pupil.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pupil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-17 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth
|
16
|
-
requirement: &
|
16
|
+
requirement: &70175508522040 !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: *70175508522040
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: json
|
27
|
-
requirement: &
|
27
|
+
requirement: &70175508519700 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70175508519700
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70175508512420 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.3.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70175508512420
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: yard
|
49
|
-
requirement: &
|
49
|
+
requirement: &70175508505560 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.6.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70175508505560
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: bundler
|
60
|
-
requirement: &
|
60
|
+
requirement: &70175508490580 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.0.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70175508490580
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: jeweler
|
71
|
-
requirement: &
|
71
|
+
requirement: &70175508473000 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 1.6.4
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70175508473000
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rcov
|
82
|
-
requirement: &
|
82
|
+
requirement: &70175508470300 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70175508470300
|
91
91
|
description: The "Lazy" Twitter API Library for Ruby 1.9.x. Easy to use.
|
92
92
|
email: oame@oameya.com
|
93
93
|
executables: []
|