accounts_client 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/padma_account.rb +13 -7
- data/app/models/padma_user.rb +20 -22
- metadata +4 -4
data/app/models/padma_account.rb
CHANGED
@@ -1,14 +1,20 @@
|
|
1
1
|
# wrapper for PADMA-Accounts Account API interaction
|
2
2
|
# Configuration for LogicalModel on /config/initializers/logical_model.rb
|
3
3
|
class PadmaAccount < LogicalModel
|
4
|
-
|
4
|
+
use_hydra Accounts::HYDRA
|
5
|
+
set_resource_host Accounts::HOST
|
6
|
+
set_resource_path "/v0/accounts"
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
attribute :id
|
9
|
+
attribute :name
|
10
|
+
attribute :enabled
|
11
|
+
attribute :timezone
|
12
|
+
attribute :email
|
13
|
+
attribute :full_name
|
14
|
+
attribute :nucleo_id
|
15
|
+
attribute :migrated_to_padma_on
|
16
|
+
|
17
|
+
set_api_key 'token', Accounts::API_KEY
|
12
18
|
|
13
19
|
TIMEOUT = 5500 # milisecons
|
14
20
|
PER_PAGE = 9999
|
data/app/models/padma_user.rb
CHANGED
@@ -3,32 +3,30 @@ class PadmaUser < LogicalModel
|
|
3
3
|
include Gravtastic
|
4
4
|
gravtastic
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
6
|
+
use_hydra Accounts::HYDRA
|
7
|
+
|
8
|
+
set_resource_path "/v0/users"
|
9
|
+
set_resource_host Accounts::HOST
|
10
|
+
|
11
|
+
set_api_key 'token', Accounts::API_KEY
|
12
|
+
|
13
|
+
attribute :username
|
14
|
+
attribute :drc_login
|
15
|
+
attribute :email
|
16
|
+
attribute :locale
|
17
|
+
attribute :accounts
|
18
|
+
attribute :current_account_name
|
19
|
+
attribute :roles
|
20
|
+
attribute :verbose_help
|
21
|
+
attribute :fb_uid
|
22
|
+
attribute :fb_token
|
23
|
+
|
24
|
+
# LogicalModel expects an id to create resource_uri
|
25
|
+
alias_attribute :id, :username
|
24
26
|
|
25
27
|
TIMEOUT = 5500 # milisecons
|
26
28
|
PER_PAGE = 9999
|
27
29
|
|
28
|
-
# LogicalModel expects an id to create resource_uri
|
29
|
-
def id
|
30
|
-
self.username
|
31
|
-
end
|
32
30
|
|
33
31
|
# @return [PadmaAccount]
|
34
32
|
def current_account
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: accounts_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.5.
|
53
|
+
version: 0.5.8
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.5.
|
61
|
+
version: 0.5.8
|
62
62
|
description: This is client library for padma-Accounts-ws
|
63
63
|
email:
|
64
64
|
- dwaynemac@gmail.com
|