code42 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/code42.gemspec +1 -1
- data/lib/code42/attribute_serializer.rb +4 -2
- data/lib/code42/version.rb +1 -1
- data/spec/cassettes/Code42_Client/_create_org/returns_created_org.yml +43 -16
- data/spec/cassettes/Code42_Client/_create_user/returns_created_user.yml +34 -13
- data/spec/cassettes/Code42_Client/_create_user/when_sending_an_invalid_email/raises_an_exception.yml +8 -6
- data/spec/cassettes/Code42_Client/_find_org_by_name/returns_the_org_with_the_specified_name.yml +54 -34
- data/spec/cassettes/Code42_Client/_get_token/returns_valid_tokens.yml +17 -7
- data/spec/cassettes/Code42_Client/_get_token/when_providing_invalid_credentials/should_raise_an_exception.yml +8 -6
- data/spec/cassettes/Code42_Client/_org/when_ID_is_not_passed/returns_my_org.yml +51 -33
- data/spec/cassettes/Code42_Client/_org/when_ID_is_passed_in/returns_a_specific_org.yml +51 -33
- data/spec/cassettes/Code42_Client/_ping/returns_a_ping.yml +22 -27
- data/spec/cassettes/Code42_Client/_user/when_ID_is_not_passed/returns_my_user.yml +42 -32
- data/spec/cassettes/Code42_Client/_user/when_ID_is_passed_in/returns_a_specific_user.yml +42 -32
- data/spec/cassettes/Code42_Client/_user/when_blocked/returns_the_blocked_status.yml +53 -39
- data/spec/cassettes/Code42_Client/_user/when_unblocked/returns_the_blocked_status.yml +55 -41
- data/spec/cassettes/Code42_Client/_user_roles/returns_an_enumerable.yml +29 -29
- data/spec/cassettes/Code42_Client/_validate_token/returns_a_valid_response.yml +43 -35
- metadata +4 -5
@@ -12,43 +12,61 @@ http_interactions:
|
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
15
|
-
-
|
15
|
+
- '*/*'
|
16
16
|
response:
|
17
17
|
status:
|
18
18
|
code: 200
|
19
|
-
message:
|
20
|
-
T0s=
|
19
|
+
message: OK
|
21
20
|
headers:
|
22
|
-
|
23
|
-
-
|
24
|
-
|
25
|
-
|
26
|
-
-
|
27
|
-
|
28
|
-
|
29
|
-
-
|
30
|
-
|
31
|
-
|
32
|
-
- !binary |-
|
33
|
-
Z3ppcA==
|
34
|
-
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
35
|
-
- !binary |-
|
36
|
-
Y2h1bmtlZA==
|
37
|
-
!binary "U2VydmVy":
|
38
|
-
- !binary |-
|
39
|
-
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
21
|
+
Cache-Control:
|
22
|
+
- no-store
|
23
|
+
Pragma:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Server:
|
30
|
+
- Jetty(7.6.3.v20120416)
|
40
31
|
body:
|
41
|
-
encoding:
|
42
|
-
string:
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
32
|
+
encoding: UTF-8
|
33
|
+
string: |-
|
34
|
+
{
|
35
|
+
"metadata": {
|
36
|
+
"timestamp": "2013-06-13T15:16:30.317-05:00",
|
37
|
+
"params": {}
|
38
|
+
},
|
39
|
+
"data": {
|
40
|
+
"orgId": 1,
|
41
|
+
"orgUid": "ADMIN",
|
42
|
+
"orgName": "ADMIN",
|
43
|
+
"status": "Active",
|
44
|
+
"active": true,
|
45
|
+
"blocked": false,
|
46
|
+
"parentOrgId": null,
|
47
|
+
"type": "ENTERPRISE",
|
48
|
+
"externalId": "ADMIN",
|
49
|
+
"hierarchyCounts": {},
|
50
|
+
"configInheritanceCounts": {},
|
51
|
+
"creationDate": "2006-05-23T15:11:39.159-05:00",
|
52
|
+
"modificationDate": "2013-06-13T15:14:38.120-05:00",
|
53
|
+
"registrationKey": "xxxxxxxxxxxxxxxx",
|
54
|
+
"reporting": {},
|
55
|
+
"customConfig": true,
|
56
|
+
"settings": {
|
57
|
+
"maxSeats": -1,
|
58
|
+
"maxBytes": -1
|
59
|
+
},
|
60
|
+
"settingsInherited": {
|
61
|
+
"maxSeats": "",
|
62
|
+
"maxBytes": ""
|
63
|
+
},
|
64
|
+
"settingsSummary": {
|
65
|
+
"maxSeats": -1,
|
66
|
+
"maxBytes": -1
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
52
70
|
http_version:
|
53
|
-
recorded_at:
|
71
|
+
recorded_at: Thu, 13 Jun 2013 20:16:30 GMT
|
54
72
|
recorded_with: VCR 2.5.0
|
@@ -12,37 +12,32 @@ http_interactions:
|
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
15
|
-
-
|
15
|
+
- '*/*'
|
16
16
|
response:
|
17
17
|
status:
|
18
18
|
code: 200
|
19
|
-
message:
|
20
|
-
T0s=
|
19
|
+
message: OK
|
21
20
|
headers:
|
22
|
-
|
23
|
-
-
|
24
|
-
|
25
|
-
|
26
|
-
-
|
27
|
-
|
28
|
-
|
29
|
-
-
|
30
|
-
|
31
|
-
|
32
|
-
- !binary |-
|
33
|
-
Z3ppcA==
|
34
|
-
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
35
|
-
- !binary |-
|
36
|
-
Y2h1bmtlZA==
|
37
|
-
!binary "U2VydmVy":
|
38
|
-
- !binary |-
|
39
|
-
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
21
|
+
Cache-Control:
|
22
|
+
- no-store
|
23
|
+
Pragma:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Server:
|
30
|
+
- Jetty(7.6.3.v20120416)
|
40
31
|
body:
|
41
|
-
encoding:
|
42
|
-
string:
|
43
|
-
|
44
|
-
|
45
|
-
|
32
|
+
encoding: UTF-8
|
33
|
+
string: |-
|
34
|
+
{
|
35
|
+
"metadata": {
|
36
|
+
"timestamp": "2013-06-13T15:16:29.837-05:00",
|
37
|
+
"params": {}
|
38
|
+
},
|
39
|
+
"data": {"success": true}
|
40
|
+
}
|
46
41
|
http_version:
|
47
|
-
recorded_at:
|
42
|
+
recorded_at: Thu, 13 Jun 2013 20:16:29 GMT
|
48
43
|
recorded_with: VCR 2.5.0
|
@@ -12,42 +12,52 @@ http_interactions:
|
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
15
|
-
-
|
15
|
+
- '*/*'
|
16
16
|
response:
|
17
17
|
status:
|
18
18
|
code: 200
|
19
|
-
message:
|
20
|
-
T0s=
|
19
|
+
message: OK
|
21
20
|
headers:
|
22
|
-
|
23
|
-
-
|
24
|
-
|
25
|
-
|
26
|
-
-
|
27
|
-
|
28
|
-
|
29
|
-
-
|
30
|
-
|
31
|
-
|
32
|
-
- !binary |-
|
33
|
-
Z3ppcA==
|
34
|
-
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
35
|
-
- !binary |-
|
36
|
-
Y2h1bmtlZA==
|
37
|
-
!binary "U2VydmVy":
|
38
|
-
- !binary |-
|
39
|
-
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
21
|
+
Cache-Control:
|
22
|
+
- no-store
|
23
|
+
Pragma:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Server:
|
30
|
+
- Jetty(7.6.3.v20120416)
|
40
31
|
body:
|
41
|
-
encoding:
|
42
|
-
string:
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
32
|
+
encoding: UTF-8
|
33
|
+
string: |-
|
34
|
+
{
|
35
|
+
"metadata": {
|
36
|
+
"timestamp": "2013-06-13T15:16:30.059-05:00",
|
37
|
+
"params": {}
|
38
|
+
},
|
39
|
+
"data": {
|
40
|
+
"userId": 1,
|
41
|
+
"userUid": "thwlhuOyiq2svbdcqfmm2demndi",
|
42
|
+
"status": "Active",
|
43
|
+
"username": "admin",
|
44
|
+
"email": "admin",
|
45
|
+
"firstName": "Admin",
|
46
|
+
"lastName": "Admin",
|
47
|
+
"quotaInBytes": -1,
|
48
|
+
"orgId": 1,
|
49
|
+
"orgUid": "ADMIN",
|
50
|
+
"orgName": "ADMIN",
|
51
|
+
"active": true,
|
52
|
+
"blocked": false,
|
53
|
+
"emailPromo": false,
|
54
|
+
"invited": false,
|
55
|
+
"orgType": "ENTERPRISE",
|
56
|
+
"usernameIsAnEmail": false,
|
57
|
+
"creationDate": "2006-04-17T12:30:00.990-05:00",
|
58
|
+
"modificationDate": "2006-04-17T12:30:00.990-05:00"
|
59
|
+
}
|
60
|
+
}
|
51
61
|
http_version:
|
52
|
-
recorded_at:
|
62
|
+
recorded_at: Thu, 13 Jun 2013 20:16:30 GMT
|
53
63
|
recorded_with: VCR 2.5.0
|
@@ -12,42 +12,52 @@ http_interactions:
|
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
14
|
Accept:
|
15
|
-
-
|
15
|
+
- '*/*'
|
16
16
|
response:
|
17
17
|
status:
|
18
18
|
code: 200
|
19
|
-
message:
|
20
|
-
T0s=
|
19
|
+
message: OK
|
21
20
|
headers:
|
22
|
-
|
23
|
-
-
|
24
|
-
|
25
|
-
|
26
|
-
-
|
27
|
-
|
28
|
-
|
29
|
-
-
|
30
|
-
|
31
|
-
|
32
|
-
- !binary |-
|
33
|
-
Z3ppcA==
|
34
|
-
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
35
|
-
- !binary |-
|
36
|
-
Y2h1bmtlZA==
|
37
|
-
!binary "U2VydmVy":
|
38
|
-
- !binary |-
|
39
|
-
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
21
|
+
Cache-Control:
|
22
|
+
- no-store
|
23
|
+
Pragma:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Server:
|
30
|
+
- Jetty(7.6.3.v20120416)
|
40
31
|
body:
|
41
|
-
encoding:
|
42
|
-
string:
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
32
|
+
encoding: UTF-8
|
33
|
+
string: |-
|
34
|
+
{
|
35
|
+
"metadata": {
|
36
|
+
"timestamp": "2013-06-13T15:16:30.098-05:00",
|
37
|
+
"params": {}
|
38
|
+
},
|
39
|
+
"data": {
|
40
|
+
"userId": 2,
|
41
|
+
"userUid": "thwlhuOyiq2svbdcqfmm2demnda",
|
42
|
+
"status": "Active, Blocked",
|
43
|
+
"username": "account_australia",
|
44
|
+
"email": "account_australia",
|
45
|
+
"firstName": "account_australia",
|
46
|
+
"lastName": "account_australia",
|
47
|
+
"quotaInBytes": -1,
|
48
|
+
"orgId": 1,
|
49
|
+
"orgUid": "ADMIN",
|
50
|
+
"orgName": "ADMIN",
|
51
|
+
"active": true,
|
52
|
+
"blocked": true,
|
53
|
+
"emailPromo": false,
|
54
|
+
"invited": false,
|
55
|
+
"orgType": "ENTERPRISE",
|
56
|
+
"usernameIsAnEmail": false,
|
57
|
+
"creationDate": "2006-04-17T12:30:00.990-05:00",
|
58
|
+
"modificationDate": "2013-06-13T15:14:39.525-05:00"
|
59
|
+
}
|
60
|
+
}
|
51
61
|
http_version:
|
52
|
-
recorded_at:
|
62
|
+
recorded_at: Thu, 13 Jun 2013 20:16:30 GMT
|
53
63
|
recorded_with: VCR 2.5.0
|
@@ -2,21 +2,23 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: put
|
5
|
-
uri: http://admin:admin@localhost:7280/api/
|
5
|
+
uri: http://admin:admin@localhost:7280/api/UserBlock/2
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: '{}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
11
|
- Faraday v0.8.7
|
12
12
|
Content-Type:
|
13
13
|
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
Accept:
|
15
|
-
-
|
17
|
+
- '*/*'
|
16
18
|
response:
|
17
19
|
status:
|
18
|
-
code:
|
19
|
-
message:
|
20
|
+
code: 201
|
21
|
+
message: Created
|
20
22
|
headers:
|
21
23
|
Cache-Control:
|
22
24
|
- no-store
|
@@ -24,13 +26,15 @@ http_interactions:
|
|
24
26
|
- no-cache
|
25
27
|
Content-Type:
|
26
28
|
- application/json
|
29
|
+
Content-Length:
|
30
|
+
- '0'
|
27
31
|
Server:
|
28
32
|
- Jetty(7.6.3.v20120416)
|
29
33
|
body:
|
30
|
-
encoding:
|
34
|
+
encoding: UTF-8
|
31
35
|
string: ''
|
32
36
|
http_version:
|
33
|
-
recorded_at:
|
37
|
+
recorded_at: Thu, 13 Jun 2013 20:16:30 GMT
|
34
38
|
- request:
|
35
39
|
method: get
|
36
40
|
uri: http://admin:admin@localhost:7280/api/user/2
|
@@ -43,42 +47,52 @@ http_interactions:
|
|
43
47
|
Accept-Encoding:
|
44
48
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
45
49
|
Accept:
|
46
|
-
-
|
50
|
+
- '*/*'
|
47
51
|
response:
|
48
52
|
status:
|
49
53
|
code: 200
|
50
|
-
message:
|
51
|
-
T0s=
|
54
|
+
message: OK
|
52
55
|
headers:
|
53
|
-
|
54
|
-
-
|
55
|
-
|
56
|
-
|
57
|
-
-
|
58
|
-
|
59
|
-
|
60
|
-
-
|
61
|
-
|
62
|
-
|
63
|
-
- !binary |-
|
64
|
-
Z3ppcA==
|
65
|
-
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
66
|
-
- !binary |-
|
67
|
-
Y2h1bmtlZA==
|
68
|
-
!binary "U2VydmVy":
|
69
|
-
- !binary |-
|
70
|
-
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
56
|
+
Cache-Control:
|
57
|
+
- no-store
|
58
|
+
Pragma:
|
59
|
+
- no-cache
|
60
|
+
Content-Type:
|
61
|
+
- application/json; charset=utf-8
|
62
|
+
Transfer-Encoding:
|
63
|
+
- chunked
|
64
|
+
Server:
|
65
|
+
- Jetty(7.6.3.v20120416)
|
71
66
|
body:
|
72
|
-
encoding:
|
73
|
-
string:
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
67
|
+
encoding: UTF-8
|
68
|
+
string: |-
|
69
|
+
{
|
70
|
+
"metadata": {
|
71
|
+
"timestamp": "2013-06-13T15:16:30.243-05:00",
|
72
|
+
"params": {}
|
73
|
+
},
|
74
|
+
"data": {
|
75
|
+
"userId": 2,
|
76
|
+
"userUid": "thwlhuOyiq2svbdcqfmm2demnda",
|
77
|
+
"status": "Active, Blocked",
|
78
|
+
"username": "account_australia",
|
79
|
+
"email": "account_australia",
|
80
|
+
"firstName": "account_australia",
|
81
|
+
"lastName": "account_australia",
|
82
|
+
"quotaInBytes": -1,
|
83
|
+
"orgId": 1,
|
84
|
+
"orgUid": "ADMIN",
|
85
|
+
"orgName": "ADMIN",
|
86
|
+
"active": true,
|
87
|
+
"blocked": true,
|
88
|
+
"emailPromo": false,
|
89
|
+
"invited": false,
|
90
|
+
"orgType": "ENTERPRISE",
|
91
|
+
"usernameIsAnEmail": false,
|
92
|
+
"creationDate": "2006-04-17T12:30:00.990-05:00",
|
93
|
+
"modificationDate": "2013-06-13T15:16:30.212-05:00"
|
94
|
+
}
|
95
|
+
}
|
82
96
|
http_version:
|
83
|
-
recorded_at:
|
97
|
+
recorded_at: Thu, 13 Jun 2013 20:16:30 GMT
|
84
98
|
recorded_with: VCR 2.5.0
|