api_guard 0.5.0 → 0.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: 16c29cefc6fd22302a55e87e7ec5f52d6fc4936640ee190cad692646cbe37cc7
4
- data.tar.gz: daa21cfa0052dc034fc5e5c18c380a9ee3eac72e3d1490db895798dc2f31c9f7
3
+ metadata.gz: db273f8953347d07ed9d5acb5923480e463461517e2e1396d37a9db704ffc218
4
+ data.tar.gz: 92b5aeffc41c1d97d3d1ade1389b4acd902ff66166ecb3895fd858b0f8f51a01
5
5
  SHA512:
6
- metadata.gz: 6daaca97ec4dd5d3c4f9938642edc77b2fc25a8854985d6b305e4ce1e83b20dd52b2056fed4e0e9d8b6e14f9f0049391afe42c40f455983d9386556fc1bca37c
7
- data.tar.gz: a3feb57d806c7581a6679833a2cb0f41328e8b9a9077acd5504898173527b7ae30778d846efbbac4106d52abea65c35300e6714f2aa0cc2cb3016e1dd2b1eb2f
6
+ metadata.gz: d99aa923a6b41bdc4b1c5524cc9159342fee8e1c31931d0387c21651d7b338ccef6be7773cdd48d8773f1b50000e228310bf7a18d9c3cefaeb52f63f2b82c824
7
+ data.tar.gz: 3651814062e401e8c8be16d9c103a23de042232140bccb10a79977dc3ffdb7370b658ddfeed26cc3e995705e3d7e60c90d97f5b65469025eed717260e6097a31
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![Version](https://img.shields.io/gem/v/api_guard.svg?color=green)](https://rubygems.org/gems/api_guard)
4
4
  [![Build Status](https://github.com/Gokul595/api_guard/workflows/build/badge.svg?branch=master)](https://github.com/Gokul595/api_guard/actions?query=workflow%3Abuild)
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/ced3e74a26a66ed915cb/maintainability)](https://codeclimate.com/github/Gokul595/api_guard/maintainability)
6
- [![Test Coverage](https://api.codeclimate.com/v1/badges/ced3e74a26a66ed915cb/test_coverage)](https://codeclimate.com/github/Gokul595/api_guard/test_coverage)
7
6
 
8
7
 
9
8
  [JSON Web Token (JWT)](https://jwt.io/) based authentication solution with token refreshing & blacklisting for APIs
@@ -58,7 +58,7 @@ module ApiGuard
58
58
  # Defines "current_{{resource_name}}" method and "@current_{{resource_name}}" instance variable
59
59
  # that returns "resource" value
60
60
  def define_current_resource_accessors(resource)
61
- self.class.send(:define_method, "current_#{@resource_name}") do
61
+ define_singleton_method("current_#{@resource_name}") do
62
62
  instance_variable_get("@current_#{@resource_name}") ||
63
63
  instance_variable_set("@current_#{@resource_name}", resource)
64
64
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApiGuard
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gokul Murali
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-13 00:00:00.000000000 Z
11
+ date: 2020-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  - !ruby/object:Gem::Version
196
196
  version: '0'
197
197
  requirements: []
198
- rubygems_version: 3.1.2
198
+ rubygems_version: 3.0.8
199
199
  signing_key:
200
200
  specification_version: 4
201
201
  summary: Rails API authentication made easy