link_thumbnailer 3.2.1 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/link_thumbnailer/configuration.rb +2 -1
- data/lib/link_thumbnailer/processor.rb +2 -2
- data/lib/link_thumbnailer/version.rb +1 -1
- 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: 62e43acf3460b4ef3da648fa16fb8f3f970d88b8
|
4
|
+
data.tar.gz: 4768729820579a8387d692ddba91a3557f548d60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e4a5a30c0166b19f57a0e2dbc57fda86074ad26caa28fde4ad8c15e1afe278478c4ca27223a155b66ce777765a729e78f5a95ddd080abb535fa5b806eaeafbb
|
7
|
+
data.tar.gz: 93464538468ced5cb85119c2e85219f592c33a91733bf1e89741d074253e9a540f949355258a723db38698e712c7c2d079ec6d75539fb249f48cb25109ab772b
|
data/CHANGELOG.md
CHANGED
@@ -26,7 +26,7 @@ module LinkThumbnailer
|
|
26
26
|
:verify_ssl, :http_open_timeout, :http_read_timeout, :attributes,
|
27
27
|
:graders, :description_min_length, :positive_regex, :negative_regex,
|
28
28
|
:image_limit, :image_stats, :raise_on_invalid_format, :max_concurrency,
|
29
|
-
:scrapers
|
29
|
+
:scrapers, :http_override_headers
|
30
30
|
|
31
31
|
alias_method :http_timeout, :http_open_timeout
|
32
32
|
alias_method :http_timeout=, :http_open_timeout=
|
@@ -62,6 +62,7 @@ module LinkThumbnailer
|
|
62
62
|
@raise_on_invalid_format = false
|
63
63
|
@max_concurrency = 20
|
64
64
|
@scrapers = [:opengraph, :default]
|
65
|
+
@http_override_headers = { 'Accept-Encoding' => 'none' }
|
65
66
|
end
|
66
67
|
|
67
68
|
end
|
@@ -39,8 +39,8 @@ module LinkThumbnailer
|
|
39
39
|
|
40
40
|
def set_http_headers(headers = {})
|
41
41
|
headers.each { |k, v| http.headers[k] = v }
|
42
|
-
http.override_headers['User-Agent']
|
43
|
-
http.override_headers[
|
42
|
+
http.override_headers['User-Agent'] = user_agent
|
43
|
+
config.http_override_headers.each { |k, v| http.override_headers[k] = v }
|
44
44
|
end
|
45
45
|
|
46
46
|
def set_http_options
|
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: 3.
|
4
|
+
version: 3.3.0
|
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: 2016-
|
11
|
+
date: 2016-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|