castle-rb 3.6.1 → 3.6.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 +4 -4
- data/lib/castle/extractors/headers.rb +1 -1
- data/lib/castle/version.rb +1 -1
- data/spec/lib/castle/extractors/headers_spec.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 01fa92f200806e9649d71afa71dff0e8ff37db950a74e122134fdbda5413ef8a
|
|
4
|
+
data.tar.gz: f3a11d66711788d68c228ff63b647326e5446fff0ddb1be4e33e4b400d4587a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5329a71bd213ee88665b68ab4a79f6eca7987355d839d9e26b4d132ea3d4b7986714d23c3b6f97e7743ce774d969438365ea004fdcdd99eb7643f5c07c43d7b9
|
|
7
|
+
data.tar.gz: 89d8241793e59288651ac45b8d799c545a9b60aa25e6ae8d0092cda6183e9ecdf3b9d5b8ee68e0184b8021dc8633f9f949c987c6f0cd3abc1db6f7f2b47bda99
|
|
@@ -29,7 +29,7 @@ module Castle
|
|
|
29
29
|
# @return [Hash]
|
|
30
30
|
def call
|
|
31
31
|
@request_env.keys.each_with_object({}) do |env_header, acc|
|
|
32
|
-
next unless env_header.start_with?(HTTP_HEADER_PREFIX) || env_header == CONTENT_LENGTH
|
|
32
|
+
next unless env_header.to_s.start_with?(HTTP_HEADER_PREFIX) || env_header == CONTENT_LENGTH
|
|
33
33
|
|
|
34
34
|
header = @formatter.call(env_header)
|
|
35
35
|
|
data/lib/castle/version.rb
CHANGED
|
@@ -5,17 +5,18 @@ describe Castle::Extractors::Headers do
|
|
|
5
5
|
|
|
6
6
|
let(:client_id) { 'abcd' }
|
|
7
7
|
let(:env) do
|
|
8
|
-
Rack::MockRequest.env_for(
|
|
8
|
+
result = Rack::MockRequest.env_for(
|
|
9
9
|
'/',
|
|
10
10
|
'Action-Dispatch.request.content-Type' => 'application/json',
|
|
11
11
|
'HTTP_AUTHORIZATION' => 'Basic 123456',
|
|
12
12
|
'HTTP_COOKIE' => "__cid=#{client_id};other=efgh",
|
|
13
|
-
'HTTP_OK' => 'OK',
|
|
14
13
|
'HTTP_ACCEPT' => 'application/json',
|
|
15
14
|
'HTTP_X_FORWARDED_FOR' => '1.2.3.4',
|
|
16
15
|
'HTTP_USER_AGENT' => 'Mozilla 1234',
|
|
17
16
|
'TEST' => '1'
|
|
18
17
|
)
|
|
18
|
+
result[:HTTP_OK] = 'OK'
|
|
19
|
+
result
|
|
19
20
|
end
|
|
20
21
|
let(:request) { Rack::Request.new(env) }
|
|
21
22
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: castle-rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.6.
|
|
4
|
+
version: 3.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Johan Brissmyr
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-04-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Castle protects your users from account compromise
|
|
14
14
|
email: johan@castle.io
|