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
@@ -2,17 +2,19 @@
|
|
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
20
|
code: 204
|
@@ -27,21 +29,23 @@ http_interactions:
|
|
27
29
|
Server:
|
28
30
|
- Jetty(7.6.3.v20120416)
|
29
31
|
body:
|
30
|
-
encoding:
|
32
|
+
encoding: UTF-8
|
31
33
|
string: ''
|
32
34
|
http_version:
|
33
|
-
recorded_at:
|
35
|
+
recorded_at: Thu, 13 Jun 2013 20:16:30 GMT
|
34
36
|
- request:
|
35
37
|
method: delete
|
36
|
-
uri: http://admin:admin@localhost:7280/api/
|
38
|
+
uri: http://admin:admin@localhost:7280/api/UserBlock/2
|
37
39
|
body:
|
38
40
|
encoding: US-ASCII
|
39
41
|
string: ''
|
40
42
|
headers:
|
41
43
|
User-Agent:
|
42
44
|
- Faraday v0.8.7
|
45
|
+
Accept-Encoding:
|
46
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
43
47
|
Accept:
|
44
|
-
-
|
48
|
+
- '*/*'
|
45
49
|
response:
|
46
50
|
status:
|
47
51
|
code: 204
|
@@ -56,10 +60,10 @@ http_interactions:
|
|
56
60
|
Server:
|
57
61
|
- Jetty(7.6.3.v20120416)
|
58
62
|
body:
|
59
|
-
encoding:
|
63
|
+
encoding: UTF-8
|
60
64
|
string: ''
|
61
65
|
http_version:
|
62
|
-
recorded_at:
|
66
|
+
recorded_at: Thu, 13 Jun 2013 20:16:30 GMT
|
63
67
|
- request:
|
64
68
|
method: get
|
65
69
|
uri: http://admin:admin@localhost:7280/api/user/2
|
@@ -72,42 +76,52 @@ http_interactions:
|
|
72
76
|
Accept-Encoding:
|
73
77
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
74
78
|
Accept:
|
75
|
-
-
|
79
|
+
- '*/*'
|
76
80
|
response:
|
77
81
|
status:
|
78
82
|
code: 200
|
79
|
-
message:
|
80
|
-
T0s=
|
83
|
+
message: OK
|
81
84
|
headers:
|
82
|
-
|
83
|
-
-
|
84
|
-
|
85
|
-
|
86
|
-
-
|
87
|
-
|
88
|
-
|
89
|
-
-
|
90
|
-
|
91
|
-
|
92
|
-
- !binary |-
|
93
|
-
Z3ppcA==
|
94
|
-
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
95
|
-
- !binary |-
|
96
|
-
Y2h1bmtlZA==
|
97
|
-
!binary "U2VydmVy":
|
98
|
-
- !binary |-
|
99
|
-
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
85
|
+
Cache-Control:
|
86
|
+
- no-store
|
87
|
+
Pragma:
|
88
|
+
- no-cache
|
89
|
+
Content-Type:
|
90
|
+
- application/json; charset=utf-8
|
91
|
+
Transfer-Encoding:
|
92
|
+
- chunked
|
93
|
+
Server:
|
94
|
+
- Jetty(7.6.3.v20120416)
|
100
95
|
body:
|
101
|
-
encoding:
|
102
|
-
string:
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
96
|
+
encoding: UTF-8
|
97
|
+
string: |-
|
98
|
+
{
|
99
|
+
"metadata": {
|
100
|
+
"timestamp": "2013-06-13T15:16:30.180-05:00",
|
101
|
+
"params": {}
|
102
|
+
},
|
103
|
+
"data": {
|
104
|
+
"userId": 2,
|
105
|
+
"userUid": "thwlhuOyiq2svbdcqfmm2demnda",
|
106
|
+
"status": "Active",
|
107
|
+
"username": "account_australia",
|
108
|
+
"email": "account_australia",
|
109
|
+
"firstName": "account_australia",
|
110
|
+
"lastName": "account_australia",
|
111
|
+
"quotaInBytes": -1,
|
112
|
+
"orgId": 1,
|
113
|
+
"orgUid": "ADMIN",
|
114
|
+
"orgName": "ADMIN",
|
115
|
+
"active": true,
|
116
|
+
"blocked": false,
|
117
|
+
"emailPromo": false,
|
118
|
+
"invited": false,
|
119
|
+
"orgType": "ENTERPRISE",
|
120
|
+
"usernameIsAnEmail": false,
|
121
|
+
"creationDate": "2006-04-17T12:30:00.990-05:00",
|
122
|
+
"modificationDate": "2013-06-13T15:16:30.146-05:00"
|
123
|
+
}
|
124
|
+
}
|
111
125
|
http_version:
|
112
|
-
recorded_at:
|
126
|
+
recorded_at: Thu, 13 Jun 2013 20:16:30 GMT
|
113
127
|
recorded_with: VCR 2.5.0
|
@@ -12,39 +12,39 @@ 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
|
-
|
32
|
+
encoding: UTF-8
|
33
|
+
string: |-
|
34
|
+
{
|
35
|
+
"metadata": {
|
36
|
+
"timestamp": "2013-06-13T15:16:30.345-05:00",
|
37
|
+
"params": {}
|
38
|
+
},
|
39
|
+
"data": [ {
|
40
|
+
"roleId": 1,
|
41
|
+
"roleName": "SYSADMIN",
|
42
|
+
"locked": true,
|
43
|
+
"creationDate": "2006-04-17T12:30:00.987-05:00",
|
44
|
+
"modificationDate": "2013-06-13T15:13:53.293-05:00",
|
45
|
+
"permissions": [{"permission": "admin"}]
|
46
|
+
}]
|
47
|
+
}
|
48
48
|
http_version:
|
49
|
-
recorded_at:
|
49
|
+
recorded_at: Thu, 13 Jun 2013 20:16:30 GMT
|
50
50
|
recorded_with: VCR 2.5.0
|
@@ -5,14 +5,16 @@ http_interactions:
|
|
5
5
|
uri: http://admin:admin@localhost:7280/api/authToken
|
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
20
|
code: 200
|
@@ -29,15 +31,23 @@ http_interactions:
|
|
29
31
|
Server:
|
30
32
|
- Jetty(7.6.3.v20120416)
|
31
33
|
body:
|
32
|
-
encoding:
|
33
|
-
string:
|
34
|
-
|
35
|
-
|
34
|
+
encoding: UTF-8
|
35
|
+
string: |-
|
36
|
+
{
|
37
|
+
"metadata": {
|
38
|
+
"timestamp": "2013-06-13T15:16:29.726-05:00",
|
39
|
+
"params": {}
|
40
|
+
},
|
41
|
+
"data": [
|
42
|
+
"134jrkicsh5pv05bhldt7otnjn",
|
43
|
+
"1lmn47hi5a0wt065xjlz15cabl"
|
44
|
+
]
|
45
|
+
}
|
36
46
|
http_version:
|
37
|
-
recorded_at:
|
47
|
+
recorded_at: Thu, 13 Jun 2013 20:16:29 GMT
|
38
48
|
- request:
|
39
49
|
method: get
|
40
|
-
uri: http://admin:admin@localhost:7280/api/authToken/
|
50
|
+
uri: http://admin:admin@localhost:7280/api/authToken/134jrkicsh5pv05bhldt7otnjn-1lmn47hi5a0wt065xjlz15cabl
|
41
51
|
body:
|
42
52
|
encoding: US-ASCII
|
43
53
|
string: ''
|
@@ -47,37 +57,35 @@ http_interactions:
|
|
47
57
|
Accept-Encoding:
|
48
58
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
49
59
|
Accept:
|
50
|
-
-
|
60
|
+
- '*/*'
|
51
61
|
response:
|
52
62
|
status:
|
53
63
|
code: 200
|
54
|
-
message:
|
55
|
-
T0s=
|
64
|
+
message: OK
|
56
65
|
headers:
|
57
|
-
|
58
|
-
-
|
59
|
-
|
60
|
-
|
61
|
-
-
|
62
|
-
|
63
|
-
|
64
|
-
-
|
65
|
-
|
66
|
-
|
67
|
-
- !binary |-
|
68
|
-
Z3ppcA==
|
69
|
-
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
70
|
-
- !binary |-
|
71
|
-
Y2h1bmtlZA==
|
72
|
-
!binary "U2VydmVy":
|
73
|
-
- !binary |-
|
74
|
-
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
66
|
+
Cache-Control:
|
67
|
+
- no-store
|
68
|
+
Pragma:
|
69
|
+
- no-cache
|
70
|
+
Content-Type:
|
71
|
+
- application/json; charset=utf-8
|
72
|
+
Transfer-Encoding:
|
73
|
+
- chunked
|
74
|
+
Server:
|
75
|
+
- Jetty(7.6.3.v20120416)
|
75
76
|
body:
|
76
|
-
encoding:
|
77
|
-
string:
|
78
|
-
|
79
|
-
|
80
|
-
|
77
|
+
encoding: UTF-8
|
78
|
+
string: |-
|
79
|
+
{
|
80
|
+
"metadata": {
|
81
|
+
"timestamp": "2013-06-13T15:16:29.741-05:00",
|
82
|
+
"params": {}
|
83
|
+
},
|
84
|
+
"data": {
|
85
|
+
"valid": true,
|
86
|
+
"username": "admin"
|
87
|
+
}
|
88
|
+
}
|
81
89
|
http_version:
|
82
|
-
recorded_at:
|
90
|
+
recorded_at: Thu, 13 Jun 2013 20:16:29 GMT
|
83
91
|
recorded_with: VCR 2.5.0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code42
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-08-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 2.
|
53
|
+
version: 2.5.0
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
61
|
+
version: 2.5.0
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: faraday
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -248,4 +248,3 @@ test_files:
|
|
248
248
|
- spec/fixtures/user_roles.json
|
249
249
|
- spec/fixtures/validate_token.json
|
250
250
|
- spec/spec_helper.rb
|
251
|
-
has_rdoc:
|