apia 3.5.0 → 3.5.1

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: 360c2cb98ee125b41392e2005987b1736a452d02307bc234f074ba74e6dda86a
4
- data.tar.gz: d82e4a00e799fbac207669f8ba011e57212d5f0e2afb513932aabd0b2cc31d9d
3
+ metadata.gz: 655dd00a146e4b25e600c926b0b57f160b8eb22d5908f0a7617c5c69d2781867
4
+ data.tar.gz: 57e7d53b19ed835966326bea22228b873218865505823ebf5cc13c3694274d30
5
5
  SHA512:
6
- metadata.gz: a0ecfdfa99d462409158ea2545215839567b2728ff0e8e91d1e4b6a2391fe517efb2976f038a73b04d320b1968532620acd38f728553a5682116ff06a336109a
7
- data.tar.gz: 406100fb8a0afdb2fda77bd9a3a8c3bcab5abc0d0db54232d0e1480b7a2a7e3930102e93a2d4784ee958d5a338db75def9efe66bf6c587945295f71250706956
6
+ metadata.gz: 16961608a1f749b7dea60e91b26a475fe2079f1c80b0535216a2a4551d8d481298733b33c304d6c6e2dd2811f253011d991fc234e42186e945f778ff7f595738
7
+ data.tar.gz: b611dd81deba0c3114af55c1fd3a8605ae5a4eb746730ba1d19b27f7b95302857962abbc2e7e2c7f7c4b59f4b1cf7bfffc87a440db3f396c350be4b9eb8f3d0a
data/lib/apia/rack.rb CHANGED
@@ -79,7 +79,8 @@ module Apia
79
79
 
80
80
  validate_api if development?
81
81
 
82
- route = find_route(request_method, api_path)
82
+ access_control_request_method = env['HTTP_ACCESS_CONTROL_REQUEST_METHOD']&.upcase if request_method == 'OPTIONS'
83
+ route = find_route((access_control_request_method || request_method), api_path)
83
84
  if route.nil?
84
85
  Apia::Notifications.notify(:request_route_not_found, notify_hash)
85
86
  raise RackError.new(404, 'route_not_found', "No route matches '#{api_path}' for #{request_method}")
data/lib/apia/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Apia
4
4
 
5
- VERSION = '3.5.0'
5
+ VERSION = '3.5.1'
6
6
 
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apia
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-14 00:00:00.000000000 Z
11
+ date: 2023-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json