ruby-oembed 0.8.7 → 0.8.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :get
5
- uri: http://www.flickr.com:80/services/oembed/?format=json&url=http://flickr.com/photos/bees/2362225867/
5
+ uri: http://www.flickr.com:80/services/oembed/?format=json&url=http%3A%2F%2Fflickr.com%2Fphotos%2Fbees%2F2362225867%2F
6
6
  body: !!null
7
7
  headers: !!null
8
8
  response: !ruby/struct:VCR::Response
@@ -42,7 +42,7 @@
42
42
  - !ruby/struct:VCR::HTTPInteraction
43
43
  request: !ruby/struct:VCR::Request
44
44
  method: :get
45
- uri: http://www.flickr.com:80/services/oembed/?format=json&url=http://flickr.com/photos/bees/2362225867/404
45
+ uri: http://www.flickr.com:80/services/oembed/?format=json&url=http%3A%2F%2Fflickr.com%2Fphotos%2Fbees%2F2362225867%2F404
46
46
  body: !!null
47
47
  headers: !!null
48
48
  response: !ruby/struct:VCR::Response
@@ -79,7 +79,7 @@
79
79
  - !ruby/struct:VCR::HTTPInteraction
80
80
  request: !ruby/struct:VCR::Request
81
81
  method: :get
82
- uri: http://www.flickr.com:80/services/oembed/?format=json&url=http://flickr.com/photos/bees/2362225867/405
82
+ uri: http://www.flickr.com:80/services/oembed/?format=json&url=http%3A%2F%2Fflickr.com%2Fphotos%2Fbees%2F2362225867%2F405
83
83
  body: !!null
84
84
  headers: !!null
85
85
  response: !ruby/struct:VCR::Response
@@ -116,7 +116,7 @@
116
116
  - !ruby/struct:VCR::HTTPInteraction
117
117
  request: !ruby/struct:VCR::Request
118
118
  method: :get
119
- uri: http://www.flickr.com:80/services/oembed/?format=json&url=http://flickr.com/photos/bees/2362225867/500
119
+ uri: http://www.flickr.com:80/services/oembed/?format=json&url=http%3A%2F%2Fflickr.com%2Fphotos%2Fbees%2F2362225867%2F500
120
120
  body: !!null
121
121
  headers: !!null
122
122
  response: !ruby/struct:VCR::Response
@@ -153,7 +153,7 @@
153
153
  - !ruby/struct:VCR::HTTPInteraction
154
154
  request: !ruby/struct:VCR::Request
155
155
  method: :get
156
- uri: http://www.flickr.com:80/services/oembed/?format=json&url=http://flickr.com/photos/bees/2362225867/501
156
+ uri: http://www.flickr.com:80/services/oembed/?format=json&url=http%3A%2F%2Fflickr.com%2Fphotos%2Fbees%2F2362225867%2F501
157
157
  body: !!null
158
158
  headers: !!null
159
159
  response: !ruby/struct:VCR::Response
@@ -190,7 +190,7 @@
190
190
  - !ruby/struct:VCR::HTTPInteraction
191
191
  request: !ruby/struct:VCR::Request
192
192
  method: :get
193
- uri: https://vimeo.com:443/api/oembed.json?url=https://vimeo.com/31158841
193
+ uri: https://vimeo.com:443/api/oembed.json?url=https%3A%2F%2Fvimeo.com%2F31158841
194
194
  body: !!null
195
195
  headers: !!null
196
196
  response: !ruby/struct:VCR::Response
@@ -542,7 +542,7 @@
542
542
  - !ruby/struct:VCR::HTTPInteraction
543
543
  request: !ruby/struct:VCR::Request
544
544
  method: :get
545
- uri: http://www.youtube.com:80/oembed?format=json&url=http://www.youtube.com/watch?v=u6XAPnuFjJc
545
+ uri: http://www.youtube.com:80/oembed?format=json&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Du6XAPnuFjJc
546
546
  body:
547
547
  headers:
548
548
  response: !ruby/struct:VCR::Response
@@ -704,7 +704,7 @@
704
704
  - !ruby/struct:VCR::HTTPInteraction
705
705
  request: !ruby/struct:VCR::Request
706
706
  method: :get
707
- uri: http://www.youtube.com:80/oembed?format=json&url=http://www.youtube.com/watch?v=u6XAPnuFjJc
707
+ uri: http://www.youtube.com:80/oembed?format=json&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Du6XAPnuFjJc
708
708
  body:
709
709
  headers:
710
710
  response: !ruby/struct:VCR::Response
@@ -866,7 +866,7 @@
866
866
  - !ruby/struct:VCR::HTTPInteraction
867
867
  request: !ruby/struct:VCR::Request
868
868
  method: :get
869
- uri: http://www.youtube.com:80/oembed?format=xml&url=http://www.youtube.com/watch?v=u6XAPnuFjJc
869
+ uri: http://www.youtube.com:80/oembed?format=xml&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Du6XAPnuFjJc
870
870
  body:
871
871
  headers:
872
872
  response: !ruby/struct:VCR::Response
@@ -2919,7 +2919,7 @@
2919
2919
  - !ruby/struct:VCR::HTTPInteraction
2920
2920
  request: !ruby/struct:VCR::Request
2921
2921
  method: :get
2922
- uri: http://vimeo.com:80/api/oembed.json?format=json&url=http://vimeo.com/27953845
2922
+ uri: http://vimeo.com:80/api/oembed.json?format=json&url=http%3A%2F%2Fvimeo.com%2F27953845
2923
2923
  body:
2924
2924
  headers:
2925
2925
  response: !ruby/struct:VCR::Response
@@ -3455,7 +3455,7 @@
3455
3455
  - !ruby/struct:VCR::HTTPInteraction
3456
3456
  request: !ruby/struct:VCR::Request
3457
3457
  method: :get
3458
- uri: http://vimeo.com:80/api/oembed.json?format=json&url=http://vimeo.com/27953845
3458
+ uri: http://vimeo.com:80/api/oembed.json?format=json&url=http%3A%2F%2Fvimeo.com%2F27953845
3459
3459
  body:
3460
3460
  headers:
3461
3461
  response: !ruby/struct:VCR::Response
@@ -3991,7 +3991,7 @@
3991
3991
  - !ruby/struct:VCR::HTTPInteraction
3992
3992
  request: !ruby/struct:VCR::Request
3993
3993
  method: :get
3994
- uri: http://vimeo.com:80/api/oembed.xml?format=xml&url=http://vimeo.com/27953845
3994
+ uri: http://vimeo.com:80/api/oembed.xml?format=xml&url=http%3A%2F%2Fvimeo.com%2F27953845
3995
3995
  body:
3996
3996
  headers:
3997
3997
  response: !ruby/struct:VCR::Response
@@ -219,13 +219,13 @@ describe OEmbed::Provider do
219
219
  uri.host.should == "www.flickr.com"
220
220
  uri.path.should == "/services/oembed/"
221
221
  uri.query.include?("format=#{@flickr.format}").should be_true
222
- uri.query.include?("url=http://flickr.com/photos/bees/2362225867/").should be_true
222
+ uri.query.include?("url=#{CGI.escape 'http://flickr.com/photos/bees/2362225867/'}").should be_true
223
223
 
224
224
  uri = @qik.send(:build, example_url(:qik))
225
225
  uri.host.should == "qik.com"
226
226
  uri.path.should == "/api/oembed.xml"
227
227
  uri.query.include?("format=#{@qik.format}").should be_false
228
- uri.query.should == "url=http://qik.com/video/49565"
228
+ uri.query.should == "url=#{CGI.escape 'http://qik.com/video/49565'}"
229
229
  end
230
230
 
231
231
  it "should accept parameters" do
@@ -245,6 +245,17 @@ describe OEmbed::Provider do
245
245
  uri = @qik.send(:build, example_url(:qik), :format => :json)
246
246
  uri.path.should == "/api/oembed.json"
247
247
  end
248
+
249
+ it "should build correctly with query parameters in the endpoint URL" do
250
+ provider = OEmbed::Provider.new('http://www.youtube.com/oembed?scheme=https')
251
+ provider << 'http://*.youtube.com/*'
252
+ url = 'http://youtube.com/watch?v=M3r2XDceM6A'
253
+ provider.include?(url).should be_true
254
+
255
+ uri = provider.send(:build, url)
256
+ uri.query.include?("scheme=https").should be_true
257
+ uri.query.include?("url=#{CGI.escape url}").should be_true
258
+ end
248
259
  end
249
260
 
250
261
  describe "#raw" do
@@ -3,134 +3,162 @@ require File.dirname(__FILE__) + '/spec_helper'
3
3
  describe OEmbed::Response do
4
4
  include OEmbedSpecHelper
5
5
 
6
- before(:all) do
7
- @flickr = OEmbed::Provider.new("http://www.flickr.com/services/oembed/")
8
- @qik = OEmbed::Provider.new("http://qik.com/api/oembed.{format}", :xml)
9
- @viddler = OEmbed::Provider.new("http://lab.viddler.com/services/oembed/", :json)
10
-
11
- @flickr << "http://*.flickr.com/*"
12
- @qik << "http://qik.com/video/*"
13
- @qik << "http://qik.com/*"
14
- @viddler << "http://*.viddler.com/*"
15
-
16
- @new_res = OEmbed::Response.new(valid_response(:object), OEmbed::Providers::OohEmbed)
17
-
18
- @default_res = OEmbed::Response.create_for(valid_response(:json), @flickr, example_url(:flickr), :json)
19
- @xml_res = OEmbed::Response.create_for(valid_response(:xml), @qik, example_url(:qik), :xml)
20
- @json_res = OEmbed::Response.create_for(valid_response(:json), @viddler, example_url(:viddler), :json)
21
-
22
- # These keys should be turned into helper methods
23
- @expected_helpers = {
6
+ let(:flickr) {
7
+ flickr = OEmbed::Provider.new("http://www.flickr.com/services/oembed/")
8
+ flickr << "http://*.flickr.com/*"
9
+ flickr
10
+ }
11
+
12
+ let(:skitch) {
13
+ OEmbed::Provider.new("https://skitch.com/oembed")
14
+ }
15
+
16
+ let(:qik) {
17
+ qik = OEmbed::Provider.new("http://qik.com/api/oembed.{format}", :xml)
18
+ qik << "http://qik.com/video/*"
19
+ qik << "http://qik.com/*"
20
+ qik
21
+ }
22
+
23
+ let(:viddler) {
24
+ viddler = OEmbed::Provider.new("http://lab.viddler.com/services/oembed/", :json)
25
+ viddler << "http://*.viddler.com/*"
26
+ viddler
27
+ }
28
+
29
+ let(:new_res) {
30
+ OEmbed::Response.new(valid_response(:object), OEmbed::Providers::OohEmbed)
31
+ }
32
+
33
+ let(:default_res) {
34
+ OEmbed::Response.create_for(valid_response(:json), @flickr, example_url(:flickr), :json)
35
+ }
36
+
37
+ let(:xml_res) {
38
+ OEmbed::Response.create_for(valid_response(:xml), @qik, example_url(:qik), :xml)
39
+ }
40
+
41
+ let(:json_res) {
42
+ OEmbed::Response.create_for(valid_response(:json), @viddler, example_url(:viddler), :json)
43
+ }
44
+
45
+ let(:expected_helpers) {
46
+ {
24
47
  "type" => "random",
25
48
  "version" => "1.0",
26
49
  "html" => "&lt;em&gt;Hello world!&lt;/em&gt;",
27
50
  "url" => "http://foo.com/bar",
28
51
  }
29
- # These keys should already be defined
30
- @expected_skipped = {
52
+ }
53
+
54
+ let(:expected_skipped) {
55
+ {
31
56
  "fields" => "hello",
32
57
  "__id__" => 1234,
33
58
  "provider" => "oohEmbed",
34
59
  "to_s" => "random string",
35
60
  }
36
- @all_expected = @expected_helpers.merge(@expected_skipped)
37
- end
61
+ }
62
+
63
+ let(:all_expected) {
64
+ expected_helpers.merge(expected_skipped)
65
+ }
38
66
 
39
67
  describe "#initialize" do
40
68
  it "should parse the data into fields" do
41
69
  # We need to compare keys & values separately because we don't expect all
42
70
  # non-string values to be recognized correctly.
43
71
 
44
- @new_res.fields.keys.should == valid_response(:object).keys
45
- @new_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s}
72
+ new_res.fields.keys.should == valid_response(:object).keys
73
+ new_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s}
46
74
 
47
- @default_res.fields.keys.should == valid_response(:object).keys
48
- @default_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s}
75
+ default_res.fields.keys.should == valid_response(:object).keys
76
+ default_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s}
49
77
 
50
- @xml_res.fields.keys.should == valid_response(:object).keys
51
- @xml_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s}
78
+ xml_res.fields.keys.should == valid_response(:object).keys
79
+ xml_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s}
52
80
 
53
- @json_res.fields.keys.should == valid_response(:object).keys
54
- @json_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s}
81
+ json_res.fields.keys.should == valid_response(:object).keys
82
+ json_res.fields.values.map{|v|v.to_s}.should == valid_response(:object).values.map{|v|v.to_s}
55
83
  end
56
84
 
57
85
  it "should set the provider" do
58
- @new_res.provider.should == OEmbed::Providers::OohEmbed
59
- @default_res.provider.should == @flickr
60
- @xml_res.provider.should == @qik
61
- @json_res.provider.should == @viddler
86
+ new_res.provider.should == OEmbed::Providers::OohEmbed
87
+ default_res.provider.should == @flickr
88
+ xml_res.provider.should == @qik
89
+ json_res.provider.should == @viddler
62
90
  end
63
91
 
64
92
  it "should set the format" do
65
- @new_res.format.should be_nil
66
- @default_res.format.to_s.should == 'json'
67
- @xml_res.format.to_s.should == 'xml'
68
- @json_res.format.to_s.should == 'json'
93
+ new_res.format.should be_nil
94
+ default_res.format.to_s.should == 'json'
95
+ xml_res.format.to_s.should == 'xml'
96
+ json_res.format.to_s.should == 'json'
69
97
  end
70
98
 
71
99
  it "should set the request_url" do
72
- @new_res.request_url.should be_nil
73
- @default_res.request_url.to_s.should == example_url(:flickr)
74
- @xml_res.request_url.to_s.should == example_url(:qik)
75
- @json_res.request_url.to_s.should == example_url(:viddler)
100
+ new_res.request_url.should be_nil
101
+ default_res.request_url.to_s.should == example_url(:flickr)
102
+ xml_res.request_url.to_s.should == example_url(:qik)
103
+ json_res.request_url.to_s.should == example_url(:viddler)
76
104
  end
77
105
  end
78
106
 
79
107
  describe "create_for" do
80
108
  it "should only allow JSON or XML" do
81
109
  lambda do
82
- OEmbed::Response.create_for(valid_response(:json), @flickr, example_url(:flickr), :json)
110
+ OEmbed::Response.create_for(valid_response(:json), flickr, example_url(:flickr), :json)
83
111
  end.should_not raise_error(OEmbed::FormatNotSupported)
84
112
 
85
113
  lambda do
86
- OEmbed::Response.create_for(valid_response(:xml), @flickr, example_url(:flickr), :xml)
114
+ OEmbed::Response.create_for(valid_response(:xml), flickr, example_url(:flickr), :xml)
87
115
  end.should_not raise_error(OEmbed::FormatNotSupported)
88
116
 
89
117
  lambda do
90
- OEmbed::Response.create_for(valid_response(:yml), @flickr, example_url(:flickr), :yml)
118
+ OEmbed::Response.create_for(valid_response(:yml), flickr, example_url(:flickr), :yml)
91
119
  end.should raise_error(OEmbed::FormatNotSupported)
92
120
  end
93
121
 
94
122
  it "should not parse the incorrect format" do
95
123
  lambda do
96
- OEmbed::Response.create_for(valid_response(:object), example_url(:flickr), @flickr, :json)
124
+ OEmbed::Response.create_for(valid_response(:object), example_url(:flickr), flickr, :json)
97
125
  end.should raise_error(OEmbed::ParseError)
98
126
 
99
127
  lambda do
100
- OEmbed::Response.create_for(valid_response(:xml), example_url(:flickr), @viddler, :json)
128
+ OEmbed::Response.create_for(valid_response(:xml), example_url(:flickr), viddler, :json)
101
129
  end.should raise_error(OEmbed::ParseError)
102
130
 
103
131
  lambda do
104
- OEmbed::Response.create_for(valid_response(:json), example_url(:flickr), @viddler, :xml)
132
+ OEmbed::Response.create_for(valid_response(:json), example_url(:flickr), viddler, :xml)
105
133
  end.should raise_error(OEmbed::ParseError)
106
134
  end
107
135
  end
108
136
 
109
137
  it "should access the XML data through #field" do
110
- @xml_res.field(:type).should == "photo"
111
- @xml_res.field(:version).should == "1.0"
112
- @xml_res.field(:fields).should == "hello"
113
- @xml_res.field(:__id__).should == "1234"
138
+ xml_res.field(:type).should == "photo"
139
+ xml_res.field(:version).should == "1.0"
140
+ xml_res.field(:fields).should == "hello"
141
+ xml_res.field(:__id__).should == "1234"
114
142
  end
115
143
 
116
144
  it "should access the JSON data through #field" do
117
- @json_res.field(:type).should == "photo"
118
- @json_res.field(:version).should == "1.0"
119
- @json_res.field(:fields).should == "hello"
120
- @json_res.field(:__id__).should == "1234"
145
+ json_res.field(:type).should == "photo"
146
+ json_res.field(:version).should == "1.0"
147
+ json_res.field(:fields).should == "hello"
148
+ json_res.field(:__id__).should == "1234"
121
149
  end
122
150
 
123
151
  describe "#define_methods!" do
124
152
  it "should automagically define helpers" do
125
- local_res = OEmbed::Response.new(@all_expected, OEmbed::Providers::OohEmbed)
153
+ local_res = OEmbed::Response.new(all_expected, OEmbed::Providers::OohEmbed)
126
154
 
127
- @all_expected.each do |method, value|
155
+ all_expected.each do |method, value|
128
156
  local_res.should respond_to(method)
129
157
  end
130
- @expected_helpers.each do |method, value|
158
+ expected_helpers.each do |method, value|
131
159
  local_res.send(method).should == value
132
160
  end
133
- @expected_skipped.each do |method, value|
161
+ expected_skipped.each do |method, value|
134
162
  local_res.send(method).should_not == value
135
163
  end
136
164
  end
@@ -139,10 +167,10 @@ describe OEmbed::Response do
139
167
  Object.new.should respond_to('__id__')
140
168
  Object.new.should respond_to('to_s')
141
169
 
142
- @all_expected.keys.should include('__id__')
143
- @all_expected.keys.should include('to_s')
170
+ all_expected.keys.should include('__id__')
171
+ all_expected.keys.should include('to_s')
144
172
 
145
- local_res = OEmbed::Response.new(@all_expected, OEmbed::Providers::OohEmbed)
173
+ local_res = OEmbed::Response.new(all_expected, OEmbed::Providers::OohEmbed)
146
174
 
147
175
  local_res.__id__.should_not == local_res.field('__id__')
148
176
  local_res.to_s.should_not == local_res.field('to_s')
@@ -158,14 +186,35 @@ describe OEmbed::Response do
158
186
  Object.new.should respond_to('version')
159
187
  String.new.should respond_to('version')
160
188
 
161
- @all_expected.keys.should include('version')
162
- @all_expected['version'].should_not == String.new.version
189
+ all_expected.keys.should include('version')
190
+ all_expected['version'].should_not == String.new.version
163
191
 
164
- local_res = OEmbed::Response.new(@all_expected, OEmbed::Providers::OohEmbed)
192
+ local_res = OEmbed::Response.new(all_expected, OEmbed::Providers::OohEmbed)
165
193
 
166
194
  local_res.version.should == local_res.field('version')
167
195
  local_res.version.should_not == String.new.version
168
196
  end
169
197
  end
170
198
 
199
+ describe "OEmbed::Response::Photo" do
200
+ describe "#html" do
201
+ it "should include the title, if given" do
202
+ response = OEmbed::Response.create_for(example_body(:flickr), example_url(:flickr), flickr, :json)
203
+ response.should respond_to(:title)
204
+ response.title.should_not be_empty
205
+
206
+ response.html.should_not be_nil
207
+ response.html.should match(/alt='#{response.title}'/)
208
+ end
209
+
210
+ it "should work just fine, without a title" do
211
+ response = OEmbed::Response.create_for(example_body(:skitch), example_url(:skitch), skitch, :json)
212
+ response.should_not respond_to(:title)
213
+
214
+ response.html.should_not be_nil
215
+ response.html.should match(/alt=''/)
216
+ end
217
+ end
218
+ end
219
+
171
220
  end
@@ -6,6 +6,9 @@
6
6
  Lollys","author_name":"\u202e\u202d\u202cbees\u202c","width":"500","height":"375","url":"http:\/\/farm4.staticflickr.com\/3040\/2362225867_4a87ab8baf.jpg"}
7
7
 
8
8
  '
9
+ :skitch:
10
+ :url: "http://skitch.com/sethferreira/nmbr8/the-kings-new-toy"
11
+ :body: ! '{"type":"photo","version":"1.0","author_name":"sethferreira","author_url":"http:\/\/skitch.com\/sethferreira\/","provider_name":"Skitch.com","provider_url":"http:\/\/skitch.com\/","width":804,"height":804,"url":"https:\/\/img.skitch.com\/20091210-m9cq9r2e6cy1j1sn23acn38kx.jpg","thumbnail_width":337,"thumbnail_height":337,"thumbnail_url":"https:\/\/img.skitch.com\/20091210-m9cq9r2e6cy1j1sn23acn38kx.preview.jpg","cache_age":86400}'
9
12
  :viddler:
10
13
  :url: "http://www.viddler.com/explore/cdevroe/videos/424/"
11
14
  :qik:
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.7
4
+ version: 0.8.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,11 +12,11 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-03-12 00:00:00.000000000 Z
15
+ date: 2012-11-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
- name: jeweler
19
- requirement: &70130727181160 !ruby/object:Gem::Requirement
18
+ name: rake
19
+ requirement: !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ! '>='
@@ -24,21 +24,15 @@ dependencies:
24
24
  version: '0'
25
25
  type: :development
26
26
  prerelease: false
27
- version_requirements: *70130727181160
28
- - !ruby/object:Gem::Dependency
29
- name: rake
30
- requirement: &70130727180620 !ruby/object:Gem::Requirement
27
+ version_requirements: !ruby/object:Gem::Requirement
31
28
  none: false
32
29
  requirements:
33
30
  - - ! '>='
34
31
  - !ruby/object:Gem::Version
35
32
  version: '0'
36
- type: :development
37
- prerelease: false
38
- version_requirements: *70130727180620
39
33
  - !ruby/object:Gem::Dependency
40
34
  name: json
41
- requirement: &70130727179960 !ruby/object:Gem::Requirement
35
+ requirement: !ruby/object:Gem::Requirement
42
36
  none: false
43
37
  requirements:
44
38
  - - ! '>='
@@ -46,10 +40,15 @@ dependencies:
46
40
  version: '0'
47
41
  type: :development
48
42
  prerelease: false
49
- version_requirements: *70130727179960
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
50
49
  - !ruby/object:Gem::Dependency
51
50
  name: xml-simple
52
- requirement: &70130727179260 !ruby/object:Gem::Requirement
51
+ requirement: !ruby/object:Gem::Requirement
53
52
  none: false
54
53
  requirements:
55
54
  - - ! '>='
@@ -57,10 +56,15 @@ dependencies:
57
56
  version: '0'
58
57
  type: :development
59
58
  prerelease: false
60
- version_requirements: *70130727179260
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ! '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
61
65
  - !ruby/object:Gem::Dependency
62
66
  name: nokogiri
63
- requirement: &70130727178760 !ruby/object:Gem::Requirement
67
+ requirement: !ruby/object:Gem::Requirement
64
68
  none: false
65
69
  requirements:
66
70
  - - ! '>='
@@ -68,10 +72,15 @@ dependencies:
68
72
  version: '0'
69
73
  type: :development
70
74
  prerelease: false
71
- version_requirements: *70130727178760
75
+ version_requirements: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
72
81
  - !ruby/object:Gem::Dependency
73
82
  name: rspec
74
- requirement: &70130727178240 !ruby/object:Gem::Requirement
83
+ requirement: !ruby/object:Gem::Requirement
75
84
  none: false
76
85
  requirements:
77
86
  - - ! '>='
@@ -79,10 +88,15 @@ dependencies:
79
88
  version: '2.0'
80
89
  type: :development
81
90
  prerelease: false
82
- version_requirements: *70130727178240
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '2.0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: vcr
85
- requirement: &70130727177700 !ruby/object:Gem::Requirement
99
+ requirement: !ruby/object:Gem::Requirement
86
100
  none: false
87
101
  requirements:
88
102
  - - ~>
@@ -90,10 +104,15 @@ dependencies:
90
104
  version: '1.0'
91
105
  type: :development
