rgabo-readability 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use 1.8.7@readability
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -16,14 +16,21 @@ module Readability
16
16
 
17
17
  attr_writer :read_style, :read_size, :read_margin
18
18
 
19
+ def unlink(*paths)
20
+ self.search(*paths).unlink
21
+ end
22
+
23
+ alias :remove :unlink
24
+
19
25
  def to_readable(args = {})
20
26
  args[:content_only] ||= false
21
27
 
22
28
  # dup document
23
29
  readable_doc = self.dup
24
30
 
25
- # remove all script tags
26
- readable_doc.xpath('//script').each { |node| node.remove }
31
+ # remove all script and iframe tags
32
+ readable_doc.remove('script')
33
+ readable_doc.remove('iframe')
27
34
 
28
35
  readable_doc.harmony_page do |page|
29
36
  # Set parameters
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rgabo-readability}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gabor Ratky"]
12
- s.date = %q{2010-05-16}
12
+ s.date = %q{2010-05-17}
13
13
  s.description = %q{Extends Nokogiri::HTML::Document to run Arc90's Readability script and produces easy to read HTML documents.}
14
14
  s.email = %q{rgabo@rgabostyle.com}
15
15
  s.extra_rdoc_files = [
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".document",
21
21
  ".gitignore",
22
+ ".rvmrc",
22
23
  "LICENSE",
23
24
  "README.rdoc",
24
25
  "Rakefile",
@@ -31,9 +32,13 @@ Gem::Specification.new do |s|
31
32
  "readability.gems",
32
33
  "rgabo-readability.gemspec",
33
34
  "spec/files/change_title.js",
35
+ "spec/files/script.js",
36
+ "spec/files/techcrunch-article.html",
34
37
  "spec/files/tomdoc-reasonable-ruby-documentation.html",
38
+ "spec/files/tomdoc-script_test.html",
35
39
  "spec/readability/harmonizable_spec.rb",
36
40
  "spec/readability/readable_spec.rb",
41
+ "spec/readability/urls.yaml",
37
42
  "spec/readability_spec.rb",
38
43
  "spec/spec.opts",
39
44
  "spec/spec_helper.rb"
@@ -0,0 +1 @@
1
+ document.title = "failed";