ruby-oembed 0.8.13 → 0.8.14

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: 3f3a0f4bb2b17461615d009c0c8c69a81945a9a3
4
- data.tar.gz: 1c7e0e0eb6f4b41120016a709d4540e82dd36f71
3
+ metadata.gz: f272f1578d7a957040f57d7be37efd0d5f3d0c38
4
+ data.tar.gz: aa9c139bd3f26aeafd8a591331a0e3c3ba8160ea
5
5
  SHA512:
6
- metadata.gz: afb3f8190d9f8ca421bcf35746af78c901f558a3dd585a86b39ad871bf53176e9066005f3a954a354dadb0a9d361d3776bee832b0e8e5b4c69f6703ba7b10f46
7
- data.tar.gz: 40d0f01fd1717af0dc8c4036b25b0dbcc9327ca96e8698cd431b102d16c9a33b62d1dcbf0d59d4e5a4278104859ab4f825f0f2e2fd7682e9464819c7efcf1e5e
6
+ metadata.gz: d0793e3de5c2a4ffc40c75cefceab7890bf6ab43b24cd8e5f9da7ac37f8732074170f80cf384d63e7f656a391e526f254d06535c3aec4d5456c60b7a3c36bf3b
7
+ data.tar.gz: 25b144a3c8c6682ae9e1d5c99a1cede9cf8013ce9cbc83e05b50f0401eca8e11ad1bfab7e986cef2a08cca2cf5c49ad3d83ae98f849f17525bb1d9d2d802ab7a
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,11 @@
1
1
  = CHANGELOG
2
2
 
3
+ == 0.8.14 - 25 April 2015
4
+
5
+ * Change built-in Vimeo provider to use https oembed endpoint; Pull #44 (Jonne Haß)
6
+ * Change built-in Flickr provider to use https oembed endpoint; Pull #46 (Javan Makhmali)
7
+ * Change built-in Flickr provider to recognize https URLs and short flic.kr URLs (Javan Makhmali & Marcos Wright-Kuhns)
8
+
3
9
  == 0.8.13 - 23 April 2015
4
10
 
5
11
  * Change built-in Instagram provider to recognize https URLs; Pull #35 (Philipp Bosch)
@@ -144,9 +144,11 @@ module OEmbed
144
144
  add_official_provider(Youtube)
145
145
 
146
146
  # Provider for flickr.com
147
- # http://developer.yahoo.com/blogs/ydn/posts/2008/05/oembed_embeddin/
148
- Flickr = OEmbed::Provider.new("http://www.flickr.com/services/oembed/")
147
+ Flickr = OEmbed::Provider.new("https://www.flickr.com/services/oembed/")
149
148
  Flickr << "http://*.flickr.com/*"
149
+ Flickr << "https://*.flickr.com/*"
150
+ Flickr << "http://flic.kr/*"
151
+ Flickr << "https://flic.kr/*"
150
152
  add_official_provider(Flickr)
151
153
 
152
154
  # Provider for viddler.com
@@ -173,8 +175,8 @@ module OEmbed
173
175
  add_official_provider(Hulu)
174
176
 
175
177
  # Provider for vimeo.com
176
- # http://developer.vimeo.com/apis/oembed
177
- Vimeo = OEmbed::Provider.new("http://vimeo.com/api/oembed.{format}")
178
+ # https://developer.vimeo.com/apis/oembed
179
+ Vimeo = OEmbed::Provider.new("https://vimeo.com/api/oembed.{format}")
178
180
  Vimeo << "http://*.vimeo.com/*"
179
181
  Vimeo << "https://*.vimeo.com/*"
180
182
  add_official_provider(Vimeo)
@@ -2,7 +2,7 @@ module OEmbed
2
2
  class Version
3
3
  MAJOR = 0
4
4
  MINOR = 8
5
- PATCH = 13
5
+ PATCH = 14
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
 
8
8
  class << self
@@ -30,16 +30,16 @@ describe OEmbed::Provider do
30
30
  end
31
31
 
32
32
  it "should require a valid endpoint for a new instance" do
33
- proc { OEmbed::Provider.new("http://foo.com/oembed/") }.
34
- should_not raise_error
33
+ expect { OEmbed::Provider.new("http://foo.com/oembed/") }.
34
+ not_to raise_error
35
35
 
36
- proc { OEmbed::Provider.new("https://foo.com/oembed/") }.
37
- should_not raise_error
36
+ expect { OEmbed::Provider.new("https://foo.com/oembed/") }.
37
+ not_to raise_error
38
38
  end
39
39
 
40
40
  it "should allow a {format} string in the endpoint for a new instance" do
41
- proc { OEmbed::Provider.new("http://foo.com/oembed.{format}/get") }.
42
- should_not raise_error
41
+ expect { OEmbed::Provider.new("http://foo.com/oembed.{format}/get") }.
42
+ not_to raise_error
43
43
  end
44
44
 
45
45
  it "should raise an ArgumentError given an invalid endpoint for a new instance" do
@@ -50,66 +50,66 @@ describe OEmbed::Provider do
50
50
  "http://not a uri",
51
51
  nil, 1,
52
52
  ].each do |endpoint|
53
- proc { OEmbed::Provider.new(endpoint) }.
54
- should raise_error(ArgumentError)
53
+ expect { OEmbed::Provider.new(endpoint) }.
54
+ to raise_error(ArgumentError)
55
55
  end
56
56
  end
57
57
 
58
58
  it "should allow no URI schema to be given" do
59
59
  provier = OEmbed::Provider.new("http://foo.com/oembed")
60
60
 
61
- provier.include?("http://foo.com/1").should be_truthy
62
- provier.include?("http://bar.foo.com/1").should be_truthy
63
- provier.include?("http://bar.foo.com/show/1").should be_truthy
64
- provier.include?("https://bar.foo.com/1").should be_truthy
65
- provier.include?("http://asdf.com/1").should be_truthy
66
- provier.include?("asdf").should be_truthy
61
+ expect(provier).to include("http://foo.com/1")
62
+ expect(provier).to include("http://bar.foo.com/1")
63
+ expect(provier).to include("http://bar.foo.com/show/1")
64
+ expect(provier).to include("https://bar.foo.com/1")
65
+ expect(provier).to include("http://asdf.com/1")
66
+ expect(provier).to include("asdf")
67
67
  end
68
68
 
69
69
  it "should allow a String as a URI schema" do
70
70
  provier = OEmbed::Provider.new("http://foo.com/oembed")
71
71
  provier << "http://bar.foo.com/*"
72
72
 
73
- provier.include?("http://bar.foo.com/1").should be_truthy
74
- provier.include?("http://bar.foo.com/show/1").should be_truthy
73
+ expect(provier).to include("http://bar.foo.com/1")
74
+ expect(provier).to include("http://bar.foo.com/show/1")
75
75
 
76
- provier.include?("https://bar.foo.com/1").should be_falsey
77
- provier.include?("http://foo.com/1").should be_falsey
76
+ expect(provier).to_not include("https://bar.foo.com/1")
77
+ expect(provier).to_not include("http://foo.com/1")
78
78
  end
79
79
 
80
80
  it "should allow multiple path wildcards in a String URI schema" do
81
81
  provier = OEmbed::Provider.new("http://foo.com/oembed")
82
82
  provier << "http://bar.foo.com/*/show/*"
83
83
 
84
- provier.include?("http://bar.foo.com/photo/show/1").should be_truthy
85
- provier.include?("http://bar.foo.com/video/show/2").should be_truthy
86
- provier.include?("http://bar.foo.com/help/video/show/2").should be_truthy
84
+ expect(provier).to include("http://bar.foo.com/photo/show/1")
85
+ expect(provier).to include("http://bar.foo.com/video/show/2")
86
+ expect(provier).to include("http://bar.foo.com/help/video/show/2")
87
87
 
88
- provier.include?("https://bar.foo.com/photo/show/1").should be_falsey
89
- provier.include?("http://foo.com/video/show/2").should be_falsey
90
- provier.include?("http://bar.foo.com/show/1").should be_falsey
91
- provier.include?("http://bar.foo.com/1").should be_falsey
88
+ expect(provier).to_not include("https://bar.foo.com/photo/show/1")
89
+ expect(provier).to_not include("http://foo.com/video/show/2")
90
+ expect(provier).to_not include("http://bar.foo.com/show/1")
91
+ expect(provier).to_not include("http://bar.foo.com/1")
92
92
  end
93
93
 
94
94
  it "should NOT allow multiple domain wildcards in a String URI schema", :pending => true do
95
95
  provier = OEmbed::Provider.new("http://foo.com/oembed")
96
96
 
97
- proc { provier << "http://*.com/*" }.
98
- should raise_error(ArgumentError)
97
+ expect { provier << "http://*.com/*" }.
98
+ to raise_error(ArgumentError)
99
99
 
100
- provier.include?("http://foo.com/1").should be_falsey
100
+ expect(provier).to_not include("http://foo.com/1")
101
101
  end
102
102
 
103
103
  it "should allow a sub-domain wildcard in String URI schema" do
104
104
  provier = OEmbed::Provider.new("http://foo.com/oembed")
105
105
  provier << "http://*.foo.com/*"
106
106
 
107
- provier.include?("http://bar.foo.com/1").should be_truthy
108
- provier.include?("http://foo.foo.com/2").should be_truthy
109
- provier.include?("http://foo.com/3").should be_truthy
107
+ expect(provier).to include("http://bar.foo.com/1")
108
+ expect(provier).to include("http://foo.foo.com/2")
109
+ expect(provier).to include("http://foo.com/3")
110
110
 
111
- provier.include?("https://bar.foo.com/1").should be_falsey
112
- provier.include?("http://my.bar.foo.com/1").should be_falsey
111
+ expect(provier).to_not include("https://bar.foo.com/1")
112
+ expect(provier).to_not include("http://my.bar.foo.com/1")
113
113
 
114
114
  provier << "http://my.*.foo.com/*"
115
115
  end
@@ -118,66 +118,66 @@ describe OEmbed::Provider do
118
118
  provier = OEmbed::Provider.new("http://foo.com/oembed")
119
119
  provier << "http://*.my.*.foo.com/*"
120
120
 
121
- provier.include?("http://my.bar.foo.com/1").should be_truthy
122
- provier.include?("http://my.foo.com/2").should be_truthy
123
- provier.include?("http://bar.my.bar.foo.com/3").should be_truthy
121
+ expect(provier).to include("http://my.bar.foo.com/1")
122
+ expect(provier).to include("http://my.foo.com/2")
123
+ expect(provier).to include("http://bar.my.bar.foo.com/3")
124
124
 
125
- provier.include?("http://bar.foo.com/1").should be_falsey
126
- provier.include?("http://foo.bar.foo.com/1").should be_falsey
125
+ expect(provier).to_not include("http://bar.foo.com/1")
126
+ expect(provier).to_not include("http://foo.bar.foo.com/1")
127
127
  end
128
128
 
129
129
  it "should NOT allow a scheme wildcard in a String URI schema", :pending => true do
130
130
  provier = OEmbed::Provider.new("http://foo.com/oembed")
131
131
 
132
- proc { provier << "*://foo.com/*" }.
133
- should raise_error(ArgumentError)
132
+ expect { provier << "*://foo.com/*" }.
133
+ to raise_error(ArgumentError)
134
134
 
135
- provier.include?("http://foo.com/1").should be_falsey
135
+ expect(provier).to_not include("http://foo.com/1")
136
136
  end
137
137
 
138
138
  it "should allow a scheme other than http in a String URI schema" do
139
139
  provier = OEmbed::Provider.new("http://foo.com/oembed")
140
140
  provier << "https://foo.com/*"
141
141
 
142
- provier.include?("https://foo.com/1").should be_truthy
142
+ expect(provier).to include("https://foo.com/1")
143
143
 
144
144
  gopher_url = "gopher://foo.com/1"
145
- provier.include?(gopher_url).should be_falsey
145
+ expect(provier).to_not include(gopher_url)
146
146
  provier << "gopher://foo.com/*"
147
- provier.include?(gopher_url).should be_truthy
147
+ expect(provier).to include(gopher_url)
148
148
  end
149
149
 
150
150
  it "should allow a Regexp as a URI schema" do
151
151
  provier = OEmbed::Provider.new("http://foo.com/oembed")
