big_ml 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/CHANGELOG.md +5 -0
  2. data/README.md +55 -18
  3. data/big_ml.gemspec +1 -0
  4. data/lib/big_ml/base.rb +21 -11
  5. data/lib/big_ml/dataset.rb +10 -4
  6. data/lib/big_ml/model.rb +16 -10
  7. data/lib/big_ml/prediction.rb +6 -4
  8. data/lib/big_ml/source.rb +10 -4
  9. data/lib/big_ml/{authenticable.rb → util/authenticable.rb} +0 -0
  10. data/lib/big_ml/util/client.rb +26 -0
  11. data/lib/big_ml/util/config.rb +32 -0
  12. data/lib/big_ml/{request.rb → util/request.rb} +0 -0
  13. data/lib/big_ml/version.rb +1 -1
  14. data/lib/big_ml.rb +8 -4
  15. data/spec/integration/dataset_spec.rb +17 -0
  16. data/spec/integration/model_spec.rb +17 -0
  17. data/spec/integration/prediction_spec.rb +11 -0
  18. data/spec/integration/source_spec.rb +19 -6
  19. data/spec/units/client_spec.rb +5 -5
  20. data/spec/vcr_cassettes/BigML_Dataset/no_dataset/_all/must_be_empty.yml +53 -17
  21. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/can_be_converted_in_a_model.yml +232 -0
  22. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_be_deleted_using_the_destroy_method.yml +288 -0
  23. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_be_find_using_the_reference.yml +49 -49
  24. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_remove_the_dataset.yml +41 -77
  25. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_update_the_name.yml +57 -57
  26. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_be_able_to_update_the_name_from_the_instance.yml +360 -0
  27. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_have_only_one_item.yml +44 -44
  28. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/must_have_the_same_file_name.yml +44 -44
  29. data/spec/vcr_cassettes/BigML_Dataset/one_dataset/was_created_successfully.yml +22 -22
  30. data/spec/vcr_cassettes/BigML_Model/no_model/_all/must_be_empty.yml +133 -21
  31. data/spec/vcr_cassettes/BigML_Model/one_model/can_be_converted_in_a_prediction.yml +346 -0
  32. data/spec/vcr_cassettes/BigML_Model/one_model/{must_have_the_same_file_name.yml → must_be_able_to_be_deleted_using_the_destroy_method.yml} +90 -107
  33. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_be_find_using_the_reference.yml +172 -161
  34. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_remove_the_model.yml +194 -70
  35. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_update_the_name.yml +225 -243
  36. data/spec/vcr_cassettes/BigML_Model/one_model/must_be_able_to_update_the_name_from_the_instance.yml +686 -0
  37. data/spec/vcr_cassettes/BigML_Model/one_model/must_have_only_one_item.yml +169 -52
  38. data/spec/vcr_cassettes/BigML_Model/one_model/must_have_the_same_size.yml +91 -90
  39. data/spec/vcr_cassettes/BigML_Model/one_model/was_created_successfully.yml +35 -114
  40. data/spec/vcr_cassettes/BigML_Prediction/no_prediction/_all/must_be_empty.yml +141 -89
  41. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_be_deleted_using_the_destroy_method.yml +474 -0
  42. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_be_find_using_the_reference.yml +88 -88
  43. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_remove_the_prediction.yml +88 -88
  44. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_update_the_name.yml +97 -97
  45. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_be_able_to_update_the_name_from_the_instance.yml +545 -0
  46. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_have_only_one_item.yml +90 -90
  47. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/must_have_the_same_name.yml +161 -78
  48. data/spec/vcr_cassettes/BigML_Prediction/one_prediction/was_created_successfully.yml +45 -45
  49. data/spec/vcr_cassettes/BigML_Source/no_source/_all/must_be_empty.yml +12 -42
  50. data/spec/vcr_cassettes/BigML_Source/one_source/can_be_converted_in_a_dataset.yml +119 -0
  51. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_be_deleted_using_the_destroy_method.yml +135 -0
  52. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_be_find_using_the_reference.yml +22 -52
  53. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_remove_the_source.yml +43 -30
  54. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_update_the_name.yml +38 -68
  55. data/spec/vcr_cassettes/BigML_Source/one_source/must_be_able_to_update_the_name_from_the_instance.yml +249 -0
  56. data/spec/vcr_cassettes/BigML_Source/one_source/must_have_only_one_item.yml +24 -54
  57. data/spec/vcr_cassettes/BigML_Source/one_source/must_have_the_same_file_name.yml +21 -51
  58. data/spec/vcr_cassettes/BigML_Source/one_source/was_created_successfully.yml +8 -38
  59. metadata +50 -9
  60. data/.rvmrc +0 -1
  61. data/lib/big_ml/client.rb +0 -29
  62. data/lib/big_ml/config.rb +0 -30
