em-twitter 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0d8b4374b1f2ec8d46efc08a8b0906c20699c6d
4
- data.tar.gz: dfc0cc03a2fce5dbe40e65d489c6bb929629fa2c
3
+ metadata.gz: 7a2b34f426ad76a43f6b60f28c7e072d684ab32c
4
+ data.tar.gz: afa8350fa4f7710516419a42e651699985dc5d96
5
5
  SHA512:
6
- metadata.gz: d46bfee4b6eb89f9a0fc393a621763e832568a5616041edb83e1757e3e22a6edb8fc0a104c236d2818e020ed159428291de4729df26e6b70a84bc52e976aed62
7
- data.tar.gz: e3e99940cec29cfc42724d41372f337c2b7509004ea76c4dbdfe4ab04f96b72f1fcd38f9ba10f663ce6c2424773ec521412e356476c51359f0e750cda646caa5
6
+ metadata.gz: afdf27dfc9462b201156485083f69c6c80083755802c44f084d7edde03894e8c5e97cea548e6d56f7428775550cbc803ebd69b441faaa8a2544babf05d79f69b
7
+ data.tar.gz: c5a2b10a9cc2cfddb44c1ee108a3b7b98d3553c0aa4ca62da9f7b84465af855758062a7e73195a2388f9468f29c5b6da1abbe61343fb781a886a2b5cdcd342ec
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.add_dependency 'eventmachine', '~> 1.0'
18
18
  spec.add_dependency 'http_parser.rb', '~> 0.6'
19
19
  spec.add_dependency 'simple_oauth', '~> 0.2'
20
+ spec.add_dependency 'buftok', '~> 0.2'
20
21
 
21
22
  spec.add_development_dependency 'bundler', '~> 1.0'
22
23
 
@@ -1,5 +1,5 @@
1
1
  require 'eventmachine'
2
- require 'em/buftok'
2
+ require 'buftok'
3
3
  require 'uri'
4
4
  require 'http/parser'
5
5
  require 'openssl'
@@ -17,7 +17,6 @@ module EventMachine
17
17
  module Twitter
18
18
  class Connection < EM::Connection
19
19
 
20
- MAX_LINE_LENGTH = 1024*1024 unless defined?(MAX_LINE_LENGTH)
21
20
  STALL_TIMEOUT = 90 unless defined?(STALL_TIMEOUT)
22
21
  STALL_TIMER = 10 unless defined?(STALL_TIMER)
23
22
 
@@ -137,10 +136,11 @@ module EventMachine
137
136
  protected
138
137
 
139
138
  def handle_stream(data)
139
+ @last_response << (@decoder ||= BaseDecoder.new).decode(data)
140
+
140
141
  # handle empty lines, Site stream sometimes returns \r\n\r\n
141
142
  return if data.strip.empty?
142
143
 
143
- @last_response << (@decoder ||= BaseDecoder.new).decode(data)
144
144
  if @last_response.complete?
145
145
  invoke_callback(@client.each_item_callback, @last_response.body)
146
146
  end
@@ -300,7 +300,7 @@ module EventMachine
300
300
  # Resets the internals of the connection on initial connection and
301
301
  # on reconnections. Clears the response buffer and resets internal state
302
302
  def reset_connection
303
- @buffer = BufferedTokenizer.new("\r", MAX_LINE_LENGTH)
303
+ @buffer = BufferedTokenizer.new("\r")
304
304
  @parser = Http::Parser.new(self)
305
305
  @parser.on_body = method(:on_body)
306
306
  @parser.on_headers_complete = method(:on_headers_complete)
@@ -1,5 +1,5 @@
1
1
  module EventMachine
2
2
  module Twitter
3
- VERSION = "0.3.2" unless defined?(EventMachine::Twitter::VERSION)
3
+ VERSION = "0.3.3" unless defined?(EventMachine::Twitter::VERSION)
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em-twitter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Agalloco
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-12 00:00:00.000000000 Z
11
+ date: 2014-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: buftok
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '0.2'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '0.2'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -124,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
138
  version: '0'
125
139
  requirements: []
126
140
  rubyforge_project:
127
- rubygems_version: 2.0.3
141
+ rubygems_version: 2.0.14
128
142
  signing_key:
129
143
  specification_version: 4
130
144
  summary: Twitter Streaming API client for EventMachine