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,270 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables?
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - &70259176453560 !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="X41NCYnDHsd9yXqGt2NyULQe20eamfTLrBUQ3WKiJo0",
30
+ oauth_signature="GLe%2BZAxgeUBQyesWrIri2Cmi7OI%3D", oauth_signature_method="HMAC-SHA1",
31
+ oauth_timestamp="1337784779", 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 14:52:59 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
+ Etag:
53
+ - ! '"fdd19a5a31979a223f78ac78732f1c98"'
54
+ Cache-Control:
55
+ - max-age=0, private, must-revalidate
56
+ X-Ua-Compatible:
57
+ - IE=Edge,chrome=1
58
+ Set-Cookie:
59
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZGU5ZWI5NjhjMDJiNmU2MmY0MDdmNTA0NTRjYmE2NTdJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--c566fe9bb6f533215745098b9bfa8c3cf5fe1288;
60
+ domain=.cartodb.com; path=/; HttpOnly
61
+ X-Runtime:
62
+ - '0.012861'
63
+ Content-Encoding:
64
+ - gzip
65
+ body:
66
+ encoding: ASCII-8BIT
67
+ string: ! '{"total_entries":1,"tables":[{"id":4655,"name":"moto_gp_circuit","privacy":"PUBLIC","tags":"","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","point"],["constructed","date"],["description","string"],["left_corners","number"],["length","string"],["longest_straight","string"],["modified","date"],["name","string"],["right_corners","number"],["width","string"],["created_at","date"],["updated_at","date"]],"updated_at":"2012-05-23T16:52:56+02:00","rows_counted":0}]}'
68
+ http_version: '1.1'
69
+ recorded_at: Wed, 23 May 2012 14:52:59 GMT
70
+ - request:
71
+ method: delete
72
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/moto_gp_circuit?
73
+ body:
74
+ encoding: US-ASCII
75
+ string: ''
76
+ headers:
77
+ Accept:
78
+ - *70259176453560
79
+ Authorization:
80
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="zUDKxmV5zXHTDAdfw6FP3qrP0NYPjyJ72nJZPKUro",
81
+ oauth_signature="c%2BMCEh%2BTYZQUi2Wl4%2F41MBMLk1s%3D", oauth_signature_method="HMAC-SHA1",
82
+ oauth_timestamp="1337784779", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
83
+ oauth_version="1.0"
84
+ response:
85
+ status:
86
+ code: 200
87
+ message: OK
88
+ headers:
89
+ Server:
90
+ - nginx
91
+ Date:
92
+ - Wed, 23 May 2012 14:52:59 GMT
93
+ Content-Type:
94
+ - application/json; charset=utf-8
95
+ Transfer-Encoding:
96
+ - chunked
97
+ Connection:
98
+ - keep-alive
99
+ Vary:
100
+ - Accept-Encoding
101
+ Status:
102
+ - 200 OK
103
+ Cache-Control:
104
+ - no-cache
105
+ X-Ua-Compatible:
106
+ - IE=Edge,chrome=1
107
+ Set-Cookie:
108
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlY2UyZWU4Nzc3OWMzM2NhODg3Yjg2MDFkMTBmOWY5N2JJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--2a9bd6425444f0f25ef28ed5e70aed7b5b8eb8f5;
109
+ domain=.cartodb.com; path=/; HttpOnly
110
+ X-Runtime:
111
+ - '0.168016'
112
+ Content-Encoding:
113
+ - gzip
114
+ body:
115
+ encoding: ASCII-8BIT
116
+ string: ! ' '
117
+ http_version: '1.1'
118
+ recorded_at: Wed, 23 May 2012 14:52:59 GMT
119
+ - request:
120
+ method: get
121
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/my_table_with_custom_name?
122
+ body:
123
+ encoding: US-ASCII
124
+ string: ''
125
+ headers:
126
+ Accept:
127
+ - *70259176453560
128
+ Authorization:
129
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="fWZMTzov8z0BCvLZmCMqTAWHdPwXJYft4vf6WWvak",
130
+ oauth_signature="VJc46o87hTNW%2FCdHSBBEXzxXvbA%3D", oauth_signature_method="HMAC-SHA1",
131
+ oauth_timestamp="1337784779", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
132
+ oauth_version="1.0"
133
+ response:
134
+ status:
135
+ code: 404
136
+ message: Not Found
137
+ headers:
138
+ Server:
139
+ - nginx
140
+ Date:
141
+ - Wed, 23 May 2012 14:52:59 GMT
142
+ Content-Type:
143
+ - application/json; charset=utf-8
144
+ Transfer-Encoding:
145
+ - chunked
146
+ Connection:
147
+ - keep-alive
148
+ Vary:
149
+ - Accept-Encoding
150
+ Status:
151
+ - 404 Not Found
152
+ Cache-Control:
153
+ - no-cache
154
+ X-Ua-Compatible:
155
+ - IE=Edge,chrome=1
156
+ Set-Cookie:
157
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZmMwN2U3YTJhNzNhODM3MjU1Yzk1ZmEwMjZkNDY1N2RJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--1326c65d6b2a66db9f375bff8926187ae3816e9b;
158
+ domain=.cartodb.com; path=/; HttpOnly
159
+ X-Runtime:
160
+ - '0.008482'
161
+ Content-Encoding:
162
+ - gzip
163
+ body:
164
+ encoding: ASCII-8BIT
165
+ string: ! ' '
166
+ http_version: '1.1'
167
+ recorded_at: Wed, 23 May 2012 14:52:59 GMT
168
+ - request:
169
+ method: get
170
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/my_table_with_custom_name?
171
+ body:
172
+ encoding: US-ASCII
173
+ string: ''
174
+ headers:
175
+ Accept:
176
+ - *70259176453560
177
+ Authorization:
178
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="5zNHWGqGNyKPpPmzouOahBAMxvlIWM1AnHnAysQjQI",
179
+ oauth_signature="7JsBEGNWS9Ys04meKaD%2Fxwy2%2FTU%3D", oauth_signature_method="HMAC-SHA1",
180
+ oauth_timestamp="1337784779", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
181
+ oauth_version="1.0"
182
+ response:
183
+ status:
184
+ code: 404
185
+ message: Not Found
186
+ headers:
187
+ Server:
188
+ - nginx
189
+ Date:
190
+ - Wed, 23 May 2012 14:52:59 GMT
191
+ Content-Type:
192
+ - application/json; charset=utf-8
193
+ Transfer-Encoding:
194
+ - chunked
195
+ Connection:
196
+ - keep-alive
197
+ Vary:
198
+ - Accept-Encoding
199
+ Status:
200
+ - 404 Not Found
201
+ Cache-Control:
202
+ - no-cache
203
+ X-Ua-Compatible:
204
+ - IE=Edge,chrome=1
205
+ Set-Cookie:
206
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZTU0MDg2MjQwNDg3MDE1ZWNlNWJiMDc2ODhiNTUwM2VJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--e01c96764a9433ce3c1bf08beae3b8f3bf54bd53;
207
+ domain=.cartodb.com; path=/; HttpOnly
208
+ X-Runtime:
209
+ - '0.009070'
210
+ Content-Encoding:
211
+ - gzip
212
+ body:
213
+ encoding: ASCII-8BIT
214
+ string: ! ' '
215
+ http_version: '1.1'
216
+ recorded_at: Wed, 23 May 2012 14:52:59 GMT
217
+ - request:
218
+ method: post
219
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables
220
+ body:
221
+ encoding: US-ASCII
222
+ string: ''
223
+ headers:
224
+ Accept:
225
+ - *70259176453560
226
+ Authorization:
227
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="S6R9uCQqVvTFqCobnBh7PRj9SmkUMjzbVU3IuH4E4",
228
+ oauth_signature="Ljkxg2rdjTn15i98gnseHHerbeM%3D", oauth_signature_method="HMAC-SHA1",
229
+ oauth_timestamp="1337784779", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
230
+ oauth_version="1.0"
231
+ response:
232
+ status:
233
+ code: 200
234
+ message: OK
235
+ headers:
236
+ Server:
237
+ - nginx
238
+ Date:
239
+ - Wed, 23 May 2012 14:53:00 GMT
240
+ Content-Type:
241
+ - application/json; charset=utf-8
242
+ Transfer-Encoding:
243
+ - chunked
244
+ Connection:
245
+ - keep-alive
246
+ Vary:
247
+ - Accept-Encoding
248
+ Status:
249
+ - 200 OK
250
+ Location:
251
+ - /tables/4656
252
+ Etag:
253
+ - ! '"7f7c8e9ba8c9839d479d60cdb43d72b5"'
254
+ Cache-Control:
255
+ - max-age=0, private, must-revalidate
256
+ X-Ua-Compatible:
257
+ - IE=Edge,chrome=1
258
+ Set-Cookie:
259
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlNTQ2MWJiMjQ1YTk2NDk0Mzk0YTBlMWI2ZDEyMGE3ZTFJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--d7b756f18806d1b67df09574fa864ad54cfc1885;
260
+ domain=.cartodb.com; path=/; HttpOnly
261
+ X-Runtime:
262
+ - '0.869752'
263
+ Content-Encoding:
264
+ - gzip
265
+ body:
266
+ encoding: ASCII-8BIT
267
+ string: ! '{"id":4656,"name":"my_table_with_custom_name","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","point"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]]}'
268
+ http_version: '1.1'
269
+ recorded_at: Wed, 23 May 2012 14:53:00 GMT
270
+ recorded_with: VCR 2.1.1
@@ -0,0 +1,421 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables?
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - &70259176453560 !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="UkaEuMpjGFtoHR3FCZUzvelTbWQxuUktcytX9SPkcA",
30
+ oauth_signature="%2BG9AwPf6JYRJT1fynQPi4I74QHI%3D", oauth_signature_method="HMAC-SHA1",
31
+ oauth_timestamp="1337784796", 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 14:53:16 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
+ Etag:
53
+ - ! '"d322b3619a394afca012df9270c7999d"'
54
+ Cache-Control:
55
+ - max-age=0, private, must-revalidate
56
+ X-Ua-Compatible:
57
+ - IE=Edge,chrome=1
58
+ Set-Cookie:
59
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZTUzMzkwMTkxMzgzNTY0YzU5YzE4MjYwOTdjMzJjYzFJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--e2ca0b9de435ef0e6c23891c8fc5bd9b0d90c8e0;
60
+ domain=.cartodb.com; path=/; HttpOnly
61
+ X-Runtime:
62
+ - '0.089100'
63
+ Content-Encoding:
64
+ - gzip
65
+ body:
66
+ encoding: ASCII-8BIT
67
+ string: ! '{"total_entries":2,"tables":[{"id":4660,"name":"standard_model","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-23T16:53:15+02:00","rows_counted":0},{"id":4659,"name":"moto_gp_circuit","privacy":"PUBLIC","tags":"","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","point"],["constructed","date"],["description","string"],["left_corners","number"],["length","string"],["longest_straight","string"],["modified","date"],["name","string"],["right_corners","number"],["width","string"],["created_at","date"],["updated_at","date"]],"updated_at":"2012-05-23T16:53:13+02:00","rows_counted":0}]}'
68
+ http_version: '1.1'
69
+ recorded_at: Wed, 23 May 2012 14:53:16 GMT
70
+ - request:
71
+ method: delete
72
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/standard_model?
73
+ body:
74
+ encoding: US-ASCII
75
+ string: ''
76
+ headers:
77
+ Accept:
78
+ - *70259176453560
79
+ Authorization:
80
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="k6tubRoLXd7iGCzGOathSd5LI0UybPZ9AkqeX7Y",
81
+ oauth_signature="12xp%2FLd2hvdaFfD7UGzGwfUUmDk%3D", oauth_signature_method="HMAC-SHA1",
82
+ oauth_timestamp="1337784796", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
83
+ oauth_version="1.0"
84
+ response:
85
+ status:
86
+ code: 200
87
+ message: OK
88
+ headers:
89
+ Server:
90
+ - nginx
91
+ Date:
92
+ - Wed, 23 May 2012 14:53:16 GMT
93
+ Content-Type:
94
+ - application/json; charset=utf-8
95
+ Transfer-Encoding:
96
+ - chunked
97
+ Connection:
98
+ - keep-alive
99
+ Vary:
100
+ - Accept-Encoding
101
+ Status:
102
+ - 200 OK
103
+ Cache-Control:
104
+ - no-cache
105
+ X-Ua-Compatible:
106
+ - IE=Edge,chrome=1
107
+ Set-Cookie:
108
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlNTVhMGI2M2UxMzFlNDcwMDAwZDRmOTRkYjdhYTJjMmNJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--8962e6193712e957f65ec6b0653e6a9ce49ac919;
109
+ domain=.cartodb.com; path=/; HttpOnly
110
+ X-Runtime:
111
+ - '0.172541'
112
+ Content-Encoding:
113
+ - gzip
114
+ body:
115
+ encoding: ASCII-8BIT
116
+ string: ! ' '
117
+ http_version: '1.1'
118
+ recorded_at: Wed, 23 May 2012 14:53:16 GMT
119
+ - request:
120
+ method: delete
121
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/moto_gp_circuit?
122
+ body:
123
+ encoding: US-ASCII
124
+ string: ''
125
+ headers:
126
+ Accept:
127
+ - *70259176453560
128
+ Authorization:
129
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="4qRaTAIpLsessAS0KTWHZz6riMftQ8DJDOxpnsVMtI",
130
+ oauth_signature="aiGp5u3zxNV3Qdyl7YGh8GdGTAI%3D", oauth_signature_method="HMAC-SHA1",
131
+ oauth_timestamp="1337784796", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
132
+ oauth_version="1.0"
133
+ response:
134
+ status:
135
+ code: 200
136
+ message: OK
137
+ headers:
138
+ Server:
139
+ - nginx
140
+ Date:
141
+ - Wed, 23 May 2012 14:53:16 GMT
142
+ Content-Type:
143
+ - application/json; charset=utf-8
144
+ Transfer-Encoding:
145
+ - chunked
146
+ Connection:
147
+ - keep-alive
148
+ Vary:
149
+ - Accept-Encoding
150
+ Status:
151
+ - 200 OK
152
+ Cache-Control:
153
+ - no-cache
154
+ X-Ua-Compatible:
155
+ - IE=Edge,chrome=1
156
+ Set-Cookie:
157
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlMmJkOWNiMzE3NGIwYzMwN2VlYzFlM2Q3MjQ1NjM4MmNJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--31779c97f6b414cd1c9f4ae1b44a42f5c5abfe5a;
158
+ domain=.cartodb.com; path=/; HttpOnly
159
+ X-Runtime:
160
+ - '0.243563'
161
+ Content-Encoding:
162
+ - gzip
163
+ body:
164
+ encoding: ASCII-8BIT
165
+ string: ! ' '
166
+ http_version: '1.1'
167
+ recorded_at: Wed, 23 May 2012 14:53:16 GMT
168
+ - request:
169
+ method: get
170
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/custom_data_type_column_model?
171
+ body:
172
+ encoding: US-ASCII
173
+ string: ''
174
+ headers:
175
+ Accept:
176
+ - *70259176453560
177
+ Authorization:
178
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="QcVOcnwPao0cupPodKJDXu8AcjJNpBIARFo2s2bQUc",
179
+ oauth_signature="esORFYMEYdyB0%2Fv5p8yEg2UQyFc%3D", oauth_signature_method="HMAC-SHA1",
180
+ oauth_timestamp="1337784796", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
181
+ oauth_version="1.0"
182
+ response:
183
+ status:
184
+ code: 404
185
+ message: Not Found
186
+ headers:
187
+ Server:
188
+ - nginx
189
+ Date:
190
+ - Wed, 23 May 2012 14:53:17 GMT
191
+ Content-Type:
192
+ - application/json; charset=utf-8
193
+ Transfer-Encoding:
194
+ - chunked
195
+ Connection:
196
+ - keep-alive
197
+ Vary:
198
+ - Accept-Encoding
199
+ Status:
200
+ - 404 Not Found
201
+ Cache-Control:
202
+ - no-cache
203
+ X-Ua-Compatible:
204
+ - IE=Edge,chrome=1
205
+ Set-Cookie:
206
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlOTdiZDdlMzFkYWEwZjkzYTM0NTBiMGJjZWNhYjA4ZDFJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--9baa4d2d726c7b7cbfef77d9d6e68c5cc53b024e;
207
+ domain=.cartodb.com; path=/; HttpOnly
208
+ X-Runtime:
209
+ - '0.009516'
210
+ Content-Encoding:
211
+ - gzip
212
+ body:
213
+ encoding: ASCII-8BIT
214
+ string: ! ' '
215
+ http_version: '1.1'
216
+ recorded_at: Wed, 23 May 2012 14:53:17 GMT
217
+ - request:
218
+ method: get
219
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/custom_data_type_column_model?
220
+ body:
221
+ encoding: US-ASCII
222
+ string: ''
223
+ headers:
224
+ Accept:
225
+ - *70259176453560
226
+ Authorization:
227
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="66cbT19EDJymtikovypGCbqg3bcCbJoVRg8NPdOU8g",
228
+ oauth_signature="9amIBAst03vMzUdpsIszPcZ2HdQ%3D", oauth_signature_method="HMAC-SHA1",
229
+ oauth_timestamp="1337784797", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
230
+ oauth_version="1.0"
231
+ response:
232
+ status:
233
+ code: 404
234
+ message: Not Found
235
+ headers:
236
+ Server:
237
+ - nginx
238
+ Date:
239
+ - Wed, 23 May 2012 14:53:17 GMT
240
+ Content-Type:
241
+ - application/json; charset=utf-8
242
+ Transfer-Encoding:
243
+ - chunked
244
+ Connection:
245
+ - keep-alive
246
+ Vary:
247
+ - Accept-Encoding
248
+ Status:
249
+ - 404 Not Found
250
+ Cache-Control:
251
+ - no-cache
252
+ X-Ua-Compatible:
253
+ - IE=Edge,chrome=1
254
+ Set-Cookie:
255
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlMWQzNjkyYzAzMWI3ZTQ3NGFiMDZjNjVmMzdhMTU2NGVJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--7a848a23e4ba030d29c2881ca1d45b3f03aab6d4;
256
+ domain=.cartodb.com; path=/; HttpOnly
257
+ X-Runtime:
258
+ - '0.008908'
259
+ Content-Encoding:
260
+ - gzip
261
+ body:
262
+ encoding: ASCII-8BIT
263
+ string: ! ' '
264
+ http_version: '1.1'
265
+ recorded_at: Wed, 23 May 2012 14:53:17 GMT
266
+ - request:
267
+ method: post
268
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables
269
+ body:
270
+ encoding: US-ASCII
271
+ string: ''
272
+ headers:
273
+ Accept:
274
+ - *70259176453560
275
+ Authorization:
276
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="dQGkZ6YdkyxfswFGpWq6qq34HSmEO394Al7RFZdYv4",
277
+ oauth_signature="DXxZgcHBR24HHiR3QtFEA9oUI40%3D", oauth_signature_method="HMAC-SHA1",
278
+ oauth_timestamp="1337784797", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
279
+ oauth_version="1.0"
280
+ response:
281
+ status:
282
+ code: 200
283
+ message: OK
284
+ headers:
285
+ Server:
286
+ - nginx
287
+ Date:
288
+ - Wed, 23 May 2012 14:53:17 GMT
289
+ Content-Type:
290
+ - application/json; charset=utf-8
291
+ Transfer-Encoding:
292
+ - chunked
293
+ Connection:
294
+ - keep-alive
295
+ Vary:
296
+ - Accept-Encoding
297
+ Status:
298
+ - 200 OK
299
+ Location:
300
+ - /tables/4661
301
+ Etag:
302
+ - ! '"edacd442c5a62cd2b8da6f668b29439e"'
303
+ Cache-Control:
304
+ - max-age=0, private, must-revalidate
305
+ X-Ua-Compatible:
306
+ - IE=Edge,chrome=1
307
+ Set-Cookie:
308
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlMGQwYWIyOWYyOWNjYjI4ZDJiYjUzMGYzYjc2ZDg3OGVJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--1fe25a3b0937034a190f7a1f1d0aaa4cef377f19;
309
+ domain=.cartodb.com; path=/; HttpOnly
310
+ X-Runtime:
311
+ - '0.790944'
312
+ Content-Encoding:
313
+ - gzip
314
+ body:
315
+ encoding: ASCII-8BIT
316
+ string: ! '{"id":4661,"name":"custom_data_type_column_model","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","point"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]]}'
317
+ http_version: '1.1'
318
+ recorded_at: Wed, 23 May 2012 14:53:18 GMT
319
+ - request:
320
+ method: post
321
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/custom_data_type_column_model/columns
322
+ body:
323
+ encoding: US-ASCII
324
+ string: ''
325
+ headers:
326
+ Accept:
327
+ - *70259176453560
328
+ Authorization:
329
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="nZDNEqmb8XMqg68SDIaVNm7HzqhJqokKcGn5z4DOF8",
330
+ oauth_signature="MLzcQ6gYpKKSoAwOR6cDdGIrMwA%3D", oauth_signature_method="HMAC-SHA1",
331
+ oauth_timestamp="1337784798", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
332
+ oauth_version="1.0"
333
+ response:
334
+ status:
335
+ code: 200
336
+ message: OK
337
+ headers:
338
+ Server:
339
+ - nginx
340
+ Date:
341
+ - Wed, 23 May 2012 14:53:18 GMT
342
+ Content-Type:
343
+ - application/json; charset=utf-8
344
+ Transfer-Encoding:
345
+ - chunked
346
+ Connection:
347
+ - keep-alive
348
+ Vary:
349
+ - Accept-Encoding
350
+ Status:
351
+ - 200 OK
352
+ Etag:
353
+ - ! '"97bad60fe46d77e880d0a9e6ad8f4e1e"'
354
+ Cache-Control:
355
+ - max-age=0, private, must-revalidate
356
+ X-Ua-Compatible:
357
+ - IE=Edge,chrome=1
358
+ Set-Cookie:
359
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZjk2OWVhYTE1NzYxNDZmMzhlZjAwODk1NzhmYzFjZjJJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--6d6221680ccb7d7732b0ff9d0c57d3fe9b6ca135;
360
+ domain=.cartodb.com; path=/; HttpOnly
361
+ X-Runtime:
362
+ - '0.075035'
363
+ Content-Encoding:
364
+ - gzip
365
+ body:
366
+ encoding: ASCII-8BIT
367
+ string: ! '{"name":"test","type":"integer","cartodb_type":"number"}'
368
+ http_version: '1.1'
369
+ recorded_at: Wed, 23 May 2012 14:53:18 GMT
370
+ - request:
371
+ method: get
372
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/custom_data_type_column_model?
373
+ body:
374
+ encoding: US-ASCII
375
+ string: ''
376
+ headers:
377
+ Accept:
378
+ - *70259176453560
379
+ Authorization:
380
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="LQzkn4EragXRrYzqCXJt7C9rIUxWH4G6XLEcxC0sTTU",
381
+ oauth_signature="qLsk2ebtrZxE%2FEUH7ob9AQQNlPA%3D", oauth_signature_method="HMAC-SHA1",
382
+ oauth_timestamp="1337784798", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
383
+ oauth_version="1.0"
384
+ response:
385
+ status:
386
+ code: 200
387
+ message: OK
388
+ headers:
389
+ Server:
390
+ - nginx
391
+ Date:
392
+ - Wed, 23 May 2012 14:53:18 GMT
393
+ Content-Type:
394
+ - application/json; charset=utf-8
395
+ Transfer-Encoding:
396
+ - chunked
397
+ Connection:
398
+ - keep-alive
399
+ Vary:
400
+ - Accept-Encoding
401
+ Status:
402
+ - 200 OK
403
+ Etag:
404
+ - ! '"be3c5b37bcc686da272c7356efccce48"'
405
+ Cache-Control:
406
+ - max-age=0, private, must-revalidate
407
+ X-Ua-Compatible:
408
+ - IE=Edge,chrome=1
409
+ Set-Cookie:
410
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZTA2NDA5N2FkZWJhMTZhYTE3ODUzNDMxZGRiYjA1OWRJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--db28525348c9149cd391ae1bab5744f5159b30f9;
411
+ domain=.cartodb.com; path=/; HttpOnly
412
+ X-Runtime:
413
+ - '0.015611'
414
+ Content-Encoding:
415
+ - gzip
416
+ body:
417
+ encoding: ASCII-8BIT
418
+ string: ! '{"id":4661,"name":"custom_data_type_column_model","privacy":"PUBLIC","tags":"","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","point"],["description","string"],["name","string"],["test","number"],["created_at","date"],["updated_at","date"]]}'
419
+ http_version: '1.1'
420
+ recorded_at: Wed, 23 May 2012 14:53:18 GMT
421
+ recorded_with: VCR 2.1.1