api_guard 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: bc34f3bf30f6d777d1350a7a66f30db8e5dd848c
4
- data.tar.gz: fefe25e711ccb0fe99433fe321734b1abb850b1d
3
+ metadata.gz: 5fb06d2b7085c3eb3819a89610602c556435440a
4
+ data.tar.gz: 3f78360c4859b5d18aedcf9031526c4c7b13d01a
5
5
  SHA512:
6
- metadata.gz: 36553d07a9491c368be3790b53b991b3b9f1519faaea1cb93023cfb0436e51a7c491c5eba499b38abcce48731a851c5f4a99fce1830f259c9bf7bd88d303aacb
7
- data.tar.gz: c00a3c77306a8214af71cb16270c59f7c7e441d9d1f885cf80e776a1be124c587a75b9b0f601bf224d8502568a55b0d5bea4eacf6ca0bf658bf87de99f02a33d
6
+ metadata.gz: b6531b78c3c2a6c1d90a1ed2a12644f16294eaeb949b3a2932909d88cd3dfa46bff3dff2afdc3c358422078ed3ccd47eefd164773ec7a11e5308a97ec5979495
7
+ data.tar.gz: 4a2cc065e85e1fc78afe832771dfb1df2eb49ad54afa1b0b69b00edd5a40f1b3ed64b28063ce068babe9f1d0118b6a9dcdfafea25b51c64e71e796d7f81c4c29
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # API Guard
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/api_guard.svg)](https://badge.fury.io/rb/api_guard)
3
+ [![Version](https://img.shields.io/gem/v/api_guard.svg?color=green)](https://rubygems.org/gems/api_guard)
4
4
  [![Build Status](https://travis-ci.org/Gokul595/api_guard.svg?branch=master)](https://travis-ci.org/Gokul595/api_guard)
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/ced3e74a26a66ed915cb/maintainability)](https://codeclimate.com/github/Gokul595/api_guard/maintainability)
6
6
  [![Test Coverage](https://api.codeclimate.com/v1/badges/ced3e74a26a66ed915cb/test_coverage)](https://codeclimate.com/github/Gokul595/api_guard/test_coverage)
@@ -9,7 +9,10 @@ module ApiGuard
9
9
 
10
10
  # Use 'secret_key_base' from Rails secrets if 'token_signing_secret' is not configured
11
11
  initializer 'ApiGuard.token_signing_secret' do |app|
12
- ApiGuard.token_signing_secret ||= Rails.application.secrets.secret_key_base
12
+ unless ApiGuard.token_signing_secret
13
+ signing_secret = app.respond_to?(:credentials) ? app.credentials.secret_key_base : app.secrets.secret_key_base
14
+ ApiGuard.token_signing_secret = signing_secret
15
+ end
13
16
  end
14
17
  end
15
18
  end
@@ -1,3 +1,3 @@
1
1
  module ApiGuard
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_guard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gokul Murali
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-24 00:00:00.000000000 Z
11
+ date: 2019-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt