cartodb-rb-client 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/.gitignore +0 -1
  2. data/.rvmrc +1 -2
  3. data/README.markdown +12 -1
  4. data/cartodb-rb-client.gemspec +1 -1
  5. data/lib/cartodb-rb-client.rb +1 -0
  6. data/lib/cartodb-rb-client/cartodb/client/authorization.rb +7 -1
  7. data/lib/cartodb-rb-client/cartodb/client/connection/base.rb +2 -2
  8. data/lib/cartodb-rb-client/version.rb +1 -1
  9. data/spec/client_spec.rb +1 -1
  10. data/spec/fixtures/cassettes/CartoDB_client/should_add_and_remove_colums_in_a_previously_created_table.yml +527 -268
  11. data/spec/fixtures/cassettes/CartoDB_client/should_allow_reserved_words_in_columns_names.yml +243 -80
  12. data/spec/fixtures/cassettes/CartoDB_client/should_change_a_previously_created_column.yml +309 -121
  13. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_and_get_its_table_definition.yml +1611 -100
  14. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_forcing_the_schema_and_get_its_table_definition.yml +258 -83
  15. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_from_a_csv_file.yml +2028 -1052
  16. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_with_MULTILINESTRING_type_geometry.yml +259 -83
  17. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_with_MULTIPOLYGON_type_geometry.yml +258 -83
  18. data/spec/fixtures/cassettes/CartoDB_client/should_create_a_table_with_POINT_type_geometry.yml +542 -85
  19. data/spec/fixtures/cassettes/CartoDB_client/should_delete_a_table_s_row.yml +342 -153
  20. data/spec/fixtures/cassettes/CartoDB_client/should_drop_a_table.yml +297 -195
  21. data/spec/fixtures/cassettes/CartoDB_client/should_escape_properly_input_data_in_insert_queries.yml +254 -80
  22. data/spec/fixtures/cassettes/CartoDB_client/should_execute_a_select_query_and_return_results.yml +806 -434
  23. data/spec/fixtures/cassettes/CartoDB_client/should_get_a_table_by_its_name.yml +258 -83
  24. data/spec/fixtures/cassettes/CartoDB_client/should_import_any_kind_of_data_file.yml +752 -413
  25. data/spec/fixtures/cassettes/CartoDB_client/should_insert_a_row_in_a_table.yml +316 -80
  26. data/spec/fixtures/cassettes/CartoDB_client/should_paginate_records.yml +2942 -1924
  27. data/spec/fixtures/cassettes/CartoDB_client/should_rename_an_existing_table.yml +259 -83
  28. data/spec/fixtures/cassettes/CartoDB_client/should_return_errors_on_invalid_queries.yml +105 -32
  29. data/spec/fixtures/cassettes/CartoDB_client/should_return_nil_when_requesting_a_table_which_does_not_exists.yml +190 -40
  30. data/spec/fixtures/cassettes/CartoDB_client/should_return_user_s_table_list.yml +188 -120
  31. data/spec/fixtures/cassettes/CartoDB_client/should_update_a_row_in_a_table.yml +292 -115
  32. data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_destroy_a_previously_created_record.yml +1544 -1022
  33. data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_initialize_attributes_of_the_model_without_persisting_them.yml +900 -160
  34. data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_persist_into_cartodb_using_the_save_method.yml +1571 -1031
  35. data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_persist_into_cartodb_using_the_static_create_method.yml +1447 -950
  36. data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_save_polygons_in_different_formats.yml +1485 -948
  37. data/spec/fixtures/cassettes/CartoDB_model_data_methods/should_update_an_existing_record.yml +2363 -1535
  38. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_add_more_columns_if_the_table_previously_exists.yml +1267 -748
  39. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_contain_an_array_of_columns.yml +1620 -1056
  40. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_a_table_with_custom_name_if_specified.yml +276 -189
  41. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_model_with_custom_data_types_columns.yml +444 -300
  42. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_model_with_polygon_type_geometry_columns.yml +411 -190
  43. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_create_the_table_in_cartodb_if_it_doesn_t_exists.yml +830 -562
  44. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_have_a_valid_CartoDB_Client_instance_as_a_connection_object.yml +778 -489
  45. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_have_a_valid_table_name.yml +765 -522
  46. data/spec/fixtures/cassettes/CartoDB_model_metadata_methods/should_return_only_data_columns.yml +880 -613
  47. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_allow_to_select_the_specified_fiels.yml +25627 -17752
  48. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_count_all_records.yml +22192 -15387
  49. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_find_a_record_by_its_id.yml +21667 -15012
  50. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_order_results.yml +23508 -16246
  51. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_paginate_results.yml +35431 -24288
  52. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_return_all_records_paginated.yml +23505 -16294
  53. data/spec/fixtures/cassettes/CartoDB_model_scopes/should_search_records_by_certain_filters.yml +5898 -3768
  54. data/spec/fixtures/cassettes/cartodb_spec_models.yml +2806 -1864
  55. data/spec/fixtures/cassettes/clean_tables.yml +170 -212
  56. data/spec/spec_helper.rb +45 -92
  57. data/spec/support/cartodb_config.yml +11 -0
  58. data/spec/support/cartodb_config.yml.sample +5 -4
  59. metadata +16 -6
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cartodb-rb-client.cartodb.com/api/v1/tables?
5
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables?api_key=242015a0c60666b5cdff0ce614334668817b52ac
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
11
- - &70347547176260 !ruby/object:MIME::Type
11
+ - &70175296087520 !ruby/object:MIME::Type
12
12
  content_type: application/json
13
13
  raw_media_type: application
14
14
  raw_sub_type: json
@@ -18,249 +18,207 @@ http_interactions:
18
18
  extensions:
19
19
  - json
20
20
  encoding: 8bit
21
- system: !!null
21
+ system:
22
22
  registered: true
23
23
  url:
24
24
  - IANA
25
25
  - RFC4627
26
- obsolete: !!null
27
- docs: !!null
28
- Authorization:
29
- - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="VEi9jwsh7M68W8emeqcxoZjaBtoeA4wLfNGy8qVj2s",
30
- oauth_signature="Cz8LzmTlBslwlfEJ1bm5I7iHTgY%3D", oauth_signature_method="HMAC-SHA1",
31
- oauth_timestamp="1337788390", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
32
- oauth_version="1.0"
26
+ obsolete:
27
+ docs:
33
28
  response:
34
29
  status:
35
30
  code: 200
36
- message: OK
31
+ message: !binary |-
32
+ T0s=
37
33
  headers:
38
- Server:
39
- - nginx
40
- Date:
41
- - Wed, 23 May 2012 15:53:10 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
- - ! '"5822de039c547528e69f48f88b4a5650"'
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlNDlmYjRmODQ0MWFjOTIwNDEyNTI5NmQ0NjU4ZGJiZWJJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--999fbd3225bcb2ead656025ec98e41895ea3b674;
60
- domain=.cartodb.com; path=/; HttpOnly
61
- X-Runtime:
62
- - '0.025659'
63
- Content-Encoding:
64
- - gzip
34
+ !binary "U2VydmVy":
35
+ - !binary |-
36
+ bmdpbng=
37
+ !binary "RGF0ZQ==":
38
+ - !binary |-
39
+ TW9uLCAyMCBBdWcgMjAxMiAxMDo1ODoyOSBHTVQ=
40
+ !binary "Q29udGVudC1UeXBl":
41
+ - !binary |-
42
+ YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
43
+ !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
44
+ - !binary |-
45
+ Y2h1bmtlZA==
46
+ !binary "Q29ubmVjdGlvbg==":
47
+ - !binary |-
48
+ a2VlcC1hbGl2ZQ==
49
+ !binary "VmFyeQ==":
50
+ - !binary |-
51
+ QWNjZXB0LUVuY29kaW5n
52
+ !binary "U3RhdHVz":
53
+ - !binary |-
54
+ MjAwIE9L
55
+ !binary "RXRhZw==":
56
+ - !binary |-
57
+ IjIxZTZhOWFhMDg0NmUzYmJlZGNiYjhmMzhkYzQwZjNmIg==
58
+ !binary "Q2FjaGUtQ29udHJvbA==":
59
+ - !binary |-
60
+ bWF4LWFnZT0wLCBwcml2YXRlLCBtdXN0LXJldmFsaWRhdGU=
61
+ !binary "WC1VYS1Db21wYXRpYmxl":
62
+ - !binary |-
63
+ SUU9RWRnZSxjaHJvbWU9MQ==
64
+ !binary "U2V0LUNvb2tpZQ==":
65
+ - !binary |-
66
+ X2NhcnRvZGJfc2Vzc2lvbj1CQWg3QjBraUQzTmxjM05wYjI1ZmFXUUdPZ1pG
67
+ UmlJbE9HWmpPR1ZqWTJSaVpqUTRaRFF4WVRFeFpETmtPVFV4WVRZME9HRXpO
68
+ akJKSWlaM1lYSmtaVzR1ZFhObGNpNWpZWEowYjJSaUxYSmlMV05zYVdWdWRD
69
+ NXJaWGtHT3dCVVNTSVdZMkZ5ZEc5a1lpMXlZaTFqYkdsbGJuUUdPd0JVLS1h
70
+ OTg5ZTcxNjBhYjc1MzJkNjYwMjIzOTE3YWFhYzAwNjI2NWIyZTczOyBkb21h
71
+ aW49LmNhcnRvZGIuY29tOyBwYXRoPS87IEh0dHBPbmx5
72
+ !binary "WC1SdW50aW1l":
73
+ - !binary |-
74
+ MC4wMTExOTk=
75
+ !binary "Q29udGVudC1FbmNvZGluZw==":
76
+ - !binary |-
77
+ Z3ppcA==
65
78
  body:
66
79
  encoding: ASCII-8BIT
67
- string: ! '{"total_entries":4,"tables":[{"id":4724,"name":"polygon_geometry_model","privacy":"PUBLIC","tags":"","schema":[["cartodb_id","number"],["the_geom","polygon"],["updated_at","date"],["created_at","date"]],"updated_at":"2012-05-23T17:48:49+02:00","rows_counted":0},{"id":4723,"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"]],"updated_at":"2012-05-23T17:48:48+02:00","rows_counted":0},{"id":4722,"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"],["name","string"],["right_corners","number"],["width","string"],["created_at","date"],["updated_at","date"]],"updated_at":"2012-05-23T17:48:43+02:00","rows_counted":0},{"id":4718,"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:39:39+02:00","rows_counted":0}]}'
68
- http_version: '1.1'
69
- recorded_at: Wed, 23 May 2012 15:53:10 GMT
80
+ string: !binary |-
81
+ eyJ0b3RhbF9lbnRyaWVzIjoyLCJ0YWJsZXMiOlt7ImlkIjo4MjI0LCJuYW1l
82
+ IjoidGFibGVfMiIsInByaXZhY3kiOiJQVUJMSUMiLCJ0YWdzIjoiIiwic2No
83
+ ZW1hIjpbWyJjYXJ0b2RiX2lkIiwibnVtYmVyIl0sWyJ0aGVfZ2VvbSIsImdl
84
+ b21ldHJ5IiwiZ2VvbWV0cnkiLCJwb2ludCJdLFsiZGVzY3JpcHRpb24iLCJz
85
+ dHJpbmciXSxbIm5hbWUiLCJzdHJpbmciXSxbImNyZWF0ZWRfYXQiLCJkYXRl
86
+ Il0sWyJ1cGRhdGVkX2F0IiwiZGF0ZSJdXSwidXBkYXRlZF9hdCI6IjIwMTIt
87
+ MDgtMjBUMTI6NTg6MDcrMDI6MDAiLCJyb3dzX2NvdW50ZWQiOjB9LHsiaWQi
88
+ OjgyMjMsIm5hbWUiOiJ0YWJsZV8xIiwicHJpdmFjeSI6IlBVQkxJQyIsInRh
89
+ Z3MiOiIiLCJzY2hlbWEiOltbImNhcnRvZGJfaWQiLCJudW1iZXIiXSxbInRo
90
+ ZV9nZW9tIiwiZ2VvbWV0cnkiLCJnZW9tZXRyeSIsInBvaW50Il0sWyJkZXNj
91
+ cmlwdGlvbiIsInN0cmluZyJdLFsibmFtZSIsInN0cmluZyJdLFsiY3JlYXRl
92
+ ZF9hdCIsImRhdGUiXSxbInVwZGF0ZWRfYXQiLCJkYXRlIl1dLCJ1cGRhdGVk
93
+ X2F0IjoiMjAxMi0wOC0yMFQxMjo1ODowNiswMjowMCIsInJvd3NfY291bnRl
94
+ ZCI6MH1dfQ==
95
+ http_version: !binary |-
96
+ MS4x
97
+ recorded_at: Mon, 20 Aug 2012 10:58:29 GMT
70
98
  - request:
71
99
  method: delete
72
- uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/polygon_geometry_model?
100
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/table_2?api_key=242015a0c60666b5cdff0ce614334668817b52ac
73
101
  body:
74
102
  encoding: US-ASCII
75
103
  string: ''
76
104
  headers:
77
105
  Accept:
78
- - *70347547176260
79
- Authorization:
80
- - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="ln36GI7sCB4fvICNlnZYyw3QPGDyTsllbbGqgpdzU",
81
- oauth_signature="UvNC9nLmY80ddXMUUfXap8EVxww%3D", oauth_signature_method="HMAC-SHA1",
82
- oauth_timestamp="1337788390", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
83
- oauth_version="1.0"
106
+ - *70175296087520
84
107
  response:
85
108
  status:
86
109
  code: 200
87
- message: OK
110
+ message: !binary |-
111
+ T0s=
88
112
  headers:
89
- Server:
90
- - nginx
91
- Date:
92
- - Wed, 23 May 2012 15:53:10 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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlMDYwY2E4NWE2MGJlZmE5NDI4MjI1YzE2ZjRkMDY3MTZJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--91c56a0e50dfa569f02b89ca7a341285a18ad1e5;
109
- domain=.cartodb.com; path=/; HttpOnly
110
- X-Runtime:
111
- - '0.190212'
112
- Content-Encoding:
113
- - gzip
113
+ !binary "U2VydmVy":
114
+ - !binary |-
115
+ bmdpbng=
116
+ !binary "RGF0ZQ==":
117
+ - !binary |-
118
+ TW9uLCAyMCBBdWcgMjAxMiAxMDo1ODozMCBHTVQ=
119
+ !binary "Q29udGVudC1UeXBl":
120
+ - !binary |-
121
+ YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
122
+ !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
123
+ - !binary |-
124
+ Y2h1bmtlZA==
125
+ !binary "Q29ubmVjdGlvbg==":
126
+ - !binary |-
127
+ a2VlcC1hbGl2ZQ==
128
+ !binary "VmFyeQ==":
129
+ - !binary |-
130
+ QWNjZXB0LUVuY29kaW5n
131
+ !binary "U3RhdHVz":
132
+ - !binary |-
133
+ MjAwIE9L
134
+ !binary "Q2FjaGUtQ29udHJvbA==":
135
+ - !binary |-
136
+ bm8tY2FjaGU=
137
+ !binary "WC1VYS1Db21wYXRpYmxl":
138
+ - !binary |-
139
+ SUU9RWRnZSxjaHJvbWU9MQ==
140
+ !binary "U2V0LUNvb2tpZQ==":
141
+ - !binary |-
142
+ X2NhcnRvZGJfc2Vzc2lvbj1CQWg3QjBraUQzTmxjM05wYjI1ZmFXUUdPZ1pG
143
+ UmlJbE16TXhNakE1T1dGalkyVTNaVFk1TWpFd01ETTFOR0poTnpVek0yWXdP
144
+ VEJKSWlaM1lYSmtaVzR1ZFhObGNpNWpZWEowYjJSaUxYSmlMV05zYVdWdWRD
145
+ NXJaWGtHT3dCVVNTSVdZMkZ5ZEc5a1lpMXlZaTFqYkdsbGJuUUdPd0JVLS1m
146
+ MDMzNTY2MTc0NjhiNmE0MzYxMjY4ZjkxNzA0M2VjYTVkZDg0MTczOyBkb21h
147
+ aW49LmNhcnRvZGIuY29tOyBwYXRoPS87IEh0dHBPbmx5
148
+ !binary "WC1SdW50aW1l":
149
+ - !binary |-
150
+ MC4xODAzMDI=
151
+ !binary "Q29udGVudC1FbmNvZGluZw==":
152
+ - !binary |-
153
+ Z3ppcA==
114
154
  body:
115
155
  encoding: ASCII-8BIT
116
- string: ! ' '
117
- http_version: '1.1'
118
- recorded_at: Wed, 23 May 2012 15:53:10 GMT
156
+ string: !binary |-
157
+ IA==
158
+ http_version: !binary |-
159
+ MS4x
160
+ recorded_at: Mon, 20 Aug 2012 10:58:30 GMT
119
161
  - request:
120
162
  method: delete
121
- uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/custom_data_type_column_model?
163
+ uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/table_1?api_key=242015a0c60666b5cdff0ce614334668817b52ac
122
164
  body:
123
165
  encoding: US-ASCII
124
166
  string: ''
125
167
  headers:
126
168
  Accept:
127
- - *70347547176260
128
- Authorization:
129
- - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="rNWAVHzmRIM6RxJTJKfjoAfkB4SNiLsxlSaIAFKdk",
130
- oauth_signature="R2S1Q6coDbFdsBItWqu1sv3s9Wg%3D", oauth_signature_method="HMAC-SHA1",
131
- oauth_timestamp="1337788390", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
132
- oauth_version="1.0"
169
+ - *70175296087520
133
170
  response:
134
171
  status:
135
172
  code: 200
136
- message: OK
173
+ message: !binary |-
174
+ T0s=
137
175
  headers:
