tramway-api 1.8.7.2 → 1.8.7.3
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 +4 -4
- data/README.md +1 -1
- data/app/controllers/tramway/api/application_controller.rb +2 -2
- data/lib/tramway/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 11004151aa05f918b93dfcc0732fe11e69030074fd0f677470b8d8971bf15cb8
|
|
4
|
+
data.tar.gz: 966562fdf9a961d25ed49e70b509df1039b8009e49520374ccdc4667432053f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cda3e5383e1b5e8d18b6ca86b58a811fc44d58ad2a6d8a0a080d283081053a385d56d24c175687ab648232560128d3dbf7e4f11d2801e1819f927fa57900a61a
|
|
7
|
+
data.tar.gz: c6e6e8f9bbf3ae234ce5f5b415d946158b69a5ba281f0dc638ef0c4eaf5b742700cc661744fc7182d8bc71000e80cc61bca74a39efdb2c99ab430f83b6435d90
|
data/README.md
CHANGED
|
@@ -35,7 +35,7 @@ module Tramway
|
|
|
35
35
|
user_based_model = params[:user_based_model].constantize
|
|
36
36
|
@entity ||=
|
|
37
37
|
if user_based_model.respond_to? :from_token_request
|
|
38
|
-
user_based_model.
|
|
38
|
+
user_based_model.from_token_request request
|
|
39
39
|
else
|
|
40
40
|
params[:auth] && find_user_by_auth_attributes
|
|
41
41
|
end
|
|
@@ -44,7 +44,7 @@ module Tramway
|
|
|
44
44
|
def find_user_by_auth_attributes
|
|
45
45
|
user_based_model = params[:user_based_model].constantize
|
|
46
46
|
Tramway::Api.auth_attributes[params[:user_based_model]].each do |attribute|
|
|
47
|
-
object = user_based_model.
|
|
47
|
+
object = user_based_model.where.not(attribute => nil).find_by(attribute => auth_params[:login])
|
|
48
48
|
return object if object
|
|
49
49
|
end
|
|
50
50
|
nil
|
data/lib/tramway/api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tramway-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.8.7.
|
|
4
|
+
version: 1.8.7.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Kalashnikov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-12-
|
|
11
|
+
date: 2021-12-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: active_model_serializers
|