link_thumbnailer 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTlmNDRkNWViMjFlMjY3NzQwNTg5MzYwMWJmN2Q4M2QxMjdjMDJkNA==
4
+ NDIyODBlNzExNDRkZDIyZDQxOTVmNjBlMzM2YjA5OTBjYTA1OGI2ZA==
5
5
  data.tar.gz: !binary |-
6
- Y2RlMmRlM2UxYmY3YTEyOGJiNWI2MzJjZWY1MDEzYTEzMzc5ZWNiMQ==
6
+ NTFhODI5Y2U1ZTcyM2EzMjE0MDQwNmRlMTkyZDUzZWY0ZDU0NzE0MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZWM4NjJmZWM5YjAyZDdiYWIzMmQ4YjU5NTcxNmNkNzczNmJjMzhiMzFlZTFm
10
- YzYzNzk3YzRlZjE3MWM4NzQ0ODYyNjU0ZTk3ODBhNmEwYmFlYjM5N2E0MTMz
11
- YzNhNjI4ZjY5MzNiNTI4OGQ1NDVmYjEzMzI3OTkxOTUzNzY3ZjA=
9
+ NDA1YjcyMmIwMDlhMTZkM2RhNTU4OWEyYTNjNDY0NzQxN2RlZGFjOWFhYmE0
10
+ ZDk3ZGMwMjgyN2FmMzYyZTE0ODNmZjUzYTU0MjlkNTMxN2Y4NTYyYmNhMTY5
11
+ ZWVhNGYxN2VlMTUxODZhNzM2MWExODQ2MDU0OTQxZDMwMDIyYjU=
12
12
  data.tar.gz: !binary |-
13
- NTE0MThjNzhkNDIwY2UxYmYwMTIwNDE5Y2ZmYWMyMWVmMGI4NjBhODZkMjNi
14
- YjBhN2RmN2ExMDQ2YTMzMTYyNWE1NDg1MGM3Zjg1NTFhMGYyZjRlZmM0YWI2
15
- OWI4NDE3M2Q3MjY2ODgyOWRlYzM2ZTZkMzQwZjEyNzEzM2VhOWE=
13
+ NmNkMzhmODdkMzEwMzhjNjI4NzQ1NDY2MmFiNTczNjQ2NTY4NzcxZTk5ZDY5
14
+ OWVkNzJiMjIxZjc2NTZiNGY0ZTcyMDNjNmEzYmQxMjI2MDY1ZDliMjFlMWFk
15
+ YWU1N2Q5MGM2NDNiNzg1Yzc4NTdjOTg4ZjQ1ZDhmOTFlNWQzNmE=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.3.1
2
+
3
+ - Fix an issue with the link density grader caused by links with image instead of text. Fixes [#45](https://github.com/gottfrois/link_thumbnailer/issues/45)
4
+
1
5
  # 2.3.0
2
6
 
3
7
  - Add requested favicon scraper [#40](https://github.com/gottfrois/link_thumbnailer/issues/40)
data/README.md CHANGED
@@ -138,6 +138,8 @@ In `config/initializers/link_thumbnailer.rb`
138
138
  # config.negative_regex = /combx|comment|com-|contact|foot|footer|footnote|masthead|media|meta|outbrain|promo|related|scroll|shoutbox|sidebar|sponsor|shopping|tags|tool|widget|modal/i
139
139
 
140
140
  # Numbers of images to fetch. Fetching too many images will be slow.
141
+ # Note that LinkThumbnailer will only sort fetched images between each other.
142
+ # Meaning that they could be a "better" image on the page.
141
143
  #
142
144
  # config.image_limit = 5
143
145
 
@@ -58,6 +58,8 @@ LinkThumbnailer.configure do |config|
58
58
  # config.negative_regex = /combx|comment|com-|contact|foot|footer|footnote|masthead|media|meta|outbrain|promo|related|scroll|shoutbox|sidebar|sponsor|shopping|tags|tool|widget|modal/i
59
59
 
60
60
  # Numbers of images to fetch. Fetching too many images will be slow.
61
+ # Note that LinkThumbnailer will only sort fetched images between each other.
62
+ # Meaning that they could be a "better" image on the page.
61
63
  #
62
64
  # config.image_limit = 5
63
65
 
@@ -19,7 +19,7 @@ module LinkThumbnailer
19
19
  end
20
20
 
21
21
  def links
22
- node.css('a').map(&:text)
22
+ node.css('a').map(&:text).compact.reject(&:empty?)
23
23
  end
24
24
 
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module LinkThumbnailer
2
- VERSION = '2.3.0'
2
+ VERSION = '2.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: link_thumbnailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre-Louis Gottfrois
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-21 00:00:00.000000000 Z
11
+ date: 2014-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport