passety 0.0.11 → 0.0.12

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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -0
  3. data/.travis.yml +1 -1
  4. data/Gemfile.lock +1 -1
  5. data/lib/passety/collection.rb +0 -4
  6. data/lib/passety/collections/thing.rb +3 -1
  7. data/lib/passety/nested_item.rb +0 -4
  8. data/lib/passety/property.rb +1 -1
  9. data/lib/passety/response.rb +0 -12
  10. data/lib/passety/version.rb +1 -1
  11. data/lib/passety/wrapper.rb +0 -4
  12. data/spec/collections_spec.rb +126 -0
  13. data/spec/properties_spec.rb +75 -0
  14. data/spec/things_spec.rb +100 -0
  15. data/spec/vcr/collections/all.yml +53 -0
  16. data/spec/vcr/collections/create.yml +54 -0
  17. data/spec/vcr/collections/delete.yml +46 -0
  18. data/spec/vcr/collections/find.yml +52 -0
  19. data/spec/vcr/collections/things/all.yml +52 -0
  20. data/spec/vcr/collections/things/create.yml +52 -0
  21. data/spec/vcr/collections/things/delete.yml +46 -0
  22. data/spec/vcr/collections/things/remove.yml +46 -0
  23. data/spec/vcr/collections/update.yml +52 -0
  24. data/spec/vcr/common/info.yml +52 -0
  25. data/spec/vcr/common/search.yml +52 -0
  26. data/spec/vcr/common/uploads.yml +56 -0
  27. data/spec/vcr/things/all.yml +55 -0
  28. data/spec/vcr/things/create.yml +54 -0
  29. data/spec/vcr/things/delete.yml +46 -0
  30. data/spec/vcr/things/find.yml +52 -0
  31. data/spec/vcr/things/photos/all.yml +52 -0
  32. data/spec/vcr/things/photos/create.yml +54 -0
  33. data/spec/vcr/things/properties/all.yml +52 -0
  34. data/spec/vcr/things/properties/create.yml +54 -0
  35. data/spec/vcr/things/properties/delete.yml +46 -0
  36. data/spec/vcr/things/properties/find.yml +52 -0
  37. data/spec/vcr/things/update.yml +52 -0
  38. data/spec/wrapper_spec.rb +41 -15
  39. metadata +55 -6
  40. data/spec/item_spec.rb +0 -14
  41. data/spec/property_spec.rb +0 -13
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.passety.com/collections
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"My suppa-duppa collection"}'
9
+ headers:
10
+ Accept:
11
+ - application/json; version=1
12
+ Authorization:
13
+ - Bearer thVEvafigsp9nCMGiA5XlOSQ2lzNCBLl
14
+ User-Agent:
15
+ - Faraday v0.9.0
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 201
21
+ message: Created
22
+ headers:
23
+ Server:
24
+ - nginx/1.6.0
25
+ Date:
26
+ - Fri, 06 Jun 2014 12:05:03 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Location:
40
+ - https://api.passety.com/collections/6
41
+ Etag:
42
+ - '"93ac41d5c201817b87a53ccaca8fceed"'
43
+ Cache-Control:
44
+ - max-age=0, private, must-revalidate
45
+ X-Request-Id:
46
+ - 80e49af3-031f-468d-809d-82ecfd7fd0f3
47
+ X-Runtime:
48
+ - '0.062938'
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"id":6,"name":"My suppa-duppa collection","description":null,"private":true,"things_count":0}'
52
+ http_version:
53
+ recorded_at: Fri, 06 Jun 2014 12:05:03 GMT
54
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.passety.com/collections/1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json; version=1
12
+ Authorization:
13
+ - Bearer thVEvafigsp9nCMGiA5XlOSQ2lzNCBLl
14
+ User-Agent:
15
+ - Faraday v0.9.0
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 204
21
+ message: No Content
22
+ headers:
23
+ Server:
24
+ - nginx/1.6.0
25
+ Date:
26
+ - Fri, 06 Jun 2014 12:45:59 GMT
27
+ Connection:
28
+ - keep-alive
29
+ X-Frame-Options:
30
+ - SAMEORIGIN
31
+ X-Xss-Protection:
32
+ - 1; mode=block
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ Cache-Control:
36
+ - no-cache
37
+ X-Request-Id:
38
+ - c69600d2-9b91-440d-860b-be662f2faed1
39
+ X-Runtime:
40
+ - '0.129698'
41
+ body:
42
+ encoding: UTF-8
43
+ string: ''
44
+ http_version:
45
+ recorded_at: Fri, 06 Jun 2014 12:45:59 GMT
46
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.passety.com/collections/1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json; version=1
12
+ Authorization:
13
+ - Bearer thVEvafigsp9nCMGiA5XlOSQ2lzNCBLl
14
+ User-Agent:
15
+ - Faraday v0.9.0
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx/1.6.0
25
+ Date:
26
+ - Fri, 06 Jun 2014 11:52:21 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Etag:
40
+ - '"2db3b6131b2749d6f1ae3a0302343b1b"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ X-Request-Id:
44
+ - 27d7ef0e-84e0-4b0f-96ef-318a16bcfd07
45
+ X-Runtime:
46
+ - '0.054891'
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"id":1,"name":"Lexi Colle","description":"","private":false,"things_count":0}'
50
+ http_version:
51
+ recorded_at: Fri, 06 Jun 2014 11:52:21 GMT
52
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.passety.com/collections/1/things/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json; version=1
12
+ Authorization:
13
+ - Bearer thVEvafigsp9nCMGiA5XlOSQ2lzNCBLl
14
+ User-Agent:
15
+ - Faraday v0.9.0
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx/1.6.0
25
+ Date:
26
+ - Fri, 06 Jun 2014 12:04:07 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Etag:
40
+ - '"ea6c3f2358d56561556df279913f2658"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ X-Request-Id:
44
+ - ce9517ec-0d5f-4234-a53a-d2ae739b01df
45
+ X-Runtime:
46
+ - '0.051502'
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"things":[],"meta":{"total_count":0,"page_count":0,"per_page":24,"page":1}}'
50
+ http_version:
51
+ recorded_at: Fri, 06 Jun 2014 12:04:07 GMT
52
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.passety.com/collections/1/things/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"ids":["AABAM"]}'
9
+ headers:
10
+ Accept:
11
+ - application/json; version=1
12
+ Authorization:
13
+ - Bearer thVEvafigsp9nCMGiA5XlOSQ2lzNCBLl
14
+ User-Agent:
15
+ - Faraday v0.9.0
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx/1.6.0
25
+ Date:
26
+ - Fri, 06 Jun 2014 12:20:58 GMT
27
+ Content-Type:
28
+ - text/plain; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Etag:
40
+ - '"7215ee9c7d9dc229d2921a40e899ec5f"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ X-Request-Id:
44
+ - ce8289cf-69ce-4fcc-990e-92db4103b197
45
+ X-Runtime:
46
+ - '11.704930'
47
+ body:
48
+ encoding: UTF-8
49
+ string: ' '
50
+ http_version:
51
+ recorded_at: Fri, 06 Jun 2014 12:20:58 GMT
52
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.passety.com/collections/1/things/AABAM
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json; version=1
12
+ Authorization:
13
+ - Bearer thVEvafigsp9nCMGiA5XlOSQ2lzNCBLl
14
+ User-Agent:
15
+ - Faraday v0.9.0
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 204
21
+ message: No Content
22
+ headers:
23
+ Server:
24
+ - nginx/1.6.0
25
+ Date:
26
+ - Fri, 06 Jun 2014 12:23:37 GMT
27
+ Connection:
28
+ - keep-alive
29
+ X-Frame-Options:
30
+ - SAMEORIGIN
31
+ X-Xss-Protection:
32
+ - 1; mode=block
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ Cache-Control:
36
+ - no-cache
37
+ X-Request-Id:
38
+ - 49250e93-61f4-4c1e-87fd-4a6f36e12e4d
39
+ X-Runtime:
40
+ - '7.217011'
41
+ body:
42
+ encoding: UTF-8
43
+ string: ''
44
+ http_version:
45
+ recorded_at: Fri, 06 Jun 2014 12:23:37 GMT
46
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.passety.com/collections/1/things/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"ids":["AABAM"]}'
9
+ headers:
10
+ Accept:
11
+ - application/json; version=1
12
+ Authorization:
13
+ - Bearer thVEvafigsp9nCMGiA5XlOSQ2lzNCBLl
14
+ User-Agent:
15
+ - Faraday v0.9.0
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 204
21
+ message: No Content
22
+ headers:
23
+ Server:
24
+ - nginx/1.6.0
25
+ Date:
26
+ - Fri, 06 Jun 2014 12:44:54 GMT
27
+ Connection:
28
+ - keep-alive
29
+ X-Frame-Options:
30
+ - SAMEORIGIN
31
+ X-Xss-Protection:
32
+ - 1; mode=block
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ Cache-Control:
36
+ - no-cache
37
+ X-Request-Id:
38
+ - 975e46c8-ccca-4561-a21f-3692b3fe7429
39
+ X-Runtime:
40
+ - '7.546760'
41
+ body:
42
+ encoding: UTF-8
43
+ string: ''
44
+ http_version:
45
+ recorded_at: Fri, 06 Jun 2014 12:44:54 GMT
46
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.passety.com/collections/1
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"Brand new name"}'
9
+ headers:
10
+ Accept:
11
+ - application/json; version=1
12
+ Authorization:
13
+ - Bearer thVEvafigsp9nCMGiA5XlOSQ2lzNCBLl
14
+ User-Agent:
15
+ - Faraday v0.9.0
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx/1.6.0
25
+ Date:
26
+ - Fri, 06 Jun 2014 12:04:07 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Etag:
40
+ - '"6679adb1a0877d8955d01c1d891d9b67"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ X-Request-Id:
44
+ - b7f6784b-de4c-4321-bee0-3dcd9b9bb5d4
45
+ X-Runtime:
46
+ - '0.053541'
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"id":1,"name":"Brand new name","description":"","private":false,"things_count":0}'
50
+ http_version:
51
+ recorded_at: Fri, 06 Jun 2014 12:04:07 GMT
52
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.passety.com/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json; version=1
12
+ Authorization:
13
+ - Bearer thVEvafigsp9nCMGiA5XlOSQ2lzNCBLl
14
+ User-Agent:
15
+ - Faraday v0.9.0
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx/1.6.0
25
+ Date:
26
+ - Fri, 06 Jun 2014 10:38:32 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Etag:
40
+ - '"f1ce8584a74e24708f446a35d31f6812"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ X-Request-Id:
44
+ - 3130f907-d47f-4427-9457-35975ab2d766
45
+ X-Runtime:
46
+ - '0.021002'
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"resources":{"core":{"limit":5000,"remaining":4984,"reset":1402052400}}}'
50
+ http_version:
51
+ recorded_at: Fri, 06 Jun 2014 10:38:32 GMT
52
+ recorded_with: VCR 2.9.0