em-twitter 0.3.4 → 0.3.5

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: 073f50a221b40cd0bca13f4eaa88b4dfe27f838b
4
- data.tar.gz: dec59eb20f85b6582318ab9befa87586fcfdd8d3
3
+ metadata.gz: 9f72b2475176af50d7783862abe0d6c16abdc281
4
+ data.tar.gz: 0ef0ab7682d0999e5dcf2e38194b79c8e5c18592
5
5
  SHA512:
6
- metadata.gz: 09236b7b2bdb73dc9b9709e02284a9e0f8cb9f60c6a95f7e15c58bdd42ecb9765690426e591e69b4091095d092955afa44707dabf503c2afdeedb00eb40ec29b
7
- data.tar.gz: da7c001ff38f4a0e33c3eb903f2b9f0b1d797bc904db5ba7e56dbead497eaf22cf1153e4bb047127edb0a146640949570f503a53d6fd6dfcef10c1c908ac3c53
6
+ metadata.gz: 7cefd4b25f766aea1cd27091e0265cc4ddefac4d20b63093e0a1802fbb6b4ad98d5f69755191a8ed16bbde312fc95c17a84f5ad07b38a1ffe606318d8edd82c1
7
+ data.tar.gz: 2290cd0e16b1b7d91cebbb3b4cbbf3fc54b5d9499aed2f9e1672637c1df7b751e4a1b91952025f3e09d956ce982ffe55689994a67dea1e084aea0dea5d5a9d4b
@@ -104,10 +104,7 @@ module EventMachine
104
104
  end
105
105
 
106
106
  def oauth_params
107
- SimpleOAuth::Header::ATTRIBUTE_KEYS.inject({}) do |hash, key|
108
- hash[key] = @options[:oauth][key] if @options[:oauth].key?(key)
109
- hash
110
- end
107
+ @options[:oauth].merge(:ignore_extra_keys => true)
111
108
  end
112
109
 
113
110
  def basic_auth?
@@ -1,5 +1,5 @@
1
1
  module EventMachine
2
2
  module Twitter
3
- VERSION = "0.3.4" unless defined?(EventMachine::Twitter::VERSION)
3
+ VERSION = "0.3.5" unless defined?(EventMachine::Twitter::VERSION)
4
4
  end
5
5
  end
@@ -54,7 +54,7 @@ describe EM::Twitter::Client do
54
54
  it "delegate to the connection" do
55
55
  EM.run_block do
56
56
  client = EM::Twitter::Client.connect(default_options)
57
- expect(client.respond_to?(:immediate_reconnect)).to be_true
57
+ expect(client.respond_to?(:immediate_reconnect)).to be_truthy
58
58
  end
59
59
  end
60
60
  end
@@ -114,7 +114,7 @@ describe "EM::Twitter::Connection reconnections" do
114
114
  client.on_reconnect { called = true; EM.stop }
115
115
  end
116
116
 
117
- expect(called).to be_true
117
+ expect(called).to be true
118
118
  end
119
119
 
120
120
  it "does not reconnect when auto_reconnect is false" do
@@ -146,7 +146,7 @@ describe "EM::Twitter::Connection reconnections" do
146
146
  client.immediate_reconnect
147
147
  end
148
148
 
149
- expect(called).to be_true
149
+ expect(called).to be true
150
150
  end
151
151
 
152
152
  it "reconnects the current connection" do
@@ -10,7 +10,7 @@ describe EM::Twitter::Connection do
10
10
  client = EM::Twitter::Client.connect(default_options.merge(:on_inited => lambda { called = true}))
11
11
  end
12
12
 
13
- expect(called).to be_true
13
+ expect(called).to be true
14
14
  end
15
15
 
16
16
  it "sets the inactivity timeout" do
@@ -150,7 +150,7 @@ describe EM::Twitter::Connection do
150
150
  end
151
151
  end
152
152
 
153
- expect(called).to be_true
153
+ expect(called).to be true
154
154
  end
155
155
 
156
156
  it "closes the connection when stalled to prompt a reconnect" do
@@ -165,7 +165,7 @@ describe EM::Twitter::Connection do
165
165
  end
166
166
  end
167
167
 
168
- expect(called).to be_true
168
+ expect(called).to be true
169
169
  end
170
170
 
171
171
  it "invokes a no-data callback when stalled without a response" do
@@ -186,7 +186,7 @@ describe EM::Twitter::Connection do
186
186
  end
187
187
  end
188
188
 
189
- expect(stalled).to be_true
189
+ expect(stalled).to be true
190
190
  end
191
191
  end
192
192
  end
@@ -200,7 +200,7 @@ describe EM::Twitter::Connection do
200
200
  client.on_close { called = true }
201
201
  end
202
202
 
203
- expect(called).to be_true
203
+ expect(called).to be true
204
204
  end
205
205
  end
206
206
 
@@ -225,7 +225,7 @@ describe EM::Twitter::Connection do
225
225
  EM.run_block do
226
226
  client = EM::Twitter::Client.connect(default_options)
227
227
  client.stop
228
- expect(client.connection.auto_reconnect?).to be_false
228
+ expect(client.connection.auto_reconnect?).to be_falsey
229
229
  end
230
230
  end
231
231
  end
@@ -283,7 +283,7 @@ describe EM::Twitter::Connection do
283
283
  EM.run do
284
284
  client = EM::Twitter::Client.connect(default_options)
285
285
  EM::Timer.new(1) do
286
- expect(client.auto_reconnect?).to be_true
286
+ expect(client.auto_reconnect?).to be true
287
287
  EM.stop
288
288
  end
289
289
  end
@@ -293,7 +293,7 @@ describe EM::Twitter::Connection do
293
293
  EM.run do
294
294
  client = EM::Twitter::Client.connect(default_options.merge(:auto_reconnect => false))
295
295
  EM::Timer.new(1) do
296
- expect(client.auto_reconnect?).to be_false
296
+ expect(client.auto_reconnect?).to be_falsey
297
297
  EM.stop
298
298
  end
299
299
  end
@@ -12,7 +12,7 @@ describe EM::Twitter::Proxy do
12
12
 
13
13
  describe "#header" do
14
14
  it "returns false when no proxy credentials are passed" do
15
- expect(EM::Twitter::Proxy.new.header).to be_false
15
+ expect(EM::Twitter::Proxy.new.header).to be_falsey
16
16
  end
17
17
 
18
18
  it "generates a header when passed credentials" do
@@ -36,12 +36,12 @@ describe EM::Twitter::Request do
36
36
  describe "#proxy?" do
37
37
  it "defaults to false" do
38
38
  req = EM::Twitter::Request.new
39
- expect(req.proxy?).to be_false
39
+ expect(req.proxy?).to be_falsey
40
40
  end
41
41
 
42
42
  it "returns true when a proxy is set" do
43
43
  req = EM::Twitter::Request.new(proxy_options)
44
- expect(req.proxy?).to be_true
44
+ expect(req.proxy?).to be_truthy
45
45
  end
46
46
  end
47
47
 
@@ -66,25 +66,25 @@ describe EM::Twitter::Response do
66
66
 
67
67
  describe "#complete?" do
68
68
  it "returns false when an incomplete body" do
69
- expect(EM::Twitter::Response.new('{ "status" : true').complete?).to be_false
69
+ expect(EM::Twitter::Response.new('{ "status" : true').complete?).to be_falsey
70
70
  end
71
71
 
72
72
  it "returns false when an complete body" do
73
- expect(EM::Twitter::Response.new('{ "status" : true }').complete?).to be_true
73
+ expect(EM::Twitter::Response.new('{ "status" : true }').complete?).to be true
74
74
  end
75
75
  end
76
76
 
77
77
  describe "#older_than?" do
78
78
  it "returns false when the last response is younger than the number of seconds" do
79
79
  response = EM::Twitter::Response.new
80
- expect(response.older_than?(100)).to be_false
80
+ expect(response.older_than?(100)).to be_falsey
81
81
  end
82
82
 
83
83
  it "returns true when the last response is older than the number of seconds" do
84
84
  response = EM::Twitter::Response.new
85
85
  response.concat('fakebody')
86
86
  sleep(2)
87
- expect(response.older_than?(1)).to be_true
87
+ expect(response.older_than?(1)).to be true
88
88
  end
89
89
 
90
90
  it "generates a timestamp when no initial timestamp exists" do
@@ -81,7 +81,7 @@ def error_callback_invoked(callback, code, desc, msg = nil)
81
81
  end
82
82
 
83
83
  expect(response_code).to eq("Unhandled status code: #{code}.") if response_code
84
- expect(called).to be_true
84
+ expect(called).to be true
85
85
  end
86
86
  end
87
87
  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.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Agalloco