152
152
  provier << %r{^https?://([^\.]*\.)?foo.com/(show/)?\d+}
153
153
 
154
- provier.include?("http://bar.foo.com/1").should be_truthy
155
- provier.include?("http://bar.foo.com/show/1").should be_truthy
156
- provier.include?("http://foo.com/1").should be_truthy
157
- provier.include?("https://bar.foo.com/1").should be_truthy
154
+ expect(provier).to include("http://bar.foo.com/1")
155
+ expect(provier).to include("http://bar.foo.com/show/1")
156
+ expect(provier).to include("http://foo.com/1")
157
+ expect(provier).to include("https://bar.foo.com/1")
158
158
 
159
- provier.include?("http://bar.foo.com/video/1").should be_falsey
160
- provier.include?("gopher://foo.com/1").should be_falsey
159
+ expect(provier).to_not include("http://bar.foo.com/video/1")
160
+ expect(provier).to_not include("gopher://foo.com/1")
161
161
  end
162
162
 
163
163
  it "should by default use OEmbed::Formatter.default" do
164
- @flickr.format.should == @default
164
+ expect(@flickr.format).to eq(@default)
165
165
  end
166
166
 
167
167
  it "should allow xml" do
168
- @qik.format.should == :xml
168
+ expect(@qik.format).to eq(:xml)
169
169
  end
170
170
 
171
171
  it "should allow json" do
172
- @viddler.format.should == :json
172
+ expect(@viddler.format).to eq(:json)
173
173
  end
174
174
 
175
175
  it "should allow random formats on initialization" do
176
- proc {
176
+ expect {
177
177
  yaml_provider = OEmbed::Provider.new("http://foo.com/api/oembed.{format}", :yml)
178
178
  yaml_provider << "http://foo.com/*"
179
179
  }.
180
- should_not raise_error
180
+ not_to raise_error
181
181
  end
182
182
 
183
183
  it "should not allow random formats to be parsed" do
@@ -185,43 +185,43 @@ describe OEmbed::Provider do
185
185
  yaml_provider << "http://foo.com/*"
186
186
  yaml_url = "http://foo.com/video/1"
187
187
 
188
- yaml_provider.should_receive(:raw).
188
+ expect(yaml_provider).to receive(:raw).
189
189
  with(yaml_url, {:format=>:yml}).
190
190
  and_return(valid_response(:json))
191
191
 
192
- proc { yaml_provider.get(yaml_url) }.
193
- should raise_error(OEmbed::FormatNotSupported)
192
+ expect { yaml_provider.get(yaml_url) }.
193
+ to raise_error(OEmbed::FormatNotSupported)
194
194
  end
195
195
 
196
196
  it "should add URL schemes" do
197
- @flickr.urls.should == [%r{^http://([^\.]+\.)?flickr\.com/(.*?)}]
198
- @qik.urls.should == [%r{^http://qik\.com/video/(.*?)},
199
- %r{^http://qik\.com/(.*?)}]
197
+ expect(@flickr.urls).to eq([%r{^http://([^\.]+\.)?flickr\.com/(.*?)}])
198
+ expect(@qik.urls).to eq([%r{^http://qik\.com/video/(.*?)},
199
+ %r{^http://qik\.com/(.*?)}])
200
200
  end
201
201
 
202
202
  it "should match URLs" do
203
- @flickr.include?(example_url(:flickr)).should be_truthy
204
- @qik.include?(example_url(:qik)).should be_truthy
203
+ expect(@flickr).to include(example_url(:flickr))
204
+ expect(@qik).to include(example_url(:qik))
205
205
  end
206
206
 
207
207
  it "should raise error if the URL is invalid" do
208
- proc{ @flickr.send(:build, example_url(:fake)) }.should raise_error(OEmbed::NotFound)
209
- proc{ @qik.send(:build, example_url(:fake)) }.should raise_error(OEmbed::NotFound)
208
+ expect{ @flickr.send(:build, example_url(:fake)) }.to raise_error(OEmbed::NotFound)
209
+ expect{ @qik.send(:build, example_url(:fake)) }.to raise_error(OEmbed::NotFound)
210
210
  end
211
211
 
212
212
  describe "#build" do
213
213
  it "should return a proper URL" do
214
214
  uri = @flickr.send(:build, example_url(:flickr))
215
- uri.host.should == "www.flickr.com"
216
- uri.path.should == "/services/oembed/"
217
- uri.query.include?("format=#{@flickr.format}").should be_truthy
218
- uri.query.include?("url=#{CGI.escape 'http://flickr.com/photos/bees/2362225867/'}").should be_truthy
215
+ expect(uri.host).to eq("www.flickr.com")
216
+ expect(uri.path).to eq("/services/oembed/")
217
+ expect(uri.query).to include("format=#{@flickr.format}")
218
+ expect(uri.query).to include("url=#{CGI.escape 'http://flickr.com/photos/bees/2362225867/'}")
219
219
 
220
220
  uri = @qik.send(:build, example_url(:qik))
221
- uri.host.should == "qik.com"
222
- uri.path.should == "/api/oembed.xml"
223
- uri.query.include?("format=#{@qik.format}").should be_falsey
224
- uri.query.should == "url=#{CGI.escape 'http://qik.com/video/49565'}"
221
+ expect(uri.host).to eq("qik.com")
222
+ expect(uri.path).to eq("/api/oembed.xml")
223
+ expect(uri.query).to_not include("format=#{@qik.format}")
224
+ expect(uri.query).to eq("url=#{CGI.escape 'http://qik.com/video/49565'}")
225
225
  end
226
226
 
227
227
  it "should accept parameters" do
@@ -231,26 +231,26 @@ describe OEmbed::Provider do
231
231
  :format => :xml,
232
232
  :another => "test")
233
233
 
234
- uri.query.include?("maxwidth=600").should be_truthy
235
- uri.query.include?("maxheight=200").should be_truthy
236
- uri.query.include?("format=xml").should be_truthy
237
- uri.query.include?("another=test").should be_truthy
234
+ expect(uri.query).to include("maxwidth=600")
235
+ expect(uri.query).to include("maxheight=200")
236
+ expect(uri.query).to include("format=xml")
237
+ expect(uri.query).to include("another=test")
238
238
  end
239
239
 
240
240
  it "should build correctly when format is in the endpoint URL" do
241
241
  uri = @qik.send(:build, example_url(:qik), :format => :json)
242
- uri.path.should == "/api/oembed.json"
242
+ expect(uri.path).to eq("/api/oembed.json")
243
243
  end
244
244
 
245
245
  it "should build correctly with query parameters in the endpoint URL" do
246
246
  provider = OEmbed::Provider.new('http://www.youtube.com/oembed?scheme=https')
247
247
  provider << 'http://*.youtube.com/*'
248
248
  url = 'http://youtube.com/watch?v=M3r2XDceM6A'
249
- provider.include?(url).should be_truthy
249
+ expect(provider).to include(url)
250
250
 
251
251
  uri = provider.send(:build, url)
252
- uri.query.include?("scheme=https").should be_truthy
253
- uri.query.include?("url=#{CGI.escape url}").should be_truthy
252
+ expect(uri.query).to include("scheme=https")
253
+ expect(uri.query).to include("url=#{CGI.escape url}")
254
254
  end
255
255
 
256
256
  it "should not include the :timeout parameter in the query string" do
@@ -258,15 +258,15 @@ describe OEmbed::Provider do
258
258
  :timeout => 5,
259
259
  :another => "test")
260
260
 
261
- uri.query.include?("timeout=5").should be_falsey
262
- uri.query.include?("another=test").should be_truthy
261
+ expect(uri.query).to_not include("timeout=5")
262
+ expect(uri.query).to include("another=test")
263
263
  end
264
264
  end
265
265
 
266
266
  describe "#raw" do
267
267
  it "should return the body on 200" do
268
268
  res = @flickr.send(:raw, example_url(:flickr))
269
- res.should == example_body(:flickr)
269
+ expect(res).to eq(example_body(:flickr))
270
270
  end
271
271
 
272
272
  it "should return the body on 200 even over https" do
@@ -275,7 +275,8 @@ describe OEmbed::Provider do
275
275
  @vimeo_ssl << "https://*.vimeo.com/*"
276
276
 
277
277
  expect {
278
- @vimeo_ssl.send(:raw, example_url(:vimeo_ssl)).should == example_body(:vimeo_ssl)
278
+ res = @vimeo_ssl.send(:raw, example_url(:vimeo_ssl))
279
+ expect(res).to eq(example_body(:vimeo_ssl))
279
280
  }.not_to raise_error
280
281
  end
281
282
 
@@ -313,18 +314,18 @@ describe OEmbed::Provider do
313
314
 
314
315
  describe "#get" do
315
316
  it "should send the specified format" do
316
- @flickr.should_receive(:raw).
317
+ expect(@flickr).to receive(:raw).
317
318
  with(example_url(:flickr), {:format=>:json}).
318
319
  and_return(valid_response(:json))
319
320
  @flickr.get(example_url(:flickr), :format=>:json)
320
321
 
321
- @flickr.should_receive(:raw).
322
+ expect(@flickr).to receive(:raw).
322
323
  with(example_url(:flickr), {:format=>:xml}).
323
324
  and_return(valid_response(:xml))
324
325
  @flickr.get(example_url(:flickr), :format=>:xml)
325
326
 
326
327
  expect {
327
- @flickr.should_receive(:raw).
328
+ expect(@flickr).to receive(:raw).
328
329
  with(example_url(:flickr), {:format=>:yml}).
329
330
  and_return(valid_response(:json))
330
331
  @flickr.get(example_url(:flickr), :format=>:yml)
@@ -332,47 +333,47 @@ describe OEmbed::Provider do
332
333
  end
333
334
 
334
335
  it "should return OEmbed::Response" do
335
- @flickr.stub(:raw).and_return(valid_response(@default))
336
- @flickr.get(example_url(:flickr)).should be_a(OEmbed::Response)
336
+ allow(@flickr).to receive(:raw).and_return(valid_response(@default))
337
+ expect(@flickr.get(example_url(:flickr))).to be_a(OEmbed::Response)
337
338
  end
338
339
 
339
340
  it "should be calling OEmbed::Response#create_for internally" do
340
- @flickr.stub(:raw).and_return(valid_response(@default))
341
- OEmbed::Response.should_receive(:create_for).
341
+ allow(@flickr).to receive(:raw).and_return(valid_response(@default))
342
+ expect(OEmbed::Response).to receive(:create_for).
342
343
  with(valid_response(@default), @flickr, example_url(:flickr), @default.to_s)
343
344
  @flickr.get(example_url(:flickr))
344
345
 
345
- @qik.stub(:raw).and_return(valid_response(:xml))
346
- OEmbed::Response.should_receive(:create_for).
346
+ allow(@qik).to receive(:raw).and_return(valid_response(:xml))
347
+ expect(OEmbed::Response).to receive(:create_for).
347
348
  with(valid_response(:xml), @qik, example_url(:qik), 'xml')
348
349
  @qik.get(example_url(:qik))
349
350
 
350
- @viddler.stub(:raw).and_return(valid_response(:json))
351
- OEmbed::Response.should_receive(:create_for).
351
+ allow(@viddler).to receive(:raw).and_return(valid_response(:json))
352
+ expect(OEmbed::Response).to receive(:create_for).
352
353
  with(valid_response(:json), @viddler, example_url(:viddler), 'json')
353
354
  @viddler.get(example_url(:viddler))
354
355
  end
355
356
 
356
357
  it "should send the provider's format if none is specified" do
357
- @flickr.should_receive(:raw).
358
+ expect(@flickr).to receive(:raw).
358
359
  with(example_url(:flickr), :format => @default).
359
360
  and_return(valid_response(@default))
360
361
  @flickr.get(example_url(:flickr))
361
362
 
362
- @qik.should_receive(:raw).
363
+ expect(@qik).to receive(:raw).
363
364
  with(example_url(:qik), :format=>:xml).
364
365
  and_return(valid_response(:xml))
365
366
  @qik.get(example_url(:qik))
366
367
 
367
- @viddler.should_receive(:raw).
368
+ expect(@viddler).to receive(:raw).
368
369
  with(example_url(:viddler), :format=>:json).
369
370
  and_return(valid_response(:json))
370
371
  @viddler.get(example_url(:viddler))
371
372
  end
372
373
 
373
374
  it "handles the :timeout option" do
374
- Net::HTTP.any_instance.should_receive(:open_timeout=).with(5)
375
- Net::HTTP.any_instance.should_receive(:read_timeout=).with(5)
375
+ expect_any_instance_of(Net::HTTP).to receive(:open_timeout=).with(5)
376
+ expect_any_instance_of(Net::HTTP).to receive(:read_timeout=).with(5)
376
377
  @flickr.get(example_url(:flickr), :timeout => 5)
377
378
  end
378
379
  end
@@ -127,9 +127,9 @@ describe OEmbed::Providers do
127
127
  OEmbed::Providers.register_all
128
128
  all_example_urls.each do |url|
129
129
  provider = OEmbed::Providers.find(url)
130
- provider.should_receive(:raw).
130
+ expect(provider).should_receive(:raw).
131
131
  with(url, {})
132
- provider.should_receive(:get).
132
+ expect(provider).should_receive(:get).
133
133
  with(url, {})
134
134
  OEmbed::Providers.raw(url)
135
135
  OEmbed::Providers.get(url)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-oembed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.13
4
+ version: 0.8.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus Holm
@@ -184,7 +184,7 @@ rdoc_options:
184
184
  - "--main"
185
185
  - README.rdoc
186
186
  - "--title"
187
- - ruby-oembed-0.8.13
187
+ - ruby-oembed-0.8.14
188
188
  - "--inline-source"
189
189
  - "--exclude"
190
190
  - tasks