breath 0.1.1 → 0.1.2

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: 50ebd07a8e36d441f618c760f7a5a24fa18d9ac94ddb4a6bdc900cfdb3e359ca
4
- data.tar.gz: d260c09a3bee03dc94022e6b579b344c26cc297ccede0dfd858ab12952d67690
3
+ metadata.gz: b2785b5ee6dbd2e81dad460ef63f97dcfcb481e93e72d1805019c12911766e55
4
+ data.tar.gz: 29c3bcfc6c28916d7a5dbf54bb9937688f008d938c2d27135219f4ec34c6dd72
5
5
  SHA512:
6
- metadata.gz: 4714402fea80ecc8cb5f3d1a1462ef7f28a36d8c6b3abea415aca82b71ae460f5537f931441dd80d3c67064313c63c0ab564f069050011d129f39a2ec91e4561
7
- data.tar.gz: 24ff2a754e289c97a9953a29f42b88a311e886b80c2f97a7c5a879bb3939c981c2ad432c75d77255b851a11503ac4e9b72b7edb3fef67a8ee3ae7119ecb5021d
6
+ metadata.gz: 6749ed6e952b1da8a7e5074f33810293c63d1e1629df7390319f6d4e28fa79948df168c25abb1cc0b5d457c30648fd427a62b089c9b40eef6df2892bb9a4a517
7
+ data.tar.gz: fb538d0d914d31c9e693b64fe24bcc7d615b7c6bacb77fcb70b9c82d05b425614cb94d902fc8e8301383f3a6ea8705f2d5389895ee437489a2f5630d965b246a
@@ -7,14 +7,14 @@ module Breath
7
7
  included do
8
8
  target_class = to_s.split("::")[-2].singularize.constantize
9
9
  target_name = target_class.to_s.underscore
10
- current_target_name = "current_#{target_name}"
10
+ current_target = "current_#{target_name}"
11
11
 
12
12
  include ActionController::Cookies
13
13
 
14
14
  define_method :authenticate! do
15
15
  raise AuthenticationError unless cookies.key?("#{target_name}_id".to_sym)
16
- raise AuthenticationError if send(current_target_name).nil?
17
- raise AuthenticationError unless send(current_target_name).remember?(cookies[:remember_token])
16
+ raise AuthenticationError if send(current_target).nil?
17
+ raise AuthenticationError unless send(current_target).remember?(cookies[:remember_token])
18
18
 
19
19
  target = target_class.enabled.find_by(id: cookies.signed["#{target_name}_id".to_sym])
20
20
 
@@ -1,3 +1,3 @@
1
1
  module Breath
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: breath
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
  - testCodeV01