maestrano 1.0.0.pre.RC8 → 1.0.0.pre.RC9
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 +4 -4
- data/lib/maestrano/sso/base_group.rb +6 -4
- data/lib/maestrano/version.rb +1 -1
- data/test/maestrano/sso/base_group_test.rb +8 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 797f96b0fef67e57328edb69af7f33b24ba84c7b
|
4
|
+
data.tar.gz: 5cbc92abb18c47438d376f65cc60021689dbfcd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 712bdb7f8989a792bcbc1d27813a5e5fab95a2a238ceae9eac1390d1757be5b9e9fe489744e83005af8a3126abfcd96f3b9d995f2305d831eedb277abf564875
|
7
|
+
data.tar.gz: 6571265997f004364928d6abdf38f42e3a7a66806287ff3f07100b156c7ac417b240f17b6fba4cd1f4a4d477d316f1d4730407f909c44a7e304932b28fac9f6d
|
@@ -2,10 +2,10 @@ module Maestrano
|
|
2
2
|
module SSO
|
3
3
|
class BaseGroup
|
4
4
|
attr_accessor :local_id
|
5
|
-
attr_reader :uid, :company_name, :free_trial_end_at, :has_credit_card, :name, :email, :city,
|
5
|
+
attr_reader :uid, :company_name, :free_trial_end_at, :has_credit_card, :name, :org_uid, :email, :city,
|
6
6
|
:country, :timezone, :currency
|
7
|
-
|
8
|
-
|
7
|
+
|
8
|
+
|
9
9
|
# Initializer
|
10
10
|
# @param Maestrano::SAML::Response
|
11
11
|
def initialize(saml_response)
|
@@ -15,13 +15,14 @@ module Maestrano
|
|
15
15
|
@free_trial_end_at = Time.iso8601(att['group_end_free_trial'])
|
16
16
|
@company_name = att['company_name']
|
17
17
|
@name = att['group_name']
|
18
|
+
@org_uid = att['group_org_uid']
|
18
19
|
@email = att['group_email']
|
19
20
|
@city = att['group_city']
|
20
21
|
@timezone = att['group_timezone']
|
21
22
|
@currency = att['group_currency']
|
22
23
|
@country = att['country']
|
23
24
|
end
|
24
|
-
|
25
|
+
|
25
26
|
def to_hash
|
26
27
|
{
|
27
28
|
provider: 'maestrano',
|
@@ -31,6 +32,7 @@ module Maestrano
|
|
31
32
|
company_name: self.company_name,
|
32
33
|
has_credit_card: self.has_credit_card,
|
33
34
|
name: self.name,
|
35
|
+
org_uid: self.org_uid,
|
34
36
|
email: self.email,
|
35
37
|
city: self.city,
|
36
38
|
country: self.country,
|
data/lib/maestrano/version.rb
CHANGED
@@ -4,7 +4,7 @@ module Maestrano
|
|
4
4
|
module SSO
|
5
5
|
class BaseGroupTest < Test::Unit::TestCase
|
6
6
|
include SamlTestHelper
|
7
|
-
|
7
|
+
|
8
8
|
setup do
|
9
9
|
@saml_response = Maestrano::Saml::Response.new(response_document)
|
10
10
|
@saml_response.stubs(:attributes).returns({
|
@@ -12,6 +12,7 @@ module Maestrano
|
|
12
12
|
'mno_session_recheck' => Time.now.utc.iso8601,
|
13
13
|
'group_uid' => 'cld-1',
|
14
14
|
'group_name' => 'Some Group Name',
|
15
|
+
'group_org_uid' => 'org-48',
|
15
16
|
'group_currency' => 'AUD',
|
16
17
|
'group_timezone' => 'America/Los_Angeles',
|
17
18
|
'group_email' => 'principal@maestrano.com',
|
@@ -29,11 +30,11 @@ module Maestrano
|
|
29
30
|
"company_name" => "DoeCorp"
|
30
31
|
})
|
31
32
|
end
|
32
|
-
|
33
|
+
|
33
34
|
should "have a local_id accessor" do
|
34
35
|
assert Maestrano::SSO::BaseGroup.new(@saml_response).respond_to?(:local_id) == true
|
35
36
|
end
|
36
|
-
|
37
|
+
|
37
38
|
should "extract the rights attributes from the saml response" do
|
38
39
|
group = Maestrano::SSO::BaseGroup.new(@saml_response)
|
39
40
|
assert group.uid == @saml_response.attributes['group_uid']
|
@@ -41,6 +42,7 @@ module Maestrano
|
|
41
42
|
assert group.free_trial_end_at == Time.iso8601(@saml_response.attributes['group_end_free_trial'])
|
42
43
|
assert group.company_name == @saml_response.attributes['company_name']
|
43
44
|
assert group.name == @saml_response.attributes['group_name']
|
45
|
+
assert group.org_uid == @saml_response.attributes['group_org_uid']
|
44
46
|
assert group.email == @saml_response.attributes['group_email']
|
45
47
|
assert group.currency == @saml_response.attributes['group_currency']
|
46
48
|
assert group.timezone == @saml_response.attributes['group_timezone']
|
@@ -48,7 +50,7 @@ module Maestrano
|
|
48
50
|
assert group.email == @saml_response.attributes['group_email']
|
49
51
|
assert group.country == @saml_response.attributes['country']
|
50
52
|
end
|
51
|
-
|
53
|
+
|
52
54
|
should "have the right hash representation" do
|
53
55
|
sso_group = Maestrano::SSO::BaseGroup.new(@saml_response)
|
54
56
|
assert sso_group.to_hash == {
|
@@ -59,6 +61,7 @@ module Maestrano
|
|
59
61
|
company_name: sso_group.company_name,
|
60
62
|
has_credit_card: sso_group.has_credit_card,
|
61
63
|
name: sso_group.name,
|
64
|
+
org_uid: sso_group.org_uid,
|
62
65
|
email: sso_group.email,
|
63
66
|
city: sso_group.city,
|
64
67
|
country: sso_group.country,
|
@@ -70,4 +73,4 @@ module Maestrano
|
|
70
73
|
end
|
71
74
|
end
|
72
75
|
end
|
73
|
-
end
|
76
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maestrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.
|
4
|
+
version: 1.0.0.pre.RC9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arnaud Lachaume
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|