onebox 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +4 -0
  3. data/.travis.yml +4 -0
  4. data/README.md +154 -113
  5. data/lib/onebox.rb +6 -3
  6. data/lib/onebox/engine.rb +28 -26
  7. data/lib/onebox/engine/amazon_onebox.rb +4 -2
  8. data/lib/onebox/engine/bliptv_onebox.rb +4 -2
  9. data/lib/onebox/engine/clikthrough_onebox.rb +4 -2
  10. data/lib/onebox/engine/college_humor_onebox.rb +3 -2
  11. data/lib/onebox/engine/dailymotion_onebox.rb +4 -2
  12. data/lib/onebox/engine/dotsub_onebox.rb +4 -2
  13. data/lib/onebox/engine/example_onebox.rb +4 -5
  14. data/lib/onebox/engine/flickr_onebox.rb +3 -2
  15. data/lib/onebox/engine/funny_or_die_onebox.rb +4 -2
  16. data/lib/onebox/engine/github_blob_onebox.rb +28 -0
  17. data/lib/onebox/engine/github_commit_onebox.rb +43 -0
  18. data/lib/onebox/engine/github_gist_onebox.rb +33 -0
  19. data/lib/onebox/engine/github_pullrequest_onebox.rb +43 -0
  20. data/lib/onebox/engine/html.rb +1 -1
  21. data/lib/onebox/engine/hulu_onebox.rb +5 -2
  22. data/lib/onebox/engine/imgur_image_onebox.rb +26 -0
  23. data/lib/onebox/engine/itunes_onebox.rb +28 -0
  24. data/lib/onebox/engine/json.rb +11 -0
  25. data/lib/onebox/engine/kinomap_onebox.rb +27 -0
  26. data/lib/onebox/engine/nfb_onebox.rb +5 -2
  27. data/lib/onebox/engine/open_graph.rb +1 -1
  28. data/lib/onebox/engine/qik_onebox.rb +4 -2
  29. data/lib/onebox/engine/revision3_onebox.rb +3 -2
  30. data/lib/onebox/engine/slideshare_onebox.rb +4 -2
  31. data/lib/onebox/engine/sound_cloud_onebox.rb +4 -2
  32. data/lib/onebox/engine/spotify_onebox.rb +27 -0
  33. data/lib/onebox/engine/stack_exchange_onebox.rb +4 -2
  34. data/lib/onebox/engine/ted_onebox.rb +5 -2
  35. data/lib/onebox/engine/twitter_onebox.rb +31 -0
  36. data/lib/onebox/engine/viddler_onebox.rb +5 -3
  37. data/lib/onebox/engine/vimeo_onebox.rb +3 -2
  38. data/lib/onebox/engine/wikipedia_onebox.rb +4 -2
  39. data/lib/onebox/engine/yfrog_onebox.rb +5 -2
  40. data/lib/onebox/version.rb +1 -1
  41. data/lib/onebox/view.rb +21 -0
  42. data/onebox.gemspec +1 -1
  43. data/spec/fixtures/githubblob.response +922 -0
  44. data/spec/fixtures/githubcommit.response +87 -0
  45. data/spec/fixtures/githubgist.response +468 -0
  46. data/spec/fixtures/githubpullrequest.response +216 -0
  47. data/spec/fixtures/imguralbum.response +941 -0
  48. data/spec/fixtures/{imgur.response → imgurimage.response} +870 -890
  49. data/spec/fixtures/itunes.response +402 -0
  50. data/spec/fixtures/{rottentomatoes_fresh.response → rottentomatoesfresh.response} +0 -0
  51. data/spec/fixtures/{rottentomatoes_incomplete.response → rottentomatoesincomplete.response} +0 -0
  52. data/spec/fixtures/{rottentomatoes_rotten.response → rottentomatoesrotten.response} +0 -0
  53. data/spec/fixtures/spotify.response +250 -0
  54. data/spec/fixtures/{wikipedia_redirected.response → wikipediaredirected.response} +0 -0
  55. data/spec/lib/onebox/engine/{amazon_spec.rb → amazon_onebox_spec.rb} +7 -4
  56. data/spec/lib/onebox/engine/{bliptv_spec.rb → bliptv_onebox_spec.rb} +7 -4
  57. data/spec/lib/onebox/engine/{clikthrough_spec.rb → clikthrough_onebox_spec.rb} +7 -4
  58. data/spec/lib/onebox/engine/{college_humor_spec.rb → college_humor_onebox_spec.rb} +7 -4
  59. data/spec/lib/onebox/engine/{dailymotion_spec.rb → dailymotion_onebox_spec.rb} +7 -4
  60. data/spec/lib/onebox/engine/{dotsub_spec.rb → dotsub_onebox_spec.rb} +7 -4
  61. data/spec/lib/onebox/engine/example_onebox_spec.rb +21 -0
  62. data/spec/lib/onebox/engine/{flickr_spec.rb → flickr_onebox_spec.rb} +7 -4
  63. data/spec/lib/onebox/engine/{funny_or_die_spec.rb → funny_or_die_onebox_spec.rb} +7 -4
  64. data/spec/lib/onebox/engine/github_blob_onebox_spec.rb +30 -0
  65. data/spec/lib/onebox/engine/github_commit_onebox_spec.rb +61 -0
  66. data/spec/lib/onebox/engine/github_gist_onebox_spec.rb +29 -0
  67. data/spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb +58 -0
  68. data/spec/lib/onebox/engine/html_spec.rb +27 -0
  69. data/spec/lib/onebox/engine/{hulu_spec.rb → hulu_onebox_spec.rb} +7 -4
  70. data/spec/lib/onebox/engine/imgur_image_onebox_spec.rb +29 -0
  71. data/spec/lib/onebox/engine/itunes_onebox_spec.rb +29 -0
  72. data/spec/lib/onebox/engine/json_spec.rb +27 -0
  73. data/spec/lib/onebox/engine/kinomap_onebox_spec.rb +37 -0
  74. data/spec/lib/onebox/engine/{nfb_spec.rb → nfb_onebox_spec.rb} +7 -4
  75. data/spec/lib/onebox/engine/open_graph_spec.rb +27 -0
  76. data/spec/lib/onebox/engine/{qik_spec.rb → qik_onebox_spec.rb} +7 -4
  77. data/spec/lib/onebox/engine/{revision3_spec.rb → revision3_onebox_spec.rb} +7 -4
  78. data/spec/lib/onebox/engine/{slideshare_spec.rb → slideshare_onebox_spec.rb} +7 -4
  79. data/spec/lib/onebox/engine/{sound_cloud_spec.rb → sound_cloud_onebox_spec.rb} +7 -4
  80. data/spec/lib/onebox/engine/spotify_onebox_spec.rb +36 -0
  81. data/spec/lib/onebox/engine/{stack_exchange_spec.rb → stack_exchange_onebox_spec.rb} +7 -4
  82. data/spec/lib/onebox/engine/{ted_spec.rb → ted_onebox_spec.rb} +7 -4
  83. data/spec/lib/onebox/engine/twitter_onebox_spec.rb +47 -0
  84. data/spec/lib/onebox/engine/{viddler_spec.rb → viddler_onebox_spec.rb} +7 -4
  85. data/spec/lib/onebox/engine/{vimeo_spec.rb → vimeo_onebox_spec.rb} +7 -4
  86. data/spec/lib/onebox/engine/{wikipedia_spec.rb → wikipedia_onebox_spec.rb} +7 -4
  87. data/spec/lib/onebox/engine/{yfrog_spec.rb → yfrog_onebox_spec.rb} +7 -4
  88. data/spec/lib/onebox/engine_spec.rb +38 -27
  89. data/spec/lib/onebox/preview_spec.rb +3 -1
  90. data/spec/lib/onebox/view_spec.rb +16 -0
  91. data/spec/lib/onebox_spec.rb +1 -1
  92. data/spec/spec_helper.rb +8 -3
  93. data/spec/support/html_spec_helper.rb +1 -1
  94. data/templates/_layout.mustache +4 -0
  95. data/templates/amazon.mustache +5 -0
  96. data/templates/bliptv.mustache +5 -0
  97. data/templates/clikthrough.mustache +4 -0
  98. data/templates/collegehumor.mustache +5 -0
  99. data/templates/dailymotion.mustache +5 -0
  100. data/templates/dotsub.mustache +5 -0
  101. data/templates/example.mustache +2 -0
  102. data/templates/flickr.mustache +4 -0
  103. data/templates/funnyordie.mustache +6 -0
  104. data/templates/githubblob.mustache +5 -0
  105. data/templates/githubcommit.mustache +11 -0
  106. data/templates/githubgist.mustache +3 -0
  107. data/templates/githubpullrequest.mustache +14 -0
  108. data/templates/hulu.mustache +6 -0
  109. data/templates/imgurimage.mustache +3 -0
  110. data/templates/itunes.mustache +4 -0
  111. data/templates/kinomap.mustache +5 -0
  112. data/templates/nfb.mustache +5 -0
  113. data/templates/qik.mustache +4 -0
  114. data/templates/revision3.mustache +5 -0
  115. data/templates/slideshare.mustache +4 -0
  116. data/templates/soundcloud.mustache +5 -0
  117. data/templates/spotify.mustache +4 -0
  118. data/templates/stackexchange.mustache +3 -0
  119. data/templates/ted.mustache +5 -0
  120. data/templates/twitter.mustache +7 -0
  121. data/templates/viddler.mustache +5 -0
  122. data/templates/vimeo.mustache +5 -0
  123. data/templates/wikipedia.mustache +4 -0
  124. data/templates/yfrog.mustache +4 -0
  125. metadata +139 -90
  126. data/spec/fixtures/apple.response +0 -391
  127. data/spec/fixtures/clickthrough.response +0 -1472
  128. data/spec/fixtures/gist.response +0 -282
  129. data/spec/fixtures/github_blob.response +0 -706
  130. data/spec/fixtures/github_commit.response +0 -881
  131. data/spec/fixtures/github_pullrequest.response +0 -1619
  132. data/spec/lib/onebox/engine/example_spec.rb +0 -18
  133. data/templates/amazon.handlebars +0 -9
  134. data/templates/bliptv.handlebars +0 -10
  135. data/templates/clickthrough.handlebars +0 -8
  136. data/templates/clikthrough.handlebars +0 -8
  137. data/templates/collegehumor.handlebars +0 -9
  138. data/templates/dailymotion.handlebars +0 -9
  139. data/templates/dotsub.handlebars +0 -9
  140. data/templates/flickr.handlebars +0 -8
  141. data/templates/funnyordie.handlebars +0 -9
  142. data/templates/hulu.handlebars +0 -9
  143. data/templates/nfb.handlebars +0 -8
  144. data/templates/qik.handlebars +0 -7
  145. data/templates/revision3.handlebars +0 -9
  146. data/templates/slideshare.handlebars +0 -8
  147. data/templates/soundcloud.handlebars +0 -9
  148. data/templates/stackexchange.handlebars +0 -7
  149. data/templates/ted.handlebars +0 -8
  150. data/templates/viddler.handlebars +0 -9
  151. data/templates/vimeo.handlebars +0 -9
  152. data/templates/wikipedia.handlebars +0 -8
  153. data/templates/yfrog.handlebars +0 -8
@@ -1,9 +1,11 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe Onebox::Preview do
4
+ before(:each) { Onebox.defaults.cache.clear }
5
+
4
6
  describe "#to_s" do
5
7
  it "returns some html if given a valid url" do
6
- fake("http://www.example.com", response("example.response"))
8
+ fake("http://www.example.com", response("example"))
7
9
  preview = described_class.new("http://www.example.com")
8
10
  expect(preview.to_s).to include("Example Domain 1")
9
11
  end
@@ -0,0 +1,16 @@
1
+ require "spec_helper"
2
+
3
+ describe Onebox::View do
4
+ let(:view) { described_class.new("example", true) }
5
+ let(:html) { view.to_html({ url: "http://example.com" }) }
6
+
7
+ describe "#to_html" do
8
+ it "renders engine partial within layout template" do
9
+ expect(html).to include(%|class="onebox"|)
10
+ end
11
+
12
+ it "renders the url" do
13
+ expect(html).to include("http://example.com")
14
+ end
15
+ end
16
+ end
@@ -26,7 +26,7 @@ describe Onebox do
26
26
  end
27
27
 
28
28
  describe "templates" do
29
- let(:templates) { Dir["templates/*.handlebars"] }
29
+ let(:templates) { Dir["templates/*.mustache"] - ["templates/_layout.mustache"] }
30
30
 
