accounts_client 0.2.26 → 0.2.27
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 +5 -13
- data/lib/accounts/belongs_to_account.rb +12 -1
- data/lib/accounts/belongs_to_user.rb +1 -1
- metadata +11 -12
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
YTliZWNmMmRlMWJjNTYxMjliODUxNWYyYjE3NWQyMmJhYzg5NTE1OA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 02a6317fe59bd0d8df3b71cc5a3565d54237731d
|
4
|
+
data.tar.gz: aa10d37d3b8608e637e5df9bd3b594ef813d0874
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MDg5YzVmMjJmZDY1ZWY4NDgyOGRhMzY4YjUzM2VmZWNmZTMxYTRjYTQ4ZWRk
|
11
|
-
NjhiZGI1ZmY0ZGQ3N2FiNDYyNDdjMThlMTE2ZDg4ZGVhZmU0NWM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YTQ4YWI0OGI1MGVjYjU2MzQwM2RiMTcxODI1YzA4YjM1Mjk5MzE3NTc2Zjk3
|
14
|
-
Nzg4NzliNmNiMDMzOTI1N2E3MjlhZTY2YWIyODQxMWI2ODFjYjFmMmRkMjk5
|
15
|
-
M2Y0N2U1ODZhNDcwMTQwOWZjN2M2NDgxYTViNGFhY2UzMTI1YjM=
|
6
|
+
metadata.gz: e31f78e293f256da5d1fc4f1106471a6093c4edebf2a74f18020f2b1ee46e5f6c67a95b574a7eb03beec3876a80aaef5f93e91dd1477f64be39c6a4c0c1063ad
|
7
|
+
data.tar.gz: 7efdc47350c37c190bb311cfd4898cbc1fd14ed1b34f1346a198148b6b3eb096fcecf82f8a384f2f5ac2fbd0a365a2b47164094e9e660f84f9ba08d46d1002e0
|
@@ -22,7 +22,7 @@ module Accounts
|
|
22
22
|
# @return [PadmaAccount / PadmaAccountDecorator]
|
23
23
|
def account(options={})
|
24
24
|
if self.padma_account.nil? || options[:force_service_call]
|
25
|
-
self.padma_account =
|
25
|
+
self.padma_account = get_account_from_padma(account_name)
|
26
26
|
end
|
27
27
|
ret = padma_account
|
28
28
|
if options[:decorated] && padma_account
|
@@ -36,6 +36,17 @@ module Accounts
|
|
36
36
|
end
|
37
37
|
|
38
38
|
private
|
39
|
+
|
40
|
+
def get_account_from_padma(account_name)
|
41
|
+
pa = Rails.cache.read([account_name,"padma_account"])
|
42
|
+
if pa.nil?
|
43
|
+
pa = PadmaAccount.find(account_name)
|
44
|
+
if pa
|
45
|
+
Rails.cache.write([account_name,"padma_account"], pa, :expires_in => 5.minutes)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
pa
|
49
|
+
end
|
39
50
|
|
40
51
|
# If padma_account is setted with a PadmaAccount that doesn't match
|
41
52
|
# account_id an exception will be raised
|
@@ -24,7 +24,7 @@ module Accounts
|
|
24
24
|
if padma_user.nil? || options[:force_service_call]
|
25
25
|
padma_user = PadmaUser.find(username)
|
26
26
|
if padma_user
|
27
|
-
Rails.cache.write([
|
27
|
+
Rails.cache.write([username,"padma_user"], padma_user, :expires_in => 5.minutes)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: accounts_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dwayne Macgowan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: gravtastic
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: logical_model
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 0.6.3
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.6.3
|
55
55
|
description: This is client library for padma-Accounts-ws
|
@@ -81,19 +81,18 @@ require_paths:
|
|
81
81
|
- lib
|
82
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- -
|
84
|
+
- - ">="
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '0'
|
87
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
|
-
- -
|
89
|
+
- - ">="
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.5.1
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Client library for padma-Accounts-ws
|
98
98
|
test_files: []
|
99
|
-
has_rdoc:
|