model_token_auth 1.1.0 → 1.1.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: 6b3168a54dc4b80feef92939e9c1ec3445fd0598bdd6394933650c3b615087a0
4
- data.tar.gz: 585c716460869964bef679d24c117bfadc5345a084bbf11feaa50b859cf4002d
3
+ metadata.gz: 5929157c163b1f04cc0901bed7d7e8dd52ac7757745a95b993df2b6ec6e8f54d
4
+ data.tar.gz: 263e54f27208a612e590b7b685b2493500ad78863d470aa557240cc7c4e04643
5
5
  SHA512:
6
- metadata.gz: 7c664b48be846dc4b15ad2b3ccc92ddaf0b10cdcfadf75c3b080ef970ef0f86e23e973ea704eac5d68872ef2fcdd30851935367669cd1fbba2f18510b7709914
7
- data.tar.gz: 182fb2d03f4741e75e3953b0c8e00bb49e8482c4082df69c44921a951bdad8038e02849bbfeb5b55720efda1d4514c9fbbe8ce9bc1d856324a7e4946dbaa8920
6
+ metadata.gz: 4a4401fe57daa58f076e7ec858a727e7e60d67ff20edd6a34c5a21c9733ad681fc55033d3de51291905b60315a91a90d7c5c635d0d674a10043bf221e337a4c5
7
+ data.tar.gz: 42cacc4e2be630e5924a4c5142ab50fda96b8ee3f08075dad8b6772fe169594814363ddc6d92e3d95863d591b6682410ca2565356faaf4be9fbccc694e55b454
@@ -3,20 +3,21 @@ require 'model_token_auth/access_tokens_config'
3
3
  require 'model_token_auth/acts_as_model_authenticable'
4
4
  require 'model_token_auth/acts_as_controllers_authenticable'
5
5
 
6
- module ModelTokenAuth; end
7
-
6
+ # => Class associated with the models
7
+ # that will be authenticated.
8
+ #
9
+ # if you want to add functionality or
10
+ # parameters you need to open the class
11
+ # in the models folder of the rails application
12
+ #
8
13
  class AccessToken < ActiveRecord::Base
9
14
  include ModelTokenAuth::AccessTokensConfig
10
15
  end
11
16
 
12
- ActiveRecord::Base.include(
13
- ModelTokenAuth::ActsAsModelAuthenticable
14
- )
15
-
16
- ActionController::Base.include(
17
- ModelTokenAuth::ActsAsControllersAuthenticable
18
- ) if ActionController::Base
17
+ # => *
18
+ ActiveRecord::Base.include ModelTokenAuth::ActsAsModelAuthenticable
19
19
 
20
- ActionController::API.include(
21
- ModelTokenAuth::ActsAsControllersAuthenticable
22
- ) if ActionController::API
20
+ # => *
21
+ [ActionController::Base, ActionController::API].each do |resource|
22
+ resource.include ModelTokenAuth::ActsAsControllersAuthenticable
23
+ end
@@ -6,7 +6,7 @@ module ModelTokenAuth
6
6
 
7
7
  class_methods do
8
8
  def acts_as_controller_authenticable
9
- include ModelTokenAuth::ControllersAuth
9
+ superclass.include ModelTokenAuth::ControllersAuth
10
10
  end
11
11
  end
12
12
  end
@@ -1,3 +1,3 @@
1
1
  module ModelTokenAuth
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: model_token_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Armando Alejandre