@@ -17,7 +17,7 @@ http_interactions:
17
17
  content-type:
18
18
  - application/json; charset=utf-8
19
19
  date:
20
- - Wed, 20 Jun 2012 04:05:58 GMT
20
+ - Thu, 28 Jun 2012 22:25:21 GMT
21
21
  server:
22
22
  - nginx/1.0.12
23
23
  content-length:
@@ -29,7 +29,7 @@ http_interactions:
29
29
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
30
30
  "total_count": 0}, "objects": []}'
31
31
  http_version: '1.1'
32
- recorded_at: Wed, 20 Jun 2012 04:09:49 GMT
32
+ recorded_at: Thu, 28 Jun 2012 22:30:07 GMT
33
33
  - request:
34
34
  method: get
35
35
  uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
@@ -47,11 +47,11 @@ http_interactions:
47
47
  content-type:
48
48
  - application/json; charset=utf-8
49
49
  date:
50
- - Wed, 20 Jun 2012 04:08:19 GMT
50
+ - Thu, 28 Jun 2012 22:27:55 GMT
51
51
  server:
52
52
  - nginx/1.0.12
53
- content-length:
54
- - '101'
53
+ transfer-encoding:
54
+ - chunked
55
55
  connection:
56
56
  - Close
57
57
  body:
@@ -59,7 +59,7 @@ http_interactions:
59
59
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
60
60
  "total_count": 0}, "objects": []}'
61
61
  http_version: '1.1'
62
- recorded_at: Wed, 20 Jun 2012 04:09:50 GMT
62
+ recorded_at: Thu, 28 Jun 2012 22:30:08 GMT
63
63
  - request:
64
64
  method: get
65
65
  uri: https://bigml.io/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
@@ -77,7 +77,7 @@ http_interactions:
77
77
  content-type:
78
78
  - application/json; charset=utf-8
79
79
  date:
80
- - Wed, 20 Jun 2012 04:06:00 GMT
80
+ - Thu, 28 Jun 2012 22:25:23 GMT
81
81
  server:
82
82
  - nginx/1.0.12
83
83
  content-length:
@@ -89,7 +89,7 @@ http_interactions:
89
89
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
90
90
  "total_count": 0}, "objects": []}'
91
91
  http_version: '1.1'
92
- recorded_at: Wed, 20 Jun 2012 04:09:51 GMT
92
+ recorded_at: Thu, 28 Jun 2012 22:30:10 GMT
93
93
  - request:
94
94
  method: get
95
95
  uri: https://bigml.io/andromeda/prediction?username=<USERNAME>&api_key=<API_KEY>
@@ -107,7 +107,7 @@ http_interactions:
107
107
  content-type:
108
108
  - application/json; charset=utf-8
109
109
  date:
110
- - Wed, 20 Jun 2012 04:08:22 GMT
110
+ - Thu, 28 Jun 2012 22:27:59 GMT
111
111
  server:
112
112
  - nginx/1.0.12
113
113
  content-length:
@@ -119,7 +119,7 @@ http_interactions:
119
119
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
120
120
  "total_count": 0}, "objects": []}'
121
121
  http_version: '1.1'
122
- recorded_at: Wed, 20 Jun 2012 04:09:53 GMT
122
+ recorded_at: Thu, 28 Jun 2012 22:30:12 GMT
123
123
  - request:
124
124
  method: post
125
125
  uri: https://bigml.io/andromeda/source
@@ -141,9 +141,9 @@ http_interactions:
141
141
  content-type:
142
142
  - application/json; charset=utf-8
143
143
  date:
