relic_link 1.2.0 → 1.2.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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 933d2d2f0ea7389569d273f910d7c81ccd0abb7f4db84353ba52a537a44fcff8
4
- data.tar.gz: 927197b6cf76cc074e4a01bf945f9970005e1c10322ec260f3117022fa39c9ef
3
+ metadata.gz: f946c4d09c17dbdd9522d22cfea4e8ff935cffdca59728b34e398d4e35986ece
4
+ data.tar.gz: 75924b2a77be65290e8ff3d312d6ba619b733b4276fe38e178e0c3fb49b224d6
5
5
  SHA512:
6
- metadata.gz: d1a53aefa0bd7708f790901dd03d25446b04702dabf7037abeacdef38127365ba9d5f9ffd37969a5604ca254ed73f08f2fa6908b7eda5cba6427e9e49c314d18
7
- data.tar.gz: 5b1286b258c58bd9fcaf29123da22a944a6942a455b955bfe1b7e4e9b8f1951500c495b13e364d58ce3141cc8a8fe323482904b756f7b2f72726cf81d826d657
6
+ metadata.gz: eea1940ab9da3a557aa941028f4635ff089d4fe8506a1b822e460984b2098076163386019497aca46248182e518f91c767a8f3ccd90f9f328b8fc1f0fc6c123e
7
+ data.tar.gz: '0975d7c5e3173c1d876f0bd7e48b86db108635254ed6abe698a3987a65ec8f8b37a4f05ad9eccec53f1b31a06f730c26b36249b47f7081a087e983f15fcd9729'
data/.rubocop.yml CHANGED
@@ -1,3 +1,7 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
1
5
  AllCops:
2
6
  TargetRubyVersion: 3.1
3
7
  NewCops: enable
@@ -11,6 +15,36 @@ Metrics/BlockLength:
11
15
  Metrics/MethodLength:
12
16
  Max: 15
13
17
 
18
+ Rake/Desc:
19
+ Enabled: false
20
+
21
+ RSpec/AnyInstance:
22
+ Enabled: false
23
+
24
+ RSpec/ContextWording:
25
+ Enabled: false
26
+
27
+ RSpec/ExampleLength:
28
+ Max: 10
29
+
30
+ RSpec/HookArgument:
31
+ Enabled: false
32
+
33
+ RSpec/MessageChain:
34
+ Enabled: false
35
+
36
+ RSpec/MessageSpies:
37
+ Enabled: false
38
+
39
+ RSpec/MultipleExpectations:
40
+ Enabled: false
41
+
42
+ RSpec/MultipleMemoizedHelpers:
43
+ Enabled: false
44
+
45
+ RSpec/NestedGroups:
46
+ Enabled: false
47
+
14
48
  Style/GlobalStdStream:
15
49
  Enabled: false
16
50
 
data/Gemfile CHANGED
@@ -9,6 +9,8 @@ gem 'rake', '~> 13.2'
9
9
 
10
10
  gem 'rspec', '~> 3.13'
11
11
 
12
- gem 'rubocop', '~> 1.65'
12
+ gem 'rubocop', '~> 1.66'
13
+ gem 'rubocop-rake'
14
+ gem 'rubocop-rspec'
13
15
 
14
- gem 'vcr', '~> 6.2'
16
+ gem 'vcr', '~> 6.3'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- relic_link (1.2.0)
4
+ relic_link (1.2.1)
5
5
  faraday (~> 2.7)
6
6
  faraday-mashify (~> 0.1)
7
7
  hashie (~> 5.0)
@@ -10,62 +10,64 @@ GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
12
  ast (2.4.2)
13
+ base64 (0.2.0)
13
14
  diff-lcs (1.5.1)
14
- faraday (2.10.1)
15
- faraday-net_http (>= 2.0, < 3.2)
15
+ faraday (2.11.0)
16
+ faraday-net_http (>= 2.0, < 3.4)
16
17
  logger
