code42 0.2.0 → 0.2.1

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.
Files changed (20) hide show
  1. data/README.md +1 -1
  2. data/code42.gemspec +1 -1
  3. data/lib/code42/attribute_serializer.rb +4 -2
  4. data/lib/code42/version.rb +1 -1
  5. data/spec/cassettes/Code42_Client/_create_org/returns_created_org.yml +43 -16
  6. data/spec/cassettes/Code42_Client/_create_user/returns_created_user.yml +34 -13
  7. data/spec/cassettes/Code42_Client/_create_user/when_sending_an_invalid_email/raises_an_exception.yml +8 -6
  8. data/spec/cassettes/Code42_Client/_find_org_by_name/returns_the_org_with_the_specified_name.yml +54 -34
  9. data/spec/cassettes/Code42_Client/_get_token/returns_valid_tokens.yml +17 -7
  10. data/spec/cassettes/Code42_Client/_get_token/when_providing_invalid_credentials/should_raise_an_exception.yml +8 -6
  11. data/spec/cassettes/Code42_Client/_org/when_ID_is_not_passed/returns_my_org.yml +51 -33
  12. data/spec/cassettes/Code42_Client/_org/when_ID_is_passed_in/returns_a_specific_org.yml +51 -33
  13. data/spec/cassettes/Code42_Client/_ping/returns_a_ping.yml +22 -27
  14. data/spec/cassettes/Code42_Client/_user/when_ID_is_not_passed/returns_my_user.yml +42 -32
  15. data/spec/cassettes/Code42_Client/_user/when_ID_is_passed_in/returns_a_specific_user.yml +42 -32
  16. data/spec/cassettes/Code42_Client/_user/when_blocked/returns_the_blocked_status.yml +53 -39
  17. data/spec/cassettes/Code42_Client/_user/when_unblocked/returns_the_blocked_status.yml +55 -41
  18. data/spec/cassettes/Code42_Client/_user_roles/returns_an_enumerable.yml +29 -29
  19. data/spec/cassettes/Code42_Client/_validate_token/returns_a_valid_response.yml +43 -35
  20. 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/userblock/2
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: US-ASCII
32
+ encoding: UTF-8
31
33
  string: ''
32
34
  http_version:
33
- recorded_at: Tue, 11 Jun 2013 20:36:13 GMT
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/userblock/2
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: US-ASCII
63
+ encoding: UTF-8
60
64
  string: ''
61
65
  http_version:
62
- recorded_at: Tue, 11 Jun 2013 20:36:13 GMT
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: !binary |-
80
- T0s=
83
+ message: OK
81
84
  headers:
82
- !binary "Q2FjaGUtQ29udHJvbA==":
83
- - !binary |-
84
- bm8tc3RvcmU=
85
- !binary "UHJhZ21h":
86
- - !binary |-
87
- bm8tY2FjaGU=
88
- !binary "Q29udGVudC1UeXBl":
89
- - !binary |-
90
- YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
91
- !binary "Q29udGVudC1FbmNvZGluZw==":
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: ASCII-8BIT
102
- string: !binary |-
103
- H4sIAAAAAAAAAI2SMW/CMBCFd35F5JkgOykgslGRIUMpoulcHY5TrMYx2Bcq
104
- hPjvdSCUkKK2oz/fu3d3eoee5xElEDJAIJHneQdHHEOphEVQGwdJQFno05HP
105
- WMqGUTiKWDgIxkOfDiNKSf+s2IABZV354ejAsaak27WywiSZI0H/Cl5lTQiu
106
- P4t19byX28DuVhnf5koFmVBlBhcLNxBWtQWZcpQ7QVpdSlCi/gHOdVXiG1QW
107
- DRTyWywUyOLXilwai/O/+hTwj6JtpRGS8nGPop7XZw3X5v20f+vdrD+dPSVz
108
- csUXixsO57UjD00lGrYqNP8QdY8cCiva2y6MVrrzIcudxB/lzjDdb06G8TyN
109
- l4tl8hJ3z5vYaRk3V2yLuRGAUpczQHGOi8sKffDZOGVBFFIXksFkQm/jonQm
110
- c8k7wjs5Cy7COlW94xcVE54ksgIAAA==
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: Tue, 11 Jun 2013 20:36:13 GMT
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: !binary |-
20
- T0s=
19
+ message: OK
21
20
  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==
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: ASCII-8BIT
42
- string: !binary |-
43
- H4sIAAAAAAAAAF2PPQ+CMBRFd39F0xlISxGlmwmLgy6wGOPwAs+kkYopdSL8
44
- d18jfq4n755377hgjFv00IIHrhljIxFi3lgcPNgbQZ4KqWKRx1LWcqlVrqVK
45
- VLqOxVILwaNn4gYO7EDn40RgCpTP1uNb6/oOty0hGX3AHiyGN9Wh2pS77f5l
46
- 7PrmguHYuzvOrHEI3vTXEjw+q1EvkcVyVctUK0GFkmK9+q1m+9acTfMX/NmU
47
- aZEnRaH+NqGzZhgoFoYdxy8QHNBac+XTKew9LaYHscZqsU0BAAA=
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: Tue, 11 Jun 2013 20:36:13 GMT
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: US-ASCII
33
- string: ! "{\n \"metadata\": {\n \"timestamp\": \"2013-06-11T15:36:12.961-05:00\",\n
34
- \ \"params\": {}\n },\n \"data\": [\n \"0kar1p08yxaj018frlrvyinmgk\",\n
35
- \ \"00urf5qlpxdfh0p1nfwwxout68\"\n ]\n}"
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: Tue, 11 Jun 2013 20:36:12 GMT
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/0kar1p08yxaj018frlrvyinmgk-00urf5qlpxdfh0p1nfwwxout68
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: !binary |-
55
- T0s=
64
+ message: OK
56
65
  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==
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: ASCII-8BIT
77
- string: !binary |-
78
- H4sIAAAAAAAAAF3NMQrDMAyF4T2nMJqTYiUkpT5HLyCwBkMUgq10Mb57ZNqp
79
- 64f+pzo4B8JKkZQgOOeqiZkm4aIkpyHMHpfJbxPiG9ewbAHnx+tptAbvYfwW
80
- J2WSYue1GbSu8L/6oT1FA80X/7KrcD5IuP+hKOmAXg/tBgjg2zKaAAAA
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: Tue, 11 Jun 2013 20:36:12 GMT
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.0
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-06-13 00:00:00.000000000 Z
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.4.0
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.4.0
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: