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: 491d688ce2ee00c8b59f059ff205c992b069cec6
4
- data.tar.gz: 7d432a0022b58c54c5891b8f01d657d034c4fadd
3
+ metadata.gz: ea72aa4513e7ecb47c8f7e36d8f01e69e90f86db
4
+ data.tar.gz: 5f19154398f9a2bc500ad5b00fcf97c0b019f98f
5
5
  SHA512:
6
- metadata.gz: 8986b91cec76fa6f66e865f6d154509f42214961a62df928df76e793bf1fd88cee3a89dd702d105f41990026396e87bbd4b5b8bd13af1ba5a5db36b845951aef
7
- data.tar.gz: a5e1e663d61dea79d555cb721ea3529ca9a1dbb906a9089dcaa52b4638c1a9c23f238154d73b8cabe89b54236ef6aae64490e9653c12e6820bb5c6b20a8a45d1
6
+ metadata.gz: 3d4ef8bf155f722c815325815b714e1f7d236c3bbc349d54a364a52f137d00f1e3ad83b5aa93e04d82043185bafc0ac6c02deb2394ef3c43ad9d957d58ddb79e
7
+ data.tar.gz: 799f737771783d74ce81df60dc37a12d5d7fd84b95d28367334babc82dba28869f0b40b7e8041a5e0e7575015c8d9c5ac303ec9b19ab9391143ee4c18852a7ff
@@ -1,5 +1,9 @@
1
1
  # MediaWiktory Changelog
2
2
 
3
+ # 0.1.3 (2018-02-08)
4
+
5
+ * Add gzip headers, as it should be done a long ago :(
6
+
3
7
  # 0.1.2 (2017-11-09)
4
8
 
5
9
  * Fix requiring `addressable` (@chrisadams).
@@ -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
@@ -3,6 +3,6 @@
3
3
  module MediaWiktory
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- PATCH = 2
6
+ PATCH = 3
7
7
  VERSION = [MAJOR, MINOR, PATCH].join('.')
8
8
  end
@@ -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.2
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: 2017-11-08 00:00:00.000000000 Z
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.10
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