17
18
  faraday-mashify (0.1.1)
18
19
  faraday (~> 2.0)
19
20
  hashie
20
- faraday-net_http (3.1.1)
21
+ faraday-net_http (3.3.0)
21
22
  net-http
22
23
  hashie (5.0.0)
23
24
  json (2.7.2)
24
25
  language_server-protocol (3.17.0.3)
25
- logger (1.6.0)
26
+ logger (1.6.1)
26
27
  net-http (0.4.1)
27
28
  uri
28
- parallel (1.26.1)
29
- parser (3.3.4.2)
29
+ parallel (1.26.3)
30
+ parser (3.3.5.0)
30
31
  ast (~> 2.4.1)
31
32
  racc
32
33
  racc (1.8.1)
33
34
  rainbow (3.1.1)
34
35
  rake (13.2.1)
35
36
  regexp_parser (2.9.2)
36
- rexml (3.3.4)
37
- strscan
38
37
  rspec (3.13.0)
39
38
  rspec-core (~> 3.13.0)
40
39
  rspec-expectations (~> 3.13.0)
41
40
  rspec-mocks (~> 3.13.0)
42
- rspec-core (3.13.0)
41
+ rspec-core (3.13.1)
43
42
  rspec-support (~> 3.13.0)
44
- rspec-expectations (3.13.1)
43
+ rspec-expectations (3.13.3)
45
44
  diff-lcs (>= 1.2.0, < 2.0)
46
45
  rspec-support (~> 3.13.0)
47
46
  rspec-mocks (3.13.1)
48
47
  diff-lcs (>= 1.2.0, < 2.0)
49
48
  rspec-support (~> 3.13.0)
50
49
  rspec-support (3.13.1)
51
- rubocop (1.65.1)
50
+ rubocop (1.66.1)
52
51
  json (~> 2.3)
53
52
  language_server-protocol (>= 3.17.0)
54
53
  parallel (~> 1.10)
55
54
  parser (>= 3.3.0.2)
56
55
  rainbow (>= 2.2.2, < 4.0)
57
56
  regexp_parser (>= 2.4, < 3.0)
58
- rexml (>= 3.2.5, < 4.0)
59
- rubocop-ast (>= 1.31.1, < 2.0)
57
+ rubocop-ast (>= 1.32.2, < 2.0)
60
58
  ruby-progressbar (~> 1.7)
61
59
  unicode-display_width (>= 2.4.0, < 3.0)
62
- rubocop-ast (1.32.0)
60
+ rubocop-ast (1.32.3)
63
61
  parser (>= 3.3.1.0)
62
+ rubocop-rake (0.6.0)
63
+ rubocop (~> 1.0)
64
+ rubocop-rspec (3.0.5)
65
+ rubocop (~> 1.61)
64
66
  ruby-progressbar (1.13.0)
65
- strscan (3.1.0)
66
67
  unicode-display_width (2.5.0)
67
- uri (0.13.0)
68
- vcr (6.2.0)
68
+ uri (0.13.1)
69
+ vcr (6.3.1)
70
+ base64
69
71
 
70
72
  PLATFORMS
71
73
  arm64-darwin-21
@@ -76,8 +78,10 @@ DEPENDENCIES
76
78
  rake (~> 13.2)
77
79
  relic_link!
78
80
  rspec (~> 3.13)
79
- rubocop (~> 1.65)
80
- vcr (~> 6.2)
81
+ rubocop (~> 1.66)
82
+ rubocop-rake
83
+ rubocop-rspec
84
+ vcr (~> 6.3)
81
85
 
82
86
  BUNDLED WITH
