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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 39188c7bb4d4d49d771fbf8c18d148ef1b096fa6
4
- data.tar.gz: ac100f0a32e112e6ad5dd59f7d794eecff4b7c49
2
+ SHA256:
3
+ metadata.gz: e5b2d20f2442d19622e12ebd2472bc3ab125bc5ce2766ee85c18404f1984361b
4
+ data.tar.gz: 006a6c118b74801b94719311e04c8be19b04a54bb6b6c2cb280ea26b52d3b766
5
5
  SHA512:
6
- metadata.gz: 82c6edc040873f19f976272263a8c1f38facfb9a1454adeb05a9c0002c6556be4b61087ddc7b0b29f92c901e324631e82d87705294ec01dd2adbf063c6d4f72a
7
- data.tar.gz: 1b6e90ae32f75ca7171256086a5c31560b9e765bd77220979c4ced9391fe1d08adb327e836131a03173a9ac1ebb9737e7918cac06e0ec518bb198370e8162c65
6
+ metadata.gz: 21024b41afd6f5fbefdb0722026e91e8c6082a2d25c4268a52b97092e501016404e5286493f34a1b8954b0d2c2e401727957c4854e52a99fce40b3dfeea213ef
7
+ data.tar.gz: 1fd60fc3861a318a551a603b3509bd7addcf43f0c56f23ca717f8c9a3a09ad77d9f062bdb16d29c95b6b6fca8ba004e62ba670321f9219d92f04d6526b84659d
@@ -6,6 +6,7 @@ class ApiKey < LogicalModel
6
6
  attribute :username
7
7
  attribute :account_name
8
8
  attribute :access
9
+ attribute :key
9
10
 
10
11
  set_api_key 'token', Accounts::API_KEY
11
12
 
@@ -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.should_receive(:find).with(object.account_name).and_return(PadmaAccount.new(account_name: object.account_name))
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.stub(:find).with(object.username).and_return(PadmaUser.new(username: object.username))
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.2.35
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: 2018-06-01 00:00:00.000000000 Z
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.6.3
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.6.3
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
- rubyforge_project:
94
- rubygems_version: 2.5.1
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: []