tramway-api 1.6.1 → 1.6.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: b920c83657545239444937c65c0eabe7ac496eb20d1063814f2da5f337ef072f
4
- data.tar.gz: e19dc84bf0d4039043c07dd8ce8471b80230c7ab93b7180281af10c435881da3
3
+ metadata.gz: bca58876f3668111e2468cbc1f4c891addfc537f922d962df2e0d7fed1ce3c0c
4
+ data.tar.gz: 1ab78086fb53b2caaa91afd84f03f253044b2bb2795aabbad1bbb2e4a39cfe95
5
5
  SHA512:
6
- metadata.gz: a15fafcb20310c90fda6e53f51160c8258705d54eb61dc91038fd155e29f87446891ea9aa8cbb3dd3bef60c7afbb1b4a5285bb0d9e506e708b4c60a433ce5687
7
- data.tar.gz: 238a0d0f3d1213064f3665e03358e56b3a3a5c64cf789f958b30e8c5f5e8e4746cce3e5233f4a78353bb35a6f04c07c6ec5d0516b82e63d4c3e24df1b243d6aa
6
+ metadata.gz: 4d2ac014846f179a7dcfb5878f78f344df7ea4c693aa9d16eb4f344462ff3ac0723901dd3c88bb7378ca09e09380891270ecf0a21f689e3372a74da6c9f8ca8a
7
+ data.tar.gz: acd4515b5542e5abf1e3f61916dfd6c26fb9e34f48a34b2098c1c498955a65ab3b2053cfa17b1ac7c89be5349d6eef8b879344b66ec6345b4c118d7186cda082
@@ -17,12 +17,13 @@ module Tramway
17
17
  head :unauthorized
18
18
  end
19
19
 
20
- protected
21
-
22
20
  def authenticate
23
- return unauthorized if current_user.nil? || !params[:user_based_model].in?(Tramway::Api.user_based_models)
21
+ return if current_user || params[:user_based_model].in?(Tramway::Api.user_based_models)
22
+ unauthorized
24
23
  end
25
24
 
25
+ protected
26
+
26
27
  def auth_token
27
28
  if entity.respond_to? :to_token_payload
28
29
  ::Knock::AuthToken.new payload: entity.to_token_payload
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Api
5
- VERSION = '1.6.1'
5
+ VERSION = '1.6.1.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov