rails_jwt_auth 0.19.1 → 0.19.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: a9f77503a47b7abe190b882660fabef6845c6ff8bc69a55e874c89a514eb0e7f
4
- data.tar.gz: a9fe88686938bd93ffce0ac382a4a7bf372078cec6d565c6f4b843dc05f09afa
3
+ metadata.gz: 6bd8391486a564c99d8df46d6728d55d7dad89c193093ebb5f4b03d880a8ae6c
4
+ data.tar.gz: 6bfccb2b462c62a7d64a7a5de6dd311477c7daec66bf1f81271514a6d77dfdf9
5
5
  SHA512:
6
- metadata.gz: 6ae7c088814a80fc85b62fc424fd532e25d00eb33b77a0cf5c41623d2e3a7dd6dc691e0486a973519d3df978b511896ea1f2176f44a0346a74512f45cb531c33
7
- data.tar.gz: 32768f619782e7c4dfbfd41deeea93802e57f6604e54c503f33d2c20d402524f9045aa081cece593db31885884e6d6068bcae3fa8453d1b01f4c5f3b0987465c
6
+ metadata.gz: 4d7a8c674fafa2ac9d0e2491a4bcfd728f49e16f731613dacb98f0ee147e607324aa3b988473ea78f9f773bd24c93649014ec8fda4dcfb6610dc562059057956
7
+ data.tar.gz: 52161685d3441dd3dd7055d51464bb722694df49bc1756145e436d79c4ecae44621d32d6fb4d6195011ea65f75c77b32d818071f0e427b8fc782edca892db497
data/README.md CHANGED
@@ -551,7 +551,7 @@ And then we can just call sign_in(user) to sign in as a user, or sign_out for ex
551
551
  end
552
552
 
553
553
  it "allows authenticated access" do
554
- sign_in
554
+ sign_in user
555
555
  get :index
556
556
  expect(response).to be_success
557
557
  end
@@ -4,7 +4,7 @@ module RailsJwtAuth
4
4
  include RenderHelper
5
5
 
6
6
  def create
7
- user = RailsJwtAuth.model.where(email: password_create_params[:email]).first
7
+ user = RailsJwtAuth.model.where(email: password_create_params[:email].to_s.downcase).first
8
8
  return render_422(email: [I18n.t('rails_jwt_auth.errors.not_found')]) unless user
9
9
 
10
10
  user.send_reset_password_instructions ? render_204 : render_422(user.errors)
@@ -39,7 +39,7 @@ module RailsJwtAuth
39
39
 
40
40
  def self.included(base)
41
41
  base.class_eval do
42
- if ancestors.include? Mongoid::Document
42
+ if defined?(Mongoid) && ancestors.include?(Mongoid::Document)
43
43
  # include GlobalID::Identification to use deliver_later method
44
44
  # http://edgeguides.rubyonrails.org/active_job_basics.html#globalid
45
45
  include GlobalID::Identification if RailsJwtAuth.deliver_later
@@ -32,7 +32,7 @@ module RailsJwtAuth
32
32
 
33
33
  def self.included(base)
34
34
  base.class_eval do
35
- if base.ancestors.include? Mongoid::Document
35
+ if defined?(Mongoid) && base.ancestors.include?(Mongoid::Document)
36
36
  # include GlobalID::Identification to use deliver_later method
37
37
  # http://edgeguides.rubyonrails.org/active_job_basics.html#globalid
38
38
  include GlobalID::Identification if RailsJwtAuth.deliver_later
@@ -1,3 +1,3 @@
1
1
  module RailsJwtAuth
2
- VERSION = '0.19.1'
2
+ VERSION = '0.19.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_jwt_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.1
4
+ version: 0.19.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - rjurado
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-19 00:00:00.000000000 Z
11
+ date: 2018-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails