trawler 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trawler/parsed_document.rb +4 -0
- data/lib/trawler/parser.rb +4 -0
- data/lib/trawler/version.rb +1 -1
- data/spec/parsed_document_spec.rb +5 -1
- data/spec/parser_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f92ac5258476cb629c3ee84fc07659779e482c3
|
4
|
+
data.tar.gz: d87eaf3f6018633a3c35c532e6e72a8dc8af2d38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25564d07389a40842aeb069f799b6cbfed26e8b5a196eda9c5b4f6fcca11314e319b5a694327b27da6a7af6454437c8344f5bde66138ed705ef2c1c577109869
|
7
|
+
data.tar.gz: 1f5897559c9bb75555bcfccb812bdbb5889c34a32a03f4c394e3a7fd5d46c7b200d07a063f9ed305dba183361c63530d6b5d7cbaea1d7577cb35702870aa0598
|
data/lib/trawler/parser.rb
CHANGED
data/lib/trawler/version.rb
CHANGED
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe Trawler::ParsedDocument do
|
4
4
|
|
5
|
-
let(:data) { double("PARSER", images: ["foo"], title: "foobar", video: "bar", description: "foobarbaz", document: "") }
|
5
|
+
let(:data) { double("PARSER", images: ["foo"], title: "foobar", video: "bar", video_still: "barfoo", description: "foobarbaz", document: "") }
|
6
6
|
let(:doc) { Trawler::ParsedDocument.new("www.cats.com", data) }
|
7
7
|
|
8
8
|
it "sets the url" do
|
@@ -29,4 +29,8 @@ describe Trawler::ParsedDocument do
|
|
29
29
|
it "has the raw data" do
|
30
30
|
expect(doc.raw_data).to eq ""
|
31
31
|
end
|
32
|
+
|
33
|
+
it "has the video still" do
|
34
|
+
expect(doc.video_still).to eq "barfoo"
|
35
|
+
end
|
32
36
|
end
|
data/spec/parser_spec.rb
CHANGED
@@ -65,6 +65,10 @@ describe Trawler::Parser do
|
|
65
65
|
it "gets the images" do
|
66
66
|
expect(parser.images).to include "http://i1.ytimg.com/vi/OrIFaWJ9Glo/maxresdefault.jpg"
|
67
67
|
end
|
68
|
+
|
69
|
+
it "gets an image as the placeholder for the video" do
|
70
|
+
expect(parser.video_still).to eq "http://i1.ytimg.com/vi/OrIFaWJ9Glo/maxresdefault.jpg"
|
71
|
+
end
|
68
72
|
end
|
69
73
|
|
70
74
|
context "document style page" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trawler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Wheeler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|