31
31
  def expect_templates_to_not_match(text)
32
32
  templates.each do |template|
data/spec/spec_helper.rb CHANGED
@@ -15,12 +15,17 @@ RSpec.configure do |config|
15
15
  config.include HTMLSpecHelper
16
16
  end
17
17
 
18
- shared_examples_for "engines" do
19
- it "should behave like an engine" do
18
+ shared_examples_for "an engine" do
19
+ it "has engine behavior" do
20
20
  expect(described_class.private_instance_methods).to include(:data, :record, :raw)
21
21
  end
22
22
 
23
- it "should have implemented a data method" do
23
+ it "has implemented the data functionality" do
24
24
  expect { described_class.new(link).send(:data) }.not_to raise_error
25
25
  end
26
+
27
+ it "correctly matches the url" do
28
+ onebox = Onebox::Matcher.new(link).oneboxed
29
+ expect(onebox).to be(described_class)
30
+ end
26
31
  end
@@ -12,6 +12,6 @@ module HTMLSpecHelper
12
12
  end
13
13
 
14
14
  def response(file)
15
- Nokogiri::HTML(File.read(File.join("spec", "fixtures", file)))
15
+ File.read(File.join("spec", "fixtures", "#{file}.response"))
16
16
  end
17
17
  end
@@ -0,0 +1,4 @@
1
+ <div class="onebox">
2
+ <a href="{{url}}">{{url}}</a>
3
+ {{{view}}}
4
+ </div>
@@ -0,0 +1,5 @@
1
+ <h1>{{name}}</h1>
2
+ <h2 class="host">amazon.com</h2>
3
+ <img src="{{image}}" />
4
+ <p>{{description}}</p>
5
+ <p>{{price}}</p>
@@ -0,0 +1,5 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">blip.tv</h2>
3
+ <img src="{{image}}" />
4
+ {{video}}
5
+ <p>{{description}}</p>
@@ -0,0 +1,4 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">clikthrough.com</h2>
3
+ <img src="{{image}}" />
4
+ <p>{{description}}</p>
@@ -0,0 +1,5 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">collegehumor.com</h2>
3
+ <img src="{{image}}" />
4
+ {{video}}
5
+ <p>{{description}}</p>
@@ -0,0 +1,5 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">dailymotion.com</h2>
3
+ <img src="{{image}}" />
4
+ {{video}}
5
+ <p>{{description}}</p>
@@ -0,0 +1,5 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">dotsub.com</h2>
3
+ <img src="{{photo}}" />
4
+ {{video}}
5
+ <p>{{description}}</p>
@@ -0,0 +1,2 @@
1
+ <h1>{{header}}</h1>
2
+ <h2 class="host">example.com</h2>
@@ -0,0 +1,4 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">flickr.com</h2>
3
+ <img src="{{image}}" />
4
+ <p>{{description}}</p>
@@ -0,0 +1,6 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">funnyordie.com</h2>
3
+ <img src="{{image}}" />
4
+ {{video}}
5
+ <p>{{description}}</p>
6
+
@@ -0,0 +1,5 @@
1
+ <h2 class="host">github.com</h2>
2
+ {{url}}
3
+ {{filename}}
4
+ {{lines}}
5
+ {{file}}
@@ -0,0 +1,11 @@
1
+ {{owner}}/{{repo}}
2
+ {{sha}}
3
+ {{branch}}
4
+ <h2 class="host">github.com</h2>
5
+ <img src="{{gravatar}}" />
6
+ {{message}}
7
+ {{author}}
8
+ {{time_date}}
9
+ {{files_changed}} changed file
10
+ {{additions}} additions
11
+ {{deletions}} deletions
@@ -0,0 +1,3 @@
1
+ <h2 class="host">github.com</h2>
2
+ {{content}}
3
+ {{author}}
@@ -0,0 +1,14 @@
1
+ <h2 class="host">github.com</h2>
2
+ {{repo}}
3
+ {{url}}
4
+ {{author}}
5
+ {{title}}
6
+ <img src="{{gravatar}}" />
7
+ {{time_date}}
8
+ {{commits}}
9
+ {{additions}}
10
+ {{deletions}}
11
+ {{changed_files}}
12
+ {{description}}
13
+
14
+
@@ -0,0 +1,6 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">hulu.com</h2>
3
+ <img src="{{image}}" />
4
+ {{video}}
5
+ <p>{{description}}</p>
6
+
@@ -0,0 +1,3 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">imgur.com</h2>
3
+ <img src="{{image}}" />
@@ -0,0 +1,4 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">itunes.apple.com</h2>
3
+ <img src="{{image}}" />
4
+ <p>{{description}}</p>
@@ -0,0 +1,5 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">kinomap.com</h2>
3
+ <img src="{{image}}" />
4
+ {{video}}
5
+ <p>{{description}}</p>
@@ -0,0 +1,5 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">nfb.ca</h2>
3
+ {{video}}
4
+ <p>{{description}}</p>
5
+
@@ -0,0 +1,4 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">qik.com</h2>
3
+ <img src="{{image}}" />
4
+
@@ -0,0 +1,5 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">revison3.com</h2>
3
+ <img src="{{image}}" />
4
+ {{video}}
5
+ <p>{{description}}</p>
@@ -0,0 +1,4 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">slideshare.net</h2>
3
+ <img src="{{image}}" />
4
+ <p>{{description}}</p>
@@ -0,0 +1,5 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">soundcloud.com</h2>
3
+ <img src="{{image}}" />
4
+ {{video}}
5
+ <p>{{description}}</p>
@@ -0,0 +1,4 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">spotify.com</h2>
3
+ <img src="{{image}}" />
4
+ <p>{{description}}</p>
@@ -0,0 +1,3 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">stackexchange.com</h2>
3
+ <p>{{question}}</p>
@@ -0,0 +1,5 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">vimeo.com</h2>
3
+ <img src="{{image}}" />
4
+ <p>{{description}}</p>
5
+
@@ -0,0 +1,7 @@
1
+ <h2 class="host">twitter.com</h2>
2
+ <h1>{{user}}</h1>
3
+ <img src="{{avatar}}" />
4
+ <p>{{tweet_text}}</p>
5
+ <p>{{time_date}}</p>
6
+ <p>{{favorites}}</p>
7
+ <p>{{retweets}}</p>
@@ -0,0 +1,5 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">viddler.com</h2>
3
+ <img src="{{image}}" />
4
+ {{video}}
5
+ <p>{{description}}</p>
@@ -0,0 +1,5 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">vimeo.com</h2>
3
+ <img src="{{image}}" />
4
+ {{video}}
5
+ <p>{{description}}</p>
@@ -0,0 +1,4 @@
1
+ <h1>{{name}}</h1>
2
+ <h2 class="host">wikipedia.org</h2>
3
+ <img src="{{image}}" />
4
+ <p>{{description}}</p>
@@ -0,0 +1,4 @@
1
+ <h1>{{title}}</h1>
2
+ <h2 class="host">yfrog.com</h2>
3
+ <img src="{{image}}" />
4
+ <p>{{description}}</p>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onebox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joanna Zeta
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-13 00:00:00.000000000 Z
12
+ date: 2013-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json
@@ -68,19 +68,19 @@ dependencies:
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0.2'
70
70
  - !ruby/object:Gem::Dependency
71
- name: verbal_expressions
71
+ name: hexpress
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ~>
75
75
  - !ruby/object:Gem::Version
76
- version: '0.1'
76
+ version: '1.2'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ~>
82
82
  - !ruby/object:Gem::Version
83
- version: '0.1'
83
+ version: '1.2'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: moneta
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -250,16 +250,26 @@ files:
250
250
  - lib/onebox/engine/example_onebox.rb
251
251
  - lib/onebox/engine/flickr_onebox.rb
252
252
  - lib/onebox/engine/funny_or_die_onebox.rb
253
+ - lib/onebox/engine/github_blob_onebox.rb
254
+ - lib/onebox/engine/github_commit_onebox.rb
255
+ - lib/onebox/engine/github_gist_onebox.rb
256
+ - lib/onebox/engine/github_pullrequest_onebox.rb
253
257
  - lib/onebox/engine/html.rb
254
258
  - lib/onebox/engine/hulu_onebox.rb
259
+ - lib/onebox/engine/imgur_image_onebox.rb
260
+ - lib/onebox/engine/itunes_onebox.rb
261
+ - lib/onebox/engine/json.rb
262
+ - lib/onebox/engine/kinomap_onebox.rb
255
263
  - lib/onebox/engine/nfb_onebox.rb
256
264
  - lib/onebox/engine/open_graph.rb
