rating-chgk-v2 1.4.0 → 1.5.0

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
  SHA256:
3
- metadata.gz: e04c147b75634054c4363396f1d610964a0f5994083d06b3e6644eb001f81db5
4
- data.tar.gz: 996db9eb097c35793c1b17e76f5a9c2aa1390e6abaa462c641793e65e2f7aeee
3
+ metadata.gz: ef9700f05e3174c4138a2e4df640e21bf23b23d07f138ee5839867ad083f3f57
4
+ data.tar.gz: 4381d5641a0bf6764015b7959f5b1eba2db60d56595a8ef14d546025e2b7e570
5
5
  SHA512:
6
- metadata.gz: 69e18dd4bd3eb3fef7ab30cde3b274af30baab247ee5b447a2d75d7bf4265e1c1a1b3de8835de85eda21bfcf36809cceb1a99e39038dacfcf884dfe563e66ff1
7
- data.tar.gz: 739bf6a49bb794ab5fcc46049178034782c28d9a27812c3106d0514142a84d03d72da4c6f48b699bde4445efc051b3672733490abb0c771bc8cc966dcdcafd3c
6
+ metadata.gz: 7f8b3a973ab3700bd3d333a69ae85924c511c424bc089546415950b3f740182652b619c59b1c71b962b3c25c091f0d5bf03bcfa04932d734b547250ffea9a9cf
7
+ data.tar.gz: 4d6f49c85cedbd4dd100cef159b86228ae8f51ed78f1e1092a2070f9dedb082c7bdb6c4d26be7c170691d4e1de56b4c14119294696dde2a4dfa6f35a3d689ef0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.5.0 (23-Aug-23)
4
+
5
+ * Fixed authorization header sending (thanks, @L-Eugene)
6
+ * Added proper support for compression and fixed processing
7
+
3
8
  ## 1.4.0 (09-Jun-23)
4
9
 
5
10
  * Renamed `narrators` method to `narrator` for `TournamentSynchRequests` (thanks, @L-Eugene)
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ![Gem](https://img.shields.io/gem/v/rating-chgk-v2)
4
4
  ![CI](https://github.com/bodrovis/rating-chgk-v2/actions/workflows/ci.yml/badge.svg)
5
+ [![Coverage Status](https://coveralls.io/repos/github/bodrovis/rating-chgk-v2/badge.svg?branch=master)](https://coveralls.io/github/bodrovis/rating-chgk-v2?branch=master)
6
+ ![Downloads total](https://img.shields.io/gem/dt/rating-chgk-v2)
5
7
 
6
8
  Ruby client for [competitive "What? Where? When?" (aka "CHGK") API](http://api.rating.chgk.net/). This gem is a replacement for [ChgkRating](https://github.com/bodrovis/ChgkRating) which worked only with the deprecated API version.
7
9
 
@@ -7,6 +7,7 @@ module RatingChgkV2
7
7
  def connection(client)
8
8
  Faraday.new(options(client), request_params_for(client)) do |faraday|
9
9
  faraday.adapter Faraday.default_adapter
10
+ faraday.request :gzip
10
11
  end
11
12
  end
12
13
 
@@ -20,7 +21,7 @@ module RatingChgkV2
20
21
  accept_encoding: 'gzip,deflate,br'
21
22
  }
22
23
 
23
- headers = headers.merge({Authorization: "Bearer #{client.token}"}) if client.token
24
+ headers = headers.merge({Authorization: "Bearer #{client.token}"}) unless client.token.to_s.empty?
24
25
 
25
26
  {headers: headers, url: BASE_URL}
26
27
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RatingChgkV2
4
- VERSION = '1.4.0'
4
+ VERSION = '1.5.0'
5
5
  end
@@ -3,6 +3,7 @@
3
3
  require 'zeitwerk'
4
4
  require 'yaml'
5
5
  require 'faraday'
6
+ require 'faraday/gzip'
6
7
  require 'addressable/template'
7
8
  require 'forwardable'
8
9
 
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_dependency 'addressable', '~> 2.5'
25
25
  spec.add_dependency 'faraday', '~> 2'
26
+ spec.add_dependency 'faraday-gzip', '~> 2.0'
26
27
  spec.add_dependency 'json', '~> 2'
27
28
  spec.add_dependency 'zeitwerk', '~> 2.4'
28
29
 
@@ -35,6 +36,7 @@ Gem::Specification.new do |spec|
35
36
  spec.add_development_dependency 'rubocop-rake', '~> 0.6'
36
37
  spec.add_development_dependency 'rubocop-rspec', '~> 2.0'
37
38
  spec.add_development_dependency 'simplecov', '~> 0.22'
39
+ spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
38
40
  spec.add_development_dependency 'vcr', '~> 6.0'
39
41
  spec.add_development_dependency 'webmock', '~> 3.14'
40
42
  spec.metadata = {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rating-chgk-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Krukowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-08 00:00:00.000000000 Z
11
+ date: 2023-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: faraday-gzip
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: json
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +206,20 @@ dependencies:
192
206
  - - "~>"
193
207
  - !ruby/object:Gem::Version
194
208
  version: '0.22'
209
+ - !ruby/object:Gem::Dependency
210
+ name: simplecov-lcov
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '0.8'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: '0.8'
195
223
  - !ruby/object:Gem::Dependency
196
224
  name: vcr
197
225
  requirement: !ruby/object:Gem::Requirement
@@ -363,7 +391,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
363
391
  - !ruby/object:Gem::Version
364
392
  version: '0'
365
393
  requirements: []
366
- rubygems_version: 3.4.13
394
+ rubygems_version: 3.4.18
367
395
  signing_key:
368
396
  specification_version: 4
369
397
  summary: Ruby interface for the new CHGK rating API