chunky_baconfile 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/.document +5 -0
  2. data/.gitignore +22 -0
  3. data/.yardoc/checksums +5 -0
  4. data/.yardoc/objects/ChunkyBaconfile.dat +0 -0
  5. data/.yardoc/objects/ChunkyBaconfile/Client.dat +0 -0
  6. data/.yardoc/objects/ChunkyBaconfile/Client/build_multipart_bodies_c.dat +0 -0
  7. data/.yardoc/objects/ChunkyBaconfile/Client/build_multipart_bodies_i.dat +0 -0
  8. data/.yardoc/objects/ChunkyBaconfile/Client/create_folder_i.dat +0 -0
  9. data/.yardoc/objects/ChunkyBaconfile/Client/delete_i.dat +0 -0
  10. data/.yardoc/objects/ChunkyBaconfile/Client/file_i.dat +0 -0
  11. data/.yardoc/objects/ChunkyBaconfile/Client/folder_i.dat +0 -0
  12. data/.yardoc/objects/ChunkyBaconfile/Client/initialize_i.dat +0 -0
  13. data/.yardoc/objects/ChunkyBaconfile/Client/mime_type_c.dat +0 -0
  14. data/.yardoc/objects/ChunkyBaconfile/Client/mime_type_i.dat +0 -0
  15. data/.yardoc/objects/ChunkyBaconfile/Client/public_i.dat +0 -0
  16. data/.yardoc/objects/ChunkyBaconfile/Client/upload_file_i.dat +0 -0
  17. data/.yardoc/objects/ChunkyBaconfile/Client/username_3D_i.dat +0 -0
  18. data/.yardoc/objects/ChunkyBaconfile/Client/username_i.dat +0 -0
  19. data/.yardoc/objects/ChunkyBaconfile/Client/verify_i.dat +0 -0
  20. data/.yardoc/objects/ChunkyBaconfile/FileInfo.dat +0 -0
  21. data/.yardoc/objects/ChunkyBaconfile/FileInfo/image_3F_i.dat +0 -0
  22. data/.yardoc/objects/ChunkyBaconfile/FileInfo/size_i.dat +0 -0
  23. data/.yardoc/objects/ChunkyBaconfile/FileInfo/time_modified_i.dat +0 -0
  24. data/.yardoc/objects/ChunkyBaconfile/FileInfo/type_i.dat +0 -0
  25. data/.yardoc/objects/ChunkyBaconfile/public_c.dat +0 -0
  26. data/.yardoc/objects/root.dat +0 -0
  27. data/.yardoc/proxy_types +0 -0
  28. data/LICENSE +20 -0
  29. data/README.md +47 -0
  30. data/Rakefile +60 -0
  31. data/VERSION +1 -0
  32. data/changelog.md +5 -0
  33. data/lib/chunky_baconfile.rb +24 -0
  34. data/lib/chunky_baconfile/client.rb +121 -0
  35. data/lib/chunky_baconfile/file_info.rb +19 -0
  36. data/test/fixtures/bacon.json +242 -0
  37. data/test/fixtures/cat.jpg +0 -0
  38. data/test/fixtures/cat.jpg.json +20 -0
  39. data/test/fixtures/delete.json +1 -0
  40. data/test/fixtures/error.json +1 -0
  41. data/test/fixtures/new_file.json +20 -0
  42. data/test/fixtures/new_folder.json +20 -0
  43. data/test/fixtures/public.json +402 -0
  44. data/test/fixtures/verify.json +1 -0
  45. data/test/helper.rb +43 -0
  46. data/test/test_chunky_baconfile.rb +87 -0
  47. metadata +171 -0
