cartodb-rb-client 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -2
- data/lib/cartodb-rb-client/cartodb/client/connection/cartodb.rb +1 -1
- data/lib/cartodb-rb-client/cartodb/model/base.rb +1 -1
- data/lib/cartodb-rb-client/cartodb/model/getters.rb +6 -9
- data/lib/cartodb-rb-client/cartodb/model/schema.rb +13 -2
- data/lib/cartodb-rb-client/cartodb/model/setters.rb +5 -9
- data/lib/cartodb-rb-client/version.rb +1 -1
- data/spec/client_spec.rb +3 -3
- data/spec/fixtures/cassettes/CartoDB_client/should_add_and_remove_colums_in_a_previously_created_table.yml +376 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_allow_reserved_words_in_columns_names.yml +121 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_change_a_previously_created_column.yml +174 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_and_get_its_table_definition.yml +123 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_forcing_the_schema_and_get_its_table_definition.yml +123 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_from_a_csv_file.yml +1971 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_with_MULTILINESTRING_type_geometry.yml +123 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_with_MULTIPOLYGON_type_geometry.yml +123 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_with_POINT_type_geometry.yml +123 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_delete_a_table_s_row.yml +221 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_drop_a_table.yml +278 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_escape_properly_input_data_in_insert_queries.yml +121 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_execute_a_select_query_and_return_results.yml +615 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_get_a_table_by_its_name.yml +123 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_import_any_kind_of_data_file.yml +6612 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_insert_a_row_in_a_table.yml +121 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_paginate_records.yml +2624 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_rename_an_existing_table.yml +123 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_return_errors_on_invalid_queries.yml +59 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_return_nil_when_requesting_a_table_which_does_not_exists.yml +68 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_return_user_s_table_list.yml +176 -0
- data/spec/fixtures/cassettes/CartoDB_client/should_update_a_row_in_a_table.yml +170 -0
- data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_destroy_a_previously_created_record.yml +1398 -0
- data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_initialize_attributes_of_the_model_without_persisting_them.yml +223 -0
- data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_persist_into_cartodb_using_the_save_method.yml +1406 -0
- data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_persist_into_cartodb_using_the_static_create_method.yml +1299 -0
- data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_update_an_existing_record.yml +2028 -0
- data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_add_more_columns_if_the_table_previously_exists.yml +990 -0
- data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_contain_an_array_of_columns.yml +1443 -0
- data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_a_table_with_custom_name_if_specified.yml +270 -0
- data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_model_with_custom_data_types_columns.yml +421 -0
- data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_model_with_polygon_type_geometry_columns.yml +272 -0
- data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_the_table_in_cartodb_if_it_doesn_t_exists.yml +780 -0
- data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_have_a_valid_CartoDB_Client_instance_as_a_connection_object.yml +682 -0
- data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_have_a_valid_table_name.yml +727 -0
- data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_return_only_data_columns.yml +829 -0
- data/spec/fixtures/cassettes/CartoDB_model_scopes/should_allow_to_select_the_specified_fiels.yml +17953 -0
- data/spec/fixtures/cassettes/CartoDB_model_scopes/should_count_all_records.yml +15596 -0
- data/spec/fixtures/cassettes/CartoDB_model_scopes/should_find_a_record_by_its_id.yml +15197 -0
- data/spec/fixtures/cassettes/CartoDB_model_scopes/should_order_results.yml +16439 -0
- data/spec/fixtures/cassettes/CartoDB_model_scopes/should_paginate_results.yml +24501 -0
- data/spec/fixtures/cassettes/CartoDB_model_scopes/should_return_all_records_paginated.yml +16488 -0
- data/spec/fixtures/cassettes/CartoDB_model_scopes/should_search_records_by_certain_filters.yml +4950 -0
- data/spec/fixtures/cassettes/cartodb_spec_models.yml +2467 -0
- data/spec/fixtures/cassettes/clean_tables.yml +266 -0
- data/spec/model/data_spec.rb +6 -6
- data/spec/model/metadata_spec.rb +11 -3
- data/spec/model/scopes_spec.rb +2 -2
- data/spec/model_specs_helper.rb +2 -0
- data/spec/spec_helper.rb +18 -5
- data/spec/support/cartodb_factories.rb +3 -3
- data/spec/support/cartodb_helpers.rb +1 -1
- data/spec/support/cartodb_models.rb +26 -19
- metadata +97 -7
- data/spec/support/data/ngos.xlsx +0 -0
@@ -0,0 +1,121 @@
|
|
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
|
+
- &70174619284940 !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="wm9cDjgcIIFF26tVUe8hIJyCtRc0mdkb6EesekjgM8",
|
30
|
+
oauth_signature="GNjATJHnkjoCv8z7DPcC6kJXyU0%3D", oauth_signature_method="HMAC-SHA1",
|
31
|
+
oauth_timestamp="1337787579", 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:39:39 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/4718
|
54
|
+
Etag:
|
55
|
+
- ! '"a9f1f502e538b2465afe881460f3d918"'
|
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZmIxOWEwNTJiMGY3YWNhZmY0ZDg1MjMyZTgzNmIxNDFJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--7c33741cdcff0243ff356ed5a55bccc407322cad;
|
62
|
+
domain=.cartodb.com; path=/; HttpOnly
|
63
|
+
X-Runtime:
|
64
|
+
- '0.589164'
|
65
|
+
Content-Encoding:
|
66
|
+
- gzip
|
67
|
+
body:
|
68
|
+
encoding: ASCII-8BIT
|
69
|
+
string: ! '{"id":4718,"name":"table_1","schema":[["cartodb_id","number"],["class","string"],["updated_at","date"],["created_at","date"]]}'
|
70
|
+
http_version: '1.1'
|
71
|
+
recorded_at: Wed, 23 May 2012 15:39:39 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
|
+
- *70174619284940
|
81
|
+
Authorization:
|
82
|
+
- OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="af70T1kBATsV6tbz4unGLM9CQRSaAq6D1y24PkodjQ",
|
83
|
+
oauth_signature="qdJNGZFJLS61dWtGh8U%2FN1uNjLk%3D", oauth_signature_method="HMAC-SHA1",
|
84
|
+
oauth_timestamp="1337787579", 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:39:39 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:39:39
|
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:39:39 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
|
+
- '158'
|
116
|
+
body:
|
117
|
+
encoding: ASCII-8BIT
|
118
|
+
string: ! '{"time":0.067,"total_rows":1,"rows":[{"id":1,"updated_at":"2012-05-23T17:39:39.883Z","created_at":"2012-05-23T17:39:39.883Z","cartodb_id":1,"class":"wadus"}]}'
|
119
|
+
http_version: '1.1'
|
120
|
+
recorded_at: Wed, 23 May 2012 15:39:39 GMT
|
121
|
+
recorded_with: VCR 2.1.1
|
@@ -0,0 +1,174 @@
|
|
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
|
+
- &70356408808960 !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="fm3dUhBhrqWRP30ndcf9ok7E1n8Md1qtYyBiLYxCPg",
|
30
|
+
oauth_signature="xC5Xjg8rN4PwD4V8O1siuU%2FQ2QE%3D", oauth_signature_method="HMAC-SHA1",
|
31
|
+
oauth_timestamp="1337787386", 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: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/4704
|
54
|
+
Etag:
|
55
|
+
- ! '"880d30b4c48aac2d3248359b6ca891e7"'
|
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlYjdjY2QyNjU1ODhiMjU3NDZkZjdkN2ZmNjZkYzdlNWJJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--a2075d726c1417fcc3922917d39882287e6b8d9d;
|
62
|
+
domain=.cartodb.com; path=/; HttpOnly
|
63
|
+
X-Runtime:
|
64
|
+
- '0.589552'
|
65
|
+
Content-Encoding:
|
66
|
+
- gzip
|
67
|
+
body:
|
68
|
+
encoding: ASCII-8BIT
|
69
|
+
string: ! '{"id":4704,"name":"cartodb_spec","schema":[["cartodb_id","number"],["field1","string"],["updated_at","date"],["created_at","date"]]}'
|
70
|
+
http_version: '1.1'
|
71
|
+
recorded_at: Wed, 23 May 2012 15:36:27 GMT
|
72
|
+
- request:
|
73
|
+
method: put
|
74
|
+
uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/cartodb_spec/columns/field1?new_name=changed_field&type=numeric
|
75
|
+
body:
|
76
|
+
encoding: US-ASCII
|
77
|
+
string: ''
|
78
|
+
headers:
|
79
|
+
Accept:
|
80
|
+
- *70356408808960
|
81
|
+
Authorization:
|
82
|
+
- OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="h3cbXJ9Lf8MPGstZ3GSnpW2c93hVV5hmSkEXITqNndE",
|
83
|
+
oauth_signature="nltd1yd3i6GvHLVfhZlCXpEzJz4%3D", oauth_signature_method="HMAC-SHA1",
|
84
|
+
oauth_timestamp="1337787387", 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:36:28 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
|
+
- ! '"ef125030e389743b528a8f40fcf00f14"'
|
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlNjRhYmI5ZjQ0ZGExZjljMjMxZTUyZTkyMjQ0YjRiNDRJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--e0a63d2d7d227c30876d4d98b2bee2c64ce976ce;
|
113
|
+
domain=.cartodb.com; path=/; HttpOnly
|
114
|
+
X-Runtime:
|
115
|
+
- '0.257226'
|
116
|
+
Content-Encoding:
|
117
|
+
- gzip
|
118
|
+
body:
|
119
|
+
encoding: ASCII-8BIT
|
120
|
+
string: ! '{"name":"changed_field","type":"numeric","cartodb_type":"number"}'
|
121
|
+
http_version: '1.1'
|
122
|
+
recorded_at: Wed, 23 May 2012 15:36:28 GMT
|
123
|
+
- request:
|
124
|
+
method: get
|
125
|
+
uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/cartodb_spec?
|
126
|
+
body:
|
127
|
+
encoding: US-ASCII
|
128
|
+
string: ''
|
129
|
+
headers:
|
130
|
+
Accept:
|
131
|
+
- *70356408808960
|
132
|
+
Authorization:
|
133
|
+
- OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="keUzK8LCQhxHZT6fLhbX0HRdZR5QFl4UkOA0TxK3A",
|
134
|
+
oauth_signature="LGOmBfjqUywn8QkcAzoGhjns8XY%3D", oauth_signature_method="HMAC-SHA1",
|
135
|
+
oauth_timestamp="1337787388", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
|
136
|
+
oauth_version="1.0"
|
137
|
+
response:
|
138
|
+
status:
|
139
|
+
code: 200
|
140
|
+
message: OK
|
141
|
+
headers:
|
142
|
+
Server:
|
143
|
+
- nginx
|
144
|
+
Date:
|
145
|
+
- Wed, 23 May 2012 15:36:28 GMT
|
146
|
+
Content-Type:
|
147
|
+
- application/json; charset=utf-8
|
148
|
+
Transfer-Encoding:
|
149
|
+
- chunked
|
150
|
+
Connection:
|
151
|
+
- keep-alive
|
152
|
+
Vary:
|
153
|
+
- Accept-Encoding
|
154
|
+
Status:
|
155
|
+
- 200 OK
|
156
|
+
Etag:
|
157
|
+
- ! '"25c2922928a1b14bfa66cb219771afed"'
|
158
|
+
Cache-Control:
|
159
|
+
- max-age=0, private, must-revalidate
|
160
|
+
X-Ua-Compatible:
|
161
|
+
- IE=Edge,chrome=1
|
162
|
+
Set-Cookie:
|
163
|
+
- _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZDRiMTZmNjMxODE1MDA4YTZjNmYzYzUwZTE1Yzg0ZDBJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--6ace23f5f88ed9de6450ae742ff3a4bb53c2ca9e;
|
164
|
+
domain=.cartodb.com; path=/; HttpOnly
|
165
|
+
X-Runtime:
|
166
|
+
- '0.011576'
|
167
|
+
Content-Encoding:
|
168
|
+
- gzip
|
169
|
+
body:
|
170
|
+
encoding: ASCII-8BIT
|
171
|
+
string: ! '{"id":4704,"name":"cartodb_spec","privacy":"PUBLIC","tags":"","schema":[["cartodb_id","number"],["changed_field","number"],["updated_at","date"],["created_at","date"]]}'
|
172
|
+
http_version: '1.1'
|
173
|
+
recorded_at: Wed, 23 May 2012 15:36:28 GMT
|
174
|
+
recorded_with: VCR 2.1.1
|
data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_and_get_its_table_definition.yml
ADDED
@@ -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
|
+
- &70348972303440 !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="wOy3geLdUbdcRlQpgpGxnaRh2bUukenfnUSPi3gwxnc",
|
30
|
+
oauth_signature="4JdGXF1ZKLUBIUi6frYUbmh6zik%3D", oauth_signature_method="HMAC-SHA1",
|
31
|
+
oauth_timestamp="1337787193", 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:33:14 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/4691
|
54
|
+
Etag:
|
55
|
+
- ! '"454d0d1d0dbce6503cb6238ef4131ac5"'
|
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlNTAwMTA4NTcxODNhMTJjYTA2ZGE1ZTRkOGYyYTgxYmRJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--dd530fa5c7d5f8f9b3e44f0767d0e528a42369a1;
|
62
|
+
domain=.cartodb.com; path=/; HttpOnly
|
63
|
+
X-Runtime:
|
64
|
+
- '1.655037'
|
65
|
+
Content-Encoding:
|
66
|
+
- gzip
|
67
|
+
body:
|
68
|
+
encoding: ASCII-8BIT
|
69
|
+
string: ! '{"id":4691,"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:33: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
|
+
- *70348972303440
|
81
|
+
Authorization:
|
82
|
+
- OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="ycvwnS9S9x7bYguvn3idYrAK9OuuVrO8zLNYXzkU",
|
83
|
+
oauth_signature="dStHywL2kd8WznSTC4t00y%2F0d%2FI%3D", oauth_signature_method="HMAC-SHA1",
|
84
|
+
oauth_timestamp="1337787195", 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:33:15 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
|
+
- ! '"a76a1376d80c77de2baf76142fa0ac98"'
|
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZGNlOThjYTA3NTU0ZTQzNTJiMTNmZWRiNjQ0YzhjZTJJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--237561c533bb3089ae2e935614a7b29bfa528642;
|
113
|
+
domain=.cartodb.com; path=/; HttpOnly
|
114
|
+
X-Runtime:
|
115
|
+
- '0.147692'
|
116
|
+
Content-Encoding:
|
117
|
+
- gzip
|
118
|
+
body:
|
119
|
+
encoding: ASCII-8BIT
|
120
|
+
string: ! '{"id":4691,"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:33:15 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
|
+
- &70148920780040 !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="jHUsf5DB55PHFCNKaSKopnhbdypnCuqKnIEc1KDSC2A",
|
30
|
+
oauth_signature="2UIcbYnf37Q3y1YF3jLH05ahP48%3D", oauth_signature_method="HMAC-SHA1",
|
31
|
+
oauth_timestamp="1337787210", 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:33:30 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/4692
|
54
|
+
Etag:
|
55
|
+
- ! '"6fd47201727358f75a14683993f3395f"'
|
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlYTliNmMyOTQ5NTVjZjEzYTFjM2ZhMWU5YjZlYmRiOWVJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--9c78fc9703c5e47fc581666175755a8193cb19d0;
|
62
|
+
domain=.cartodb.com; path=/; HttpOnly
|
63
|
+
X-Runtime:
|
64
|
+
- '0.654855'
|
65
|
+
Content-Encoding:
|
66
|
+
- gzip
|
67
|
+
body:
|
68
|
+
encoding: ASCII-8BIT
|
69
|
+
string: ! '{"id":4692,"name":"cartodb_spec","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:33:31 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
|
+
- *70148920780040
|
81
|
+
Authorization:
|
82
|
+
- OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="1QQmy81v5BH7ECfCaSGDgE0oT1fEYldtPl8lME2jOWU",
|
83
|
+
oauth_signature="RXblVAjBgJrF4UF90qsywqBks7s%3D", oauth_signature_method="HMAC-SHA1",
|
84
|
+
oauth_timestamp="1337787211", 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:33:31 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
|
+
- ! '"5f725fed30cc1c0e65b6e16a565e3366"'
|
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZTVlOTg1ZTBiOTU5ZDVmMzI2YzZjYWQ5OTZhZjA4MjNJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--5be567cb37becc044a25ed4fc3306840b9a0ed80;
|
113
|
+
domain=.cartodb.com; path=/; HttpOnly
|
114
|
+
X-Runtime:
|
115
|
+
- '0.017056'
|
116
|
+
Content-Encoding:
|
117
|
+
- gzip
|
118
|
+
body:
|
119
|
+
encoding: ASCII-8BIT
|
120
|
+
string: ! '{"id":4692,"name":"cartodb_spec","privacy":"PUBLIC","tags":"","schema":[["cartodb_id","number"],["field1","string"],["field2","number"],["field3","date"],["field4","boolean"],["updated_at","date"],["created_at","date"]]}'
|
121
|
+
http_version: '1.1'
|
122
|
+
recorded_at: Wed, 23 May 2012 15:33:31 GMT
|
123
|
+
recorded_with: VCR 2.1.1
|