144
- - Wed, 20 Jun 2012 04:06:04 GMT
144
+ - Thu, 28 Jun 2012 22:25:27 GMT
145
145
  location:
146
- - http://bigml.io/andromeda/source/4fe14d07035d074a200000fd
146
+ - http://bigml.io/andromeda/source/4fecdad5035d0741ef00329d
147
147
  server:
148
148
  - nginx/1.0.12
149
149
  content-length:
@@ -153,21 +153,21 @@ http_interactions:
153
153
  body:
154
154
  encoding: US-ASCII
155
155
  string: ! '{"category": 0, "code": 201, "content_type": "application/octet-stream",
156
- "created": "2012-06-20T04:09:43.443047", "credits": 0.0, "description": "",
156
+ "created": "2012-06-28T22:29:41.629721", "credits": 0.0, "description": "",
157
157
  "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
158
158
  "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
159
- 0, "private": true, "resource": "source/4fe14d07035d074a200000fd", "size":
159
+ 0, "private": true, "resource": "source/4fecdad5035d0741ef00329d", "size":
160
160
  4608, "source_parser": {}, "status": {"code": 1, "message": "The request has
161
161
  been queued and will be processed soon"}, "tags": [], "type": 0, "updated":
162
- "2012-06-20T04:09:43.443068"}'
162
+ "2012-06-28T22:29:41.629754"}'
163
163
  http_version: '1.1'
164
- recorded_at: Wed, 20 Jun 2012 04:09:54 GMT
164
+ recorded_at: Thu, 28 Jun 2012 22:30:14 GMT
165
165
  - request:
166
166
  method: post
167
167
  uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
168
168
  body:
169
169
  encoding: UTF-8
170
- string: ! '{"source":"source/4fe14d07035d074a200000fd"}'
170
+ string: ! '{"source":"source/4fecdad5035d0741ef00329d"}'
171
171
  headers:
172
172
  content-type:
173
173
  - application/json
@@ -181,37 +181,37 @@ http_interactions:
181
181
  content-type:
182
182
  - application/json; charset=utf-8
183
183
  date:
184
- - Wed, 20 Jun 2012 04:08:25 GMT
184
+ - Thu, 28 Jun 2012 22:28:03 GMT
185
185
  location:
186
- - http://bigml.io/andromeda/dataset/4fe14d251552687d48000111
186
+ - http://bigml.io/andromeda/dataset/4fecdad7035d0741f40032ae
187
187
  server:
188
188
  - nginx/1.0.12
189
189
  content-length:
190
- - '920'
190
+ - '921'
191
191
  connection:
192
192
  - Close
193
193
  body:
194
194
  encoding: US-ASCII
