castle-rb 3.0.0 → 3.0.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
- SHA256:
3
- metadata.gz: 42c05b0f98dc4b62b7dd63aa69c0f78b3470c4e3a9432a454b1d7ca7918dbc17
4
- data.tar.gz: a8761230e18ee47bb2337878774f637bea68ddd1d96bdc55827ec475d29a0026
2
+ SHA1:
3
+ metadata.gz: '071206458817ceae46b074a971138d80734439d0'
4
+ data.tar.gz: 7ae3185a784deb1ea4995cdc0ac732c6cca371e0
5
5
  SHA512:
6
- metadata.gz: '08a34db09b0d770ae486c520d71d5643c07aa436643679303f679bafbb7bf783222282db54dcfcbf36217a47401a19f73aaca49a3534e2919f5378f26fead199'
7
- data.tar.gz: f502877e392ec738ff2425bb98ba4c8b9bdaa73a2ca9025dad7b2c51f7e20e4c50544f5275df10a9f83639fc8410feae33787bdd8b312b5d98017e40541f5fa9
6
+ metadata.gz: 965277364777fe9830a5e5ec65bc6e34ac8f4ff77ba5221622ef3186f3dd85c8766777ed1fa2443ec811d6b7d77df9f4975bb8b0ed6e7f17105fa84d0fd113e7
7
+ data.tar.gz: d71bc4bb0dc0dd779536ae2fb8078051a002b7c3aef68c8a648beab98907f187feb9934d4c9b11ebddcb6adfdc0899a31c1b56094c0192812be32aabd776a78b
data/README.md CHANGED
@@ -62,7 +62,7 @@ The client will automatically configure the [request context](https://api.castle
62
62
  ```ruby
63
63
  begin
64
64
  castle.track(
65
- name: '$login.succeeded',
65
+ event: '$login.succeeded',
66
66
  user_id: user.id
67
67
  )
68
68
  rescue Castle::Error => e
@@ -3,7 +3,7 @@
3
3
  module Castle
4
4
  class HeaderFormatter
5
5
  def call(header)
6
- header.gsub(/^HTTP(?:_|-)/i, '').split(/_|-/).map(&:capitalize).join('-')
6
+ header.to_s.gsub(/^HTTP(?:_|-)/i, '').split(/_|-/).map(&:capitalize).join('-')
7
7
  end
8
8
  end
9
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Castle
4
- VERSION = '3.0.0'
4
+ VERSION = '3.0.1'
5
5
  end
@@ -18,4 +18,8 @@ describe Castle::HeaderFormatter do
18
18
  it 'does not remove http if there is no _- char' do
19
19
  expect(formatter.call('httpX_teST')).to be_eql('Httpx-Test')
20
20
  end
21
+
22
+ it 'removes HTTP_' do
23
+ expect(formatter.call(:clearance)).to be_eql('Clearance')
24
+ end
21
25
  end
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.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan Brissmyr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-18 00:00:00.000000000 Z
11
+ date: 2017-11-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Castle protects your users from account compromise
14
14
  email: johan@castle.io
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.6.14
95
+ rubygems_version: 2.6.13
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Castle