83
87
  2.5.17
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # RelicLink
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/relic_link.svg)](https://badge.fury.io/rb/relic_link) [![Documentation](https://img.shields.io/badge/View-Documentation-blue.svg)](https://rubydoc.info/github/ryantaylor/relic_link/v1.2.0)
3
+ [![Gem Version](https://badge.fury.io/rb/relic_link.svg)](https://badge.fury.io/rb/relic_link) [![Documentation](https://img.shields.io/badge/View-Documentation-blue.svg)](https://rubydoc.info/github/ryantaylor/relic_link/v1.2.1)
4
4
 
5
5
  A client wrapper for Relic APIs. Currently supports the Company of Heroes 3 leaderboard, stats, and recent matches API.
6
6
 
@@ -29,7 +29,7 @@ client.recent_match_history(profile_ids: [8230])
29
29
  client.recent_match_history_by_profile_id(8230)
30
30
  client.personal_stats(profile_ids: [8230])
31
31
  ```
32
- Consult the [documentation](https://rubydoc.info/github/ryantaylor/relic_link/v1.2.0) for all endpoints that have been discovered and are currently queryable. Note that Relic does not publish official documentation for their endpoints, so the functionality here is based on best estimates and is subject to change without warning. Please open an issue if you are aware of endpoints that are not exposed in this library!
32
+ Consult the [documentation](https://rubydoc.info/github/ryantaylor/relic_link/v1.2.1) for all endpoints that have been discovered and are currently queryable. Note that Relic does not publish official documentation for their endpoints, so the functionality here is based on best estimates and is subject to change without warning. Please open an issue if you are aware of endpoints that are not exposed in this library!
33
33
 
34
34
  ## Contributing
35
35
 
@@ -14,6 +14,8 @@ module RelicLink
14
14
  @stats ||= ::Faraday.new(
15
15
  url: 'https://coh3-api.reliclink.com/community/leaderboard'
16
16
  ) do |f|
17
+ ::Faraday::Mashify::Middleware.mash_class = ResponseMash
18
+
17
19
  f.params[:title] = 'coh3'
18
20
 
19
21
  f.use ::RelicLink::Coh3::Faraday::Response::RaiseHttpError
@@ -29,6 +31,8 @@ module RelicLink
29
31
  @replays ||= ::Faraday.new(
30
32
  url: 'https://coh3-api.reliclink.com/game/Replay'
31
33
  ) do |f|
34
+ ::Faraday::Mashify::Middleware.mash_class = ResponseMash
35
+
32
36
  f.params[:callNum] = rand(5..354)
33
37
 
34
38
  f.use ::RelicLink::Coh3::Faraday::Response::RaiseHttpError
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RelicLink
4
+ module Coh3
5
+ module Faraday
6
+ # Wrapper for +Hashie::Mash+ that disables conflict warnings.
7
+ class ResponseMash < Hashie::Mash
8
+ disable_warnings
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelicLink
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  end
data/lib/relic_link.rb CHANGED
@@ -19,6 +19,7 @@ require_relative 'relic_link/faraday/response/wrap_error'
19
19
  require_relative 'relic_link/coh3/util'
20
20
  require_relative 'relic_link/coh3/api/endpoints'
21
21
  require_relative 'relic_link/faraday/request'
22
+ require_relative 'relic_link/coh3/faraday/response_mash'
22
23
  require_relative 'relic_link/coh3/faraday/connection'
23
24
  require_relative 'relic_link/coh3/client'
24
25
  require_relative 'relic_link/version'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relic_link
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryantaylor
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-09 00:00:00.000000000 Z
11
+ date: 2024-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -86,6 +86,7 @@ files:
86
86
  - lib/relic_link/coh3/faraday/response/raise_http_error.rb
87
87
  - lib/relic_link/coh3/faraday/response/raise_replay_error.rb
88
88
  - lib/relic_link/coh3/faraday/response/raise_stats_error.rb
89
+ - lib/relic_link/coh3/faraday/response_mash.rb
89
90
  - lib/relic_link/coh3/util.rb
90
91
  - lib/relic_link/errors/server_error.rb
91
92
  - lib/relic_link/faraday/request.rb