195
- string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-20T04:10:13.101722",
196
- "credits": 0.0087890625, "description": "", "fields": {"000000": {"column_number":
195
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-28T22:29:43.662595",
196
+ "credits": 0.00439453125, "description": "", "fields": {"000000": {"column_number":
197
197
  0, "name": "sepal length", "optype": "numeric"}, "000001": {"column_number":
198
198
  1, "name": "sepal width", "optype": "numeric"}, "000002": {"column_number":
199
199
  2, "name": "petal length", "optype": "numeric"}, "000003": {"column_number":
200
200
  3, "name": "petal width", "optype": "numeric"}, "000004": {"column_number":
201
201
  4, "name": "species", "optype": "categorical"}}, "locale": "en_US", "name":
202
202
  "iris'' dataset", "number_of_models": 0, "number_of_predictions": 0, "private":
203
- true, "resource": "dataset/4fe14d251552687d48000111", "rows": 0, "size": 4608,
204
- "source": "source/4fe14d07035d074a200000fd", "source_status": true, "status":
203
+ true, "resource": "dataset/4fecdad7035d0741f40032ae", "rows": 0, "size": 4608,
204
+ "source": "source/4fecdad5035d0741ef00329d", "source_status": true, "status":
205
205
  {"code": 1, "message": "The dataset is being processed and will be created
206
- soon"}, "tags": [], "updated": "2012-06-20T04:10:13.101739"}'
206
+ soon"}, "tags": [], "updated": "2012-06-28T22:29:43.662614"}'
207
207
  http_version: '1.1'
208
- recorded_at: Wed, 20 Jun 2012 04:09:56 GMT
208
+ recorded_at: Thu, 28 Jun 2012 22:30:16 GMT
209
209
  - request:
210
210
  method: post
211
211
  uri: https://bigml.io/andromeda/model?username=<USERNAME>&api_key=<API_KEY>
212
212
  body:
213
213
  encoding: UTF-8
214
- string: ! '{"dataset":"dataset/4fe14d251552687d48000111"}'
214
+ string: ! '{"dataset":"dataset/4fecdad7035d0741f40032ae"}'
215
215
  headers:
216
216
  content-type:
217
217
  - application/json
@@ -225,33 +225,33 @@ http_interactions:
225
225
  content-type:
226
226
  - application/json; charset=utf-8
227
227
  date:
228
- - Wed, 20 Jun 2012 04:06:07 GMT
228
+ - Thu, 28 Jun 2012 22:25:31 GMT
229
229
  location:
230
- - http://bigml.io/andromeda/model/4fe14d261552687d42000156
230
+ - http://bigml.io/andromeda/model/4fecdb0a15526875f5003313
231
231
  server:
232
232
  - nginx/1.0.12
233
233
  content-length:
234
- - '690'
234
+ - '691'
235
235
  connection:
236
236
  - Close
237
237
  body:
238
238
  encoding: US-ASCII
239
- string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-20T04:10:14.423063",
240
- "credits": 0.03515625, "dataset": "dataset/4fe14d251552687d48000111", "dataset_status":
239
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-28T22:30:34.035084",
240
+ "credits": 0.017578125, "dataset": "dataset/4fecdad7035d0741f40032ae", "dataset_status":
241
241
  true, "description": "", "holdout": 0.0, "input_fields": [], "locale": "en_US",
242
242
  "max_columns": 5, "max_rows": 150, "name": "iris'' dataset model", "number_of_predictions":
243
243
  0, "objective_fields": [], "private": true, "range": [1, 150], "resource":
244
- "model/4fe14d261552687d42000156", "rows": 150, "size": 4608, "source": "source/4fe14d07035d074a200000fd",
244
+ "model/4fecdb0a15526875f5003313", "rows": 150, "size": 4608, "source": "source/4fecdad5035d0741ef00329d",
245
245
  "source_status": true, "status": {"code": 1, "message": "The model is being
246
- processed and will be created soon"}, "tags": [], "updated": "2012-06-20T04:10:14.423081"}'
246
+ processed and will be created soon"}, "tags": [], "updated": "2012-06-28T22:30:34.035120"}'
247
247
  http_version: '1.1'
248
- recorded_at: Wed, 20 Jun 2012 04:09:57 GMT
248
+ recorded_at: Thu, 28 Jun 2012 22:30:17 GMT
249
249
  - request:
250
250
  method: post
251
251
  uri: https://bigml.io/andromeda/prediction?username=<USERNAME>&api_key=<API_KEY>
252
252
  body:
253
253
  encoding: UTF-8
254
- string: ! '{"model":"model/4fe14d261552687d42000156","input_data":{"000001":3}}'
254
+ string: ! '{"model":"model/4fecdb0a15526875f5003313","input_data":{"000001":3}}'
255
255
  headers:
256
256
  content-type:
257
257
  - application/json
@@ -265,9 +265,9 @@ http_interactions:
265
265
  content-type:
266
266
  - application/json; charset=utf-8
267
267
  date:
268
- - Wed, 20 Jun 2012 04:08:28 GMT
268
+ - Thu, 28 Jun 2012 22:28:06 GMT
269
269
  location:
270
- - http://bigml.io/andromeda/prediction/4fe14d0b035d074a1e00010e
270
+ - http://bigml.io/andromeda/prediction/4fecdb0b15526875f9003296
271
271
  server:
272
272
  - nginx/1.0.12
273
273
  content-length:
@@ -276,22 +276,22 @@ http_interactions:
276
276
  - Close
277
277
  body:
278
278
  encoding: US-ASCII
279
- string: ! '{"category": 0, "code": 201, "created": "2012-06-20T04:09:47.869041",
280
- "credits": 0.01, "dataset": "dataset/4fe14d251552687d48000111", "dataset_status":
279
+ string: ! '{"category": 0, "code": 201, "created": "2012-06-28T22:30:35.719086",
280
+ "credits": 0.01, "dataset": "dataset/4fecdad7035d0741f40032ae", "dataset_status":
281
281
  true, "description": "", "fields": {"000001": {"column_number": 1, "datatype":
282
282
  "double", "name": "sepal width", "optype": "numeric", "preferred": true},
283
283
  "000002": {"column_number": 2, "datatype": "double", "name": "petal length",
284
284
  "optype": "numeric", "preferred": true}, "000004": {"column_number": 4, "datatype":
285
285
  "string", "name": "species", "optype": "categorical", "preferred": true}},
286
- "input_data": {"000001": 3}, "locale": "en_US", "model": "model/4fe14d261552687d42000156",
286
+ "input_data": {"000001": 3}, "locale": "en_US", "model": "model/4fecdb0a15526875f5003313",
287
287
  "model_status": true, "name": "Prediction for species", "objective_fields":
288
288
  ["000004"], "prediction": {"000004": "Iris-virginica"}, "prediction_path":
289
289
  {"bad_fields": [], "next_predicates": [{"field": "000002", "operator": ">",
290
290
  "value": 2.45}, {"field": "000002", "operator": "<=", "value": 2.45}], "path":
291
- [], "unknown_fields": []}, "private": true, "resource": "prediction/4fe14d0b035d074a1e00010e",
292
- "source": "source/4fe14d07035d074a200000fd", "source_status": true, "status":
291
+ [], "unknown_fields": []}, "private": true, "resource": "prediction/4fecdb0b15526875f9003296",
292
+ "source": "source/4fecdad5035d0741ef00329d", "source_status": true, "status":
293
293
  {"code": 5, "message": "The prediction has been created"}, "tags": [], "updated":
294
- "2012-06-20T04:09:47.869063"}'
294
+ "2012-06-28T22:30:35.719105"}'
295
295
  http_version: '1.1'
296
- recorded_at: Wed, 20 Jun 2012 04:09:59 GMT
296
+ recorded_at: Thu, 28 Jun 2012 22:30:19 GMT
297
297
  recorded_with: VCR 2.2.2
@@ -17,7 +17,7 @@ http_interactions:
17
17
  content-type:
18
18
  - application/json; charset=utf-8
19
19
  date:
20
- - Wed, 20 Jun 2012 03:19:33 GMT
20
+ - Thu, 28 Jun 2012 22:31:25 GMT
21
21
  server:
22
22
  - nginx/1.0.12
23
23
  content-length:
@@ -28,25 +28,25 @@ http_interactions:
28
28
  encoding: US-ASCII
29
29
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
30
30
  "total_count": 1}, "objects": [{"category": 0, "code": 200, "content_type":
31
- "application/octet-stream", "created": "2012-06-20T03:20:33.651000", "credits":
31
+ "application/octet-stream", "created": "2012-06-28T22:32:51.882000", "credits":
32
32
  0.0, "description": "", "fields": {"000000": {"column_number": 0, "name":
33
33
  "sepal length", "optype": "numeric"}, "000001": {"column_number": 1, "name":
34
34
  "sepal width", "optype": "numeric"}, "000002": {"column_number": 2, "name":
35
35
  "petal length", "optype": "numeric"}, "000003": {"column_number": 3, "name":
36
36
  "petal width", "optype": "numeric"}, "000004": {"column_number": 4, "name":
37
37
  "species", "optype": "categorical"}}, "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae",
38
- "name": "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
39
- 0, "private": true, "resource": "source/4fe141811552687d42000122", "size":
38
+ "name": "iris.csv", "number_of_datasets": 1, "number_of_models": 1, "number_of_predictions":
39
+ 0, "private": true, "resource": "source/4fecdb93035d0741ef0032a8", "size":
40
40
  4608, "source_parser": {"header": true, "locale": "en_US", "missing_tokens":
41
41
  ["", "N/A", "n/a", "NULL", "null", "-", "#DIV/0", "#REF!", "#NAME?", "NIL",
42
42
  "nil", "NA", "na", "#VALUE!", "#NULL!", "NaN", "#N/A", "#NUM!", "?"], "quote":
43
- "\"", "separator": ","}, "status": {"code": 5, "elapsed": 93, "message": "The
44
- source has been created"}, "tags": [], "type": 0, "updated": "2012-06-20T03:20:09.383000"}]}'
43
+ "\"", "separator": ","}, "status": {"code": 5, "elapsed": 62, "message": "The
44
+ source has been created"}, "tags": [], "type": 0, "updated": "2012-06-28T22:33:03.549000"}]}'
45
45
  http_version: '1.1'
46
- recorded_at: Wed, 20 Jun 2012 03:21:05 GMT
46
+ recorded_at: Thu, 28 Jun 2012 22:33:38 GMT
47
47
  - request:
48
48
  method: delete
49
- uri: https://bigml.io/andromeda/source/4fe141811552687d42000122?username=<USERNAME>&api_key=<API_KEY>
49
+ uri: https://bigml.io/andromeda/source/4fecdb93035d0741ef0032a8?username=<USERNAME>&api_key=<API_KEY>
50
50
  body:
51
51
  encoding: US-ASCII
52
52
  string: ''
@@ -63,7 +63,7 @@ http_interactions:
63
63
  content-type:
64
64
  - text/html; charset=utf-8
65
65
  date:
66
- - Wed, 20 Jun 2012 03:17:16 GMT
66
+ - Thu, 28 Jun 2012 22:28:54 GMT
67
67
  server:
68
68
  - nginx/1.0.12
69
69
  connection:
@@ -72,37 +72,7 @@ http_interactions:
72
72
  encoding: US-ASCII
73
73
  string: ''
74
74
  http_version: '1.1'
75
- recorded_at: Wed, 20 Jun 2012 03:21:06 GMT
76
- - request:
77
- method: get
78
- uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
79
- body:
80
- encoding: US-ASCII
81
- string: ''
82
- headers:
83
- connection:
84
- - close
85
- response:
86
- status:
87
- code: 200
88
- message: OK
89
- headers:
90
- content-type:
91
- - application/json; charset=utf-8
92
- date:
93
- - Wed, 20 Jun 2012 03:19:36 GMT
94
- server:
95
- - nginx/1.0.12
96
- content-length:
97
- - '101'
98
- connection:
99
- - Close
100
- body:
101
- encoding: US-ASCII
102
- string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
103
- "total_count": 0}, "objects": []}'
104
- http_version: '1.1'
105
- recorded_at: Wed, 20 Jun 2012 03:21:07 GMT
75
+ recorded_at: Thu, 28 Jun 2012 22:33:40 GMT
106
76
  - request:
107
77
  method: get
108
78
  uri: https://bigml.io/andromeda/source?username=<USERNAME>&api_key=<API_KEY>
@@ -120,7 +90,7 @@ http_interactions:
120
90
  content-type:
121
91
  - application/json; charset=utf-8
122
92
  date:
123
- - Wed, 20 Jun 2012 03:17:17 GMT
93
+ - Thu, 28 Jun 2012 22:31:28 GMT
124
94
  server:
125
95
  - nginx/1.0.12
126
96
  content-length:
@@ -132,5 +102,5 @@ http_interactions:
132
102
  string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
133
103
  "total_count": 0}, "objects": []}'
