code42 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE +203 -0
- data/README.md +182 -0
- data/Rakefile +1 -0
- data/code42.gemspec +26 -0
- data/examples/Gemfile +6 -0
- data/examples/computers.rb +88 -0
- data/examples/diagnostic.rb +82 -0
- data/examples/orgs.rb +88 -0
- data/examples/parser.rb +51 -0
- data/examples/parser_test.rb +64 -0
- data/examples/users.rb +88 -0
- data/lib/code42.rb +46 -0
- data/lib/code42/attribute.rb +13 -0
- data/lib/code42/attribute_serializer.rb +129 -0
- data/lib/code42/client.rb +301 -0
- data/lib/code42/computer.rb +15 -0
- data/lib/code42/connection.rb +124 -0
- data/lib/code42/diagnostic.rb +8 -0
- data/lib/code42/error.rb +21 -0
- data/lib/code42/org.rb +38 -0
- data/lib/code42/ping.rb +14 -0
- data/lib/code42/resource.rb +58 -0
- data/lib/code42/role.rb +26 -0
- data/lib/code42/role_collection.rb +35 -0
- data/lib/code42/settings.rb +42 -0
- data/lib/code42/token.rb +31 -0
- data/lib/code42/token_validation.rb +10 -0
- data/lib/code42/user.rb +40 -0
- data/lib/code42/version.rb +3 -0
- data/spec/cassettes/Code42_Client/_create_org/returns_created_org.yml +47 -0
- data/spec/cassettes/Code42_Client/_create_user/returns_created_user.yml +44 -0
- data/spec/cassettes/Code42_Client/_create_user/when_sending_an_invalid_email/raises_an_exception.yml +37 -0
- data/spec/cassettes/Code42_Client/_find_org_by_name/returns_the_org_with_the_specified_name.yml +101 -0
- data/spec/cassettes/Code42_Client/_get_token/returns_valid_tokens.yml +38 -0
- data/spec/cassettes/Code42_Client/_get_token/when_providing_invalid_credentials/should_raise_an_exception.yml +37 -0
- data/spec/cassettes/Code42_Client/_org/when_ID_is_not_passed/returns_my_org.yml +54 -0
- data/spec/cassettes/Code42_Client/_org/when_ID_is_passed_in/returns_a_specific_org.yml +54 -0
- data/spec/cassettes/Code42_Client/_ping/returns_a_ping.yml +48 -0
- data/spec/cassettes/Code42_Client/_user/when_ID_is_not_passed/returns_my_user.yml +53 -0
- data/spec/cassettes/Code42_Client/_user/when_ID_is_passed_in/returns_a_specific_user.yml +53 -0
- data/spec/cassettes/Code42_Client/_user_roles/returns_an_enumerable.yml +50 -0
- data/spec/cassettes/Code42_Client/_validate_token/returns_a_valid_response.yml +83 -0
- data/spec/cassettes/Crashplan_Client/_create_org/returns_created_org.yml +47 -0
- data/spec/cassettes/Crashplan_Client/_create_user/returns_created_user.yml +44 -0
- data/spec/cassettes/Crashplan_Client/_create_user/when_sending_an_invalid_email/raises_an_exception.yml +37 -0
- data/spec/cassettes/Crashplan_Client/_find_org_by_name/returns_the_org_with_the_specified_name.yml +55 -0
- data/spec/cassettes/Crashplan_Client/_get_token/returns_valid_tokens.yml +38 -0
- data/spec/cassettes/Crashplan_Client/_get_token/when_providing_invalid_credentials/should_raise_an_exception.yml +37 -0
- data/spec/cassettes/Crashplan_Client/_org/when_ID_is_not_passed/returns_my_org.yml +54 -0
- data/spec/cassettes/Crashplan_Client/_org/when_ID_is_passed_in/returns_a_specific_org.yml +54 -0
- data/spec/cassettes/Crashplan_Client/_ping/returns_a_ping.yml +48 -0
- data/spec/cassettes/Crashplan_Client/_user/when_ID_is_not_passed/returns_my_user.yml +99 -0
- data/spec/cassettes/Crashplan_Client/_user/when_ID_is_passed_in/returns_a_specific_user.yml +53 -0
- data/spec/cassettes/Crashplan_Client/_user_roles/returns_an_enumerable.yml +50 -0
- data/spec/cassettes/Crashplan_Client/_validate_token/returns_a_valid_response.yml +128 -0
- data/spec/crashplan/client_spec.rb +135 -0
- data/spec/crashplan/connection_spec.rb +45 -0
- data/spec/crashplan/org_spec.rb +63 -0
- data/spec/crashplan/ping_spec.rb +14 -0
- data/spec/crashplan/resource_spec.rb +56 -0
- data/spec/crashplan/role_spec.rb +28 -0
- data/spec/crashplan/settings_spec.rb +118 -0
- data/spec/crashplan/token_spec.rb +33 -0
- data/spec/crashplan/user_spec.rb +21 -0
- data/spec/fixtures/auth/bad_password.json +1 -0
- data/spec/fixtures/authToken.json +10 -0
- data/spec/fixtures/org.1.json +36 -0
- data/spec/fixtures/org.create.json +36 -0
- data/spec/fixtures/org.my.json +36 -0
- data/spec/fixtures/ping.json +7 -0
- data/spec/fixtures/user.1.json +27 -0
- data/spec/fixtures/user.create.json +27 -0
- data/spec/fixtures/user.my.json +27 -0
- data/spec/fixtures/user_roles.json +32 -0
- data/spec/fixtures/validate_token.json +10 -0
- data/spec/spec_helper.rb +67 -0
- metadata +268 -0
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://admin:admin@localhost:7280/api/user/my
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- ! '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: !binary |-
|
20
|
+
T0s=
|
21
|
+
headers:
|
22
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
23
|
+
- !binary |-
|
24
|
+
bm8tc3RvcmU=
|
25
|
+
!binary "UHJhZ21h":
|
26
|
+
- !binary |-
|
27
|
+
bm8tY2FjaGU=
|
28
|
+
!binary "Q29udGVudC1UeXBl":
|
29
|
+
- !binary |-
|
30
|
+
YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
|
31
|
+
!binary "Q29udGVudC1FbmNvZGluZw==":
|
32
|
+
- !binary |-
|
33
|
+
Z3ppcA==
|
34
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
35
|
+
- !binary |-
|
36
|
+
Y2h1bmtlZA==
|
37
|
+
!binary "U2VydmVy":
|
38
|
+
- !binary |-
|
39
|
+
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
40
|
+
body:
|
41
|
+
encoding: ASCII-8BIT
|
42
|
+
string: !binary |-
|
43
|
+
H4sIAAAAAAAAAJWSTW7CMBCF95wi8pogJzQgsktFFlmUIkoPMMROsRrbYE+o
|
44
|
+
EOLutUsoIaiLLv29mXnz49MgCIjkCAwQSBoEwckRx1BIbhHkzkES02gc0iSk
|
45
|
+
k3UUpzRJk+lomswcSiklw0vGDgxI68JPZwfOnpJ+1cZyUzBHouENvAtPCG6/
|
46
|
+
6m3zehT72B42rNxXUsaMS8XE1cI1hI23IFmJ4sBJp4oCyb0CTAp1FbgEUT/Q
|
47
|
+
ShiLizY+6yo1/CHsG41QqOcjcu8fXvvX5uNuHvdux8nmL8WC3PBv2S6Hyxhp
|
48
|
+
gKbhLdvUuvzkvkYFteXdSZZGS90ThDoIfAh3huvj7scwX6zz1XJVvOX9dRU2
|
49
|
+
U3m7oW5yaTig0GoOyC/np5OQPoXR1J9/TN3RR7MZvT+/1ExUovxHov8lg/M3
|
50
|
+
1V5KGIICAAA=
|
51
|
+
http_version:
|
52
|
+
recorded_at: Mon, 06 May 2013 17:05:57 GMT
|
53
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://admin:admin@localhost:7280/api/user/2
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- ! '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: !binary |-
|
20
|
+
T0s=
|
21
|
+
headers:
|
22
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
23
|
+
- !binary |-
|
24
|
+
bm8tc3RvcmU=
|
25
|
+
!binary "UHJhZ21h":
|
26
|
+
- !binary |-
|
27
|
+
bm8tY2FjaGU=
|
28
|
+
!binary "Q29udGVudC1UeXBl":
|
29
|
+
- !binary |-
|
30
|
+
YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
|
31
|
+
!binary "Q29udGVudC1FbmNvZGluZw==":
|
32
|
+
- !binary |-
|
33
|
+
Z3ppcA==
|
34
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
35
|
+
- !binary |-
|
36
|
+
Y2h1bmtlZA==
|
37
|
+
!binary "U2VydmVy":
|
38
|
+
- !binary |-
|
39
|
+
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
40
|
+
body:
|
41
|
+
encoding: ASCII-8BIT
|
42
|
+
string: !binary |-
|
43
|
+
H4sIAAAAAAAAAJWSzW7CMBCE7zxF5DNBTiggcktFDjmUIkrP1eI4xWocg72m
|
44
|
+
Qoh3rw2hpKnUn6M/z+7srubYCwIiOUIBCCQJguDoiGMoJDcIcusgiWk0DOko
|
45
|
+
pONVFCd0lIwmg3FMHUooJf1LxRY0SOPkx5MDJ09Jt6s1XOeFI3H/Bp6FJwQ3
|
46
|
+
79XGPh7ELjb7dcF2pZRxwWVdwNXCDYTWW5CUodhz0upSg+T+BxhTtsYXsAY1
|
47
|
+
VOKzmEsQ1Y+KUmiD89/6VPAH0c4qhLy+PyD384ZRw5V+Pe/fejfrp7OHfE5u
|
48
|
+
+GrxhcNl7SRAbXnD1pVib9z3KKEyvL3tQiupOh+i3gv8JneGq8P2bJjNV9ly
|
49
|
+
scyfsu55c5PWWXPFdjHTHFCoegbIL3Gh45DehdHEx2VIXUgG02knLlIVohTs
|
50
|
+
H4U+Vb3TBw/+lrGyAgAA
|
51
|
+
http_version:
|
52
|
+
recorded_at: Mon, 06 May 2013 17:05:57 GMT
|
53
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://admin:admin@localhost:7280/api/userRole/my
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- ! '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: !binary |-
|
20
|
+
T0s=
|
21
|
+
headers:
|
22
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
23
|
+
- !binary |-
|
24
|
+
bm8tc3RvcmU=
|
25
|
+
!binary "UHJhZ21h":
|
26
|
+
- !binary |-
|
27
|
+
bm8tY2FjaGU=
|
28
|
+
!binary "Q29udGVudC1UeXBl":
|
29
|
+
- !binary |-
|
30
|
+
YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
|
31
|
+
!binary "Q29udGVudC1FbmNvZGluZw==":
|
32
|
+
- !binary |-
|
33
|
+
Z3ppcA==
|
34
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
35
|
+
- !binary |-
|
36
|
+
Y2h1bmtlZA==
|
37
|
+
!binary "U2VydmVy":
|
38
|
+
- !binary |-
|
39
|
+
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
40
|
+
body:
|
41
|
+
encoding: ASCII-8BIT
|
42
|
+
string: !binary |-
|
43
|
+
H4sIAAAAAAAAAF2POw+CMBSFd35F01lIy1O7mbgwyIKLMQw3cE0aqZhSJ8J/
|
44
|
+
9za+Wb/cc+53poAxbtBBBw64YoxNRIg5bXB0YG4EeSxkEoosFPlBxkpkKltH
|
45
|
+
aZETUkLw1TNxAwtmpPNpJjB7yl+tp0+tHXosO0Jy9QUVGPRv6mO93e3L6t3Y
|
46
|
+
D+0F/bGzd3yx1iI4PVx34PCpJsgjDWXh1RJBQtFmXfyrmaHTZ90ugn+bEiVl
|
47
|
+
JON4sQmt0eNIMT/sNP0A3wGd0Vc+N35vE8wPONfFpk0BAAA=
|
48
|
+
http_version:
|
49
|
+
recorded_at: Mon, 06 May 2013 17:05:58 GMT
|
50
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,83 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://admin:admin@localhost:7280/api/authToken
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept:
|
15
|
+
- ! '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
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)
|
31
|
+
body:
|
32
|
+
encoding: US-ASCII
|
33
|
+
string: ! "{\n \"metadata\": {\n \"timestamp\": \"2013-05-06T12:05:58.572-05:00\",\n
|
34
|
+
\ \"params\": {}\n },\n \"data\": [\n \"1avev1icqqfub13zny9648sl4m\",\n
|
35
|
+
\ \"13yhgbxy9r6qz1emjnfdaguwsw\"\n ]\n}"
|
36
|
+
http_version:
|
37
|
+
recorded_at: Mon, 06 May 2013 17:05:58 GMT
|
38
|
+
- request:
|
39
|
+
method: get
|
40
|
+
uri: http://admin:admin@localhost:7280/api/authToken/1avev1icqqfub13zny9648sl4m-13yhgbxy9r6qz1emjnfdaguwsw
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ''
|
44
|
+
headers:
|
45
|
+
User-Agent:
|
46
|
+
- Faraday v0.8.7
|
47
|
+
Accept-Encoding:
|
48
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
49
|
+
Accept:
|
50
|
+
- ! '*/*'
|
51
|
+
response:
|
52
|
+
status:
|
53
|
+
code: 200
|
54
|
+
message: !binary |-
|
55
|
+
T0s=
|
56
|
+
headers:
|
57
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
58
|
+
- !binary |-
|
59
|
+
bm8tc3RvcmU=
|
60
|
+
!binary "UHJhZ21h":
|
61
|
+
- !binary |-
|
62
|
+
bm8tY2FjaGU=
|
63
|
+
!binary "Q29udGVudC1UeXBl":
|
64
|
+
- !binary |-
|
65
|
+
YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
|
66
|
+
!binary "Q29udGVudC1FbmNvZGluZw==":
|
67
|
+
- !binary |-
|
68
|
+
Z3ppcA==
|
69
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
70
|
+
- !binary |-
|
71
|
+
Y2h1bmtlZA==
|
72
|
+
!binary "U2VydmVy":
|
73
|
+
- !binary |-
|
74
|
+
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
75
|
+
body:
|
76
|
+
encoding: ASCII-8BIT
|
77
|
+
string: !binary |-
|
78
|
+
H4sIAAAAAAAAAF3NMQrDMAyF4T2nMJqTori4tD5HLyCwBkMUgq10Mb57ZNqp
|
79
|
+
64f+pzY5B8JKiZQgOueaiZlm4aokhyF4XO8LhgUf79VHDDE8b+HljSIizN/i
|
80
|
+
oEJS7bx1gz4U/lc/tOVkoOXkX3ZWLjsJjz+UJO8w6qlfjSe1LZoAAAA=
|
81
|
+
http_version:
|
82
|
+
recorded_at: Mon, 06 May 2013 17:05:58 GMT
|
83
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://admin:admin@localhost:7280/api/org
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"orgName":"IBM"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Accept:
|
13
|
+
- ! '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
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)
|
31
|
+
body:
|
32
|
+
encoding: US-ASCII
|
33
|
+
string: ! "{\n \"metadata\": {\n \"timestamp\": \"2013-02-07T17:15:11.793-06:00\",\n
|
34
|
+
\ \"params\": {}\n },\n \"data\": {\n \"orgId\": 17,\n \"orgUid\":
|
35
|
+
\"569639014995996375\",\n \"orgName\": \"IBM\",\n \"status\": \"Active\",\n
|
36
|
+
\ \"active\": true,\n \"blocked\": false,\n \"parentOrgId\": null,\n
|
37
|
+
\ \"type\": \"ENTERPRISE\",\n \"externalId\": \"569639014995996375\",\n
|
38
|
+
\ \"hierarchyCounts\": {},\n \"configInheritanceCounts\": {},\n \"creationDate\":
|
39
|
+
\"2013-02-07T17:15:11.536-06:00\",\n \"modificationDate\": \"2013-02-07T17:15:11.732-06:00\",\n
|
40
|
+
\ \"registrationKey\": \"WHRC-4JHW-9SC7-7JRR\",\n \"reporting\": {},\n
|
41
|
+
\ \"customConfig\": false,\n \"settings\": {\n \"maxSeats\":
|
42
|
+
null,\n \"maxBytes\": null\n },\n \"settingsInherited\": {\n
|
43
|
+
\ \"maxSeats\": \"\",\n \"maxBytes\": \"\"\n },\n \"settingsSummary\":
|
44
|
+
\ {\n \"maxSeats\": \"\",\n \"maxBytes\": \"\"\n }\n }\n}"
|
45
|
+
http_version:
|
46
|
+
recorded_at: Thu, 07 Feb 2013 23:15:11 GMT
|
47
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://admin:admin@localhost:7280/api/user
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"orgId":2,"username":"testuser"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Accept:
|
13
|
+
- ! '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
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)
|
31
|
+
body:
|
32
|
+
encoding: US-ASCII
|
33
|
+
string: ! "{\n \"metadata\": {\n \"timestamp\": \"2013-02-07T17:07:17.596-06:00\",\n
|
34
|
+
\ \"params\": {}\n },\n \"data\": {\n \"userId\": 2,\n \"userUid\":
|
35
|
+
\"832e716e813650cb\",\n \"status\": \"Active\",\n \"username\": \"testuser\",\n
|
36
|
+
\ \"email\": null,\n \"firstName\": null,\n \"lastName\": null,\n
|
37
|
+
\ \"quotaInBytes\": -1,\n \"orgId\": 2,\n \"orgUid\": \"DEFAULT_CUSTOMER_ORG_ID\",\n
|
38
|
+
\ \"orgName\": \"Default\",\n \"active\": true,\n \"blocked\": false,\n
|
39
|
+
\ \"emailPromo\": true,\n \"invited\": true,\n \"orgType\": \"ENTERPRISE\",\n
|
40
|
+
\ \"usernameIsAnEmail\": null,\n \"creationDate\": \"2013-01-31T21:53:41.862-06:00\",\n
|
41
|
+
\ \"modificationDate\": \"2013-02-07T17:07:17.551-06:00\"\n }\n}"
|
42
|
+
http_version:
|
43
|
+
recorded_at: Thu, 07 Feb 2013 23:07:17 GMT
|
44
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://admin:admin@localhost:7280/api/user
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"orgId":2,"username":"testuser","email":"testuser"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Accept:
|
13
|
+
- ! '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 500
|
19
|
+
message: ! '[{ "name": "EMAIL_INVALID", "description": "Email is invalid", "objects":
|
20
|
+
[] }]'
|
21
|
+
headers:
|
22
|
+
Pragma:
|
23
|
+
- no-cache
|
24
|
+
Content-Type:
|
25
|
+
- text/html;charset=ISO-8859-1
|
26
|
+
Cache-Control:
|
27
|
+
- must-revalidate,no-cache,no-store
|
28
|
+
Content-Length:
|
29
|
+
- '72'
|
30
|
+
Server:
|
31
|
+
- Jetty(7.6.3.v20120416)
|
32
|
+
body:
|
33
|
+
encoding: US-ASCII
|
34
|
+
string: ! '[{"name":"EMAIL_INVALID","description":"Email is invalid","objects":[]}]'
|
35
|
+
http_version:
|
36
|
+
recorded_at: Wed, 13 Feb 2013 16:59:05 GMT
|
37
|
+
recorded_with: VCR 2.4.0
|
data/spec/cassettes/Crashplan_Client/_find_org_by_name/returns_the_org_with_the_specified_name.yml
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://admin:admin@localhost:7280/api/org?q=Default
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- ! '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: !binary |-
|
20
|
+
T0s=
|
21
|
+
headers:
|
22
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
23
|
+
- !binary |-
|
24
|
+
bm8tc3RvcmU=
|
25
|
+
!binary "UHJhZ21h":
|
26
|
+
- !binary |-
|
27
|
+
bm8tY2FjaGU=
|
28
|
+
!binary "Q29udGVudC1UeXBl":
|
29
|
+
- !binary |-
|
30
|
+
YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
|
31
|
+
!binary "Q29udGVudC1FbmNvZGluZw==":
|
32
|
+
- !binary |-
|
33
|
+
Z3ppcA==
|
34
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
35
|
+
- !binary |-
|
36
|
+
Y2h1bmtlZA==
|
37
|
+
!binary "U2VydmVy":
|
38
|
+
- !binary |-
|
39
|
+
SmV0dHkoNy42LjMudjIwMTIwNDE2KQ==
|
40
|
+
body:
|
41
|
+
encoding: ASCII-8BIT
|
42
|
+
string: !binary |-
|
43
|
+
H4sIAAAAAAAAAKVTXW/aMBR951dEfi6VE4q25Y1CVkXbykTCU1Wh23ABa4nN
|
44
|
+
nJuJDOW/1zY0pNBN1ZYXy+fce879cPY9z2MFEiyBgIWe5+0NYjASBZYExdaA
|
45
|
+
LOD+oM8H/YCn/oeQ89AfXg+DoM+H5sKuDhlb0FCUJnzPftqkCa6gyok1hm5s
|
46
|
+
DLvwUAT5WFWSDOofZZReW5EHr407gPHSoMFVB5mLpfOJPo/mX9PFeJ6k02/R
|
47
|
+
bDGd3S3iCeuG3kOB3ZpazrRIlfVjo4zELzwxcLiHHukKW/QpV9kPtL4ryMsT
|
48
|
+
bppHSdNjmbLK85aieuu8o/s0mn2fxUl0MsEdoZaQx+/rZCNQg842tRuam3XT
|
49
|
+
kpmSK7GO5Qa1IJAZvhmkEUgoOQHC7mb9m5R/CgeDcPjxmnP+arP2hailWIns
|
50
|
+
X1I1rkVJ2qV+wdpm/j77usFbpUnI9VnVVUmqGLsGL0ZfItmM0r2s7quxdcMu
|
51
|
+
MQ2XZzs5MLc14QtzJJoL1eM83cr/Js/Y2+KM/VE6qYoCdP3fwu5sHu1v1mue
|
52
|
+
AdhA62LRAwAA
|
53
|
+
http_version:
|
54
|
+
recorded_at: Wed, 20 Mar 2013 22:00:15 GMT
|
55
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://admin:admin@localhost:7280/api/authToken
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"appCode":"CPP"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Accept:
|
13
|
+
- ! '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
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)
|
31
|
+
body:
|
32
|
+
encoding: US-ASCII
|
33
|
+
string: ! "{\n \"metadata\": {\n \"timestamp\": \"2013-02-07T17:07:17.451-06:00\",\n
|
34
|
+
\ \"params\": {}\n },\n \"data\": [\n \"0jxj2343t5md91shpnmtfuj82z\",\n
|
35
|
+
\ \"03i9nar7qnafz0u6zgf579o8cs\"\n ]\n}"
|
36
|
+
http_version:
|
37
|
+
recorded_at: Thu, 07 Feb 2013 23:07:17 GMT
|
38
|
+
recorded_with: VCR 2.4.0
|