92
106
  prerelease: false
93
- version_requirements: *70130727177700
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ~>
111
+ - !ruby/object:Gem::Version
112
+ version: '1.0'
94
113
  - !ruby/object:Gem::Dependency
95
114
  name: fakeweb
96
- requirement: &70130727177160 !ruby/object:Gem::Requirement
115
+ requirement: !ruby/object:Gem::Requirement
97
116
  none: false
98
117
  requirements:
99
118
  - - ! '>='
@@ -101,7 +120,12 @@ dependencies:
101
120
  version: '0'
102
121
  type: :development
103
122
  prerelease: false
104
- version_requirements: *70130727177160
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ none: false
125
+ requirements:
126
+ - - ! '>='
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
105
129
  description: An oEmbed consumer library written in Ruby, letting you easily get embeddable
106
130
  HTML representations of supported web pages, based on their URLs. See http://oembed.com
107
131
  for more information about the protocol.
@@ -109,15 +133,16 @@ email: arisbartee@gmail.com
109
133
  executables: []
110
134
  extensions: []
111
135
  extra_rdoc_files:
112
- - LICENSE
136
+ - CHANGELOG.rdoc
113
137
  - README.rdoc
138
+ - LICENSE
114
139
  files:
140
+ - .gitignore
115
141
  - .rvmrc
116
142
  - .travis.yml
117
143
  - .yardopts
118
144
  - CHANGELOG.rdoc
119
145
  - Gemfile
120
- - Gemfile.lock
121
146
  - LICENSE
122
147
  - README.rdoc
123
148
  - Rakefile
@@ -173,7 +198,7 @@ rdoc_options:
173
198
  - --main
174
199
  - README.rdoc
175
200
  - --title
176
- - ruby-oembed-0.8.7
201
+ - ruby-oembed-0.8.8
177
202
  - --inline-source
178
203
  - --exclude
179
204
  - tasks
@@ -194,8 +219,24 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
219
  version: '0'
195
220
  requirements: []
196
221
  rubyforge_project:
197
- rubygems_version: 1.8.10
222
+ rubygems_version: 1.8.19
198
223
  signing_key:
199
224
  specification_version: 3
200
225
  summary: oEmbed for Ruby
201
- test_files: []
226
+ test_files:
227
+ - spec/cassettes/OEmbed_Provider.yml
228
+ - spec/cassettes/OEmbed_ProviderDiscovery.yml
229
+ - spec/formatter/ducktype_backend_spec.rb
230
+ - spec/formatter/json/.DS_Store
231
+ - spec/formatter/json/jsongem_backend_spec.rb
232
+ - spec/formatter/json/yaml_backend_spec.rb
233
+ - spec/formatter/xml/nokogiri_backend_spec.rb
234
+ - spec/formatter/xml/rexml_backend_spec.rb
235
+ - spec/formatter/xml/xmlsimple_backend_spec.rb
236
+ - spec/formatter_spec.rb
237
+ - spec/provider_discovery_spec.rb
238
+ - spec/provider_spec.rb
239
+ - spec/providers_spec.rb
240
+ - spec/response_spec.rb
241
+ - spec/spec_helper.rb
242
+ - spec/spec_helper_examples.yml
data/Gemfile.lock DELETED
@@ -1,36 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- diff-lcs (1.1.2)
5
- fakeweb (1.3.0)
6
- git (1.2.5)
7
- jeweler (1.6.2)
8
- bundler (~> 1.0)
9
- git (>= 1.2.5)
10
- rake
11
- json (1.5.3)
12
- nokogiri (1.5.0)
13
- rake (0.9.2)
14
- rspec (2.6.0)
15
- rspec-core (~> 2.6.0)
16
- rspec-expectations (~> 2.6.0)
17
- rspec-mocks (~> 2.6.0)
18
- rspec-core (2.6.4)
19
- rspec-expectations (2.6.0)
20
- diff-lcs (~> 1.1.2)
21
- rspec-mocks (2.6.0)
22
- vcr (1.11.3)
23
- xml-simple (1.1.0)
24
-
25
- PLATFORMS
26
- ruby
27
-
28
- DEPENDENCIES
29
- fakeweb
30
- jeweler
31
- json
32
- nokogiri
33
- rake
34
- rspec (>= 2.0)
35
- vcr (~> 1.0)
36
- xml-simple