alma_api 1.0.1 → 1.0.2

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: 37b01a05c5d0872a429c9b7b79038690be884cce2ffdaf124218125f5adb73da
4
- data.tar.gz: 3c986e855de66749077a6c203f0f47adb1076d3c8b755262aadb59c73462c549
3
+ metadata.gz: be075de2651cd726b827c48274a0a71338e21064cb33433597c9e09cafabdf41
4
+ data.tar.gz: 972119e4a07785159951b1a29f98636608d46c8ce2b8179465191ff3af3804d4
5
5
  SHA512:
6
- metadata.gz: 04e5a266e16154d64e59e4a93cd8c7a46c6b27c85cc6425256f5485655193cabba0ae1be4b5a8cc08f72751495b95aa73f9188d9d6674b99e89cf1ed7678be96
7
- data.tar.gz: 593b7a0d3ccc3140bca25059cb9ce97c23c2dfbf0e9740b0ce94e0c3cb2f90883e430fa8d4d06f22c3a1377ac0f472a247a797acaaa11eb2ff4dcaaf4c7351f3
6
+ metadata.gz: cc56000113b9aebc0987713e9ebc74a2e52144989fe66dedf6f9b2f8aa128bef2af402e07211a07abcb6bd20f35d480f2fe7beaaed0a4b1626661772a9826834
7
+ data.tar.gz: 42d7d770833351af4aea0f0bd26bf4920f46fc66ccbf081c079c2f1cb0707a660d27163cf2d3cbd0792e4570e7b7ab5e09163da78acf7f888a81f9608be821fe
data/README.md CHANGED
@@ -73,10 +73,10 @@ As a shortcut, you can call `AlmaApi.configure` to get the client instance. Note
73
73
 
74
74
  ```ruby
75
75
  client = AlmaApi.configure do |config|
76
- api_key: "...",
77
- base_url: "...",
78
- default_format: "...",
79
- language: "..."
76
+ config.api_key = "..."
77
+ config.base_url = "..."
78
+ config.default_format = "..."
79
+ config.language = "..."
80
80
  end
81
81
  ```
82
82
  ### Using the client
@@ -75,13 +75,13 @@ module AlmaApi
75
75
  end
76
76
 
77
77
  def handle_faraday_error(error)
78
- error_response = parse_error_response_body(error.response[:body])
78
+ error_response = parse_error_response_body(error.response_body)
79
79
 
80
80
  case error_response[:error_code]
81
81
  when *GATEWAY_ERROR_CODES
82
82
  raise GatewayError.new(error_response[:error_message], error_response[:error_code])
83
83
  else
84
- case error.response[:status]
84
+ case error.response_status
85
85
  when 400..499
86
86
  raise LogicalError.new(error_response[:error_message], error_response[:error_code])
87
87
  else
@@ -1,3 +1,3 @@
1
1
  module AlmaApi
2
- VERSION = "1.0.1".freeze
2
+ VERSION = "1.0.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alma_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Sprotte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-16 00:00:00.000000000 Z
11
+ date: 2024-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport