bearcat 1.0.21 → 1.0.22
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/bearcat/client/accounts.rb +4 -0
- data/lib/bearcat/version.rb +1 -1
- data/spec/bearcat/client/accounts_spec.rb +11 -0
- data/spec/fixtures/account_roles.json +35 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bad8e6053ae792a9423894d9939edb8c51e0337f
|
4
|
+
data.tar.gz: aef2d6ac2d0f7ef677c99c237e7bd683c023db1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f834d75a836097011646067cbfb7585bc0f7e62a8336620d451cdb3872b0540eed90c8a0ff2ca2db22268a79502166ad534ce35521742f347a16a5ade63b527
|
7
|
+
data.tar.gz: 98bcc04bda74495210fbc260251450d1cd745a9267e338b5772247e2bc33c3dc97c9c398064b48585c2fcc9c45c13b035277d212f6badfd2d56c0553ad2de3a8
|
data/lib/bearcat/version.rb
CHANGED
@@ -36,4 +36,15 @@ describe Bearcat::Client::Accounts do
|
|
36
36
|
terms.first['name'].should == 'Term 1'
|
37
37
|
end
|
38
38
|
|
39
|
+
it "returns the roles for an account" do
|
40
|
+
stub_get(@client, "/api/v1/accounts/1/roles").to_return(json_response("account_roles.json"))
|
41
|
+
account = @client.account_roles(1)
|
42
|
+
roles = account.members
|
43
|
+
roles.count.should == 1
|
44
|
+
roles.first['id'].should == 1
|
45
|
+
roles.first['role'].should == 'AccountAdmin'
|
46
|
+
roles.first['permissions'].count.should == 4
|
47
|
+
roles.first['permissions']['manage_catalog']['enabled'].should == true
|
48
|
+
end
|
49
|
+
|
39
50
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"id": 1,
|
4
|
+
"role": "AccountAdmin",
|
5
|
+
"label": "Account Admin",
|
6
|
+
"base_role_type": "AccountMembership",
|
7
|
+
"workflow_state": "built_in",
|
8
|
+
"permissions": {
|
9
|
+
"read_forum": {
|
10
|
+
"enabled": true,
|
11
|
+
"locked": false,
|
12
|
+
"readonly": false,
|
13
|
+
"explicit": false
|
14
|
+
},
|
15
|
+
"post_to_forum": {
|
16
|
+
"enabled": true,
|
17
|
+
"locked": false,
|
18
|
+
"readonly": false,
|
19
|
+
"explicit": false
|
20
|
+
},
|
21
|
+
"moderate_forum": {
|
22
|
+
"enabled": true,
|
23
|
+
"locked": false,
|
24
|
+
"readonly": false,
|
25
|
+
"explicit": false
|
26
|
+
},
|
27
|
+
"manage_catalog": {
|
28
|
+
"enabled": true,
|
29
|
+
"locked": false,
|
30
|
+
"readonly": false,
|
31
|
+
"explicit": false
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bearcat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Mills, Jake Sorce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -165,6 +165,7 @@ files:
|
|
165
165
|
- spec/fixtures/account_reports_index.json
|
166
166
|
- spec/fixtures/account_reports_result_success.json
|
167
167
|
- spec/fixtures/account_reports_start_result.json
|
168
|
+
- spec/fixtures/account_roles.json
|
168
169
|
- spec/fixtures/account_user.json
|
169
170
|
- spec/fixtures/account_users.json
|
170
171
|
- spec/fixtures/accounts.json
|
@@ -296,6 +297,7 @@ test_files:
|
|
296
297
|
- spec/fixtures/account_reports_index.json
|
297
298
|
- spec/fixtures/account_reports_result_success.json
|
298
299
|
- spec/fixtures/account_reports_start_result.json
|
300
|
+
- spec/fixtures/account_roles.json
|
299
301
|
- spec/fixtures/account_user.json
|
300
302
|
- spec/fixtures/account_users.json
|
301
303
|
- spec/fixtures/accounts.json
|