138
- Server:
139
- - nginx
140
- Date:
141
- - Wed, 23 May 2012 15:53:11 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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlNDE5Nzg1Y2FjMzZiZjExNTgyODdlZTA0MDE4YTE0MmZJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--260748fd515484011639dd2385ea317eb716df32;
158
- domain=.cartodb.com; path=/; HttpOnly
159
- X-Runtime:
160
- - '0.216359'
161
- Content-Encoding:
162
- - gzip
176
+ !binary "U2VydmVy":
177
+ - !binary |-
178
+ bmdpbng=
179
+ !binary "RGF0ZQ==":
180
+ - !binary |-
181
+ TW9uLCAyMCBBdWcgMjAxMiAxMDo1ODozMCBHTVQ=
182
+ !binary "Q29udGVudC1UeXBl":
183
+ - !binary |-
184
+ YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
185
+ !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
186
+ - !binary |-
187
+ Y2h1bmtlZA==
188
+ !binary "Q29ubmVjdGlvbg==":
189
+ - !binary |-
190
+ a2VlcC1hbGl2ZQ==
191
+ !binary "VmFyeQ==":
192
+ - !binary |-
193
+ QWNjZXB0LUVuY29kaW5n
194
+ !binary "U3RhdHVz":
195
+ - !binary |-
196
+ MjAwIE9L
197
+ !binary "Q2FjaGUtQ29udHJvbA==":
198
+ - !binary |-
199
+ bm8tY2FjaGU=
200
+ !binary "WC1VYS1Db21wYXRpYmxl":
201
+ - !binary |-
202
+ SUU9RWRnZSxjaHJvbWU9MQ==
203
+ !binary "U2V0LUNvb2tpZQ==":
204
+ - !binary |-
205
+ X2NhcnRvZGJfc2Vzc2lvbj1CQWg3QjBraUQzTmxjM05wYjI1ZmFXUUdPZ1pG
206
+ UmlJbE56Z3hZelJsT0RCbU9URTROak00WWpBNU5qQTROekkwTWpJd1l6TmtZ
207
+ V1JKSWlaM1lYSmtaVzR1ZFhObGNpNWpZWEowYjJSaUxYSmlMV05zYVdWdWRD
208
+ NXJaWGtHT3dCVVNTSVdZMkZ5ZEc5a1lpMXlZaTFqYkdsbGJuUUdPd0JVLS1i
209
+ OGRjYjRiMmM2NGIyZmY5N2Y0NDJmYWE4Y2Y1M2YxZDg2Y2VmMDZlOyBkb21h
210
+ aW49LmNhcnRvZGIuY29tOyBwYXRoPS87IEh0dHBPbmx5
211
+ !binary "WC1SdW50aW1l":
212
+ - !binary |-
213
+ MC4xODk1NTY=
214
+ !binary "Q29udGVudC1FbmNvZGluZw==":
215
+ - !binary |-
216
+ Z3ppcA==
163
217
  body:
164
218
  encoding: ASCII-8BIT
165
- string: ! ' '
166
- http_version: '1.1'
167
- recorded_at: Wed, 23 May 2012 15:53:11 GMT
168
- - request:
169
- method: delete
170
- uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/moto_gp_circuit?
171
- body:
172
- encoding: US-ASCII
173
- string: ''
174
- headers:
175
- Accept:
176
- - *70347547176260
177
- Authorization:
178
- - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="m6fXY1zPmR8pp3DVhFwDfdw5Bt95gCiJEQVvZk1Y",
179
- oauth_signature="K48l97G6kcKiben9SIquhTEs75s%3D", oauth_signature_method="HMAC-SHA1",
180
- oauth_timestamp="1337788391", oauth_token="7PalByYmKY8Dzh76fnt05e0YPXRJino0dyqHZYCw",
181
- oauth_version="1.0"
182
- response:
183
- status:
184
- code: 200
185
- message: OK
186
- headers:
187
- Server:
188
- - nginx
189
- Date:
190
- - Wed, 23 May 2012 15:53:11 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
- - 200 OK
201
- Cache-Control:
202
- - no-cache
203
- X-Ua-Compatible:
204
- - IE=Edge,chrome=1
205
- Set-Cookie:
206
- - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlMDAyNmQ4YTcxYzVlNmFkMzlhMTVhZmY4M2U2ZDg4OTFJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--f3852a6af7a2cac08662f993c97bb4e5361ce2cf;
207
- domain=.cartodb.com; path=/; HttpOnly
208
- X-Runtime:
209
- - '0.149254'
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 15:53:11 GMT
217
- - request:
218
- method: delete
219
- uri: https://cartodb-rb-client.cartodb.com/api/v1/tables/table_1?
220
- body:
221
- encoding: US-ASCII
222
- string: ''
223
- headers:
224
- Accept:
225
- - *70347547176260
226
- Authorization:
227
- - OAuth oauth_consumer_key="0gRpcgKQK8bpcvSzM5ED4NqaSbNQ8ivS4q0pVdJF", oauth_nonce="W9qeZVUT7etENgwtN6zsPZ2IgF1dmug3qyU4qDS6M",
228
- oauth_signature="zY9gsWDwRR6fw2otdtxuxHOuhaY%3D", oauth_signature_method="HMAC-SHA1",
229
- oauth_timestamp="1337788391", 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 15:53:11 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
- Cache-Control:
251
- - no-cache
252
- X-Ua-Compatible:
253
- - IE=Edge,chrome=1
254
- Set-Cookie:
255
- - _cartodb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlN2JkZTQxZDhiYTFiM2IyMDkyYzMxODVhMGMyMGU2YjBJIiZ3YXJkZW4udXNlci5jYXJ0b2RiLXJiLWNsaWVudC5rZXkGOwBUSSIWY2FydG9kYi1yYi1jbGllbnQGOwBU--f0017b0d727604edaeb1a3d0c70d6d12adc50cf4;
256
- domain=.cartodb.com; path=/; HttpOnly
257
- X-Runtime:
258
- - '0.177177'
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 15:53:11 GMT
266
- recorded_with: VCR 2.1.1
219
+ string: !binary |-
220
+ IA==
221
+ http_version: !binary |-
222
+ MS4x
223
+ recorded_at: Mon, 20 Aug 2012 10:58:30 GMT
224
+ recorded_with: VCR 2.2.4
@@ -1,101 +1,54 @@
1
1
  require 'rubygems'
2
- require 'spork'
3
- #uncomment the following line to use spork with the debugger
4
- #require 'spork/ext/ruby-debug'
5
2
 
6
- Spork.prefork do
7
- # Loading more in this block will cause your tests to run faster. However,
8
- # if you change any configuration or code from libraries loaded here, you'll
9
- # need to restart spork for it take effect.
10
-
11
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
12
- $LOAD_PATH.unshift(File.dirname(__FILE__))
13
- require 'rspec'
14
- require 'yaml'
15
- require 'cartodb-rb-client'
16
- require 'cartodb-rb-client/cartodb'
17
- require 'active_support/core_ext/array/random_access.rb'
18
-
19
- cartodb_config = {
20
- 'host' => 'https://cartodb-rb-client.cartodb.com',
21
- 'oauth_key' => ENV['CARTODB_OAUTH_KEY'],
22
- 'oauth_secret' => ENV['CARTODB_OAUTH_SECRET'],
23
- 'username' => ENV['CARTODB_USERNAME'],
24
- 'password' => ENV['CARTODB_PASSWORD']
25
- }
26
-
27
- if File.exists?("#{File.dirname(__FILE__)}/support/cartodb_config.yml")
28
- cartodb_config = YAML.load_file("#{File.dirname(__FILE__)}/support/cartodb_config.yml")
29
- end
30
- CartoDB::Settings = cartodb_config
31
- CartoDB::Connection = CartoDB::Client::Connection::Base.new unless defined? CartoDB::Connection
32
- # CartoDB::Settings = YAML.load_file("#{File.dirname(__FILE__)}/support/database.yml") unless defined? CartoDB::Settings
33
- # CartoDB::Connection = CartoDB::Client::Connection::Base.new unless defined? CartoDB::Connection
34
-
35
- RgeoFactory = ::RGeo::Geographic.spherical_factory(:srid => 4326)
36
-
37
- require "#{File.dirname(__FILE__)}/support/cartodb_helpers.rb"
38
- require "#{File.dirname(__FILE__)}/support/cartodb_factories.rb"
39
-
40
- require 'vcr'
41
- VCR.configure do |c|
42
- c.default_cassette_options = { :record => :new_episodes }
43
- c.cassette_library_dir = 'spec/fixtures/cassettes'
44
- c.hook_into :typhoeus
45
- #c.preserve_exact_body_bytes
46
- c.configure_rspec_metadata!
47
- end
3
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
5
+ require 'rspec'
6
+ require 'yaml'
7
+ require 'cartodb-rb-client'
8
+ require 'cartodb-rb-client/cartodb'
9
+ require 'active_support/core_ext/array/random_access.rb'
10
+
11
+ cartodb_config = {
12
+ 'host' => 'https://cartodb-rb-client.cartodb.com',
13
+ 'oauth_key' => ENV['CARTODB_OAUTH_KEY'],
14
+ 'oauth_secret' => ENV['CARTODB_OAUTH_SECRET'],
15
+ 'username' => ENV['CARTODB_USERNAME'],
16
+ 'password' => ENV['CARTODB_PASSWORD']
17
+ }
18
+
19
+ if File.exists?("#{File.dirname(__FILE__)}/support/cartodb_config.yml")
20
+ cartodb_config = YAML.load_file("#{File.dirname(__FILE__)}/support/cartodb_config.yml")
21
+ end
22
+ CartoDB::Settings = cartodb_config
23
+ CartoDB::Connection = CartoDB::Client::Connection::Base.new unless defined? CartoDB::Connection
24
+ # CartoDB::Settings = YAML.load_file("#{File.dirname(__FILE__)}/support/database.yml") unless defined? CartoDB::Settings
25
+ # CartoDB::Connection = CartoDB::Client::Connection::Base.new unless defined? CartoDB::Connection
26
+
27
+ RgeoFactory = ::RGeo::Geographic.spherical_factory(:srid => 4326)
28
+
29
+ require "#{File.dirname(__FILE__)}/support/cartodb_helpers.rb"
30
+ require "#{File.dirname(__FILE__)}/support/cartodb_factories.rb"
31
+
32
+ require 'vcr'
33
+ VCR.configure do |c|
34
+ c.default_cassette_options = { :record => :new_episodes }
35
+ c.cassette_library_dir = 'spec/fixtures/cassettes'
36
+ c.hook_into :typhoeus
37
+ #c.preserve_exact_body_bytes
38
+ c.configure_rspec_metadata!
39
+ end
48
40
 
49
- RSpec.configure do |config|
50
- config.before(:each) do
51
- VCR.use_cassette('clean tables') do
52
- drop_all_cartodb_tables
53
- end
41
+ RSpec.configure do |config|
42
+ config.before(:each) do
43
+ VCR.use_cassette('clean tables') do
44
+ drop_all_cartodb_tables
54
45
  end
46
+ end
55
47
 
56
- config.after(:all) do
57
- VCR.use_cassette('clean tables') do
58
- drop_all_cartodb_tables
59
- end
48
+ config.after(:all) do
49
+ VCR.use_cassette('clean tables') do
50
+ drop_all_cartodb_tables
60
51
  end
61
-
62
52
  end
63
- end
64
-
65
- Spork.each_run do
66
- # This code will be run each time you run your specs.
67
53
 
68
54
  end
69
-
70
- # --- Instructions ---
71
- # Sort the contents of this file into a Spork.prefork and a Spork.each_run
72
- # block.
73
- #
74
- # The Spork.prefork block is run only once when the spork server is started.
75
- # You typically want to place most of your (slow) initializer code in here, in
76
- # particular, require'ing any 3rd-party gems that you don't normally modify
77
- # during development.
78
- #
79
- # The Spork.each_run block is run each time you run your specs. In case you
80
- # need to load files that tend to change during development, require them here.
81
- # With Rails, your application modules are loaded automatically, so sometimes
82
- # this block can remain empty.
83
- #
84
- # Note: You can modify files loaded *from* the Spork.each_run block without
85
- # restarting the spork server. However, this file itself will not be reloaded,
86
- # so if you change any of the code inside the each_run block, you still need to
87
- # restart the server. In general, if you have non-trivial code in this file,
88
- # it's advisable to move it into a separate file so you can easily edit it
89
- # without restarting spork. (For example, with RSpec, you could move
90
- # non-trivial code into a file spec/support/my_helper.rb, making sure that the
91
- # spec/support/* files are require'd from inside the each_run block.)
92
- #
93
- # Any code that is left outside the two blocks will be run during preforking
94
- # *and* during each_run -- that's probably not what you want.
95
- #
96
- # These instructions should self-destruct in 10 seconds. If they don't, feel
97
- # free to delete them.
98
-
99
-
100
-
101
-