mediawiktory 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea72aa4513e7ecb47c8f7e36d8f01e69e90f86db
|
4
|
+
data.tar.gz: 5f19154398f9a2bc500ad5b00fcf97c0b019f98f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d4ef8bf155f722c815325815b714e1f7d236c3bbc349d54a364a52f137d00f1e3ad83b5aa93e04d82043185bafc0ac6c02deb2394ef3c43ad9d957d58ddb79e
|
7
|
+
data.tar.gz: 799f737771783d74ce81df60dc37a12d5d7fd84b95d28367334babc82dba28869f0b40b7e8041a5e0e7575015c8d9c5ac303ec9b19ab9391143ee4c18852a7ff
|
data/CHANGELOG.md
CHANGED
@@ -32,12 +32,12 @@ module <%= @namespace %>
|
|
32
32
|
def initialize(url, **options)
|
33
33
|
@url = Addressable::URI.parse(url)
|
34
34
|
@options = options
|
35
|
-
@faraday = Faraday.new(url) do |f|
|
35
|
+
@faraday = Faraday.new(url, headers: headers) do |f|
|
36
36
|
f.request :url_encoded
|
37
37
|
f.use FaradayMiddleware::FollowRedirects, limit: 5
|
38
|
+
f.use FaradayMiddleware::Gzip
|
38
39
|
f.adapter Faraday.default_adapter
|
39
40
|
end
|
40
|
-
@faraday.headers.merge!(headers)
|
41
41
|
end
|
42
42
|
|
43
43
|
def user_agent
|
@@ -55,7 +55,7 @@ module <%= @namespace %>
|
|
55
55
|
private
|
56
56
|
|
57
57
|
def headers
|
58
|
-
{'User-Agent' => user_agent}
|
58
|
+
{'Accept-Encoding' => 'gzip', 'User-Agent' => user_agent}
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
data/lib/mediawiktory/version.rb
CHANGED
@@ -33,12 +33,12 @@ module MediaWiktory::Wikipedia
|
|
33
33
|
def initialize(url, **options)
|
34
34
|
@url = Addressable::URI.parse(url)
|
35
35
|
@options = options
|
36
|
-
@faraday = Faraday.new(url) do |f|
|
36
|
+
@faraday = Faraday.new(url, headers: headers) do |f|
|
37
37
|
f.request :url_encoded
|
38
38
|
f.use FaradayMiddleware::FollowRedirects, limit: 5
|
39
|
+
f.use FaradayMiddleware::Gzip
|
39
40
|
f.adapter Faraday.default_adapter
|
40
41
|
end
|
41
|
-
@faraday.headers.merge!(headers)
|
42
42
|
end
|
43
43
|
|
44
44
|
def user_agent
|
@@ -56,7 +56,7 @@ module MediaWiktory::Wikipedia
|
|
56
56
|
private
|
57
57
|
|
58
58
|
def headers
|
59
|
-
{'User-Agent' => user_agent}
|
59
|
+
{'Accept-Encoding' => 'gzip', 'User-Agent' => user_agent}
|
60
60
|
end
|
61
61
|
end
|
62
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mediawiktory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Shepelev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -437,7 +437,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
437
437
|
version: '0'
|
438
438
|
requirements: []
|
439
439
|
rubyforge_project:
|
440
|
-
rubygems_version: 2.6.
|
440
|
+
rubygems_version: 2.6.14
|
441
441
|
signing_key:
|
442
442
|
specification_version: 4
|
443
443
|
summary: Full-featured MediaWiki client with Arel-like queries
|