257
265
  - lib/onebox/engine/qik_onebox.rb
258
266
  - lib/onebox/engine/revision3_onebox.rb
259
267
  - lib/onebox/engine/slideshare_onebox.rb
260
268
  - lib/onebox/engine/sound_cloud_onebox.rb
269
+ - lib/onebox/engine/spotify_onebox.rb
261
270
  - lib/onebox/engine/stack_exchange_onebox.rb
262
271
  - lib/onebox/engine/ted_onebox.rb
272
+ - lib/onebox/engine/twitter_onebox.rb
263
273
  - lib/onebox/engine/viddler_onebox.rb
264
274
  - lib/onebox/engine/vimeo_onebox.rb
265
275
  - lib/onebox/engine/wikipedia_onebox.rb
@@ -267,12 +277,11 @@ files:
267
277
  - lib/onebox/matcher.rb
268
278
  - lib/onebox/preview.rb
269
279
  - lib/onebox/version.rb
280
+ - lib/onebox/view.rb
270
281
  - onebox.gemspec
271
282
  - spec/fixtures/amazon.response
272
283
  - spec/fixtures/android.response
273
- - spec/fixtures/apple.response
274
284
  - spec/fixtures/bliptv.response
275
- - spec/fixtures/clickthrough.response
276
285
  - spec/fixtures/clikthrough.response
277
286
  - spec/fixtures/collegehumor.response
278
287
  - spec/fixtures/dailymotion.response
@@ -280,23 +289,26 @@ files:
280
289
  - spec/fixtures/example.response
281
290
  - spec/fixtures/flickr.response
282
291
  - spec/fixtures/funnyordie.response
283
- - spec/fixtures/gist.response
284
- - spec/fixtures/github_blob.response
285
- - spec/fixtures/github_commit.response
286
- - spec/fixtures/github_pullrequest.response
292
+ - spec/fixtures/githubblob.response
293
+ - spec/fixtures/githubcommit.response
294
+ - spec/fixtures/githubgist.response
295
+ - spec/fixtures/githubpullrequest.response
287
296
  - spec/fixtures/hulu.response
288
297
  - spec/fixtures/image.response
289
- - spec/fixtures/imgur.response
298
+ - spec/fixtures/imguralbum.response
299
+ - spec/fixtures/imgurimage.response
300
+ - spec/fixtures/itunes.response
290
301
  - spec/fixtures/kinomap.response
291
302
  - spec/fixtures/nfb.response
292
303
  - spec/fixtures/opengraph.response
293
304
  - spec/fixtures/qik.response
294
305
  - spec/fixtures/revision3.response
295
- - spec/fixtures/rottentomatoes_fresh.response
296
- - spec/fixtures/rottentomatoes_incomplete.response
297
- - spec/fixtures/rottentomatoes_rotten.response
306
+ - spec/fixtures/rottentomatoesfresh.response
307
+ - spec/fixtures/rottentomatoesincomplete.response
308
+ - spec/fixtures/rottentomatoesrotten.response
298
309
  - spec/fixtures/slideshare.response
