busk-ruby-readability 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- busk-ruby-readability (1.1.1)
4
+ busk-ruby-readability (1.2.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/lib/readability.rb CHANGED
@@ -93,10 +93,6 @@ module Readability
93
93
  (@base_uri.to_s =~ REGEXES[:videoRe])
94
94
  end
95
95
 
96
-
97
-
98
-
99
-
100
96
  def youtube
101
97
  debug("I have a Youtube video page")
102
98
  if @request =~ /\?v=([_\-a-z0-9]+)&?/i
@@ -395,7 +391,10 @@ module Readability
395
391
  private
396
392
 
397
393
  def rules
398
- @rules ||= YAML.load_file("special_rules.yml")["sites"]
394
+ if @base_uri =~ /^www\.(.*)$/
395
+ @base_uri = $1
396
+ end
397
+ @rules ||= YAML.load_file(File.dirname(__FILE__) + "/../special_rules.yml")["sites"]
399
398
  end
400
399
 
401
400
  def apply_custom_rule
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
2
2
  s.authors = ["Fabio Mont Alegre", "Rodrigo Flores"]
3
3
  s.email = "it-team@busk.com"
4
4
  s.homepage = "http://github.com/busk/ruby-readability"
5
- s.version = "1.2.0"
5
+ s.version = "1.2.1"
6
6
  s.name = "busk-ruby-readability"
7
7
  s.summary = "A rewrite of original ruby-readability"
8
8
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: busk-ruby-readability
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 0
10
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Fabio Mont Alegre