em-twitter 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -193,6 +193,8 @@ module EventMachine
193
193
  end
194
194
 
195
195
  def ssl_handshake_completed
196
+ return true unless verify_peer?
197
+
196
198
  unless OpenSSL::SSL.verify_certificate_identity(@last_seen_cert, @client.host)
197
199
  fail OpenSSL::OpenSSLError.new("the hostname '#{@client.host}' does not match the server certificate")
198
200
  false
@@ -1,5 +1,5 @@
1
1
  module EventMachine
2
2
  module Twitter
3
- VERSION = "0.1.0" unless defined?(EventMachine::Twitter::VERSION)
3
+ VERSION = "0.1.1" unless defined?(EventMachine::Twitter::VERSION)
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em-twitter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-05-12 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine
16
- requirement: &70306082567780 !ruby/object:Gem::Requirement
16
+ requirement: &70215955874920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.0.0.beta.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70306082567780
24
+ version_requirements: *70215955874920
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: http_parser.rb
27
- requirement: &70306082567280 !ruby/object:Gem::Requirement
27
+ requirement: &70215955874300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.5'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70306082567280
35
+ version_requirements: *70215955874300
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: simple_oauth
38
- requirement: &70306082566820 !ruby/object:Gem::Requirement
38
+ requirement: &70215955873600 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0.1'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70306082566820
46
+ version_requirements: *70215955873600
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &70306082566440 !ruby/object:Gem::Requirement
49
+ requirement: &70215955872920 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70306082566440
57
+ version_requirements: *70215955872920
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rdiscount
60
- requirement: &70306082565980 !ruby/object:Gem::Requirement
60
+ requirement: &70215955872460 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70306082565980
68
+ version_requirements: *70215955872460
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
- requirement: &70306082565560 !ruby/object:Gem::Requirement
71
+ requirement: &70215955872000 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70306082565560
79
+ version_requirements: *70215955872000
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: simplecov
82
- requirement: &70306082565140 !ruby/object:Gem::Requirement
82
+ requirement: &70215955871380 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70306082565140
90
+ version_requirements: *70215955871380
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: yard
93
- requirement: &70306082557720 !ruby/object:Gem::Requirement
93
+ requirement: &70215955870700 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70306082557720
101
+ version_requirements: *70215955870700
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: mockingbird
104
- requirement: &70306082556980 !ruby/object:Gem::Requirement
104
+ requirement: &70215955869940 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 0.1.1
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70306082556980
112
+ version_requirements: *70215955869940
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: guard-rspec
115
- requirement: &70306082556480 !ruby/object:Gem::Requirement
115
+ requirement: &70215955869520 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,7 +120,7 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *70306082556480
123
+ version_requirements: *70215955869520
124
124
  description: Twitter Streaming API client for EventMachine
125
125
  email: steve.agalloco@gmail.com
126
126
  executables: []
@@ -152,7 +152,6 @@ files:
152
152
  - lib/em-twitter/response.rb
153
153
  - lib/em-twitter/version.rb
154
154
  - lib/em_twitter.rb
155
- - smoke.rb
156
155
  - spec/em-twitter/client_spec.rb
157
156
  - spec/em-twitter/connection_error_handling_spec.rb
158
157
  - spec/em-twitter/connection_reconnect_spec.rb
data/smoke.rb DELETED
@@ -1,66 +0,0 @@
1
- require 'bundler/setup'
2
- require 'em-twitter'
3
-
4
- EM::run do
5
-
6
- options = {
7
- :path => '/1/statuses/filter.json',
8
- :params => {
9
- :track => 'you,Obama,eli,bachelor,Romney'
10
- },
11
- :ssl => {
12
- :verify_peer => true,
13
- :cert_chain_file => '/etc/ssl/certs/cacert.pem'
14
- },
15
- :oauth => {
16
- :consumer_key => 'czveJ6LqlTuVHsbDBuRQ',
17
- :consumer_secret => 'wGY6NCptPerGog4lPvAKu450jtUaT3bz7wSQdzDiYaY',
18
- :token => '4618-01z5ihmeVYuc343JAYzaejVTuV0VU5CSF7gUWzsB8',
19
- :token_secret => 'HVQrPKjfQAyNPkQCCej10dIaLUaFzIIEAkwsI1hQ0'
20
- }
21
- # , :encoding => 'gzip'
22
- }
23
-
24
- client = EM::Twitter::Client.connect(options)
25
-
26
- client.each do |item|
27
- puts item
28
- end
29
-
30
- client.on_error do |message|
31
- puts "oops: error: #{message}"
32
- end
33
-
34
- client.on_unauthorized do
35
- puts "oops: unauthorized"
36
- end
37
-
38
- client.on_forbidden do
39
- puts "oops: unauthorized"
40
- end
41
-
42
- client.on_not_found do
43
- puts "oops: not_found"
44
- end
45
-
46
- client.on_not_acceptable do
47
- puts "oops: not_acceptable"
48
- end
49
-
50
- client.on_too_long do
51
- puts "oops: too_long"
52
- end
53
-
54
- client.on_range_unacceptable do
55
- puts "oops: range_unacceptable"
56
- end
57
-
58
- client.on_enhance_your_calm do
59
- puts "oops: enhance_your_calm"
60
- end
61
-
62
- EM.add_timer(25) do
63
- EM.stop
64
- end
65
-
66
- end