299
310
  - spec/fixtures/soundcloud.response
311
+ - spec/fixtures/spotify.response
300
312
  - spec/fixtures/stackexchange.response
301
313
  - spec/fixtures/ted.response
302
314
  - spec/fixtures/twitter.response
@@ -304,56 +316,79 @@ files:
304
316
  - spec/fixtures/video.response
305
317
  - spec/fixtures/vimeo.response
306
318
  - spec/fixtures/wikipedia.response
307
- - spec/fixtures/wikipedia_redirected.response
319
+ - spec/fixtures/wikipediaredirected.response
308
320
  - spec/fixtures/yfrog.response
309
- - spec/lib/onebox/engine/amazon_spec.rb
310
- - spec/lib/onebox/engine/bliptv_spec.rb
311
- - spec/lib/onebox/engine/clikthrough_spec.rb
312
- - spec/lib/onebox/engine/college_humor_spec.rb
313
- - spec/lib/onebox/engine/dailymotion_spec.rb
314
- - spec/lib/onebox/engine/dotsub_spec.rb
315
- - spec/lib/onebox/engine/example_spec.rb
316
- - spec/lib/onebox/engine/flickr_spec.rb
317
- - spec/lib/onebox/engine/funny_or_die_spec.rb
318
- - spec/lib/onebox/engine/hulu_spec.rb
319
- - spec/lib/onebox/engine/nfb_spec.rb
320
- - spec/lib/onebox/engine/qik_spec.rb
321
- - spec/lib/onebox/engine/revision3_spec.rb
322
- - spec/lib/onebox/engine/slideshare_spec.rb
323
- - spec/lib/onebox/engine/sound_cloud_spec.rb
324
- - spec/lib/onebox/engine/stack_exchange_spec.rb
325
- - spec/lib/onebox/engine/ted_spec.rb
326
- - spec/lib/onebox/engine/viddler_spec.rb
327
- - spec/lib/onebox/engine/vimeo_spec.rb
328
- - spec/lib/onebox/engine/wikipedia_spec.rb
329
- - spec/lib/onebox/engine/yfrog_spec.rb
321
+ - spec/lib/onebox/engine/amazon_onebox_spec.rb
322
+ - spec/lib/onebox/engine/bliptv_onebox_spec.rb
323
+ - spec/lib/onebox/engine/clikthrough_onebox_spec.rb
324
+ - spec/lib/onebox/engine/college_humor_onebox_spec.rb
325
+ - spec/lib/onebox/engine/dailymotion_onebox_spec.rb
326
+ - spec/lib/onebox/engine/dotsub_onebox_spec.rb
327
+ - spec/lib/onebox/engine/example_onebox_spec.rb
328
+ - spec/lib/onebox/engine/flickr_onebox_spec.rb
329
+ - spec/lib/onebox/engine/funny_or_die_onebox_spec.rb
330
+ - spec/lib/onebox/engine/github_blob_onebox_spec.rb
331
+ - spec/lib/onebox/engine/github_commit_onebox_spec.rb
332
+ - spec/lib/onebox/engine/github_gist_onebox_spec.rb
333
+ - spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
334
+ - spec/lib/onebox/engine/html_spec.rb
335
+ - spec/lib/onebox/engine/hulu_onebox_spec.rb
336
+ - spec/lib/onebox/engine/imgur_image_onebox_spec.rb
337
+ - spec/lib/onebox/engine/itunes_onebox_spec.rb
338
+ - spec/lib/onebox/engine/json_spec.rb
339
+ - spec/lib/onebox/engine/kinomap_onebox_spec.rb
340
+ - spec/lib/onebox/engine/nfb_onebox_spec.rb
341
+ - spec/lib/onebox/engine/open_graph_spec.rb
342
+ - spec/lib/onebox/engine/qik_onebox_spec.rb
343
+ - spec/lib/onebox/engine/revision3_onebox_spec.rb
344
+ - spec/lib/onebox/engine/slideshare_onebox_spec.rb
345
+ - spec/lib/onebox/engine/sound_cloud_onebox_spec.rb
346
+ - spec/lib/onebox/engine/spotify_onebox_spec.rb
347
+ - spec/lib/onebox/engine/stack_exchange_onebox_spec.rb
348
+ - spec/lib/onebox/engine/ted_onebox_spec.rb
349
+ - spec/lib/onebox/engine/twitter_onebox_spec.rb
350
+ - spec/lib/onebox/engine/viddler_onebox_spec.rb
351
+ - spec/lib/onebox/engine/vimeo_onebox_spec.rb
352
+ - spec/lib/onebox/engine/wikipedia_onebox_spec.rb
353
+ - spec/lib/onebox/engine/yfrog_onebox_spec.rb
330
354
  - spec/lib/onebox/engine_spec.rb
331
355
  - spec/lib/onebox/matcher_spec.rb
332
356
  - spec/lib/onebox/preview_spec.rb
357
+ - spec/lib/onebox/view_spec.rb
333
358
  - spec/lib/onebox_spec.rb
334
359
  - spec/spec_helper.rb
335
360
  - spec/support/html_spec_helper.rb
336
- - templates/amazon.handlebars
337
- - templates/bliptv.handlebars
338
- - templates/clickthrough.handlebars
339
- - templates/clikthrough.handlebars
340
- - templates/collegehumor.handlebars
341
- - templates/dailymotion.handlebars
342
- - templates/dotsub.handlebars
343
- - templates/flickr.handlebars
344
- - templates/funnyordie.handlebars
345
- - templates/hulu.handlebars
346
- - templates/nfb.handlebars
347
- - templates/qik.handlebars
348
- - templates/revision3.handlebars
349
- - templates/slideshare.handlebars
350
- - templates/soundcloud.handlebars
351
- - templates/stackexchange.handlebars
352
- - templates/ted.handlebars
353
- - templates/viddler.handlebars
354
- - templates/vimeo.handlebars
355
- - templates/wikipedia.handlebars
356
- - templates/yfrog.handlebars
361
+ - templates/_layout.mustache
362
+ - templates/amazon.mustache
363
+ - templates/bliptv.mustache
364
+ - templates/clikthrough.mustache
365
+ - templates/collegehumor.mustache
366
+ - templates/dailymotion.mustache
367
+ - templates/dotsub.mustache
368
+ - templates/example.mustache
369
+ - templates/flickr.mustache
370
+ - templates/funnyordie.mustache
371
+ - templates/githubblob.mustache
372
+ - templates/githubcommit.mustache
373
+ - templates/githubgist.mustache
374
+ - templates/githubpullrequest.mustache
375
+ - templates/hulu.mustache
376
+ - templates/imgurimage.mustache
377
+ - templates/itunes.mustache
378
+ - templates/kinomap.mustache
379
+ - templates/nfb.mustache
380
+ - templates/qik.mustache
381
+ - templates/revision3.mustache
382
+ - templates/slideshare.mustache
383
+ - templates/soundcloud.mustache
384
+ - templates/spotify.mustache
385
+ - templates/stackexchange.mustache
386
+ - templates/ted.mustache
387
+ - templates/twitter.mustache
388
+ - templates/viddler.mustache
389
+ - templates/vimeo.mustache
390
+ - templates/wikipedia.mustache
391
+ - templates/yfrog.mustache
357
392
  homepage: http://github.com/dysania/onebox
358
393
  licenses:
359
394
  - MIT
@@ -381,9 +416,7 @@ summary: A gem for turning URLs into previews.
381
416
  test_files:
382
417
  - spec/fixtures/amazon.response
383
418
  - spec/fixtures/android.response
384
- - spec/fixtures/apple.response
385
419
  - spec/fixtures/bliptv.response
386
- - spec/fixtures/clickthrough.response
387
420
  - spec/fixtures/clikthrough.response
388
421
  - spec/fixtures/collegehumor.response
389
422
  - spec/fixtures/dailymotion.response
@@ -391,23 +424,26 @@ test_files:
391
424
  - spec/fixtures/example.response
392
425
  - spec/fixtures/flickr.response
393
426
  - spec/fixtures/funnyordie.response
394
- - spec/fixtures/gist.response
395
- - spec/fixtures/github_blob.response
396
- - spec/fixtures/github_commit.response
397
- - spec/fixtures/github_pullrequest.response
427
+ - spec/fixtures/githubblob.response
428
+ - spec/fixtures/githubcommit.response
429
+ - spec/fixtures/githubgist.response
430
+ - spec/fixtures/githubpullrequest.response
398
431
  - spec/fixtures/hulu.response
399
432
  - spec/fixtures/image.response
400
- - spec/fixtures/imgur.response
433
+ - spec/fixtures/imguralbum.response
434
+ - spec/fixtures/imgurimage.response
435
+ - spec/fixtures/itunes.response
401
436
  - spec/fixtures/kinomap.response
402
437
  - spec/fixtures/nfb.response
403
438
  - spec/fixtures/opengraph.response
404
439
  - spec/fixtures/qik.response
405
440
  - spec/fixtures/revision3.response
406
- - spec/fixtures/rottentomatoes_fresh.response
407
- - spec/fixtures/rottentomatoes_incomplete.response
408
- - spec/fixtures/rottentomatoes_rotten.response
441
+ - spec/fixtures/rottentomatoesfresh.response
442
+ - spec/fixtures/rottentomatoesincomplete.response
443
+ - spec/fixtures/rottentomatoesrotten.response
409
444
  - spec/fixtures/slideshare.response
410
445
  - spec/fixtures/soundcloud.response
446
+ - spec/fixtures/spotify.response
411
447
  - spec/fixtures/stackexchange.response
412
448
  - spec/fixtures/ted.response
413
449
  - spec/fixtures/twitter.response
@@ -415,32 +451,45 @@ test_files:
415
451
  - spec/fixtures/video.response
416
452
  - spec/fixtures/vimeo.response
417
453
  - spec/fixtures/wikipedia.response
418
- - spec/fixtures/wikipedia_redirected.response
454
+ - spec/fixtures/wikipediaredirected.response
419
455
  - spec/fixtures/yfrog.response
420
- - spec/lib/onebox/engine/amazon_spec.rb
421
- - spec/lib/onebox/engine/bliptv_spec.rb
422
- - spec/lib/onebox/engine/clikthrough_spec.rb
423
- - spec/lib/onebox/engine/college_humor_spec.rb
424
- - spec/lib/onebox/engine/dailymotion_spec.rb
425
- - spec/lib/onebox/engine/dotsub_spec.rb
426
- - spec/lib/onebox/engine/example_spec.rb
427
- - spec/lib/onebox/engine/flickr_spec.rb
428
- - spec/lib/onebox/engine/funny_or_die_spec.rb
429
- - spec/lib/onebox/engine/hulu_spec.rb
430
- - spec/lib/onebox/engine/nfb_spec.rb
431
- - spec/lib/onebox/engine/qik_spec.rb
432
- - spec/lib/onebox/engine/revision3_spec.rb
433
- - spec/lib/onebox/engine/slideshare_spec.rb
434
- - spec/lib/onebox/engine/sound_cloud_spec.rb
435
- - spec/lib/onebox/engine/stack_exchange_spec.rb
436
- - spec/lib/onebox/engine/ted_spec.rb
437
- - spec/lib/onebox/engine/viddler_spec.rb
438
- - spec/lib/onebox/engine/vimeo_spec.rb
439
- - spec/lib/onebox/engine/wikipedia_spec.rb
440
- - spec/lib/onebox/engine/yfrog_spec.rb
456
+ - spec/lib/onebox/engine/amazon_onebox_spec.rb
457
+ - spec/lib/onebox/engine/bliptv_onebox_spec.rb
458
+ - spec/lib/onebox/engine/clikthrough_onebox_spec.rb
459
+ - spec/lib/onebox/engine/college_humor_onebox_spec.rb
460
+ - spec/lib/onebox/engine/dailymotion_onebox_spec.rb
461
+ - spec/lib/onebox/engine/dotsub_onebox_spec.rb
462
+ - spec/lib/onebox/engine/example_onebox_spec.rb
463
+ - spec/lib/onebox/engine/flickr_onebox_spec.rb
464
+ - spec/lib/onebox/engine/funny_or_die_onebox_spec.rb
465
+ - spec/lib/onebox/engine/github_blob_onebox_spec.rb
466
+ - spec/lib/onebox/engine/github_commit_onebox_spec.rb
467
+ - spec/lib/onebox/engine/github_gist_onebox_spec.rb
468
+ - spec/lib/onebox/engine/github_pullrequest_onebox_spec.rb
469
+ - spec/lib/onebox/engine/html_spec.rb
470
+ - spec/lib/onebox/engine/hulu_onebox_spec.rb
471
+ - spec/lib/onebox/engine/imgur_image_onebox_spec.rb
472
+ - spec/lib/onebox/engine/itunes_onebox_spec.rb
473
+ - spec/lib/onebox/engine/json_spec.rb
474
+ - spec/lib/onebox/engine/kinomap_onebox_spec.rb
475
+ - spec/lib/onebox/engine/nfb_onebox_spec.rb
476
+ - spec/lib/onebox/engine/open_graph_spec.rb
477
+ - spec/lib/onebox/engine/qik_onebox_spec.rb
478
+ - spec/lib/onebox/engine/revision3_onebox_spec.rb
479
+ - spec/lib/onebox/engine/slideshare_onebox_spec.rb
480
+ - spec/lib/onebox/engine/sound_cloud_onebox_spec.rb
481
+ - spec/lib/onebox/engine/spotify_onebox_spec.rb
482
+ - spec/lib/onebox/engine/stack_exchange_onebox_spec.rb
483
+ - spec/lib/onebox/engine/ted_onebox_spec.rb
484
+ - spec/lib/onebox/engine/twitter_onebox_spec.rb
485
+ - spec/lib/onebox/engine/viddler_onebox_spec.rb
486
+ - spec/lib/onebox/engine/vimeo_onebox_spec.rb
487
+ - spec/lib/onebox/engine/wikipedia_onebox_spec.rb
488
+ - spec/lib/onebox/engine/yfrog_onebox_spec.rb
441
489
  - spec/lib/onebox/engine_spec.rb
442
490
  - spec/lib/onebox/matcher_spec.rb
443
491
  - spec/lib/onebox/preview_spec.rb
492
+ - spec/lib/onebox/view_spec.rb
444
493
  - spec/lib/onebox_spec.rb
445
494
  - spec/spec_helper.rb
446
495
  - spec/support/html_spec_helper.rb