arcadex 1.3.0 → 1.3.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
  SHA1:
3
- metadata.gz: 91b34092131407b709a1d3178a770e0f69557174
4
- data.tar.gz: cb113375a85ce9ce83541ee4bbfaf063b11d73d1
3
+ metadata.gz: bae371fe1dadc2669a6393b54e5b5aa747aa2718
4
+ data.tar.gz: dbac1294e91a6a943d47f8ed95d94b75db14f099
5
5
  SHA512:
6
- metadata.gz: aa4d4fcb161c27384972e46438ba5667e54afdbf1b3b411993e46780640a7f4c76047e38a91a52df01bf980a5a2e8eee1005797546617dc4039a977f33eeb618
7
- data.tar.gz: 3e6eb947b32ba1b1d32232c693ea0adc6d1e28dae29ce3b9aed88d30afad77f79462ccb5effbf15cd4d61461e676247aa7b41daf85dacdfffb1be4eda76a5845
6
+ metadata.gz: 862b90ffb3d78585441e0e14042dc70856227991d3f088ac0f33787bfe64be2d4f36e661b8bf235fe3c92257862c7bc513b775819050a9f0f3535529c49e09fe
7
+ data.tar.gz: 3f942cea20f74ef39c84877b4392a2d3f47243cf92b98becf6c8ca62259cda5e6ce713a5154280c65b7d7016745f0113b3fa6ddc7d5dbfd0b0bcfefaf99edfb5
@@ -41,6 +41,23 @@ module Arcadex
41
41
  return instance_hash
42
42
  end
43
43
 
44
+ #Returns the object that is mapped to the key. The key is in the params or heaaders
45
+ def self.get_instance_no_update(params,request,key)
46
+ auth_token = ::Arcadex::Header.grab_param_header(params,request,key,false)
47
+ if auth_token.nil?
48
+ return nil
49
+ end
50
+ token = ::Arcadex::Find.find_token_by_auth_token(auth_token)
51
+ owner = ::Arcadex::Find.find_owner_by_token(token)
52
+ #This is to mitigate timing attacks
53
+ ::Devise.secure_compare(auth_token,auth_token)
54
+ if token.nil? || owner.nil?
55
+ return nil
56
+ end
57
+ instance_hash = {"current_owner" => owner, "current_token" => token}
58
+ return instance_hash
59
+ end
60
+
44
61
  def self.update_token(token,request)
45
62
  if token.first_ip_address.nil?
46
63
  token.first_ip_address = request.remote_ip
@@ -1,3 +1,3 @@
1
1
  module Arcadex
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arcadex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cleophus Robinson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-01 00:00:00.000000000 Z
11
+ date: 2015-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails