castle-rb 1.0.0 → 1.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
2
  SHA1:
3
- metadata.gz: 7cf6e4ab5cc8e82409be1c17d5c4a27a9c71190d
4
- data.tar.gz: 2a79f7284ad075e025d2c5c3c160c1bce6ef5134
3
+ metadata.gz: 0856742945aae9ea56e15c7de1ba12804c5fa8e5
4
+ data.tar.gz: ed17300bdbed7d306d3cc79422ea42bdad2aba16
5
5
  SHA512:
6
- metadata.gz: f0487c283b4da37dabb38d870be3d79d69013ef6ac267954dea165f8d2aa8b2fa61570ddc9911e880a533921fc5b0bdb05743164b0c5572dbb80b69cbd24bee7
7
- data.tar.gz: 309970c57c13c40158906f226af70ce790077a3a6f818f24d39a319c0fbd74a777141d9dc14019199e4d366bab38b3c211381e70740b4332d5f8f56d46934064
6
+ metadata.gz: 8e2b42486163ce5cfa7bfb8377475ca24b5266662dfce71b0ea6389d7eb8e0a7726b942bd5f5b9c405b032bf3694bfa5b540ef549d771303191a20feac337a75
7
+ data.tar.gz: 53d70097de459dfa5d3c80071a05efd9ce59dd43e6174bfdab24d8f8e4da6a0376395274b818b222c44d5999c532c9f2f028d0eb3737d0e8646a7cc2ed013e46
@@ -7,9 +7,9 @@ module Castle
7
7
  def initialize(jwt)
8
8
  begin
9
9
  raise Castle::SecurityError, 'Empty JWT' unless jwt
10
- @payload = ::JWT.decode(jwt, Castleconfig.api_secret, true) do |header|
10
+ @payload = ::JWT.decode(jwt, Castle.config.api_secret, true) do |header|
11
11
  @header = header.with_indifferent_access
12
- Castleconfig.api_secret # used by the 'key finder' in the JWT gem
12
+ Castle.config.api_secret # used by the 'key finder' in the JWT gem
13
13
  end.with_indifferent_access
14
14
  rescue ::JWT::DecodeError => e
15
15
  raise Castle::SecurityError.new(e)
@@ -29,7 +29,7 @@ module Castle
29
29
  end
30
30
 
31
31
  def to_token
32
- ::JWT.encode(@payload, Castleconfig.api_secret, "HS256", @header)
32
+ ::JWT.encode(@payload, Castle.config.api_secret, "HS256", @header)
33
33
  end
34
34
 
35
35
  end
@@ -1,3 +1,3 @@
1
1
  module Castle
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -21,7 +21,7 @@ VCR.configure do |config|
21
21
  config.hook_into :webmock
22
22
  end
23
23
 
24
- Castleconfigure do |config|
24
+ Castle.configure do |config|
25
25
  config.api_secret = 'secretkey'
26
26
  end
27
27
 
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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: her