accounts_client 0.2.35 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/models/api_key.rb +1 -0
- data/app/models/sso_token.rb +17 -0
- data/lib/accounts/shared_examples.rb +3 -3
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e5b2d20f2442d19622e12ebd2472bc3ab125bc5ce2766ee85c18404f1984361b
|
4
|
+
data.tar.gz: 006a6c118b74801b94719311e04c8be19b04a54bb6b6c2cb280ea26b52d3b766
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21024b41afd6f5fbefdb0722026e91e8c6082a2d25c4268a52b97092e501016404e5286493f34a1b8954b0d2c2e401727957c4854e52a99fce40b3dfeea213ef
|
7
|
+
data.tar.gz: 1fd60fc3861a318a551a603b3509bd7addcf43f0c56f23ca717f8c9a3a09ad77d9f062bdb16d29c95b6b6fca8ba004e62ba670321f9219d92f04d6526b84659d
|
data/app/models/api_key.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
class SsoToken < LogicalModel
|
2
|
+
use_hydra Accounts::HYDRA
|
3
|
+
set_resource_host Accounts::HOST
|
4
|
+
set_resource_path "/v0/sso_tokens"
|
5
|
+
|
6
|
+
attribute :username
|
7
|
+
attribute :account_name
|
8
|
+
|
9
|
+
set_api_key 'token', Accounts::API_KEY
|
10
|
+
|
11
|
+
TIMEOUT = 5500 # milisecons
|
12
|
+
PER_PAGE = 9999
|
13
|
+
|
14
|
+
def json_root
|
15
|
+
'sso_token'
|
16
|
+
end
|
17
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
shared_examples_for "it belongs to an account" do
|
2
2
|
it { should validate_presence_of :account_name }
|
3
3
|
it "should return account on #account" do
|
4
|
-
PadmaAccount.
|
4
|
+
expect(PadmaAccount).to receive(:find).with(object.account_name).and_return(PadmaAccount.new(account_name: object.account_name))
|
5
5
|
object.account.should be_a(PadmaAccount)
|
6
6
|
end
|
7
7
|
end
|
@@ -9,8 +9,8 @@ end
|
|
9
9
|
shared_examples_for "it belongs to a user" do
|
10
10
|
it { should validate_presence_of :username}
|
11
11
|
it "should return user on #user" do
|
12
|
-
PadmaUser.
|
12
|
+
expect(PadmaUser).to receive(:find).with(object.username).and_return(PadmaUser.new(username: object.username))
|
13
13
|
object.user.should be_a(PadmaUser)
|
14
14
|
end
|
15
15
|
it "should use Rails.cache"
|
16
|
-
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: accounts_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dwayne Macgowan
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.7.1
|
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
|
-
version: 0.
|
54
|
+
version: 0.7.1
|
55
55
|
description: This is client library for padma-Accounts-ws
|
56
56
|
email:
|
57
57
|
- dwaynemac@gmail.com
|
@@ -65,6 +65,7 @@ files:
|
|
65
65
|
- app/models/padma_user.rb
|
66
66
|
- app/models/petal.rb
|
67
67
|
- app/models/petal_subscription.rb
|
68
|
+
- app/models/sso_token.rb
|
68
69
|
- config/initializers/accounts_client.rb
|
69
70
|
- lib/accounts/belongs_to_account.rb
|
70
71
|
- lib/accounts/belongs_to_user.rb
|
@@ -75,7 +76,7 @@ files:
|
|
75
76
|
homepage: ''
|
76
77
|
licenses: []
|
77
78
|
metadata: {}
|
78
|
-
post_install_message:
|
79
|
+
post_install_message:
|
79
80
|
rdoc_options: []
|
80
81
|
require_paths:
|
81
82
|
- lib
|
@@ -90,9 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
91
|
- !ruby/object:Gem::Version
|
91
92
|
version: '0'
|
92
93
|
requirements: []
|
93
|
-
|
94
|
-
|
95
|
-
signing_key:
|
94
|
+
rubygems_version: 3.0.1
|
95
|
+
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Client library for padma-Accounts-ws
|
98
98
|
test_files: []
|