pupil 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ 0.1.3
2
+ ----------------
3
+
4
+ * Fixed a bug that Pupil::Stream::Status has not user variable
5
+
1
6
  0.1.2
2
7
  ----------------
3
8
 
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.type #=> Show type of status
75
- if status.type == :retweeted
76
- puts "#{status.content['user']['screen_name']: #{status.content['text']}"
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.2
1
+ 0.1.3
@@ -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"] rescue nil
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "pupil"
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Oame"]
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.2
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: &70356539340180 !ruby/object:Gem::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: *70356539340180
24
+ version_requirements: *70175508522040
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &70356539339540 !ruby/object:Gem::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: *70356539339540
35
+ version_requirements: *70175508519700
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70356539338740 !ruby/object:Gem::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: *70356539338740
46
+ version_requirements: *70175508512420
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: yard
49
- requirement: &70356539338000 !ruby/object:Gem::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: *70356539338000
57
+ version_requirements: *70175508505560
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: bundler
60
- requirement: &70356539337300 !ruby/object:Gem::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: *70356539337300
68
+ version_requirements: *70175508490580
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jeweler
71
- requirement: &70356539336680 !ruby/object:Gem::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: *70356539336680
79
+ version_requirements: *70175508473000
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rcov
82
- requirement: &70356539335940 !ruby/object:Gem::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: *70356539335940
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: []