134
104
  http_version: '1.1'
135
- recorded_at: Wed, 20 Jun 2012 03:21:08 GMT
105
+ recorded_at: Thu, 28 Jun 2012 22:33:42 GMT
136
106
  recorded_with: VCR 2.2.2
@@ -0,0 +1,119 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://bigml.io/andromeda/source?username=<USERNAME>&api_key=<API_KEY>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ connection:
11
+ - close
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ content-type:
18
+ - application/json; charset=utf-8
19
+ date:
20
+ - Thu, 28 Jun 2012 22:30:11 GMT
21
+ server:
22
+ - nginx/1.0.12
23
+ content-length:
24
+ - '101'
25
+ connection:
26
+ - Close
27
+ body:
28
+ encoding: US-ASCII
29
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
30
+ "total_count": 0}, "objects": []}'
31
+ http_version: '1.1'
32
+ recorded_at: Thu, 28 Jun 2012 22:34:58 GMT
33
+ - request:
34
+ method: post
35
+ uri: https://bigml.io/andromeda/source
36
+ body:
37
+ encoding: US-ASCII
38
+ string: ''
39
+ headers:
40
+ content-type:
41
+ - multipart/form-data; boundary=-----------RubyMultipartPost
42
+ content-length:
43
+ - '5147'
44
+ connection:
45
+ - close
46
+ response:
47
+ status:
48
+ code: 201
49
+ message: CREATED
50
+ headers:
51
+ content-type:
52
+ - application/json; charset=utf-8
53
+ date:
54
+ - Thu, 28 Jun 2012 22:32:46 GMT
55
+ location:
56
+ - http://bigml.io/andromeda/source/4fecdc2415526875f3003353
57
+ server:
58
+ - nginx/1.0.12
59
+ content-length:
60
+ - '567'
61
+ connection:
62
+ - Close
63
+ body:
64
+ encoding: US-ASCII
65
+ string: ! '{"category": 0, "code": 201, "content_type": "application/octet-stream",
66
+ "created": "2012-06-28T22:35:16.003275", "credits": 0.0, "description": "",
67
+ "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
68
+ "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
69
+ 0, "private": true, "resource": "source/4fecdc2415526875f3003353", "size":
70
+ 4608, "source_parser": {}, "status": {"code": 1, "message": "The request has
71
+ been queued and will be processed soon"}, "tags": [], "type": 0, "updated":
72
+ "2012-06-28T22:35:16.003305"}'
73
+ http_version: '1.1'
74
+ recorded_at: Thu, 28 Jun 2012 22:34:59 GMT
75
+ - request:
76
+ method: post
77
+ uri: https://bigml.io/andromeda/dataset?username=<USERNAME>&api_key=<API_KEY>
78
+ body:
79
+ encoding: UTF-8
80
+ string: ! '{"source":"source/4fecdc2415526875f3003353"}'
81
+ headers:
82
+ content-type:
83
+ - application/json
84
+ connection:
85
+ - close
86
+ response:
87
+ status:
88
+ code: 201
89
+ message: CREATED
90
+ headers:
91
+ content-type:
92
+ - application/json; charset=utf-8
93
+ date:
94
+ - Thu, 28 Jun 2012 22:30:15 GMT
95
+ location:
96
+ - http://bigml.io/andromeda/dataset/4fecdbf5035d0741f40032bd
97
+ server:
98
+ - nginx/1.0.12
99
+ content-length:
100
+ - '921'
101
+ connection:
102
+ - Close
103
+ body:
104
+ encoding: US-ASCII
105
+ string: ! '{"category": 0, "code": 201, "columns": 5, "created": "2012-06-28T22:34:29.143646",
106
+ "credits": 0.00439453125, "description": "", "fields": {"000000": {"column_number":
107
+ 0, "name": "sepal length", "optype": "numeric"}, "000001": {"column_number":
108
+ 1, "name": "sepal width", "optype": "numeric"}, "000002": {"column_number":
109
+ 2, "name": "petal length", "optype": "numeric"}, "000003": {"column_number":
110
+ 3, "name": "petal width", "optype": "numeric"}, "000004": {"column_number":
111
+ 4, "name": "species", "optype": "categorical"}}, "locale": "en_US", "name":
112
+ "iris'' dataset", "number_of_models": 0, "number_of_predictions": 0, "private":
113
+ true, "resource": "dataset/4fecdbf5035d0741f40032bd", "rows": 0, "size": 4608,
114
+ "source": "source/4fecdc2415526875f3003353", "source_status": true, "status":
115
+ {"code": 1, "message": "The dataset is being processed and will be created
116
+ soon"}, "tags": [], "updated": "2012-06-28T22:34:29.143666"}'
117
+ http_version: '1.1'
118
+ recorded_at: Thu, 28 Jun 2012 22:35:02 GMT
119
+ recorded_with: VCR 2.2.2
@@ -0,0 +1,135 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://bigml.io/andromeda/source?username=<USERNAME>&api_key=<API_KEY>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ connection:
11
+ - close
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ content-type:
18
+ - application/json; charset=utf-8
19
+ date:
20
+ - Thu, 28 Jun 2012 22:30:05 GMT
21
+ server:
22
+ - nginx/1.0.12
23
+ content-length:
24
+ - '101'
25
+ connection:
26
+ - Close
27
+ body:
28
+ encoding: US-ASCII
29
+ string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
30
+ "total_count": 0}, "objects": []}'
31
+ http_version: '1.1'
32
+ recorded_at: Thu, 28 Jun 2012 22:34:51 GMT
33
+ - request:
34
+ method: post
35
+ uri: https://bigml.io/andromeda/source
36
+ body:
37
+ encoding: US-ASCII
38
+ string: ''
39
+ headers:
40
+ content-type:
41
+ - multipart/form-data; boundary=-----------RubyMultipartPost
42
+ content-length:
43
+ - '5147'
44
+ connection:
45
+ - close
46
+ response:
47
+ status:
48
+ code: 201
49
+ message: CREATED
50
+ headers:
51
+ content-type:
52
+ - application/json; charset=utf-8
53
+ date:
54
+ - Thu, 28 Jun 2012 22:32:40 GMT
55
+ location:
56
+ - http://bigml.io/andromeda/source/4fecdc1d15526875f8003345
57
+ server:
58
+ - nginx/1.0.12
59
+ content-length:
60
+ - '567'
61
+ connection:
62
+ - Close
63
+ body:
64
+ encoding: US-ASCII
65
+ string: ! '{"category": 0, "code": 201, "content_type": "application/octet-stream",
66
+ "created": "2012-06-28T22:35:09.804822", "credits": 0.0, "description": "",
67
+ "file_name": "iris.csv", "md5": "d1175c032e1042bec7f974c91e4a65ae", "name":
68
+ "iris.csv", "number_of_datasets": 0, "number_of_models": 0, "number_of_predictions":
69
+ 0, "private": true, "resource": "source/4fecdc1d15526875f8003345", "size":
70
+ 4608, "source_parser": {}, "status": {"code": 1, "message": "The request has
71
+ been queued and will be processed soon"}, "tags": [], "type": 0, "updated":
72
+ "2012-06-28T22:35:09.804850"}'
73
+ http_version: '1.1'
74
+ recorded_at: Thu, 28 Jun 2012 22:34:53 GMT
75
+ - request:
76
+ method: delete
77
+ uri: https://bigml.io/andromeda/source/4fecdc1d15526875f8003345?username=<USERNAME>&api_key=<API_KEY>
78
+ body:
79
+ encoding: US-ASCII
80
+ string: ''
81
+ headers:
82
+ connection:
83
+ - close
84
+ response:
85
+ status:
86
+ code: 204
87
+ message: NO CONTENT
88
+ headers:
89
+ content-length:
90
+ - '0'
91
+ content-type:
92
+ - text/html; charset=utf-8
93
+ date:
94
+ - Thu, 28 Jun 2012 22:30:09 GMT
95
+ server:
96
+ - nginx/1.0.12
97
+ connection:
98
+ - Close
99
+ body:
100
+ encoding: US-ASCII
101
+ string: ''
102
+ http_version: '1.1'
103
+ recorded_at: Thu, 28 Jun 2012 22:34:55 GMT
104
+ - request:
105
+ method: get
106
+ uri: https://bigml.io/andromeda/source/4fecdc1d15526875f8003345?username=<USERNAME>&api_key=<API_KEY>
107
+ body:
108
+ encoding: US-ASCII
109
+ string: ''
110
+ headers:
111
+ connection:
112
+ - close
113
+ response:
114
+ status:
115
+ code: 404
116
+ message: NOT FOUND
117
+ headers:
118
+ content-type:
119
+ - application/json; charset=utf-8
120
+ date:
121
+ - Thu, 28 Jun 2012 22:32:43 GMT
122
+ server:
123
+ - nginx/1.0.12
124
+ content-length:
125
+ - '169'
126
+ connection:
127
+ - Close
128
+ body:
129
+ encoding: US-ASCII
130
+ string: ! '{"code": 404, "status": {"code": -1201, "extra": ["Couldn''t find
131
+ an instance of ''Source'' which matched ''pk=4fecdc1d15526875f8003345''."],
132
+ "message": "Id does not exist"}}'
133
+ http_version: '1.1'
134
+ recorded_at: Thu, 28 Jun 2012 22:34:57 GMT
135
+ recorded_with: VCR 2.2.2