cartodb-rb-client 0.3.1 → 0.4.0

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 (63) hide show
  1. data/Gemfile +2 -2
  2. data/lib/cartodb-rb-client/cartodb/client/connection/cartodb.rb +1 -1
  3. data/lib/cartodb-rb-client/cartodb/model/base.rb +1 -1
  4. data/lib/cartodb-rb-client/cartodb/model/getters.rb +6 -9
  5. data/lib/cartodb-rb-client/cartodb/model/schema.rb +13 -2
  6. data/lib/cartodb-rb-client/cartodb/model/setters.rb +5 -9
  7. data/lib/cartodb-rb-client/version.rb +1 -1
  8. data/spec/client_spec.rb +3 -3
  9. data/spec/fixtures/cassettes/CartoDB_client/should_add_and_remove_colums_in_a_previously_created_table.yml +376 -0
  10. data/spec/fixtures/cassettes/CartoDB_client/should_allow_reserved_words_in_columns_names.yml +121 -0
  11. data/spec/fixtures/cassettes/CartoDB_client/should_change_a_previously_created_column.yml +174 -0
  12. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_and_get_its_table_definition.yml +123 -0
  13. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_forcing_the_schema_and_get_its_table_definition.yml +123 -0
  14. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_from_a_csv_file.yml +1971 -0
  15. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_with_MULTILINESTRING_type_geometry.yml +123 -0
  16. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_with_MULTIPOLYGON_type_geometry.yml +123 -0
  17. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_with_POINT_type_geometry.yml +123 -0
  18. data/spec/fixtures/cassettes/CartoDB_client/should_delete_a_table_s_row.yml +221 -0
  19. data/spec/fixtures/cassettes/CartoDB_client/should_drop_a_table.yml +278 -0
  20. data/spec/fixtures/cassettes/CartoDB_client/should_escape_properly_input_data_in_insert_queries.yml +121 -0
  21. data/spec/fixtures/cassettes/CartoDB_client/should_execute_a_select_query_and_return_results.yml +615 -0
  22. data/spec/fixtures/cassettes/CartoDB_client/should_get_a_table_by_its_name.yml +123 -0
  23. data/spec/fixtures/cassettes/CartoDB_client/should_import_any_kind_of_data_file.yml +6612 -0
  24. data/spec/fixtures/cassettes/CartoDB_client/should_insert_a_row_in_a_table.yml +121 -0
  25. data/spec/fixtures/cassettes/CartoDB_client/should_paginate_records.yml +2624 -0
  26. data/spec/fixtures/cassettes/CartoDB_client/should_rename_an_existing_table.yml +123 -0
  27. data/spec/fixtures/cassettes/CartoDB_client/should_return_errors_on_invalid_queries.yml +59 -0
  28. data/spec/fixtures/cassettes/CartoDB_client/should_return_nil_when_requesting_a_table_which_does_not_exists.yml +68 -0
  29. data/spec/fixtures/cassettes/CartoDB_client/should_return_user_s_table_list.yml +176 -0
  30. data/spec/fixtures/cassettes/CartoDB_client/should_update_a_row_in_a_table.yml +170 -0
  31. data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_destroy_a_previously_created_record.yml +1398 -0
  32. data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_initialize_attributes_of_the_model_without_persisting_them.yml +223 -0
  33. data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_persist_into_cartodb_using_the_save_method.yml +1406 -0
  34. data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_persist_into_cartodb_using_the_static_create_method.yml +1299 -0
  35. data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_update_an_existing_record.yml +2028 -0
  36. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_add_more_columns_if_the_table_previously_exists.yml +990 -0
  37. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_contain_an_array_of_columns.yml +1443 -0
  38. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_a_table_with_custom_name_if_specified.yml +270 -0
  39. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_model_with_custom_data_types_columns.yml +421 -0
  40. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_model_with_polygon_type_geometry_columns.yml +272 -0
  41. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_the_table_in_cartodb_if_it_doesn_t_exists.yml +780 -0
  42. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_have_a_valid_CartoDB_Client_instance_as_a_connection_object.yml +682 -0
  43. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_have_a_valid_table_name.yml +727 -0
  44. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_return_only_data_columns.yml +829 -0
  45. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_allow_to_select_the_specified_fiels.yml +17953 -0
  46. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_count_all_records.yml +15596 -0
  47. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_find_a_record_by_its_id.yml +15197 -0
  48. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_order_results.yml +16439 -0
  49. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_paginate_results.yml +24501 -0
  50. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_return_all_records_paginated.yml +16488 -0
  51. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_search_records_by_certain_filters.yml +4950 -0
  52. data/spec/fixtures/cassettes/cartodb_spec_models.yml +2467 -0
  53. data/spec/fixtures/cassettes/clean_tables.yml +266 -0
  54. data/spec/model/data_spec.rb +6 -6
  55. data/spec/model/metadata_spec.rb +11 -3
  56. data/spec/model/scopes_spec.rb +2 -2
  57. data/spec/model_specs_helper.rb +2 -0
  58. data/spec/spec_helper.rb +18 -5
  59. data/spec/support/cartodb_factories.rb +3 -3
  60. data/spec/support/cartodb_helpers.rb +1 -1
  61. data/spec/support/cartodb_models.rb +26 -19
  62. metadata +97 -7
  63. data/spec/support/data/ngos.xlsx +0 -0
@@ -0,0 +1,123 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - &70099243451260 !ruby/object:MIME::Type
12
+ content_type: application/json
13
+ raw_media_type: application
14
+ raw_sub_type: json
15
+ simplified: application/json
16
+ media_type: application
17
+ sub_type: json
18
+ extensions:
19
+ - json
20
+ encoding: 8bit
21
+ system: !!null
22
+ registered: true
23
+ url:
24
+ - IANA
25
+ - RFC4627
26
+ obsolete: !!null
27
+ docs: !!null
28
+ Authorization:
29
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="3Y3r2F3F4FGoDYlX4KQu8XCCuvO8VYqFBfdBAoz1ksM",
30
+ oauth_signature="vLPteYTodRxnrRuBsAIvU05E20k%3D", oauth_signature_method="HMAC-SHA1",
31
+ oauth_timestamp="1337787326", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
32
+ oauth_version="1.0"
33
+ response:
34
+ status:
35
+ code: 200
36
+ message: OK
37
+ headers:
38
+ Server:
39
+ - nginx
40
+ Date:
41
+ - Wed, 23 May 2012 15:35:27 GMT
42
+ Content-Type:
43
+ - application/json; charset=utf-8
44
+ Transfer-Encoding:
45
+ - chunked
46
+ Connection:
47
+ - keep-alive
48
+ Vary:
49
+ - Accept-Encoding
50
+ Status:
51
+ - 200 OK
52
+ Location:
53
+ - /tables/4701
54
+ Etag:
55
+ - ! '"f132d2b123937c33ed3e98a4655a87cd"'
56
+ Cache-Control:
57
+ - max-age=0, private, must-revalidate
58
+ X-Ua-Compatible:
59
+ - IE=Edge,chrome=1
60
+ Set-Cookie:
61
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlNjQwODI1M2NjMGIyNGQ5MGZhZWE2ZGUzZTNkZDFlNzVJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--08fe2dae685439eee86a365fd275c92e4bf0a898;
62
+ domain=.cartodb.com; path=/; HttpOnly
63
+ X-Runtime:
64
+ - '0.606740'
65
+ Content-Encoding:
66
+ - gzip
67
+ body:
68
+ encoding: ASCII-8BIT
69
+ string: ! '{"id":4701,"name":"cartodb_spec","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","point"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]]}'
70
+ http_version: '1.1'
71
+ recorded_at: Wed, 23 May 2012 15:35:27 GMT
72
+ - request:
73
+ method: put
74
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/cartodb_spec?name=renamed_cartodb_spec
75
+ body:
76
+ encoding: US-ASCII
77
+ string: ''
78
+ headers:
79
+ Accept:
80
+ - *70099243451260
81
+ Authorization:
82
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="1QYQhzRJONLT2RyFrXodLr0Ll6vM2FsWDdsDzWo",
83
+ oauth_signature="%2Bxbiz4lGRF6rwTliQ2ihIS6T3QI%3D", oauth_signature_method="HMAC-SHA1",
84
+ oauth_timestamp="1337787327", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
85
+ oauth_version="1.0"
86
+ response:
87
+ status:
88
+ code: 200
89
+ message: Continue
90
+ headers:
91
+ Server:
92
+ - nginx
93
+ Date:
94
+ - Wed, 23 May 2012 15:35:27 GMT
95
+ Content-Type:
96
+ - application/json; charset=utf-8
97
+ Transfer-Encoding:
98
+ - chunked
99
+ Connection:
100
+ - keep-alive
101
+ Vary:
102
+ - Accept-Encoding
103
+ Status:
104
+ - 200 OK
105
+ Etag:
106
+ - ! '"3d2718952a9ee7210f145f5a9a5ca9c1"'
107
+ Cache-Control:
108
+ - max-age=0, private, must-revalidate
109
+ X-Ua-Compatible:
110
+ - IE=Edge,chrome=1
111
+ Set-Cookie:
112
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZWU0ZTIyNWZjNTQ3ZDQ2NGU3YWJkODhiNTQ2NzdhOGZJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--c9eafb5fa369c813c1881c10a8897a15f3040e8b;
113
+ domain=.cartodb.com; path=/; HttpOnly
114
+ X-Runtime:
115
+ - '0.107407'
116
+ Content-Encoding:
117
+ - gzip
118
+ body:
119
+ encoding: ASCII-8BIT
120
+ string: ! '{"id":4701,"name":"renamed_cartodb_spec","privacy":"PUBLIC","tags":"","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","point"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]]}'
121
+ http_version: '1.1'
122
+ recorded_at: Wed, 23 May 2012 15:35:27 GMT
123
+ recorded_with: VCR 2.1.1
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/sql
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - !ruby/object:MIME::Type
12
+ content_type: application/json
13
+ raw_media_type: application
14
+ raw_sub_type: json
15
+ simplified: application/json
16
+ media_type: application
17
+ sub_type: json
18
+ extensions:
19
+ - json
20
+ encoding: 8bit
21
+ system: !!null
22
+ registered: true
23
+ url:
24
+ - IANA
25
+ - RFC4627
26
+ obsolete: !!null
27
+ docs: !!null
28
+ Authorization:
29
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="lde3tyZkHSr7VTS24wMT7EXUZabIqlFW15jtT3cQDvc",
30
+ oauth_signature="3hwbr6q4RsRhmU11M%2BES8UddkBY%3D", oauth_signature_method="HMAC-SHA1",
31
+ oauth_timestamp="1337787521", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
32
+ oauth_version="1.0"
33
+ response:
34
+ status:
35
+ code: 400
36
+ message: Bad Request
37
+ headers:
38
+ Server:
39
+ - nginx
40
+ Date:
41
+ - Wed, 23 May 2012 15:38:41 GMT
42
+ Content-Type:
43
+ - application/json; charset=utf-8
44
+ Connection:
45
+ - keep-alive
46
+ X-Powered-By:
47
+ - Express
48
+ Access-Control-Allow-Origin:
49
+ - ! '*'
50
+ Access-Control-Allow-Headers:
51
+ - X-Requested-With
52
+ Content-Length:
53
+ - '60'
54
+ body:
55
+ encoding: ASCII-8BIT
56
+ string: ! '{"error":["relation \"non_existing_table\" does not exist"]}'
57
+ http_version: '1.1'
58
+ recorded_at: Wed, 23 May 2012 15:38:41 GMT
59
+ recorded_with: VCR 2.1.1
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/non_existing_table?
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - !ruby/object:MIME::Type
12
+ content_type: application/json
13
+ raw_media_type: application
14
+ raw_sub_type: json
15
+ simplified: application/json
16
+ media_type: application
17
+ sub_type: json
18
+ extensions:
19
+ - json
20
+ encoding: 8bit
21
+ system: !!null
22
+ registered: true
23
+ url:
24
+ - IANA
25
+ - RFC4627
26
+ obsolete: !!null
27
+ docs: !!null
28
+ Authorization:
29
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="zIeWwMLecz9GWqrdxdbrBxKlDUvd1b1HoxqW1otUCvM",
30
+ oauth_signature="wXTM2lIC2mzt9J0UIkKWIQEOgC0%3D", oauth_signature_method="HMAC-SHA1",
31
+ oauth_timestamp="1337787512", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
32
+ oauth_version="1.0"
33
+ response:
34
+ status:
35
+ code: 404
36
+ message: Not Found
37
+ headers:
38
+ Server:
39
+ - nginx
40
+ Date:
41
+ - Wed, 23 May 2012 15:38:32 GMT
42
+ Content-Type:
43
+ - application/json; charset=utf-8
44
+ Transfer-Encoding:
45
+ - chunked
46
+ Connection:
47
+ - keep-alive
48
+ Vary:
49
+ - Accept-Encoding
50
+ Status:
51
+ - 404 Not Found
52
+ Cache-Control:
53
+ - no-cache
54
+ X-Ua-Compatible:
55
+ - IE=Edge,chrome=1
56
+ Set-Cookie:
57
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlOGUyYzdiYjgzYzAxMWE3YzdjODg3MTQ5MWM2MDUxMjZJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--48af64d79e2c5b7bd0de4d219c7731ac8bfea936;
58
+ domain=.cartodb.com; path=/; HttpOnly
59
+ X-Runtime:
60
+ - '0.006543'
61
+ Content-Encoding:
62
+ - gzip
63
+ body:
64
+ encoding: ASCII-8BIT
65
+ string: ! ' '
66
+ http_version: '1.1'
67
+ recorded_at: Wed, 23 May 2012 15:38:32 GMT
68
+ recorded_with: VCR 2.1.1
@@ -0,0 +1,176 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - &70293007705880 !ruby/object:MIME::Type
12
+ content_type: application/json
13
+ raw_media_type: application
14
+ raw_sub_type: json
15
+ simplified: application/json
16
+ media_type: application
17
+ sub_type: json
18
+ extensions:
19
+ - json
20
+ encoding: 8bit
21
+ system: !!null
22
+ registered: true
23
+ url:
24
+ - IANA
25
+ - RFC4627
26
+ obsolete: !!null
27
+ docs: !!null
28
+ Authorization:
29
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="c4Npsbw3nlY6vQjowSW2wf5UpPNj5YZoewx0t84k8",
30
+ oauth_signature="hAcXWyboLUWG5P9hH95tUnL5uhg%3D", oauth_signature_method="HMAC-SHA1",
31
+ oauth_timestamp="1337787400", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
32
+ oauth_version="1.0"
33
+ response:
34
+ status:
35
+ code: 200
36
+ message: OK
37
+ headers:
38
+ Server:
39
+ - nginx
40
+ Date:
41
+ - Wed, 23 May 2012 15:36:41 GMT
42
+ Content-Type:
43
+ - application/json; charset=utf-8
44
+ Transfer-Encoding:
45
+ - chunked
46
+ Connection:
47
+ - keep-alive
48
+ Vary:
49
+ - Accept-Encoding
50
+ Status:
51
+ - 200 OK
52
+ Location:
53
+ - /tables/4705
54
+ Etag:
55
+ - ! '"484e10f493e789f2bb71ca5f4715d54b"'
56
+ Cache-Control:
57
+ - max-age=0, private, must-revalidate
58
+ X-Ua-Compatible:
59
+ - IE=Edge,chrome=1
60
+ Set-Cookie:
61
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlOGIwOTY1ZDA2NjM4YTViMDU3N2U0ODFiZWNiOTVhMjlJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--423012319b27e5661aecd7e6f4b414c85d34b3ea;
62
+ domain=.cartodb.com; path=/; HttpOnly
63
+ X-Runtime:
64
+ - '0.738619'
65
+ Content-Encoding:
66
+ - gzip
67
+ body:
68
+ encoding: ASCII-8BIT
69
+ string: ! '{"id":4705,"name":"table_1","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","point"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]]}'
70
+ http_version: '1.1'
71
+ recorded_at: Wed, 23 May 2012 15:36:41 GMT
72
+ - request:
73
+ method: post
74
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables
75
+ body:
76
+ encoding: US-ASCII
77
+ string: ''
78
+ headers:
79
+ Accept:
80
+ - *70293007705880
81
+ Authorization:
82
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="M7pWLcY41yJN3MU8q76KDB4sCKYxOGZq0013zsDo",
83
+ oauth_signature="EmeyGOY%2F3vumNNYxpm07tzPkJ0Y%3D", oauth_signature_method="HMAC-SHA1",
84
+ oauth_timestamp="1337787401", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
85
+ oauth_version="1.0"
86
+ response:
87
+ status:
88
+ code: 200
89
+ message: OK
90
+ headers:
91
+ Server:
92
+ - nginx
93
+ Date:
94
+ - Wed, 23 May 2012 15:36:42 GMT
95
+ Content-Type:
96
+ - application/json; charset=utf-8
97
+ Transfer-Encoding:
98
+ - chunked
99
+ Connection:
100
+ - keep-alive
101
+ Vary:
102
+ - Accept-Encoding
103
+ Status:
104
+ - 200 OK
105
+ Location:
106
+ - /tables/4706
107
+ Etag:
108
+ - ! '"3ea839eba2bccd832d58bbd956337060"'
109
+ Cache-Control:
110
+ - max-age=0, private, must-revalidate
111
+ X-Ua-Compatible:
112
+ - IE=Edge,chrome=1
113
+ Set-Cookie:
114
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlMzk1MWNiMWE5YWRiY2YwODgwOTIwODQ1ZjgxZDU0MDdJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--cfa1107639f53f34379be8418fb47ca73c16fd06;
115
+ domain=.cartodb.com; path=/; HttpOnly
116
+ X-Runtime:
117
+ - '0.851403'
118
+ Content-Encoding:
119
+ - gzip
120
+ body:
121
+ encoding: ASCII-8BIT
122
+ string: ! '{"id":4706,"name":"table_2","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","point"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]]}'
123
+ http_version: '1.1'
124
+ recorded_at: Wed, 23 May 2012 15:36:43 GMT
125
+ - request:
126
+ method: get
127
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables?
128
+ body:
129
+ encoding: US-ASCII
130
+ string: ''
131
+ headers:
132
+ Accept:
133
+ - *70293007705880
134
+ Authorization:
135
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="IlOa1BIelxntGDrfrPTDKZaFXPOdAyAsnZvIbOWRE",
136
+ oauth_signature="DYq3BS9cZV05Eqm%2BJYtyNgtjmZA%3D", oauth_signature_method="HMAC-SHA1",
137
+ oauth_timestamp="1337787403", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
138
+ oauth_version="1.0"
139
+ response:
140
+ status:
141
+ code: 200
142
+ message: OK
143
+ headers:
144
+ Server:
145
+ - nginx
146
+ Date:
147
+ - Wed, 23 May 2012 15:36:43 GMT
148
+ Content-Type:
149
+ - application/json; charset=utf-8
150
+ Transfer-Encoding:
151
+ - chunked
152
+ Connection:
153
+ - keep-alive
154
+ Vary:
155
+ - Accept-Encoding
156
+ Status:
157
+ - 200 OK
158
+ Etag:
159
+ - ! '"be565112af156152cc59478751e1fc17"'
160
+ Cache-Control:
161
+ - max-age=0, private, must-revalidate
162
+ X-Ua-Compatible:
163
+ - IE=Edge,chrome=1
164
+ Set-Cookie:
165
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlNGYyNTRjNzRhMzhmYWJmYjVjMzA3ZmU4NjAwZjlhZjJJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--6a446509d4db6a43acb6a9c2049ddaae6a07bdf9;
166
+ domain=.cartodb.com; path=/; HttpOnly
167
+ X-Runtime:
168
+ - '0.010628'
169
+ Content-Encoding:
170
+ - gzip
171
+ body:
172
+ encoding: ASCII-8BIT
173
+ string: ! '{"total_entries":2,"tables":[{"id":4706,"name":"table_2","privacy":"PUBLIC","tags":"","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","point"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]],"updated_at":"2012-05-23T17:36:41+02:00","rows_counted":0},{"id":4705,"name":"table_1","privacy":"PUBLIC","tags":"","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","point"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]],"updated_at":"2012-05-23T17:36:41+02:00","rows_counted":0}]}'
174
+ http_version: '1.1'
175
+ recorded_at: Wed, 23 May 2012 15:36:43 GMT
176
+ recorded_with: VCR 2.1.1
@@ -0,0 +1,170 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - &70181796874040 !ruby/object:MIME::Type
12
+ content_type: application/json
13
+ raw_media_type: application
14
+ raw_sub_type: json
15
+ simplified: application/json
16
+ media_type: application
17
+ sub_type: json
18
+ extensions:
19
+ - json
20
+ encoding: 8bit
21
+ system: !!null
22
+ registered: true
23
+ url:
24
+ - IANA
25
+ - RFC4627
26
+ obsolete: !!null
27
+ docs: !!null
28
+ Authorization:
29
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="KahvE2Lr0RCQG6jZfR1hiv6FQvQY13B1nfF8yok0t0",
30
+ oauth_signature="w%2BpoGu%2F4QAl%2BNxPLORd5oDqC7L4%3D", oauth_signature_method="HMAC-SHA1",
31
+ oauth_timestamp="1337857592", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
32
+ oauth_version="1.0"
33
+ response:
34
+ status:
35
+ code: 200
36
+ message: OK
37
+ headers:
38
+ Server:
39
+ - nginx
40
+ Date:
41
+ - Thu, 24 May 2012 11:06:34 GMT
42
+ Content-Type:
43
+ - application/json; charset=utf-8
44
+ Transfer-Encoding:
45
+ - chunked
46
+ Connection:
47
+ - keep-alive
48
+ Vary:
49
+ - Accept-Encoding
50
+ Status:
51
+ - 200 OK
52
+ Location:
53
+ - /tables/4754
54
+ Etag:
55
+ - ! '"abe671cab1ca16a2b689198b93e9a5bc"'
56
+ Cache-Control:
57
+ - max-age=0, private, must-revalidate
58
+ X-Ua-Compatible:
59
+ - IE=Edge,chrome=1
60
+ Set-Cookie:
61
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlNzE1NjExYjQ1OTNkNzY0MDA0YTVhMWM0MThjNGMxOTVJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--640d22f47e1498e12d1ab662127dade287406ca9;
62
+ domain=.cartodb.com; path=/; HttpOnly
63
+ X-Runtime:
64
+ - '1.571017'
65
+ Content-Encoding:
66
+ - gzip
67
+ body:
68
+ encoding: ASCII-8BIT
69
+ string: ! '{"id":4754,"name":"table_1","schema":[["cartodb_id","number"],["field1","string"],["field2","number"],["field3","date"],["field4","boolean"],["updated_at","date"],["created_at","date"]]}'
70
+ http_version: '1.1'
71
+ recorded_at: Thu, 24 May 2012 11:06:34 GMT
72
+ - request:
73
+ method: post
74
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/sql
75
+ body:
76
+ encoding: US-ASCII
77
+ string: ''
78
+ headers:
79
+ Accept:
80
+ - *70181796874040
81
+ Authorization:
82
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="conoteWaQakcCFPfYrpqHT4Sh4dUvBhZzAcvXTNdvQ",
83
+ oauth_signature="qwCoEFVTN3zstij0F%2BXsq6xuqhg%3D", oauth_signature_method="HMAC-SHA1",
84
+ oauth_timestamp="1337857594", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
85
+ oauth_version="1.0"
86
+ response:
87
+ status:
88
+ code: 200
89
+ message: OK
90
+ headers:
91
+ Server:
92
+ - nginx
93
+ Date:
94
+ - Thu, 24 May 2012 11:06:34 GMT
95
+ Content-Type:
96
+ - application/json; charset=utf-8
97
+ Connection:
98
+ - keep-alive
99
+ X-Powered-By:
100
+ - Express
101
+ Content-Disposition:
102
+ - inline; filename=cartodb-query.json; modification-date="Thu, 24 May 2012 11:06:34
103
+ GMT";
104
+ Access-Control-Allow-Origin:
105
+ - ! '*'
106
+ Access-Control-Allow-Headers:
107
+ - X-Requested-With
108
+ Last-Modified:
109
+ - Thu, 24 May 2012 11:06:34 GMT
110
+ Cache-Control:
111
+ - no-cache,max-age=3600,must-revalidate, public
112
+ X-Cache-Channel:
113
+ - cartodb_user_384_db:table_1
114
+ Content-Length:
115
+ - '211'
116
+ body:
117
+ encoding: ASCII-8BIT
118
+ string: ! '{"time":0.077,"total_rows":1,"rows":[{"id":1,"updated_at":"2012-05-24T13:06:34.729Z","created_at":"2012-05-24T13:06:34.729Z","cartodb_id":1,"field1":"lorem","field2":100.99,"field3":"2004-01-01","field4":true}]}'
119
+ http_version: '1.1'
120
+ recorded_at: Thu, 24 May 2012 11:06:34 GMT
121
+ - request:
122
+ method: post
123
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/sql
124
+ body:
125
+ encoding: US-ASCII
126
+ string: ''
127
+ headers:
128
+ Accept:
129
+ - *70181796874040
130
+ Authorization:
131
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="rTFbbBsgh4gyRlKkMnhXfb5lgVc13y19BLwkwgps",
132
+ oauth_signature="Vq%2FSZ8BqDdawDh%2BcyTGa02uvpsg%3D", oauth_signature_method="HMAC-SHA1",
133
+ oauth_timestamp="1337857594", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
134
+ oauth_version="1.0"
135
+ response:
136
+ status:
137
+ code: 200
138
+ message: OK
139
+ headers:
140
+ Server:
141
+ - nginx
142
+ Date:
143
+ - Thu, 24 May 2012 11:06:35 GMT
144
+ Content-Type:
145
+ - application/json; charset=utf-8
146
+ Connection:
147
+ - keep-alive
148
+ X-Powered-By:
149
+ - Express
150
+ Content-Disposition:
151
+ - inline; filename=cartodb-query.json; modification-date="Thu, 24 May 2012 11:06:35
152
+ GMT";
153
+ Access-Control-Allow-Origin:
154
+ - ! '*'
155
+ Access-Control-Allow-Headers:
156
+ - X-Requested-With
157
+ Last-Modified:
158
+ - Thu, 24 May 2012 11:06:35 GMT
159
+ Cache-Control:
160
+ - no-cache,max-age=3600,must-revalidate, public
161
+ X-Cache-Channel:
162
+ - cartodb_user_384_db:table_1,table_1
163
+ Content-Length:
164
+ - '212'
165
+ body:
166
+ encoding: ASCII-8BIT
167
+ string: ! '{"time":0.442,"total_rows":1,"rows":[{"id":1,"updated_at":"2012-05-24T13:06:34.882Z","created_at":"2012-05-24T13:06:34.729Z","cartodb_id":1,"field1":"illum","field2":-83.24,"field3":"2004-01-02","field4":false}]}'
168
+ http_version: '1.1'
169
+ recorded_at: Thu, 24 May 2012 11:06:35 GMT
170
+ recorded_with: VCR 2.1.1