distillery 0.2.7 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -195,14 +195,6 @@ module Distillery
195
195
  doc.search('.remove').should_not be_empty
196
196
  end
197
197
 
198
- it 'removes elements that have < 25 characters and (no images or > 2 images' do
199
- doc = doc_with_top_scored_html_of("<div class='remove'><div>foo</div></div>", :clean_top_scoring_elements!)
200
- doc.search('.remove').should be_empty
201
-
202
- doc = doc_with_top_scored_html_of("<div class='remove'><div>foo <img><img><img></div></div>", :clean_top_scoring_elements!)
203
- doc.search('.remove').should be_empty
204
- end
205
-
206
198
  it 'removes elements that have a weight of < 25 and link density > 0.2' do
207
199
  doc = doc_with_top_scored_html_of("<div class='remove'><div>fffff<a>#{'b'*2}</a></div></div>", :clean_top_scoring_elements!)
208
200
  doc.search('.remove').should be_empty
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: distillery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-24 00:00:00.000000000Z
12
+ date: 2011-11-17 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
- requirement: &2160187040 !ruby/object:Gem::Requirement
16
+ requirement: &2152684340 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>'
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2160187040
24
+ version_requirements: *2152684340
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: slop
27
- requirement: &2160186120 !ruby/object:Gem::Requirement
27
+ requirement: &2152683360 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>'
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '1.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2160186120
35
+ version_requirements: *2152683360
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &2160185280 !ruby/object:Gem::Requirement
38
+ requirement: &2152682380 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>'
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '2.0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2160185280
46
+ version_requirements: *2152682380
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: guard
49
- requirement: &2160176680 !ruby/object:Gem::Requirement
49
+ requirement: &2152681520 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2160176680
57
+ version_requirements: *2152681520
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: guard-rspec
60
- requirement: &2160176020 !ruby/object:Gem::Requirement
60
+ requirement: &2152680820 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2160176020
68
+ version_requirements: *2152680820
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: ruby-debug19
71
- requirement: &2160175460 !ruby/object:Gem::Requirement
71
+ requirement: &2152680240 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2160175460
79
+ version_requirements: *2152680240
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rb-fsevent
82
- requirement: &2160174800 !ruby/object:Gem::Requirement
82
+ requirement: &2152679540 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2160174800
90
+ version_requirements: *2152679540
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: growl
93
- requirement: &2160174160 !ruby/object:Gem::Requirement
93
+ requirement: &2152678080 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *2160174160
101
+ version_requirements: *2152678080
102
102
  description: Distillery extracts the "content" portion out of an HTML document. It
103
103
  applies heuristics based on element type, location, class/id name and other attributes
104
104
  to try and find the content part of the HTML document and return it.
@@ -126,6 +126,7 @@ files:
126
126
  - spec/fixtures/agave_cookies.html
127
127
  - spec/fixtures/baked_ziti.html
128
128
  - spec/fixtures/beef_jerkey.html
129
+ - spec/fixtures/bilays.html
129
130
  - spec/fixtures/bourbon_balls.html
130
131
  - spec/fixtures/bulgogi.html
131
132
  - spec/fixtures/clams_and_linguini.html
@@ -163,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
164
  version: '0'
164
165
  requirements: []
165
166
  rubyforge_project: distillery
166
- rubygems_version: 1.8.6
167
+ rubygems_version: 1.8.10
167
168
  signing_key:
168
169
  specification_version: 3
169
170
  summary: Extract the content portion of an HTML document.
@@ -173,6 +174,7 @@ test_files:
173
174
  - spec/fixtures/agave_cookies.html
174
175
  - spec/fixtures/baked_ziti.html
175
176
  - spec/fixtures/beef_jerkey.html
177
+ - spec/fixtures/bilays.html
176
178
  - spec/fixtures/bourbon_balls.html
177
179
  - spec/fixtures/bulgogi.html
178
180
  - spec/fixtures/clams_and_linguini.html