howlongtobeat 0.2.0 → 0.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: dade03f5e29eecc43b780f4721d6843fee4033a1a5d374ad65adbfcf9510cd21
4
- data.tar.gz: 51ce4b254c4f8c8923ba56b5dacb97e8981437b449de4285c7e29f1856aa111e
3
+ metadata.gz: 30968d273638c5687a8f004d3af466ba21fe5c1ffb9a901b8d46bb7e0bfe9c57
4
+ data.tar.gz: 70cfdf898cc6adc10f3916822e4dc9b6f64db824fb45be348dd2185825c0d292
5
5
  SHA512:
6
- metadata.gz: 9fb70b3b35d2a6465f37a063f2c34338dd82284ccc1e0aa684361d0a28d8028a129db8b1ea653f66fd24f9f4206284f835c5dce3f02d32e47ff3b2158b1f50ec
7
- data.tar.gz: b90d809192fd9b481c837f75c53684dca44b788dcf6fbe2aaa4558203e891fb958e3e018d1e5a69b2c521cd62ede9af314539714f27c39de4f837222b0231d15
6
+ metadata.gz: 26add34fc6bc60313c3c85cd37de8f3f3e3fb116b1fd841104311080d7d2ccdbab4afbd528b85cbfc17a4707830741ba532a7d735c3708258eb710c670b35a21
7
+ data.tar.gz: d29ee7ade48aa6984af6eaecdad80242d464aa9d5c1ce659e1508ad3810cccbf9608db188ea16f1c721c8ed8093f884037b93ab6ef2b105912bc15109cfc3dcb
data/CHANGELOG.md CHANGED
@@ -25,6 +25,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
25
25
  ### Security
26
26
  - None
27
27
 
28
+ ## [0.2.1] - 2025-12-13
29
+
30
+ ### Fixed
31
+ - Added SSL certificate verification fallback for environments with certificate issues
32
+ - Added `origin` and `accept` headers to token fetch requests for proper API authentication
33
+
28
34
  ## [0.2.0] - 2025-12-13
29
35
 
30
36
  ### Changed
@@ -179,7 +179,9 @@ module HowLongToBeat
179
179
  def get_title_request_headers
180
180
  {
181
181
  'User-Agent' => random_user_agent,
182
- 'referer' => REFERER_HEADER
182
+ 'referer' => REFERER_HEADER,
183
+ 'origin' => BASE_URL,
184
+ 'accept' => '*/*'
183
185
  }
184
186
  end
185
187
 
@@ -193,6 +195,11 @@ module HowLongToBeat
193
195
 
194
196
  response = http.request(request)
195
197
  response.body if response.is_a?(Net::HTTPSuccess)
198
+ rescue OpenSSL::SSL::SSLError => e
199
+ # SSL certificate verification failed - disable verification as fallback
200
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
201
+ response = http.request(request)
202
+ response.is_a?(Net::HTTPSuccess) ? response.body : nil
196
203
  rescue StandardError => e
197
204
  nil
198
205
  end
@@ -210,6 +217,11 @@ module HowLongToBeat
210
217
  else
211
218
  nil
212
219
  end
220
+ rescue OpenSSL::SSL::SSLError => e
221
+ # SSL certificate verification failed - disable verification as fallback
222
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
223
+ response = http.request(request)
224
+ response.is_a?(Net::HTTPSuccess) ? response.body : nil
213
225
  rescue StandardError => e
214
226
  nil
215
227
  end
@@ -1,3 +1,3 @@
1
1
  module HowLongToBeat
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: howlongtobeat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitrii Pashutskii