accounts_client 0.2.36 → 0.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
- SHA1:
3
- metadata.gz: 175b0c4c0f3d578a1dce6785920bec39a24fbdc9
4
- data.tar.gz: be54b09d7df7db787e6d44bfcb9408c249d0dda0
2
+ SHA256:
3
+ metadata.gz: 83bba499569c8f2868225b180f93816b932aa77a9d6a95efdb0c217cb5e4ae9b
4
+ data.tar.gz: d235d711105fe7dfd84cb1560c13f9d11645b1e012bd7ded5b9867b461e99ea0
5
5
  SHA512:
6
- metadata.gz: 851d8ab9fc5685b76b5dd2587a4dd5e5a5bf1b6862232cb5283534cd80227e3556a9c36f80245c9e91ef43ae5130cd8a9f382c563b17949af3a8de7dcbcf2939
7
- data.tar.gz: 6ba87ca46513d463765c7841036f7d13c9e866d55ecb5957fe2f5715fe6cc01ad6b835383b243b58443158946670bfe9aa61423524f5b677b83a6379d4207059
6
+ metadata.gz: b7c9475bd594b3a60cd10279bf0d953f9e3a51aaa76267217271f42f0813beba3f20c994f5c218192f50500415875af9e3d5995a486d234b64f060dd200e9ca0
7
+ data.tar.gz: 33aa86c83137ec979b2e7c0db639d9fe777f66a52ac71240e3bc827e97537a08a16c297ae60e0de2a5bdc514cbfe1fd60e8f1012280fcf150ea598d838d409e8
@@ -22,6 +22,7 @@ class PadmaAccount < LogicalModel
22
22
  attribute :country
23
23
  attribute :coordenates
24
24
  attribute :enabled_petals
25
+ attribute :currency
25
26
 
26
27
  set_api_key 'token', Accounts::API_KEY
27
28
 
@@ -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.36
4
+ version: 0.3.1
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-09-10 00:00:00.000000000 Z
11
+ date: 2021-12-30 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: []