imw 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. data/Gemfile +23 -0
  2. data/Gemfile.lock +47 -0
  3. data/LICENSE +20 -674
  4. data/README.rdoc +3 -4
  5. data/VERSION +1 -1
  6. data/lib/imw.rb +64 -35
  7. data/lib/imw/dataset.rb +12 -2
  8. data/lib/imw/formats.rb +4 -2
  9. data/lib/imw/formats/delimited.rb +96 -36
  10. data/lib/imw/formats/excel.rb +69 -101
  11. data/lib/imw/formats/json.rb +3 -5
  12. data/lib/imw/formats/pdf.rb +71 -0
  13. data/lib/imw/formats/yaml.rb +3 -5
  14. data/lib/imw/metadata.rb +66 -0
  15. data/lib/imw/metadata/contains_metadata.rb +44 -0
  16. data/lib/imw/metadata/dsl.rb +111 -0
  17. data/lib/imw/metadata/field.rb +65 -0
  18. data/lib/imw/metadata/schema.rb +227 -0
  19. data/lib/imw/metadata/schematized.rb +27 -0
  20. data/lib/imw/parsers.rb +1 -0
  21. data/lib/imw/parsers/flat.rb +44 -0
  22. data/lib/imw/resource.rb +36 -224
  23. data/lib/imw/schemes.rb +3 -1
  24. data/lib/imw/schemes/hdfs.rb +12 -1
  25. data/lib/imw/schemes/http.rb +1 -2
  26. data/lib/imw/schemes/local.rb +139 -16
  27. data/lib/imw/schemes/remote.rb +14 -9
  28. data/lib/imw/schemes/s3.rb +12 -0
  29. data/lib/imw/schemes/sql.rb +117 -0
  30. data/lib/imw/tools.rb +5 -3
  31. data/lib/imw/tools/downloader.rb +63 -0
  32. data/lib/imw/tools/summarizer.rb +21 -10
  33. data/lib/imw/utils.rb +10 -0
  34. data/lib/imw/utils/dynamically_extendable.rb +137 -0
  35. data/lib/imw/utils/error.rb +3 -0
  36. data/lib/imw/utils/extensions.rb +0 -4
  37. data/lib/imw/utils/extensions/array.rb +6 -7
  38. data/lib/imw/utils/extensions/hash.rb +3 -5
  39. data/lib/imw/utils/extensions/string.rb +3 -3
  40. data/lib/imw/utils/has_uri.rb +114 -0
  41. data/spec/data/{sample.csv → formats/delimited/sample.csv} +1 -1
  42. data/spec/data/{sample.tsv → formats/delimited/sample.tsv} +0 -0
  43. data/spec/data/formats/delimited/with_schema/ace-hardware-locations.tsv +11 -0
  44. data/spec/data/formats/delimited/with_schema/all-countries-ip-address-to-geolocation-data.tsv +16 -0
  45. data/spec/data/formats/delimited/with_schema/complete-list-of-starbucks-locations.tsv +11 -0
  46. data/spec/data/formats/delimited/with_schema/myspace-user-activity-stream-cumulative-word-count-from-from-dec.tsv +22 -0
  47. data/spec/data/formats/delimited/with_schema/myspace-user-activity-stream-myspace-application-adds-by-zip-cod.tsv +22 -0
  48. data/spec/data/formats/delimited/with_schema/myspace-user-activity-stream-myspace-application-counts.tsv +12 -0
  49. data/spec/data/formats/delimited/with_schema/myspace-user-activity-stream-user-count-by-latlong.tsv +13 -0
  50. data/spec/data/formats/delimited/with_schema/myspace-user-activity-stream-user-count-by-zip-code.tsv +22 -0
  51. data/spec/data/formats/delimited/with_schema/myspace-user-activity-stream-word-count-by-day-from-december-200.tsv +22 -0
  52. data/spec/data/formats/delimited/without_schema/ace-hardware-locations.tsv +10 -0
  53. data/spec/data/formats/delimited/without_schema/all-countries-ip-address-to-geolocation-data.tsv +15 -0
  54. data/spec/data/formats/delimited/without_schema/complete-list-of-starbucks-locations.tsv +10 -0
  55. data/spec/data/formats/delimited/without_schema/myspace-user-activity-stream-cumulative-word-count-from-from-dec.tsv +21 -0
  56. data/spec/data/formats/delimited/without_schema/myspace-user-activity-stream-myspace-application-adds-by-zip-cod.tsv +21 -0
  57. data/spec/data/formats/delimited/without_schema/myspace-user-activity-stream-myspace-application-counts.tsv +11 -0
  58. data/spec/data/formats/delimited/without_schema/myspace-user-activity-stream-user-count-by-latlong.tsv +12 -0
  59. data/spec/data/formats/delimited/without_schema/myspace-user-activity-stream-user-count-by-zip-code.tsv +21 -0
  60. data/spec/data/formats/delimited/without_schema/myspace-user-activity-stream-word-count-by-day-from-december-200.tsv +21 -0
  61. data/spec/data/formats/excel/sample.xls +0 -0
  62. data/spec/data/formats/json/sample.json +1 -0
  63. data/spec/data/formats/none/sample +650 -0
  64. data/spec/data/formats/sgml/sample.xml +617 -0
  65. data/spec/data/formats/text/sample.txt +650 -0
  66. data/spec/data/formats/yaml/sample.yaml +410 -0
  67. data/spec/data/schema-tabular.yaml +11 -0
  68. data/spec/imw/formats/delimited_spec.rb +34 -2
  69. data/spec/imw/formats/excel_spec.rb +55 -0
  70. data/spec/imw/formats/json_spec.rb +3 -3
  71. data/spec/imw/formats/sgml_spec.rb +4 -4
  72. data/spec/imw/formats/yaml_spec.rb +3 -3
  73. data/spec/imw/metadata/field_spec.rb +26 -0
  74. data/spec/imw/metadata/schema_spec.rb +27 -0
  75. data/spec/imw/metadata_spec.rb +39 -0
  76. data/spec/imw/parsers/line_parser_spec.rb +1 -1
  77. data/spec/imw/resource_spec.rb +0 -100
  78. data/spec/imw/schemes/hdfs_spec.rb +19 -13
  79. data/spec/imw/schemes/local_spec.rb +59 -3
  80. data/spec/imw/schemes/s3_spec.rb +4 -0
  81. data/spec/imw/utils/dynamically_extendable_spec.rb +69 -0
  82. data/spec/imw/utils/has_uri_spec.rb +55 -0
  83. data/spec/spec_helper.rb +1 -2
  84. data/spec/support/random.rb +4 -4
  85. metadata +58 -17
  86. data/CHANGELOG +0 -0
  87. data/TODO +0 -18
  88. data/spec/data/sample.json +0 -782
  89. data/spec/data/sample.txt +0 -131
  90. data/spec/data/sample.xml +0 -653
  91. data/spec/data/sample.yaml +0 -651
  92. data/spec/spec.opts +0 -4
  93. data/spec/support/extensions.rb +0 -18
@@ -1,651 +0,0 @@
1
- ---
2
-
3
- - id: 001
4
- name: Gray-bellied Night Monkey
5
- genus: Aotus
6
- species: lemurinus
7
-
8
- - id: 002
9
- name: Panamanian Night Monkey
10
- genus: Aotus
11
- species: zonalis
12
-
13
- - id: 003
14
- name: Hernández-Camacho's Night Monkey
15
- genus: Aotus
16
- species: jorgehernandezi
17
-
18
- - id: 004
19
- name: Gray-handed Night Monkey
20
- genus: Aotus
21
- species: griseimembra
22
-
23
- - id: 005
24
- name: Hershkovitz's Night Monkey
25
- genus: Aotus
26
- species: hershkovitzi
27
-
28
- - id: 006
29
- name: Brumback's Night Monkey
30
- genus: Aotus
31
- species: brumbacki
32
-
33
- - id: 007
34
- name: Three-striped Night Monkey
35
- genus: Aotus
36
- species: trivirgatus
37
-
38
- - id: 008
39
- name: Spix's Night Monkey
40
- genus: Aotus
41
- species: vociferans
42
-
43
- - id: 009
44
- name: Malaysian Lar Gibbon
45
- genus: Hylobates
46
- species: lar lar
47
-
48
- - id: 010
49
- name: Carpenter's Lar Gibbon
50
- genus: Hylobates
51
- species: lar carpenteri
52
-
53
- - id: 011
54
- name: Central Lar Gibbon
55
- genus: Hylobates
56
- species: lar entelloides
57
-
58
- - id: 012
59
- name: Sumatran Lar Gibbon
60
- genus: Hylobates
61
- species: lar vestitus
62
-
63
- - id: 013
64
- name: Yunnan Lar Gibbon
65
- genus: Hylobates
66
- species: lar yunnanensis
67
-
68
- - id: 014
69
- name: Mountain Agile Gibbon
70
- genus: Hylobates
71
- species: agilis agilis
72
-
73
- - id: 015
74
- name: Bornean White-bearded Gibbon
75
- genus: Hylobates
76
- species: agilis albibarbis
77
-
78
- - id: 016
79
- name: Lowland Agile Gibbon
80
- genus: Hylobates
81
- species: agilis unko
82
-
83
- - id: 017
84
- name: Müller's Gray Gibbon
85
- genus: Hylobates
86
- species: muelleri muelleri
87
-
88
- - id: 018
89
- name: Abbott's Gray Gibbon
90
- genus: Hylobates
91
- species: muelleri abbotti
92
-
93
- - id: 019
94
- name: Northern Gray Gibbon
95
- genus: Hylobates
96
- species: muelleri funereus
97
-
98
- - id: 020
99
- name: Black Tamarin
100
- genus: Saguinas
101
- species: niger
102
-
103
- - id: 021
104
- name: Black-mantled Tamarin
105
- genus: Saguinas
106
- species: nigricollis
107
-
108
- - id: 022
109
- name: Brown-mantled Tamarin
110
- genus: Saguinas
111
- species: fuscicollis
112
-
113
- - id: 023
114
- name: Cottontop Tamarin or Pinché Tamarin
115
- genus: Saguinas
116
- species: oedipus
117
-
118
- - id: 024
119
- name: Emperor Tamarin
120
- genus: Saguinas
121
- species: imperator
122
-
123
- - id: 025
124
- name: Geoffroy's Tamarin
125
- genus: Saguinas
126
- species: geoffroyi
127
-
128
- - id: 026
129
- name: Golden-mantled Tamarin
130
- genus: Saguinas
131
- species: tripartitus
132
-
133
- - id: 027
134
- name: Graells's Tamarin
135
- genus: Saguinas
136
- species: graellsi
137
-
138
- - id: 028
139
- name: Martins's Tamarin
140
- genus: Saguinas
141
- species: martinsi
142
-
143
- - id: 029
144
- name: Mottle-faced Tamarin
145
- genus: Saguinas
146
- species: inustus
147
-
148
- - id: 030
149
- name: Moustached Tamarin
150
- genus: Saguinas
151
- species: mystax
152
-
153
- - id: 031
154
- name: Pied Tamarin
155
- genus: Saguinas
156
- species: bicolor
157
-
158
- - id: 032
159
- name: Red-capped Tamarin
160
- genus: Saguinas
161
- species: pileatus
162
-
163
- - id: 033
164
- name: Red-handed Tamarin
165
- genus: Saguinas
166
- species: midas
167
-
168
- - id: 034
169
- name: White-footed Tamarin
170
- genus: Saguinas
171
- species: leucopus
172
-
173
- - id: 035
174
- name: White-lipped Tamarin
175
- genus: Saguinas
176
- species: labiatus
177
-
178
- - id: 036
179
- name: White-mantled Tamarin
180
- genus: Saguinas
181
- species: melanoleucus
182
-
183
- - id: 037
184
- name: Allen's Swamp Monkey
185
- genus: Allenopithecus
186
- species: nigroviridis
187
-
188
- - id: 038
189
- name: Angolan Talapoin
190
- genus: Miopithecus
191
- species: talapoin
192
-
193
- - id: 039
194
- name: Gabon Talapoin
195
- genus: Miopithecus
196
- species: ogouensis
197
-
198
- - id: 040
199
- name: Patas Monkey
200
- genus: Erythrocebus
201
- species: patas
202
-
203
- - id: 041
204
- name: Green Monkey
205
- genus: Chlorocebus
206
- species: sabaeus
207
-
208
- - id: 042
209
- name: Grivet
210
- genus: Chlorocebus
211
- species: aethiops
212
-
213
- - id: 043
214
- name: Bale Mountains Vervet
215
- genus: Chlorocebus
216
- species: djamdjamensis
217
-
218
- - id: 044
219
- name: Tantalus Monkey
220
- genus: Chlorocebus
221
- species: tantalus
222
-
223
- - id: 045
224
- name: Vervet Monkey
225
- genus: Chlorocebus
226
- species: pygerythrus
227
-
228
- - id: 046
229
- name: Malbrouck
230
- genus: Chlorocebus
231
- species: cynosuros
232
-
233
- - id: 047
234
- name: Dryas Monkey or Salongo Monkey
235
- genus: Cercopithecus
236
- species: dryas
237
-
238
- - id: 048
239
- name: Diana Monkey
240
- genus: Cercopithecus
241
- species: diana
242
-
243
- - id: 049
244
- name: Roloway Monkey
245
- genus: Cercopithecus
246
- species: roloway
247
-
248
- - id: 050
249
- name: Greater Spot-nosed Monkey
250
- genus: Cercopithecus
251
- species: nictitans
252
-
253
- - id: 051
254
- name: Blue Monkey
255
- genus: Cercopithecus
256
- species: mitis
257
-
258
- - id: 052
259
- name: Silver Monkey
260
- genus: Cercopithecus
261
- species: doggetti
262
-
263
- - id: 053
264
- name: Golden Monkey
265
- genus: Cercopithecus
266
- species: kandti
267
-
268
- - id: 054
269
- name: Sykes's Monkey
270
- genus: Cercopithecus
271
- species: albogularis
272
-
273
- - id: 055
274
- name: Mona Monkey
275
- genus: Cercopithecus
276
- species: mona
277
-
278
- - id: 056
279
- name: Campbell's Mona Monkey
280
- genus: Cercopithecus
281
- species: campbelli
282
-
283
- - id: 057
284
- name: Lowe's Mona Monkey
285
- genus: Cercopithecus
286
- species: lowei
287
-
288
- - id: 058
289
- name: Crested Mona Monkey
290
- genus: Cercopithecus
291
- species: pogonias
292
-
293
- - id: 059
294
- name: Wolf's Mona Monkey
295
- genus: Cercopithecus
296
- species: wolfi
297
-
298
- - id: 060
299
- name: Dent's Mona Monkey
300
- genus: Cercopithecus
301
- species: denti
302
-
303
- - id: 061
304
- name: Lesser Spot-nosed Monkey
305
- genus: Cercopithecus
306
- species: petaurista
307
-
308
- - id: 062
309
- name: White-throated Guenon
310
- genus: Cercopithecus
311
- species: erythrogaster
312
-
313
- - id: 063
314
- name: Sclater's Guenon
315
- genus: Cercopithecus
316
- species: sclateri
317
-
318
- - id: 064
319
- name: Red-eared Guenon
320
- genus: Cercopithecus
321
- species: erythrotis
322
-
323
- - id: 065
324
- name: Moustached Guenon
325
- genus: Cercopithecus
326
- species: cephus
327
-
328
- - id: 066
329
- name: Red-tailed Monkey
330
- genus: Cercopithecus
331
- species: ascanius
332
-
333
- - id: 067
334
- name: L'Hoest's Monkey
335
- genus: Cercopithecus
336
- species: lhoesti
337
-
338
- - id: 068
339
- name: Preuss's Monkey
340
- genus: Cercopithecus
341
- species: preussi
342
-
343
- - id: 069
344
- name: Sun-tailed Monkey
345
- genus: Cercopithecus
346
- species: solatus
347
-
348
- - id: 070
349
- name: Hamlyn's Monkey
350
- genus: Cercopithecus
351
- species: hamlyni
352
-
353
- - id: 071
354
- name: De Brazza's Monkey
355
- genus: Cercopithecus
356
- species: neglectus
357
-
358
- - id: 072
359
- name: Barbary Macaque
360
- genus: Macaca
361
- species: sylvanus
362
-
363
- - id: 073
364
- name: Lion-tailed Macaque
365
- genus: Macaca
366
- species: silenus
367
-
368
- - id: 074
369
- name: Southern Pig-tailed Macaque or Beruk
370
- genus: Macaca
371
- species: nemestrina
372
-
373
- - id: 075
374
- name: Northern Pig-tailed Macaque
375
- genus: Macaca
376
- species: leonina
377
-
378
- - id: 076
379
- name: Pagai Island Macaque or Bokkoi
380
- genus: Macaca
381
- species: pagensis
382
-
383
- - id: 077
384
- name: Siberut Macaque
385
- genus: Macaca
386
- species: siberu
387
-
388
- - id: 078
389
- name: Moor Macaque
390
- genus: Macaca
391
- species: maura
392
-
393
- - id: 079
394
- name: Booted Macaque
395
- genus: Macaca
396
- species: ochreata
397
-
398
- - id: 080
399
- name: Tonkean Macaque
400
- genus: Macaca
401
- species: tonkeana
402
-
403
- - id: 081
404
- name: Heck's Macaque
405
- genus: Macaca
406
- species: hecki
407
-
408
- - id: 082
409
- name: Gorontalo Macaque
410
- genus: Macaca
411
- species: nigrescens
412
-
413
- - id: 083
414
- name: Celebes Crested Macaque or Black Ape
415
- genus: Macaca
416
- species: nigra
417
-
418
- - id: 084
419
- name: Crab-eating Macaque or Long-tailed Macaque or Kera
420
- genus: Macaca
421
- species: fascicularis
422
-
423
- - id: 085
424
- name: Stump-tailed Macaque or Bear Macaque
425
- genus: Macaca
426
- species: arctoides
427
-
428
- - id: 086
429
- name: Rhesus Macaque
430
- genus: Macaca
431
- species: mulatta
432
-
433
- - id: 087
434
- name: Formosan Rock Macaque
435
- genus: Macaca
436
- species: cyclopis
437
-
438
- - id: 088
439
- name: Japanese Macaque
440
- genus: Macaca
441
- species: fuscata
442
-
443
- - id: 089
444
- name: Toque Macaque
445
- genus: Macaca
446
- species: sinica
447
-
448
- - id: 090
449
- name: Bonnet Macaque
450
- genus: Macaca
451
- species: radiata
452
-
453
- - id: 091
454
- name: Assam Macaque
455
- genus: Macaca
456
- species: assamensis
457
-
458
- - id: 092
459
- name: Tibetan Macaque or Milne-Edwards' Macaque
460
- genus: Macaca
461
- species: thibetana
462
-
463
- - id: 093
464
- name: Arunachal Macaque or Munzala
465
- genus: Macaca
466
- species: munzala
467
-
468
- - id: 094
469
- name: Grey-cheeked Mangabey
470
- genus: Lophocebus
471
- species: albigena
472
-
473
- - id: 095
474
- name: Black Crested Mangabey
475
- genus: Lophocebus
476
- species: aterrimus
477
-
478
- - id: 096
479
- name: Opdenbosch's Mangabey
480
- genus: Lophocebus
481
- species: opdenboschi
482
-
483
- - id: 097
484
- name: Uganda Mangabey
485
- genus: Lophocebus
486
- species: ugandae
487
-
488
- - id: 098
489
- name: Johnston's Mangabey
490
- genus: Lophocebus
491
- species: johnstoni
492
-
493
- - id: 099
494
- name: Osman Hill's Mangabey
495
- genus: Lophocebus
496
- species: osmani
497
-
498
- - id: 100
499
- name: Kipunji
500
- genus: Rungwecebus
501
- species: kipunji
502
-
503
- - id: 101
504
- name: Hamadryas Baboon
505
- genus: Papio
506
- species: hamadryas
507
-
508
- - id: 102
509
- name: Guinea Baboon
510
- genus: Papio
511
- species: papio
512
-
513
- - id: 103
514
- name: Olive Baboon
515
- genus: Papio
516
- species: anubis
517
-
518
- - id: 104
519
- name: Yellow Baboon
520
- genus: Papio
521
- species: cynocephalus
522
-
523
- - id: 105
524
- name: Chacma Baboon
525
- genus: Papio
526
- species: ursinus
527
-
528
- - id: 106
529
- name: Gelada
530
- genus: Theropithecus
531
- species: gelada
532
-
533
- - id: 107
534
- name: Sooty Mangabey
535
- genus: Cercocebus
536
- species: atys
537
-
538
- - id: 108
539
- name: Collared Mangabey
540
- genus: Cercocebus
541
- species: torquatus
542
-
543
- - id: 109
544
- name: Agile Mangabey
545
- genus: Cercocebus
546
- species: agilis
547
-
548
- - id: 110
549
- name: Golden-bellied Mangabey
550
- genus: Cercocebus
551
- species: chrysogaster
552
-
553
- - id: 111
554
- name: Tana River Mangabey
555
- genus: Cercocebus
556
- species: galeritus
557
-
558
- - id: 112
559
- name: Sanje Mangabey
560
- genus: Cercocebus
561
- species: sanjei
562
-
563
- - id: 113
564
- name: Mandrill
565
- genus: Mandrillus
566
- species: sphinx
567
-
568
- - id: 114
569
- name: Drill
570
- genus: Mandrillus
571
- species: leucophaeus
572
-
573
- - id: 115
574
- name: Black Colobus
575
- genus: Colobus
576
- species: satanas
577
-
578
- - id: 116
579
- name: Angola Colobus
580
- genus: Colobus
581
- species: angolensis
582
-
583
- - id: 117
584
- name: King Colobus
585
- genus: Colobus
586
- species: polykomos
587
-
588
- - id: 118
589
- name: Ursine Colobus
590
- genus: Colobus
591
- species: vellerosus
592
-
593
- - id: 119
594
- name: Mantled Guereza
595
- genus: Colobus
596
- species: guereza
597
-
598
- - id: 120
599
- name: Western Red Colobus
600
- genus: Piliocolobus
601
- species: badius
602
-
603
- - id: 121
604
- name: Pennant's Colobus
605
- genus: Piliocolobus
606
- species: pennantii
607
-
608
- - id: 122
609
- name: Preuss's Red Colobus
610
- genus: Piliocolobus
611
- species: preussi
612
-
613
- - id: 123
614
- name: Thollon's Red Colobus
615
- genus: Piliocolobus
616
- species: tholloni
617
-
618
- - id: 124
619
- name: Central African Red Colobus
620
- genus: Piliocolobus
621
- species: foai
622
-
623
- - id: 125
624
- name: Ugandan Red Colobus
625
- genus: Piliocolobus
626
- species: tephrosceles
627
-
628
- - id: 126
629
- name: Uzungwa Red Colobus
630
- genus: Piliocolobus
631
- species: gordonorum
632
-
633
- - id: 127
634
- name: Zanzibar Red Colobus
635
- genus: Piliocolobus
636
- species: kirkii
637
-
638
- - id: 128
639
- name: Tana River Red Colobus
640
- genus: Piliocolobus
641
- species: rufomitratus
642
-
643
- - id: 129
644
- name: Olive Colobus
645
- genus: Procolobus
646
- species: verus
647
-
648
- - id: 130
649
- name: Maroon Leaf Monkey
650
- genus: Presbytis
651
- species: rubicunda