Binary file
@@ -0,0 +1,20 @@
1
+ {
2
+ "size": 39368,
3
+ "permalink": "http://baconfile.com/leah/cat.jpg/",
4
+ "name": "cat.jpg",
5
+ "url": "/leah/cat.jpg/",
6
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/cat.jpg",
7
+ "time_modified": 1236391578,
8
+ "tiny_url": "http://tinyb.cn/5s",
9
+ "user": {
10
+ "username": "leah",
11
+ "timezone": "US/Pacific",
12
+ "id": 2
13
+ },
14
+ "is_folder": false,
15
+ "path": "leah/cat.jpg",
16
+ "content_type": "image/jpeg",
17
+ "type": "image",
18
+ "id": "4456b389edad98575845d466f4ff6f8d",
19
+ "description": "die in a fire!"
20
+ }
@@ -0,0 +1 @@
1
+ {"success": {"message": "Item deleted."}}
@@ -0,0 +1 @@
1
+ {"error": {"message": "* file\n * This field is required."}}
@@ -0,0 +1,20 @@
1
+ {
2
+ "size": 7271,
3
+ "permalink": "http://baconfile.com/pengwynn/test_folder/wynn-120x120.png/",
4
+ "name": "wynn-120x120.png",
5
+ "url": "/pengwynn/test_folder/wynn-120x120.png/",
6
+ "file_url": "http://s3.amazonaws.com:80/pengwynn.baconfile.com/test_folder%2Fwynn-120x120.png",
7
+ "time_modified": 1262755171,
8
+ "tiny_url": "http://tinyb.cn/1qm",
9
+ "user": {
10
+ "username": "pengwynn",
11
+ "timezone": "America/Chicago",
12
+ "id": 947
13
+ },
14
+ "is_folder": false,
15
+ "path": "pengwynn/test_folder/wynn-120x120.png",
16
+ "content_type": "image/png",
17
+ "type": "image",
18
+ "id": "3c05b1e667fc3cf4fd6219d146324bdd",
19
+ "description": ""
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "content_type": null,
3
+ "description": "",
4
+ "file_url": null,
5
+ "id": "22ebbfa7e969cd4480bdfed25ec261ed",
6
+ "is_folder": true,
7
+ "name": "test_folder",
8
+ "path": "pengwynn/test_folder",
9
+ "permalink": "http://baconfile.com/pengwynn/test_folder/",
10
+ "size": null,
11
+ "time_modified": 1262753640,
12
+ "tiny_url": "http://tinyb.cn/1qk",
13
+ "type": "folder",
14
+ "url": "/pengwynn/test_folder/",
15
+ "user": {
16
+ "id": 947,
17
+ "timezone": "America/Chicago",
18
+ "username": "pengwynn"
19
+ }
20
+ }
@@ -0,0 +1,402 @@
1
+ {
2
+ "items": [{
3
+ "size": 54462,
4
+ "permalink": "http://baconfile.com/pengwynn/IMG_0005.PNG/",
5
+ "name": "IMG_0005.PNG",
6
+ "url": "/pengwynn/IMG_0005.PNG/",
7
+ "file_url": "http://s3.amazonaws.com:80/pengwynn.baconfile.com/IMG_0005.PNG",
8
+ "time_modified": 1262734456,
9
+ "tiny_url": "http://tinyb.cn/1qg",
10
+ "user": {
11
+ "username": "pengwynn",
12
+ "timezone": "America/Chicago",
13
+ "id": 947
14
+ },
15
+ "is_folder": false,
16
+ "path": "pengwynn/IMG_0005.PNG",
17
+ "content_type": "image/png",
18
+ "type": "image",
19
+ "id": "19cdb515f3fe22854b5c7ce7fd2b0f25",
20
+ "description": "GPS on Lake Tahoe"
21
+ },
22
+ {
23
+ "size": 68875,
24
+ "permalink": "http://baconfile.com/edouard/rack-webtranslateit.png/",
25
+ "name": "rack-webtranslateit.png",
26
+ "url": "/edouard/rack-webtranslateit.png/",
27
+ "file_url": "http://s3.amazonaws.com:80/edouard.baconfile.com/rack-webtranslateit.png",
28
+ "time_modified": 1262726024,
29
+ "tiny_url": "http://tinyb.cn/1qe",
30
+ "user": {
31
+ "username": "edouard",
32
+ "timezone": "Europe/Stockholm",
33
+ "id": 348
34
+ },
35
+ "is_folder": false,
36
+ "path": "edouard/rack-webtranslateit.png",
37
+ "content_type": "image/png",
38
+ "type": "image",
39
+ "id": "4fd51e18e33d40c328a51339afaaa056",
40
+ "description": ""
41
+ },
42
+ {
43
+ "size": 107194,
44
+ "permalink": "http://baconfile.com/tristan/Log/reknit.png/",
45
+ "name": "reknit.png",
46
+ "url": "/tristan/Log/reknit.png/",
47
+ "file_url": "http://s3.amazonaws.com:80/tristan.baconfile.com/Log%2Freknit.png",
48
+ "time_modified": 1262716700,
49
+ "tiny_url": "http://tinyb.cn/1qd",
50
+ "user": {
51
+ "username": "tristan",
52
+ "timezone": "Europe/Paris",
53
+ "id": 233
54
+ },
55
+ "is_folder": false,
56
+ "path": "tristan/Log/reknit.png",
57
+ "content_type": "image/png",
58
+ "type": "image",
59
+ "id": "4e3b76ed6d77af5e9259ba89df78448c",
60
+ "description": ""
61
+ },
62
+ {
63
+ "size": 665862,
64
+ "permalink": "http://baconfile.com/sisir/header_v8_main.swf/",
65
+ "name": "header_v8_main.swf",
66
+ "url": "/sisir/header_v8_main.swf/",
67
+ "file_url": "http://s3.amazonaws.com:80/sisir.baconfile.com/header_v8_main.swf",
68
+ "time_modified": 1262659870,
69
+ "tiny_url": "http://tinyb.cn/1qb",
70
+ "user": {
71
+ "username": "sisir",
72
+ "timezone": "Asia/Calcutta",
73
+ "id": 917
74
+ },
75
+ "is_folder": false,
76
+ "path": "sisir/header_v8_main.swf",
77
+ "content_type": "application/x-shockwave-flash",
78
+ "type": "other",
79
+ "id": "753eac889f960249a03c6b45337adb7a",
80
+ "description": ""
81
+ },
82
+ {
83
+ "size": 853,
84
+ "permalink": "http://baconfile.com/evanwalsh/skylar/application.js/",
85
+ "name": "application.js",
86
+ "url": "/evanwalsh/skylar/application.js/",
87
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Fapplication.js",
88
+ "time_modified": 1262563908,
89
+ "tiny_url": "http://tinyb.cn/1q7",
90
+ "user": {
91
+ "username": "evanwalsh",
92
+ "timezone": "US/Indiana_minus_Starke",
93
+ "id": 357
94
+ },
95
+ "is_folder": false,
96
+ "path": "evanwalsh/skylar/application.js",
97
+ "content_type": "application/x-javascript",
98
+ "type": "other",
99
+ "id": "f420d9b3fb4b9e0af02c635ae51590fd",
100
+ "description": ""
101
+ },
102
+ {
103
+ "size": 205280,
104
+ "permalink": "http://baconfile.com/icco/4074679630_b498297f2e_b.jpg/",
105
+ "name": "4074679630_b498297f2e_b.jpg",
106
+ "url": "/icco/4074679630_b498297f2e_b.jpg/",
107
+ "file_url": "http://s3.amazonaws.com:80/icco.baconfile.com/4074679630_b498297f2e_b.jpg",
108
+ "time_modified": 1262511105,
109
+ "tiny_url": "http://tinyb.cn/1q6",
110
+ "user": {
111
+ "username": "icco",
112
+ "timezone": "US/Pacific",
113
+ "id": 929
114
+ },
115
+ "is_folder": false,
116
+ "path": "icco/4074679630_b498297f2e_b.jpg",
117
+ "content_type": "image/jpeg",
118
+ "type": "image",
119
+ "id": "3a432d5a559a234097caea3548ce1b73",
120
+ "description": ""
121
+ },
122
+ {
123
+ "size": 4971579,
124
+ "permalink": "http://baconfile.com/icco/3monitors.png/",
125
+ "name": "3monitors.png",
126
+ "url": "/icco/3monitors.png/",
127
+ "file_url": "http://s3.amazonaws.com:80/icco.baconfile.com/3monitors.png",
128
+ "time_modified": 1262494694,
129
+ "tiny_url": "http://tinyb.cn/1q3",
130
+ "user": {
131
+ "username": "icco",
132
+ "timezone": "US/Pacific",
133
+ "id": 929
134
+ },
135
+ "is_folder": false,
136
+ "path": "icco/3monitors.png",
137
+ "content_type": "image/png",
138
+ "type": "image",
139
+ "id": "08e714700ad2aea8ee794e40eec3a926",
140
+ "description": ""
141
+ },
142
+ {
143
+ "size": 2310386,
144
+ "permalink": "http://baconfile.com/icco/01022010.png/",
145
+ "name": "01022010.png",
146
+ "url": "/icco/01022010.png/",
147
+ "file_url": "http://s3.amazonaws.com:80/icco.baconfile.com/01022010.png",
148
+ "time_modified": 1262494064,
149
+ "tiny_url": "http://tinyb.cn/1q2",
150
+ "user": {
151
+ "username": "icco",
152
+ "timezone": "US/Pacific",
153
+ "id": 929
154
+ },
155
+ "is_folder": false,
156
+ "path": "icco/01022010.png",
157
+ "content_type": "image/png",
158
+ "type": "image",
159
+ "id": "d3d93b419f8e2452efec55efe952d5b2",
160
+ "description": ""
161
+ },
162
+ {
163
+ "size": 5283,
164
+ "permalink": "http://baconfile.com/evanwalsh/skylar/tumblr.css/",
165
+ "name": "tumblr.css",
166
+ "url": "/evanwalsh/skylar/tumblr.css/",
167
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Ftumblr.css",
168
+ "time_modified": 1262487973,
169
+ "tiny_url": "http://tinyb.cn/1py",
170
+ "user": {
171
+ "username": "evanwalsh",
172
+ "timezone": "US/Indiana_minus_Starke",
173
+ "id": 357
174
+ },
175
+ "is_folder": false,
176
+ "path": "evanwalsh/skylar/tumblr.css",
177
+ "content_type": "text/css",
178
+ "type": "text",
179
+ "id": "cd04e930a145775e8727256d72fbc57b",
180
+ "description": ""
181
+ },
182
+ {
183
+ "size": 512,
184
+ "permalink": "http://baconfile.com/evanwalsh/skylar/pictures_thumbs.png/",
185
+ "name": "pictures_thumbs.png",
186
+ "url": "/evanwalsh/skylar/pictures_thumbs.png/",
187
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Fpictures_thumbs.png",
188
+ "time_modified": 1262484532,
189
+ "tiny_url": "http://tinyb.cn/1pv",
190
+ "user": {
191
+ "username": "evanwalsh",
192
+ "timezone": "US/Indiana_minus_Starke",
193
+ "id": 357
194
+ },
195
+ "is_folder": false,
196
+ "path": "evanwalsh/skylar/pictures_thumbs.png",
197
+ "content_type": "image/png",
198
+ "type": "image",
199
+ "id": "fc10addfc90dae4f8851724fcb0b9dfc",
200
+ "description": ""
201
+ },
202
+ {
203
+ "size": 1944,
204
+ "permalink": "http://baconfile.com/evanwalsh/skylar/stil.css/",
205
+ "name": "stil.css",
206
+ "url": "/evanwalsh/skylar/stil.css/",
207
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Fstil.css",
208
+ "time_modified": 1262476668,
209
+ "tiny_url": "http://tinyb.cn/1pu",
210
+ "user": {
211
+ "username": "evanwalsh",
212
+ "timezone": "US/Indiana_minus_Starke",
213
+ "id": 357
214
+ },
215
+ "is_folder": false,
216
+ "path": "evanwalsh/skylar/stil.css",
217
+ "content_type": "text/css",
218
+ "type": "text",
219
+ "id": "66b714457699dc19664b0d58acc1e863",
220
+ "description": ""
221
+ },
222
+ {
223
+ "size": 944,
224
+ "permalink": "http://baconfile.com/evanwalsh/skylar/world_go.png/",
225
+ "name": "world_go.png",
226
+ "url": "/evanwalsh/skylar/world_go.png/",
227
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Fworld_go.png",
228
+ "time_modified": 1262476572,
229
+ "tiny_url": "http://tinyb.cn/1pt",
230
+ "user": {
231
+ "username": "evanwalsh",
232
+ "timezone": "US/Indiana_minus_Starke",
233
+ "id": 357
234
+ },
235
+ "is_folder": false,
236
+ "path": "evanwalsh/skylar/world_go.png",
237
+ "content_type": "image/png",
238
+ "type": "image",
239
+ "id": "b5e440f81e67753d22bb6e515d442b87",
240
+ "description": ""
241
+ },
242
+ {
243
+ "size": 743,
244
+ "permalink": "http://baconfile.com/evanwalsh/skylar/user_comment.png/",
245
+ "name": "user_comment.png",
246
+ "url": "/evanwalsh/skylar/user_comment.png/",
247
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Fuser_comment.png",
248
+ "time_modified": 1262476562,
249
+ "tiny_url": "http://tinyb.cn/1ps",
250
+ "user": {
251
+ "username": "evanwalsh",
252
+ "timezone": "US/Indiana_minus_Starke",
253
+ "id": 357
254
+ },
255
+ "is_folder": false,
256
+ "path": "evanwalsh/skylar/user_comment.png",
257
+ "content_type": "image/png",
258
+ "type": "image",
259
+ "id": "4b778d91830ec787c8c1aaaf80d31eac",
260
+ "description": ""
261
+ },
262
+ {
263
+ "size": 342,
264
+ "permalink": "http://baconfile.com/evanwalsh/skylar/page_white_text.png/",
265
+ "name": "page_white_text.png",
266
+ "url": "/evanwalsh/skylar/page_white_text.png/",
267
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Fpage_white_text.png",
268
+ "time_modified": 1262476553,
269
+ "tiny_url": "http://tinyb.cn/1pr",
270
+ "user": {
271
+ "username": "evanwalsh",
272
+ "timezone": "US/Indiana_minus_Starke",
273
+ "id": 357
274
+ },
275
+ "is_folder": false,
276
+ "path": "evanwalsh/skylar/page_white_text.png",
277
+ "content_type": "image/png",
278
+ "type": "image",
279
+ "id": "19c9346837b738ee243cb1b08dda32b1",
280
+ "description": ""
281
+ },
282
+ {
283
+ "size": 284,
284
+ "permalink": "http://baconfile.com/evanwalsh/skylar/music_note.png/",
285
+ "name": "music_note.png",
286
+ "url": "/evanwalsh/skylar/music_note.png/",
287
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Fmusic_note.png",
288
+ "time_modified": 1262476543,
289
+ "tiny_url": "http://tinyb.cn/1pq",
290
+ "user": {
291
+ "username": "evanwalsh",
292
+ "timezone": "US/Indiana_minus_Starke",
293
+ "id": 357
294
+ },
295
+ "is_folder": false,
296
+ "path": "evanwalsh/skylar/music_note.png",
297
+ "content_type": "image/png",
298
+ "type": "image",
299
+ "id": "b44ee4d880f3ef6d6d6595119b1e321e",
300
+ "description": ""
301
+ },
302
+ {
303
+ "size": 3803,
304
+ "permalink": "http://baconfile.com/evanwalsh/skylar/logo.png/",
305
+ "name": "logo.png",
306
+ "url": "/evanwalsh/skylar/logo.png/",
307
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Flogo.png",
308
+ "time_modified": 1262476533,
309
+ "tiny_url": "http://tinyb.cn/1pp",
310
+ "user": {
311
+ "username": "evanwalsh",
312
+ "timezone": "US/Indiana_minus_Starke",
313
+ "id": 357
314
+ },
315
+ "is_folder": false,
316
+ "path": "evanwalsh/skylar/logo.png",
317
+ "content_type": "image/png",
318
+ "type": "image",
319
+ "id": "baa863c7e6e549ea3d89ff54bc2b3a6d",
320
+ "description": ""
321
+ },
322
+ {
323
+ "size": 653,
324
+ "permalink": "http://baconfile.com/evanwalsh/skylar/film.png/",
325
+ "name": "film.png",
326
+ "url": "/evanwalsh/skylar/film.png/",
327
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Ffilm.png",
328
+ "time_modified": 1262476516,
329
+ "tiny_url": "http://tinyb.cn/1po",
330
+ "user": {
331
+ "username": "evanwalsh",
332
+ "timezone": "US/Indiana_minus_Starke",
333
+ "id": 357
334
+ },
335
+ "is_folder": false,
336
+ "path": "evanwalsh/skylar/film.png",
337
+ "content_type": "image/png",
338
+ "type": "image",
339
+ "id": "1ffb33cf58692389cfa482f1b17969a7",
340
+ "description": ""
341
+ },
342
+ {
343
+ "size": 557,
344
+ "permalink": "http://baconfile.com/evanwalsh/skylar/comments.png/",
345
+ "name": "comments.png",
346
+ "url": "/evanwalsh/skylar/comments.png/",
347
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Fcomments.png",
348
+ "time_modified": 1262476506,
349
+ "tiny_url": "http://tinyb.cn/1pn",
350
+ "user": {
351
+ "username": "evanwalsh",
352
+ "timezone": "US/Indiana_minus_Starke",
353
+ "id": 357
354
+ },
355
+ "is_folder": false,
356
+ "path": "evanwalsh/skylar/comments.png",
357
+ "content_type": "image/png",
358
+ "type": "image",
359
+ "id": "095012db3a5f15478a901cb692147e9b",
360
+ "description": ""
361
+ },
362
+ {
363
+ "size": 665,
364
+ "permalink": "http://baconfile.com/evanwalsh/skylar/camera.png/",
365
+ "name": "camera.png",
366
+ "url": "/evanwalsh/skylar/camera.png/",
367
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Fcamera.png",
368
+ "time_modified": 1262476490,
369
+ "tiny_url": "http://tinyb.cn/1pm",
370
+ "user": {
371
+ "username": "evanwalsh",
372
+ "timezone": "US/Indiana_minus_Starke",
373
+ "id": 357
374
+ },
375
+ "is_folder": false,
376
+ "path": "evanwalsh/skylar/camera.png",
377
+ "content_type": "image/png",
378
+ "type": "image",
379
+ "id": "002382dea850be9eece6e7490d2aab77",
380
+ "description": ""
381
+ },
382
+ {
383
+ "size": 156,
384
+ "permalink": "http://baconfile.com/evanwalsh/skylar/bottom_fade.png/",
385
+ "name": "bottom_fade.png",
386
+ "url": "/evanwalsh/skylar/bottom_fade.png/",
387
+ "file_url": "http://s3.amazonaws.com:80/evanwalsh.baconfile.com/skylar%2Fbottom_fade.png",
388
+ "time_modified": 1262476480,
389
+ "tiny_url": "http://tinyb.cn/1pl",
390
+ "user": {
391
+ "username": "evanwalsh",
392
+ "timezone": "US/Indiana_minus_Starke",
393
+ "id": 357
394
+ },
395
+ "is_folder": false,
396
+ "path": "evanwalsh/skylar/bottom_fade.png",
397
+ "content_type": "image/png",
398
+ "type": "image",
399
+ "id": "f3cac7a5ed5dbc4b391b7a934d8a3a78",
400
+ "description": ""
401
+ }]
402
+ }