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,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.passety.com/explore?q=name
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:42:09 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
+ - '"fece9f9b86d40516f8d1c29ce337f731"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ X-Request-Id:
44
+ - 8c36e1bf-d28e-423c-a238-f05d7a395c1f
45
+ X-Runtime:
46
+ - '0.390693'
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"items":[],"meta":{"total_count":4,"page_count":1,"per_page":24,"page":1}}'
50
+ http_version:
51
+ recorded_at: Fri, 06 Jun 2014 10:42:09 GMT
52
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.passety.com/uploads?type=photo
6
+ body:
7
+ encoding: UTF-8
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
+ Content-Type:
17
+ - image/jpg
18
+ Content-Disposition:
19
+ - attachment; filename="grumpy.jpg"
20
+ Content-Length:
21
+ - '0'
22
+ Accept-Encoding:
23
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
24
+ response:
25
+ status:
26
+ code: 201
27
+ message: Unprocessable Entity
28
+ headers:
29
+ Server:
30
+ - nginx/1.6.0
31
+ Date:
32
+ - Fri, 06 Jun 2014 12:59:48 GMT
33
+ Content-Type:
34
+ - application/json; charset=utf-8
35
+ Transfer-Encoding:
36
+ - chunked
37
+ Connection:
38
+ - keep-alive
39
+ X-Frame-Options:
40
+ - SAMEORIGIN
41
+ X-Xss-Protection:
42
+ - 1; mode=block
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ Cache-Control:
46
+ - no-cache
47
+ X-Request-Id:
48
+ - 037803b6-ea1b-4e95-85ef-db564bedc806
49
+ X-Runtime:
50
+ - '0.136209'
51
+ body:
52
+ encoding: UTF-8
53
+ string: ''
54
+ http_version:
55
+ recorded_at: Fri, 06 Jun 2014 12:59:48 GMT
56
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.passety.com/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 10:16:41 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
+ - '"daa75c8e96ef28c47653c910293f34a0"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ X-Request-Id:
44
+ - 6c5161e3-4d3a-4c82-b6b1-256208e538ea
45
+ X-Runtime:
46
+ - '0.039890'
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"categories":[],"things":[{"id":"AABAM","name":"Camille Wal","private":false,"picture":"http://passety.dev/assets/thing-blank-slate.png","created_at":"2014-06-03T12:12:47.344Z","updated_at":"2014-06-05T11:22:41.318Z","category":null},{"id":"AABAJ","name":"Idella
50
+ Stanton","private":true,"picture":"http://passety.dev/assets/thing-blank-slate.png","created_at":"2014-06-03T12:12:47.338Z","updated_at":"2014-06-03T12:12:47.338Z","category":null},{"id":"AABAG","name":"Ramon
51
+ Schiller","private":true,"picture":"http://passety.dev/assets/thing-blank-slate.png","created_at":"2014-06-03T12:12:47.331Z","updated_at":"2014-06-03T12:12:47.331Z","category":null},{"id":"AABAE","name":"Frederik
52
+ Maggio","private":true,"picture":"http://passety.dev/assets/thing-blank-slate.png","created_at":"2014-06-03T12:12:47.285Z","updated_at":"2014-06-03T12:12:47.285Z","category":null}],"meta":{"total_count":4,"page_count":1,"per_page":24,"page":1}}'
53
+ http_version:
54
+ recorded_at: Fri, 06 Jun 2014 10:16:41 GMT
55
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.passety.com/things
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"Nikon D3100"}'
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 10:24: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
+ Location:
40
+ - https://api.passety.com/things/AABAP
41
+ Etag:
42
+ - '"104aa94095b06c597b36f84783737f74"'
43
+ Cache-Control:
44
+ - max-age=0, private, must-revalidate
45
+ X-Request-Id:
46
+ - 44968f76-c02b-4c07-a899-ef3c6240a992
47
+ X-Runtime:
48
+ - '0.991775'
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"id":"AABAP","name":"Nikon D3100","private":true,"picture":"http://passety.dev/assets/thing-blank-slate.png","created_at":"2014-06-06T10:24:20.160Z","updated_at":"2014-06-06T10:24:20.160Z","category":null}'
52
+ http_version:
53
+ recorded_at: Fri, 06 Jun 2014 10:24:21 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/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 10:31:16 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
+ - 91d6578a-e8fa-44bc-a30c-ea59e6ae1c7d
39
+ X-Runtime:
40
+ - '0.066415'
41
+ body:
42
+ encoding: UTF-8
43
+ string: ''
44
+ http_version:
45
+ recorded_at: Fri, 06 Jun 2014 10:31:16 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/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: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx/1.6.0
25
+ Date:
26
+ - Fri, 06 Jun 2014 10:20:24 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
+ - '"0a1ad94792bdf6f0c2a7ab8c9de6addc"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ X-Request-Id:
44
+ - 30b6d602-dba4-4d36-a5a8-f8b53fe8f07b
45
+ X-Runtime:
46
+ - '0.036496'
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"id":"AABAM","name":"Camille Wal","private":false,"picture":"http://passety.dev/assets/thing-blank-slate.png","created_at":"2014-06-03T12:12:47.344Z","updated_at":"2014-06-05T11:22:41.318Z","category":null}'
50
+ http_version:
51
+ recorded_at: Fri, 06 Jun 2014 10:20:24 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/things/AABAM/photos/
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:52:22 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
+ - '"63fac96a28e1b5943e907dbc2ee4f5bd"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ X-Request-Id:
44
+ - d4e3f95e-a712-42c5-b0ea-1643e747b8bc
45
+ X-Runtime:
46
+ - '0.081068'
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"photos":[{"id":2,"message":null,"thumb":"https://s3.amazonaws.com//4a78902e167f870d465727d0c2d65a87_thumb.jpg","url":"https://s3.amazonaws.com//4a78902e167f870d465727d0c2d65a87.jpg","created_at":"2014-06-03T12:17:46.301Z"},{"id":1,"message":null,"thumb":"https://s3.amazonaws.com//e705bf1e7c3814c55032f6f37ad2a7cb_thumb.jpg","url":"https://s3.amazonaws.com//e705bf1e7c3814c55032f6f37ad2a7cb.jpg","created_at":"2014-06-03T12:12:58.867Z"}],"meta":{"total_count":2,"page_count":1,"per_page":24,"page":1}}'
50
+ http_version:
51
+ recorded_at: Fri, 06 Jun 2014 12:52:22 GMT
52
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.passety.com/things/AABAM/photos/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"photo":1}'
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:52:34 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
+ - http://api.passety.dev/things/AABAM
41
+ Etag:
42
+ - '"6622bcd2a30424bfda7fa91bc7141eb9"'
43
+ Cache-Control:
44
+ - max-age=0, private, must-revalidate
45
+ X-Request-Id:
46
+ - 3f22a67a-2c7b-446d-be9c-e89caea50429
47
+ X-Runtime:
48
+ - '0.125733'
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"id":1,"message":null,"thumb":"https://s3.amazonaws.com//e705bf1e7c3814c55032f6f37ad2a7cb_thumb.jpg","url":"https://s3.amazonaws.com//e705bf1e7c3814c55032f6f37ad2a7cb.jpg","created_at":"2014-06-03T12:12:58.867Z"}'
52
+ http_version:
53
+ recorded_at: Fri, 06 Jun 2014 12:52:34 GMT
54
+ 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/things/AABAM/properties/
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:31:36 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
+ - '"387e2d8168d7308144413694b63db6b4"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ X-Request-Id:
44
+ - 32e098e3-c93b-4398-a779-54fb052bab01
45
+ X-Runtime:
46
+ - '0.062231'
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"properties":[{"key":"description","value":"","created_at":"2014-06-05T11:22:41.660Z"},{"key":"location","value":"","created_at":"2014-06-05T11:22:41.325Z"}],"meta":{"total_count":2,"page_count":1,"per_page":24,"page":1}}'
50
+ http_version:
51
+ recorded_at: Fri, 06 Jun 2014 11:31:36 GMT
52
+ recorded_with: VCR 2.9.0