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
+ - &70365153930000 !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="1Vr9n17yZmEAHlfydxl86rclPc4aBvL7lzAWVO7TW4s",
30
+ oauth_signature="uapGN8Qyxh6ahE%2BDo4JrtAWolC0%3D", oauth_signature_method="HMAC-SHA1",
31
+ oauth_timestamp="1337787340", 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:42 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/4702
54
+ Etag:
55
+ - ! '"38eb3dcaaa9cfda9dfd4728d899d686f"'
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZjVkZmIzYjIyMWY5YTAyY2NkMjY1ZDc3NDAzMTVhNDRJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--72c489ccaed7bf37fa55911e1cf1ffe944bf63a5;
62
+ domain=.cartodb.com; path=/; HttpOnly
63
+ X-Runtime:
64
+ - '1.735285'
65
+ Content-Encoding:
66
+ - gzip
67
+ body:
68
+ encoding: ASCII-8BIT
69
+ string: ! '{"id":4702,"name":"cartodb_spec","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","multilinestring"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]]}'
70
+ http_version: '1.1'
71
+ recorded_at: Wed, 23 May 2012 15:35:42 GMT
72
+ - request:
73
+ method: get
74
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/cartodb_spec?
75
+ body:
76
+ encoding: US-ASCII
77
+ string: ''
78
+ headers:
79
+ Accept:
80
+ - *70365153930000
81
+ Authorization:
82
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="nsD6Qt1i1ik9e4faMePx0yIbsH0a04jKFqfQvUYM",
83
+ oauth_signature="DKIAElDIlVX%2F8OdS7%2BuoD0cyxPU%3D", oauth_signature_method="HMAC-SHA1",
84
+ oauth_timestamp="1337787342", 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:35: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
+ Etag:
106
+ - ! '"67eb4159eb9d29292b5632c19da6f158"'
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlNDc5NTk2MGM4ZTFlNmFmNmIzOWE4ZDFlNTBlY2JlZGZJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--8f43716ce4e6104d83b058e27b73131b02b5279a;
113
+ domain=.cartodb.com; path=/; HttpOnly
114
+ X-Runtime:
115
+ - '0.015756'
116
+ Content-Encoding:
117
+ - gzip
118
+ body:
119
+ encoding: ASCII-8BIT
120
+ string: ! '{"id":4702,"name":"cartodb_spec","privacy":"PUBLIC","tags":"","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","multilinestring"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]]}'
121
+ http_version: '1.1'
122
+ recorded_at: Wed, 23 May 2012 15:35:42 GMT
123
+ recorded_with: VCR 2.1.1
@@ -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
+ - &70152804706820 !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="5iEmPwEBHOYl69qJrCHJJ76BnhBeTyuTEaHldCGE6w",
30
+ oauth_signature="ClrOKVweYaAemymedHj6pyJwpGc%3D", oauth_signature_method="HMAC-SHA1",
31
+ oauth_timestamp="1337787315", 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:15 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/4700
54
+ Etag:
55
+ - ! '"3a866ca28deab9278a58105f67858926"'
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlOWY4Yjk4NDcxZmFmODVhYmZiOGEzYTI1ZmI4ZThiOTNJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--10c8d518133d83b244d18a5dfa9309a18fdc2b1f;
62
+ domain=.cartodb.com; path=/; HttpOnly
63
+ X-Runtime:
64
+ - '0.590895'
65
+ Content-Encoding:
66
+ - gzip
67
+ body:
68
+ encoding: ASCII-8BIT
69
+ string: ! '{"id":4700,"name":"cartodb_spec","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","multipolygon"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]]}'
70
+ http_version: '1.1'
71
+ recorded_at: Wed, 23 May 2012 15:35:15 GMT
72
+ - request:
73
+ method: get
74
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/cartodb_spec?
75
+ body:
76
+ encoding: US-ASCII
77
+ string: ''
78
+ headers:
79
+ Accept:
80
+ - *70152804706820
81
+ Authorization:
82
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="U8NikRsh4oEuOoqnjH3lDm2tzNfG9WwGmPbswKLyxM",
83
+ oauth_signature="c5V85fXiua%2Bkgw%2FLDSF26zrw0C4%3D", oauth_signature_method="HMAC-SHA1",
84
+ oauth_timestamp="1337787315", 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:35:16 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
+ - ! '"71c4b45d2fe35dc1b34f8a69eafcb091"'
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlODA1MDQxMGU3Yjc0YjU0ZTJjN2ZkMDE1ODE4OWFjMmVJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--c714a74ed8ff0e968a5d88295f94c7681493938a;
113
+ domain=.cartodb.com; path=/; HttpOnly
114
+ X-Runtime:
115
+ - '0.017730'
116
+ Content-Encoding:
117
+ - gzip
118
+ body:
119
+ encoding: ASCII-8BIT
120
+ string: ! '{"id":4700,"name":"cartodb_spec","privacy":"PUBLIC","tags":"","schema":[["cartodb_id","number"],["the_geom","geometry","geometry","multipolygon"],["description","string"],["name","string"],["created_at","date"],["updated_at","date"]]}'
121
+ http_version: '1.1'
122
+ recorded_at: Wed, 23 May 2012 15:35:16 GMT
123
+ recorded_with: VCR 2.1.1
@@ -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
+ - &70229988289520 !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="LpaEzyl8I0Cr1zJ7JM6Y6Wxmhbg0G53Y5IU3uBRyg",
30
+ oauth_signature="wWmXE0i8uY7k%2FH8PgjPfujlcw98%3D", oauth_signature_method="HMAC-SHA1",
31
+ oauth_timestamp="1337787294", 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:34:55 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/4699
54
+ Etag:
55
+ - ! '"3621998f8977c6b9e05d32a7e828f127"'
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlMTY0YThiZjk0M2RmYTZlZDBlZTY1YWQ2ZWZkOWZhOGRJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--c4c7d8599bf6e08945a7f11e8f4edd86b949da94;
62
+ domain=.cartodb.com; path=/; HttpOnly
63
+ X-Runtime:
64
+ - '0.781121'
65
+ Content-Encoding:
66
+ - gzip
67
+ body:
68
+ encoding: ASCII-8BIT
69
+ string: ! '{"id":4699,"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:34:55 GMT
72
+ - request:
73
+ method: get
74
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/cartodb_spec?
75
+ body:
76
+ encoding: US-ASCII
77
+ string: ''
78
+ headers:
79
+ Accept:
80
+ - *70229988289520
81
+ Authorization:
82
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="mNbOVnN6CeKl4V4Wt79eUiSPOCGJHJea76AlQX29LX4",
83
+ oauth_signature="ZQn8mZK3SG%2BJQJIvIXGftFm7phg%3D", oauth_signature_method="HMAC-SHA1",
84
+ oauth_timestamp="1337787295", 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:34:55 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
+ - ! '"6e273ae1d9e31bd3fe4e1499a0e7979a"'
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlNmM0Mzg5YjE2ZTkxNDEzMDQyMzhhYjljMmEzZDUyZjJJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--0d0559eb784cfa01ff75277d33d48d383d018686;
113
+ domain=.cartodb.com; path=/; HttpOnly
114
+ X-Runtime:
115
+ - '0.008809'
116
+ Content-Encoding:
117
+ - gzip
118
+ body:
119
+ encoding: ASCII-8BIT
120
+ string: ! '{"id":4699,"name":"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:34:55 GMT
123
+ recorded_with: VCR 2.1.1
@@ -0,0 +1,221 @@
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
+ - &70165286958300 !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="T3JNCaAEnFJewJGHOiiRSZwoJuAlnuV9vovRGLgebg",
30
+ oauth_signature="q6Vrq4zfVyO5titgh3J4bR%2Bvsr8%3D", oauth_signature_method="HMAC-SHA1",
31
+ oauth_timestamp="1337787461", 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:37:42 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/4712
54
+ Etag:
55
+ - ! '"ba42f14708025409125aeeaf76dca12c"'
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZTE5NzY0OTQ3Mzg3ZTY2OGQ2YWE1NzdlYTg4YzYzMjdJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--dd5c3efad0a89e25de02504796e0d8d3e6d5bedd;
62
+ domain=.cartodb.com; path=/; HttpOnly
63
+ X-Runtime:
64
+ - '0.775054'
65
+ Content-Encoding:
66
+ - gzip
67
+ body:
68
+ encoding: ASCII-8BIT
69
+ string: ! '{"id":4712,"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: Wed, 23 May 2012 15:37:42 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
+ - *70165286958300
81
+ Authorization:
82
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="AL2HqJgULid6WPQnBIw2gGSHHveOxW0yzyHYtGP3VI",
83
+ oauth_signature="JmiOe7TM4ETS7BNCPNq6JBcCJM4%3D", oauth_signature_method="HMAC-SHA1",
84
+ oauth_timestamp="1337787462", 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:37:42 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="Wed, 23 May 2012 15:37:42
103
+ GMT";
104
+ Access-Control-Allow-Origin:
105
+ - ! '*'
106
+ Access-Control-Allow-Headers:
107
+ - X-Requested-With
108
+ Last-Modified:
109
+ - Wed, 23 May 2012 15:37:42 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.075,"total_rows":1,"rows":[{"id":1,"updated_at":"2012-05-23T17:37:42.522Z","created_at":"2012-05-23T17:37:42.522Z","cartodb_id":1,"field1":"lorem","field2":100.99,"field3":"2012-05-23","field4":true}]}'
119
+ http_version: '1.1'
120
+ recorded_at: Wed, 23 May 2012 15:37:42 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
+ - *70165286958300
130
+ Authorization:
131
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="HJ5tmMCe4stg9c9tjuLFENqVaiTbHDoHGqT6lVq2EE",
132
+ oauth_signature="bLzBZ9Z%2FwN8vmmKxTrW%2Bfi8X4w4%3D", oauth_signature_method="HMAC-SHA1",
133
+ oauth_timestamp="1337787462", 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
+ - Wed, 23 May 2012 15:37:42 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="Wed, 23 May 2012 15:37:42
152
+ GMT";
153
+ Access-Control-Allow-Origin:
154
+ - ! '*'
155
+ Access-Control-Allow-Headers:
156
+ - X-Requested-With
157
+ Last-Modified:
158
+ - Wed, 23 May 2012 15:37:42 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
+ - '39'
165
+ body:
166
+ encoding: ASCII-8BIT
167
+ string: ! '{"time":0.045,"total_rows":0,"rows":[]}'
168
+ http_version: '1.1'
169
+ recorded_at: Wed, 23 May 2012 15:37:42 GMT
170
+ - request:
171
+ method: get
172
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/table_1/records?
173
+ body:
174
+ encoding: US-ASCII
175
+ string: ''
176
+ headers:
177
+ Accept:
178
+ - *70165286958300
179
+ Authorization:
180
+ - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="gpMU5UbH4ZQU7QWEBlfOAAbQbeWYJ8htNw2cYS1xQk",
181
+ oauth_signature="oAI%2BbIAC4B8GU391emKrYrQO5z8%3D", oauth_signature_method="HMAC-SHA1",
182
+ oauth_timestamp="1337787462", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
183
+ oauth_version="1.0"
184
+ response:
185
+ status:
186
+ code: 200
187
+ message: OK
188
+ headers:
189
+ Server:
190
+ - nginx
191
+ Date:
192
+ - Wed, 23 May 2012 15:37:42 GMT
193
+ Content-Type:
194
+ - application/json; charset=utf-8
195
+ Transfer-Encoding:
196
+ - chunked
197
+ Connection:
198
+ - keep-alive
199
+ Vary:
200
+ - Accept-Encoding
201
+ Status:
202
+ - 200 OK
203
+ Etag:
204
+ - ! '"4ba9fbc181be0e40548c5e6e3ddab355"'
205
+ Cache-Control:
206
+ - max-age=0, private, must-revalidate
207
+ X-Ua-Compatible:
208
+ - IE=Edge,chrome=1
209
+ Set-Cookie:
210
+ - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlYjYyYjZmODJjNzcxOTI0MGNmNDQ5OGFiNTk1NDc2M2FJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--07fac3bc7153ca5361df0df1122a20e1429158e1;
211
+ domain=.cartodb.com; path=/; HttpOnly
212
+ X-Runtime:
213
+ - '0.017646'
214
+ Content-Encoding:
215
+ - gzip
216
+ body:
217
+ encoding: ASCII-8BIT
218
+ string: ! '{"id":4712,"name":"table_1","total_rows":0,"rows":[]}'
219
+ http_version: '1.1'
220
+ recorded_at: Wed, 23 May 2012 15:37:42 GMT
221
+ recorded_with: VCR 2.1.1