alexandria-book-collection-manager 0.6.9.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (293) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.rubocop.yml +68 -0
  4. data/.rubocop_todo.yml +200 -0
  5. data/CHANGELOG.md +23 -0
  6. data/COPYING +339 -0
  7. data/ChangeLog.0 +3598 -0
  8. data/Gemfile +9 -0
  9. data/INSTALL.rdoc +156 -0
  10. data/PACKAGING +36 -0
  11. data/README.md +88 -0
  12. data/RELEASE_CHECKLIST +18 -0
  13. data/Rakefile +264 -0
  14. data/TODO +24 -0
  15. data/alexandria-book-collection-manager.gemspec +35 -0
  16. data/alexandria.desktop.in +10 -0
  17. data/bin/alexandria +82 -0
  18. data/doc/AUTHORS +60 -0
  19. data/doc/BUGS +31 -0
  20. data/doc/FAQ +369 -0
  21. data/doc/HACKING +19 -0
  22. data/doc/NEWS +341 -0
  23. data/doc/alexandria.1 +120 -0
  24. data/doc/cuecat_support.rdoc +67 -0
  25. data/lib/alexandria.rb +85 -0
  26. data/lib/alexandria/about.rb +82 -0
  27. data/lib/alexandria/book_providers.rb +411 -0
  28. data/lib/alexandria/book_providers/adlibris.rb +235 -0
  29. data/lib/alexandria/book_providers/amazon_aws.rb +261 -0
  30. data/lib/alexandria/book_providers/amazon_ecs_util.rb +405 -0
  31. data/lib/alexandria/book_providers/barnes_and_noble.rb +229 -0
  32. data/lib/alexandria/book_providers/bol_it.rb +162 -0
  33. data/lib/alexandria/book_providers/deastore.rb +277 -0
  34. data/lib/alexandria/book_providers/douban.rb +135 -0
  35. data/lib/alexandria/book_providers/ibs_it.rb +149 -0
  36. data/lib/alexandria/book_providers/mcu.rb +177 -0
  37. data/lib/alexandria/book_providers/proxis.rb +205 -0
  38. data/lib/alexandria/book_providers/pseudomarc.rb +185 -0
  39. data/lib/alexandria/book_providers/renaud.rb +142 -0
  40. data/lib/alexandria/book_providers/siciliano.rb +271 -0
  41. data/lib/alexandria/book_providers/thalia.rb +197 -0
  42. data/lib/alexandria/book_providers/web.rb +59 -0
  43. data/lib/alexandria/book_providers/webster_it.rb +173 -0
  44. data/lib/alexandria/book_providers/worldcat.rb +251 -0
  45. data/lib/alexandria/book_providers/z3950.rb +422 -0
  46. data/lib/alexandria/config.rb +8 -0
  47. data/lib/alexandria/console.rb +31 -0
  48. data/lib/alexandria/execution_queue.rb +96 -0
  49. data/lib/alexandria/export_library.rb +536 -0
  50. data/lib/alexandria/import_library.rb +316 -0
  51. data/lib/alexandria/import_library_csv.rb +270 -0
  52. data/lib/alexandria/logging.rb +159 -0
  53. data/lib/alexandria/models/book.rb +72 -0
  54. data/lib/alexandria/models/library.rb +714 -0
  55. data/lib/alexandria/net.rb +53 -0
  56. data/lib/alexandria/preferences.rb +324 -0
  57. data/lib/alexandria/scanners.rb +42 -0
  58. data/lib/alexandria/scanners/cuecat.rb +118 -0
  59. data/lib/alexandria/scanners/keyboard.rb +57 -0
  60. data/lib/alexandria/smart_library.rb +525 -0
  61. data/lib/alexandria/ui.rb +53 -0
  62. data/lib/alexandria/ui/builder_base.rb +43 -0
  63. data/lib/alexandria/ui/callbacks.rb +389 -0
  64. data/lib/alexandria/ui/completion_models.rb +228 -0
  65. data/lib/alexandria/ui/dialogs/about_dialog.rb +59 -0
  66. data/lib/alexandria/ui/dialogs/acquire_dialog.rb +640 -0
  67. data/lib/alexandria/ui/dialogs/alert_dialog.rb +68 -0
  68. data/lib/alexandria/ui/dialogs/bad_isbns_dialog.rb +43 -0
  69. data/lib/alexandria/ui/dialogs/barcode_animation.rb +159 -0
  70. data/lib/alexandria/ui/dialogs/book_properties_dialog.rb +210 -0
  71. data/lib/alexandria/ui/dialogs/book_properties_dialog_base.rb +432 -0
  72. data/lib/alexandria/ui/dialogs/export_dialog.rb +172 -0
  73. data/lib/alexandria/ui/dialogs/import_dialog.rb +205 -0
  74. data/lib/alexandria/ui/dialogs/misc_dialogs.rb +85 -0
  75. data/lib/alexandria/ui/dialogs/new_book_dialog.rb +639 -0
  76. data/lib/alexandria/ui/dialogs/new_book_dialog_manual.rb +153 -0
  77. data/lib/alexandria/ui/dialogs/new_smart_library_dialog.rb +67 -0
  78. data/lib/alexandria/ui/dialogs/preferences_dialog.rb +587 -0
  79. data/lib/alexandria/ui/dialogs/smart_library_properties_dialog.rb +56 -0
  80. data/lib/alexandria/ui/dialogs/smart_library_properties_dialog_base.rb +432 -0
  81. data/lib/alexandria/ui/dndable.rb +81 -0
  82. data/lib/alexandria/ui/gtk_thread_help.rb +88 -0
  83. data/lib/alexandria/ui/icons.rb +100 -0
  84. data/lib/alexandria/ui/iconview.rb +91 -0
  85. data/lib/alexandria/ui/iconview_tooltips.rb +162 -0
  86. data/lib/alexandria/ui/init.rb +93 -0
  87. data/lib/alexandria/ui/libraries_combo.rb +75 -0
  88. data/lib/alexandria/ui/listview.rb +310 -0
  89. data/lib/alexandria/ui/main_app.rb +67 -0
  90. data/lib/alexandria/ui/multi_drag_treeview.rb +150 -0
  91. data/lib/alexandria/ui/sidepane.rb +194 -0
  92. data/lib/alexandria/ui/sound.rb +107 -0
  93. data/lib/alexandria/ui/ui_manager.rb +1308 -0
  94. data/lib/alexandria/undo_manager.rb +78 -0
  95. data/lib/alexandria/utils.rb +30 -0
  96. data/lib/alexandria/version.rb +24 -0
  97. data/lib/alexandria/web_themes.rb +75 -0
  98. data/misc/sounds/README +15 -0
  99. data/misc/sounds/bad_scan.csd +62 -0
  100. data/misc/sounds/good_scan.csd +61 -0
  101. data/misc/sounds/scanning.csd +46 -0
  102. data/po/ChangeLog +488 -0
  103. data/po/Makefile +44 -0
  104. data/po/README +29 -0
  105. data/po/commit-po +72 -0
  106. data/po/cs.po +1437 -0
  107. data/po/cy.po +1521 -0
  108. data/po/de.po +1400 -0
  109. data/po/el.po +1379 -0
  110. data/po/es.po +1376 -0
  111. data/po/fr.po +1420 -0
  112. data/po/ga.po +1359 -0
  113. data/po/gl.po +1397 -0
  114. data/po/it.po +1406 -0
  115. data/po/ja.po +1355 -0
  116. data/po/mk.po +1373 -0
  117. data/po/nb.po +1386 -0
  118. data/po/nl.po +1405 -0
  119. data/po/pl.po +1373 -0
  120. data/po/pt.po +1398 -0
  121. data/po/pt_BR.po +1409 -0
  122. data/po/ru.po +1372 -0
  123. data/po/sk.po +1380 -0
  124. data/po/sv.po +1402 -0
  125. data/po/uk.po +1423 -0
  126. data/po/zh_TW.po +1394 -0
  127. data/schemas/alexandria.schemas +300 -0
  128. data/share/alexandria/glade/acquire_dialog__builder.glade +201 -0
  129. data/share/alexandria/glade/book_properties_dialog__builder.glade +910 -0
  130. data/share/alexandria/glade/main_app__builder.glade +229 -0
  131. data/share/alexandria/glade/new_book_dialog__builder.glade +379 -0
  132. data/share/alexandria/glade/preferences_dialog__builder.glade +733 -0
  133. data/share/alexandria/icons/alexandria.png +0 -0
  134. data/share/alexandria/icons/alexandria_small.png +0 -0
  135. data/share/alexandria/icons/book.png +0 -0
  136. data/share/alexandria/icons/book_icon.png +0 -0
  137. data/share/alexandria/icons/book_small.png +0 -0
  138. data/share/alexandria/icons/cuecat.png +0 -0
  139. data/share/alexandria/icons/cuecat_inactive.png +0 -0
  140. data/share/alexandria/icons/favorite_tag.png +0 -0
  141. data/share/alexandria/icons/less.png +0 -0
  142. data/share/alexandria/icons/library.png +0 -0
  143. data/share/alexandria/icons/library_small.png +0 -0
  144. data/share/alexandria/icons/lookup.png +0 -0
  145. data/share/alexandria/icons/more.png +0 -0
  146. data/share/alexandria/icons/no_cover.png +0 -0
  147. data/share/alexandria/icons/smart_library.png +0 -0
  148. data/share/alexandria/icons/smart_library_small.png +0 -0
  149. data/share/alexandria/icons/star_set.png +0 -0
  150. data/share/alexandria/icons/star_unset.png +0 -0
  151. data/share/alexandria/icons/view_as_icons.png +0 -0
  152. data/share/alexandria/icons/view_as_list.png +0 -0
  153. data/share/alexandria/ui/menus.xml +91 -0
  154. data/share/alexandria/ui/popups.xml +91 -0
  155. data/share/alexandria/web-themes/clean/clean.css +85 -0
  156. data/share/alexandria/web-themes/clean/preview.jpg +0 -0
  157. data/share/alexandria/web-themes/list/list.css +105 -0
  158. data/share/alexandria/web-themes/list/preview.jpg +0 -0
  159. data/share/app-icon/16x16/alexandria.png +0 -0
  160. data/share/app-icon/16x16/alexandria.svg +263 -0
  161. data/share/app-icon/22x22/alexandria.png +0 -0
  162. data/share/app-icon/22x22/alexandria.svg +465 -0
  163. data/share/app-icon/24x24/alexandria.png +0 -0
  164. data/share/app-icon/32x32/alexandria.png +0 -0
  165. data/share/app-icon/32x32/alexandria.svg +813 -0
  166. data/share/app-icon/32x32/alexandria.xpm +241 -0
  167. data/share/app-icon/48x48/alexandria.png +0 -0
  168. data/share/app-icon/scalable/alexandria.svg +700 -0
  169. data/share/gnome/help/alexandria/C/about.xml +44 -0
  170. data/share/gnome/help/alexandria/C/adding-books.xml +339 -0
  171. data/share/gnome/help/alexandria/C/alexandria.xml +185 -0
  172. data/share/gnome/help/alexandria/C/bugs.xml +18 -0
  173. data/share/gnome/help/alexandria/C/editing-book-properties.xml +124 -0
  174. data/share/gnome/help/alexandria/C/exporting.xml +81 -0
  175. data/share/gnome/help/alexandria/C/figures/adding_books_acquire_from_scanner_process.png +0 -0
  176. data/share/gnome/help/alexandria/C/figures/adding_books_add_by_isbn.png +0 -0
  177. data/share/gnome/help/alexandria/C/figures/adding_books_isbn_import.png +0 -0
  178. data/share/gnome/help/alexandria/C/figures/adding_books_manual_details.png +0 -0
  179. data/share/gnome/help/alexandria/C/figures/adding_books_rename_library_after_import.png +0 -0
  180. data/share/gnome/help/alexandria/C/figures/adding_books_search_results.png +0 -0
  181. data/share/gnome/help/alexandria/C/figures/editing_book_properties_info.png +0 -0
  182. data/share/gnome/help/alexandria/C/figures/editing_book_properties_loaning.png +0 -0
  183. data/share/gnome/help/alexandria/C/figures/exporting_information_html.png +0 -0
  184. data/share/gnome/help/alexandria/C/figures/getting_started_first_launched.png +0 -0
  185. data/share/gnome/help/alexandria/C/figures/searching_filtering_views_list_view.png +0 -0
  186. data/share/gnome/help/alexandria/C/figures/searching_filtering_views_list_view_search.png +0 -0
  187. data/share/gnome/help/alexandria/C/figures/settings_providers_new_z3950.png +0 -0
  188. data/share/gnome/help/alexandria/C/figures/smart_libraries_new_smart_library.png +0 -0
  189. data/share/gnome/help/alexandria/C/figures/working_with_libraries_library_pane.png +0 -0
  190. data/share/gnome/help/alexandria/C/getting-started.xml +154 -0
  191. data/share/gnome/help/alexandria/C/gnu-fdl-1.2.xml +543 -0
  192. data/share/gnome/help/alexandria/C/introduction.xml +142 -0
  193. data/share/gnome/help/alexandria/C/searching.xml +90 -0
  194. data/share/gnome/help/alexandria/C/settings.xml +140 -0
  195. data/share/gnome/help/alexandria/C/smart-libraries.xml +160 -0
  196. data/share/gnome/help/alexandria/C/working-with-libraries.xml +76 -0
  197. data/share/gnome/help/alexandria/ChangeLog +99 -0
  198. data/share/gnome/help/alexandria/fr/alexandria.xml +2292 -0
  199. data/share/gnome/help/alexandria/fr/figures/alexandria_add_button.png +0 -0
  200. data/share/gnome/help/alexandria/fr/figures/alexandria_add_by_isbn_1.png +0 -0
  201. data/share/gnome/help/alexandria/fr/figures/alexandria_add_by_search_1.png +0 -0
  202. data/share/gnome/help/alexandria/fr/figures/alexandria_add_manually.png +0 -0
  203. data/share/gnome/help/alexandria/fr/figures/alexandria_add_z3950.png +0 -0
  204. data/share/gnome/help/alexandria/fr/figures/alexandria_close_button.png +0 -0
  205. data/share/gnome/help/alexandria/fr/figures/alexandria_edit_info.png +0 -0
  206. data/share/gnome/help/alexandria/fr/figures/alexandria_export_web_page.png +0 -0
  207. data/share/gnome/help/alexandria/fr/figures/alexandria_importing.png +0 -0
  208. data/share/gnome/help/alexandria/fr/figures/alexandria_library_pane.png +0 -0
  209. data/share/gnome/help/alexandria/fr/figures/alexandria_list_view.png +0 -0
  210. data/share/gnome/help/alexandria/fr/figures/alexandria_list_view_search.png +0 -0
  211. data/share/gnome/help/alexandria/fr/figures/alexandria_loaning.png +0 -0
  212. data/share/gnome/help/alexandria/fr/figures/alexandria_main_window.png +0 -0
  213. data/share/gnome/help/alexandria/fr/figures/alexandria_remove_button.png +0 -0
  214. data/share/gnome/help/alexandria/ja/about.xml +33 -0
  215. data/share/gnome/help/alexandria/ja/adding-books.xml +314 -0
  216. data/share/gnome/help/alexandria/ja/alexandria.xml +172 -0
  217. data/share/gnome/help/alexandria/ja/bugs.xml +11 -0
  218. data/share/gnome/help/alexandria/ja/editing-book-properties.xml +100 -0
  219. data/share/gnome/help/alexandria/ja/exporting.xml +98 -0
  220. data/share/gnome/help/alexandria/ja/figures/adding_books_acquire_from_scanner_process.png +0 -0
  221. data/share/gnome/help/alexandria/ja/figures/adding_books_add_by_isbn.png +0 -0
  222. data/share/gnome/help/alexandria/ja/figures/adding_books_isbn_import.png +0 -0
  223. data/share/gnome/help/alexandria/ja/figures/adding_books_manual_details.png +0 -0
  224. data/share/gnome/help/alexandria/ja/figures/adding_books_rename_library_after_import.png +0 -0
  225. data/share/gnome/help/alexandria/ja/figures/adding_books_search_results.png +0 -0
  226. data/share/gnome/help/alexandria/ja/figures/editing_book_properties_info.png +0 -0
  227. data/share/gnome/help/alexandria/ja/figures/editing_book_properties_loaning.png +0 -0
  228. data/share/gnome/help/alexandria/ja/figures/exporting_information_html.png +0 -0
  229. data/share/gnome/help/alexandria/ja/figures/getting_started_first_launched.png +0 -0
  230. data/share/gnome/help/alexandria/ja/figures/searching_filtering_views_list_view.png +0 -0
  231. data/share/gnome/help/alexandria/ja/figures/searching_filtering_views_list_view_search.png +0 -0
  232. data/share/gnome/help/alexandria/ja/figures/settings_providers_new_z3950.png +0 -0
  233. data/share/gnome/help/alexandria/ja/figures/smart_libraries_new_smart_library.png +0 -0
  234. data/share/gnome/help/alexandria/ja/figures/working_with_libraries_library_pane.png +0 -0
  235. data/share/gnome/help/alexandria/ja/getting-started.xml +144 -0
  236. data/share/gnome/help/alexandria/ja/gnu-fdl-1.2.xml +541 -0
  237. data/share/gnome/help/alexandria/ja/introduction.xml +134 -0
  238. data/share/gnome/help/alexandria/ja/searching.xml +104 -0
  239. data/share/gnome/help/alexandria/ja/settings.xml +129 -0
  240. data/share/gnome/help/alexandria/ja/smart-libraries.xml +140 -0
  241. data/share/gnome/help/alexandria/ja/working-with-libraries.xml +88 -0
  242. data/share/menu/alexandria +7 -0
  243. data/share/omf/alexandria/alexandria-C.omf.in +27 -0
  244. data/share/omf/alexandria/alexandria-fr.omf.in +30 -0
  245. data/share/sounds/alexandria/bad_scan.ogg +0 -0
  246. data/share/sounds/alexandria/bad_scan.wav +0 -0
  247. data/share/sounds/alexandria/good_scan.ogg +0 -0
  248. data/share/sounds/alexandria/good_scan.wav +0 -0
  249. data/share/sounds/alexandria/scanning.ogg +0 -0
  250. data/share/sounds/alexandria/scanning.wav +0 -0
  251. data/spec/alexandria/library_spec.rb +205 -0
  252. data/spec/alexandria/preferences_spec.rb +22 -0
  253. data/spec/alexandria/scanners/cuecat_spec.rb +68 -0
  254. data/spec/alexandria/smart_library_spec.rb +22 -0
  255. data/spec/alexandria/ui/dialogs_spec.rb +90 -0
  256. data/spec/alexandria/ui/iconview_spec.rb +27 -0
  257. data/spec/alexandria/ui/listview_spec.rb +28 -0
  258. data/spec/alexandria/ui/main_app_spec.rb +48 -0
  259. data/spec/alexandria/ui/sidepane_spec.rb +27 -0
  260. data/spec/alexandria/ui/ui_manager_spec.rb +26 -0
  261. data/spec/alexandria/ui/ui_utilities_spec.rb +60 -0
  262. data/spec/alexandria/utilities_spec.rb +50 -0
  263. data/spec/data/libraries/0.6.1-noisbn/My Library/0201398257.yaml +10 -0
  264. data/spec/data/libraries/0.6.1-noisbn/My Library/1565920007.yaml +10 -0
  265. data/spec/data/libraries/0.6.1/My Library/0192812173.yaml +9 -0
  266. data/spec/data/libraries/0.6.1/My Library/0201398257.cover +0 -0
  267. data/spec/data/libraries/0.6.1/My Library/0201398257.yaml +10 -0
  268. data/spec/data/libraries/0.6.1/My Library/1565920007.yaml +10 -0
  269. data/spec/data/libraries/0.6.2/My Library/9780140266146.cover +0 -0
  270. data/spec/data/libraries/0.6.2/My Library/9780140266146.yaml +16 -0
  271. data/spec/data/libraries/0.6.2/My Library/9780140278781.cover +0 -0
  272. data/spec/data/libraries/0.6.2/My Library/9780140278781.yaml +21 -0
  273. data/spec/data/libraries/0.6.2/My Library/9780571147168.cover +0 -0
  274. data/spec/data/libraries/0.6.2/My Library/9780571147168.yaml +20 -0
  275. data/spec/data/libraries/0.6.2/My Library/9780575079038.cover +0 -0
  276. data/spec/data/libraries/0.6.2/My Library/9780575079038.yaml +20 -0
  277. data/spec/data/libraries/0.6.2/My Library/9780755322800.cover +0 -0
  278. data/spec/data/libraries/0.6.2/My Library/9780755322800.yaml +20 -0
  279. data/spec/spec_helper.rb +46 -0
  280. data/tasks/rdoc.rake +6 -0
  281. data/tasks/setup.rb +30 -0
  282. data/tasks/spec.rake +29 -0
  283. data/tasks/test.rake +38 -0
  284. data/test/application_test.rb +39 -0
  285. data/test/book_test.rb +34 -0
  286. data/test/data/isbns.txt +3 -0
  287. data/test/isbn_test.rb +68 -0
  288. data/test/providers_test.rb +254 -0
  289. data/test/test_helper.rb +42 -0
  290. data/util/rake/fileinstall.rb +313 -0
  291. data/util/rake/gettextgenerate.rb +158 -0
  292. data/util/rake/omfgenerate.rb +79 -0
  293. metadata +452 -0
@@ -0,0 +1,16 @@
1
+ --- !ruby/object:Alexandria::Book
2
+ authors:
3
+ - !str:Amazon::Search::Response William Gibson
4
+ edition: !str:Amazon::Search::Response Paperback
5
+ isbn: "9780140266146"
6
+ notes: ""
7
+ own: true
8
+ publisher: !str:Amazon::Search::Response Penguin Books Ltd
9
+ publishing_year: 2004
10
+ redd: false
11
+ saved_ident: "9780140266146"
12
+ tags: []
13
+
14
+ title: !str:Amazon::Search::Response Pattern Recognition
15
+ version: 0.6.2b1
16
+ want: true
@@ -0,0 +1,21 @@
1
+ --- !ruby/object:Alexandria::Book
2
+ authors:
3
+ - Francoise Sagan
4
+ - Irene Ash
5
+ edition: Paperback
6
+ isbn: "9780140278781"
7
+ loaned: false
8
+ loaned_since: 2007-10-16 00:00:00 +01:00
9
+ loaned_to: ""
10
+ notes: Essential penguin
11
+ own: true
12
+ publisher: Penguin Books Ltd
13
+ publishing_year: 1998
14
+ rating: 0
15
+ redd: false
16
+ saved_ident: "9780140278781"
17
+ tags: []
18
+
19
+ title: Bonjour Tristesse
20
+ version: 0.6.2b1
21
+ want: true
@@ -0,0 +1,20 @@
1
+ --- !ruby/object:Alexandria::Book
2
+ authors:
3
+ - Kazuo Ishiguro
4
+ edition: Paperback
5
+ isbn: "9780571147168"
6
+ loaned: true
7
+ loaned_since: 2007-10-12 00:00:00 +01:00
8
+ loaned_to: Fred
9
+ notes: ""
10
+ own: true
11
+ publisher: Faber and Faber
12
+ publishing_year: 1999
13
+ rating: 4
14
+ redd: false
15
+ saved_ident: "9780571147168"
16
+ tags: []
17
+
18
+ title: An Artist of the Floating World
19
+ version: 0.6.2b1
20
+ want: true
@@ -0,0 +1,20 @@
1
+ --- !ruby/object:Alexandria::Book
2
+ authors:
3
+ - Ursula Le Guin
4
+ edition: Paperback
5
+ isbn: "9780575079038"
6
+ loaned: true
7
+ loaned_since: 2007-10-22 00:00:00 +01:00
8
+ loaned_to: Jason Brown
9
+ notes: Gollancz S.F.
10
+ own: true
11
+ publisher: Gollancz
12
+ publishing_year: 2006
13
+ rating: 4
14
+ redd: true
15
+ saved_ident: "9780575079038"
16
+ tags: []
17
+
18
+ title: The Dispossessed
19
+ version: 0.6.2b1
20
+ want: true
@@ -0,0 +1,20 @@
1
+ --- !ruby/object:Alexandria::Book
2
+ authors:
3
+ - Neil Gaiman
4
+ edition: Paperback
5
+ isbn: "9780755322800"
6
+ loaned: false
7
+ loaned_since: 2007-10-16 00:00:00 +01:00
8
+ loaned_to: ""
9
+ notes: The Author's Preferred Text
10
+ own: true
11
+ publisher: Headline Review
12
+ publishing_year: 2005
13
+ rating: 5
14
+ redd: false
15
+ saved_ident: "9780755322800"
16
+ tags:
17
+ - preferred
18
+ title: Neverwhere
19
+ version: 0.6.2b1
20
+ want: true
@@ -0,0 +1,46 @@
1
+ # Copyright (C) 2007 Joseph Method
2
+ # Copyright (C) 2014 Matijs van Zuijlen
3
+ #
4
+ # Alexandria is free software; you can redistribute it and/or
5
+ # modify it under the terms of the GNU General Public License as
6
+ # published by the Free Software Foundation; either version 2 of the
7
+ # License, or (at your option) any later version.
8
+ #
9
+ # Alexandria is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
+ # General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public
15
+ # License along with Alexandria; see the file COPYING. If not,
16
+ # write to the Free Software Foundation, Inc., 51 Franklin Street,
17
+ # Fifth Floor, Boston, MA 02110-1301 USA.
18
+
19
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '/../lib'))
20
+
21
+ require 'alexandria'
22
+
23
+ LIBDIR = File.expand_path(File.join(File.dirname(__FILE__), '/data/libraries'))
24
+ TESTDIR = File.join(LIBDIR, 'test')
25
+
26
+ # def useTestLibrary(version)
27
+ # libVersion = File.join(LIBDIR, version)
28
+ # FileUtils.cp_r(libVersion, TESTDIR)
29
+ # end
30
+
31
+ def an_artist_of_the_floating_world
32
+ Alexandria::Book.new('An Artist of the Floating World',
33
+ 'Kazuo Ishiguro',
34
+ '9780571147168',
35
+ 'Faber and Faber', 1999,
36
+ 'Paperback')
37
+ end
38
+
39
+ Thread.new { Alexandria::UI.start_gnome_program }
40
+ Alexandria::UI::Icons.init
41
+
42
+ module Alexandria
43
+ class Library
44
+ DIR.replace TESTDIR
45
+ end
46
+ end
@@ -0,0 +1,6 @@
1
+ require 'rdoc/task'
2
+
3
+ RDoc::Task.new do |rdoc|
4
+ rdoc.main = 'README.rdoc'
5
+ rdoc.rdoc_files.include 'README.rdoc', 'INSTALL.rdoc', 'lib/**/*.rb'
6
+ end
@@ -0,0 +1,30 @@
1
+ #--
2
+ # Copyright (C) 2011 Matijs van Zuijlen
3
+ #
4
+ # This file is part of the Alexandria build system.
5
+ #
6
+ # Permission is hereby granted, free of charge, to any person obtaining
7
+ # a copy of this software and associated documentation files (the
8
+ # "Software"), to deal in the Software without restriction, including
9
+ # without limitation the rights to use, copy, modify, merge, publish,
10
+ # distribute, sublicense, and/or sell copies of the Software, and to
11
+ # permit persons to whom the Software is furnished to do so, subject to
12
+ # the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be
15
+ # included in all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
+ #++
25
+ require 'rake/clean'
26
+
27
+ # Load the other rake files in the tasks folder
28
+ tasks_dir = File.expand_path(File.dirname(__FILE__))
29
+ rakefiles = Dir.glob(File.join(tasks_dir, '*.rake')).sort
30
+ import(*rakefiles)
@@ -0,0 +1,29 @@
1
+ # -*- ruby -*-
2
+ #--
3
+ # Copyright (C) 2011 Matijs van Zuijlen
4
+ #
5
+ # This file is part of the Alexandria build system.
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining
8
+ # a copy of this software and associated documentation files (the
9
+ # "Software"), to deal in the Software without restriction, including
10
+ # without limitation the rights to use, copy, modify, merge, publish,
11
+ # distribute, sublicense, and/or sell copies of the Software, and to
12
+ # permit persons to whom the Software is furnished to do so, subject to
13
+ # the following conditions:
14
+ #
15
+ # The above copyright notice and this permission notice shall be
16
+ # included in all copies or substantial portions of the Software.
17
+ #
18
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
+ #++
26
+
27
+ require 'rspec/core/rake_task'
28
+
29
+ RSpec::Core::RakeTask.new(:spec)
@@ -0,0 +1,38 @@
1
+ # -*- ruby -*-
2
+ #--
3
+ # Copyright (C) 2011 Matijs van Zuijlen
4
+ #
5
+ # This file is part of the Alexandria build system.
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining
8
+ # a copy of this software and associated documentation files (the
9
+ # "Software"), to deal in the Software without restriction, including
10
+ # without limitation the rights to use, copy, modify, merge, publish,
11
+ # distribute, sublicense, and/or sell copies of the Software, and to
12
+ # permit persons to whom the Software is furnished to do so, subject to
13
+ # the following conditions:
14
+ #
15
+ # The above copyright notice and this permission notice shall be
16
+ # included in all copies or substantial portions of the Software.
17
+ #
18
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
+ #++
26
+
27
+ require 'rake/testtask'
28
+
29
+ namespace :test do
30
+ Rake::TestTask.new(:run) do |t|
31
+ t.libs = ['lib']
32
+ t.test_files = FileList['test/*_test.rb']
33
+ t.ruby_opts += ['-w']
34
+ end
35
+ end
36
+
37
+ desc 'Alias for test:run'
38
+ task :test => 'test:run'
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env ruby
2
+ # Copyright (C) 2005-2006 Laurent Sansonetti
3
+ # Copyright (C) 2011, 2014 Matijs van Zuijlen
4
+ #
5
+ # This file is part of Alexandria, a GNOME book collection manager.
6
+ #
7
+ # Alexandria is free software; you can redistribute it and/or
8
+ # modify it under the terms of the GNU General Public License as
9
+ # published by the Free Software Foundation; either version 2 of the
10
+ # License, or (at your option) any later version.
11
+ #
12
+ # Alexandria is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ # General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public
18
+ # License along with Alexandria; see the file COPYING. If not,
19
+ # write to the Free Software Foundation, Inc., 51 Franklin Street,
20
+ # Fifth Floor, Boston, MA 02110-1301 USA.
21
+
22
+ require File.expand_path('test_helper.rb', File.dirname(__FILE__))
23
+
24
+ ENV['http_proxy'] = nil if !ENV['http_proxy'].nil? \
25
+ and URI.parse(ENV['http_proxy']).userinfo.nil?
26
+
27
+ class TestAlexandriaApplication < MiniTest::Test
28
+ def test_application_runs
29
+ Alexandria::UI::Icons.init
30
+ @main_app = Alexandria::UI::MainApp.instance
31
+
32
+ Gtk.timeout_add(100) do
33
+ @main_app.main_app.destroy
34
+ Gtk.main_quit
35
+ end
36
+
37
+ Gtk.main
38
+ end
39
+ end
@@ -0,0 +1,34 @@
1
+ # Copyright (C) 2007 Joseph Method
2
+ # Modifications Copyright (C) 2011 Matijs van Zuijlen
3
+ #
4
+ # Alexandria is free software; you can redistribute it and/or
5
+ # modify it under the terms of the GNU General Public License as
6
+ # published by the Free Software Foundation; either version 2 of the
7
+ # License, or (at your option) any later version.
8
+ #
9
+ # Alexandria is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
+ # General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public
15
+ # License along with Alexandria; see the file COPYING. If not,
16
+ # write to the Free Software Foundation, Inc., 51 Franklin Street,
17
+ # Fifth Floor, Boston, MA 02110-1301 USA.
18
+
19
+ require File.expand_path('test_helper.rb', File.dirname(__FILE__))
20
+
21
+ describe Alexandria::Book do
22
+ it 'should be a thing' do
23
+ an_artist_of_the_floating_world
24
+ end
25
+
26
+ it 'should establish equality only with books with the same identity' do
27
+ book = an_artist_of_the_floating_world
28
+ same_book = an_artist_of_the_floating_world
29
+ same_book.must_equal book
30
+ different_book = an_artist_of_the_floating_world
31
+ different_book.isbn = '9780571147999'
32
+ different_book.wont_equal book
33
+ end
34
+ end
@@ -0,0 +1,3 @@
1
+ 0911826449
2
+ 0740704923
3
+ 0595371086
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/ruby
2
+ # Copyright (C) 2004-2006 Dafydd Harries
3
+ # Copyright (C) 2011, 2014 Matijs van Zuijlen
4
+ #
5
+ # This file is part of Alexandria, a GNOME book collection manager.
6
+ #
7
+ # Alexandria is free software; you can redistribute it and/or
8
+ # modify it under the terms of the GNU General Public License as
9
+ # published by the Free Software Foundation; either version 2 of the
10
+ # License, or (at your option) any later version.
11
+ #
12
+ # Alexandria is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ # General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public
18
+ # License along with Alexandria; see the file COPYING. If not,
19
+ # write to the Free Software Foundation, Inc., 51 Franklin Street,
20
+ # Fifth Floor, Boston, MA 02110-1301 USA.
21
+
22
+ require File.expand_path('test_helper.rb', File.dirname(__FILE__))
23
+
24
+ require 'alexandria/import_library'
25
+
26
+ class TestISBN < MiniTest::Test
27
+ def __test_fake_import_isbns
28
+ libraries = Alexandria::Libraries.instance
29
+ library = Alexandria::Library.new('Test Library')
30
+ libraries.add_library(library)
31
+ [library, libraries]
32
+ end
33
+
34
+ def test_valid_ISBN
35
+ for x in ['014143984X', '0-345-43192-8']
36
+ assert Alexandria::Library.valid_isbn?(x)
37
+ end
38
+ end
39
+
40
+ def test_valid_EAN
41
+ assert Alexandria::Library.valid_ean?('9780345431929')
42
+
43
+ # Regression test: this EAN has a checksum of 10, which should be
44
+ # treated like a checksum of 0.
45
+ assert Alexandria::Library.valid_ean?('9784047041790')
46
+ end
47
+
48
+ def test_canonical_ISBN
49
+ assert_equal '014143984X',
50
+ Alexandria::Library.canonicalise_isbn('014143984X')
51
+ assert_equal '0345431928',
52
+ Alexandria::Library.canonicalise_isbn('0-345-43192-8')
53
+ assert_equal '3522105907',
54
+ Alexandria::Library.canonicalise_isbn('3522105907')
55
+ # EAN number
56
+ assert_equal '0345431928',
57
+ Alexandria::Library.canonicalise_isbn('9780345431929')
58
+ end
59
+
60
+ # Doesn't work quite yet.
61
+ # def test_ISBN_import_bad_number
62
+ # on_iterate_cb = proc { }
63
+ # on_error_cb = proc { }
64
+ # library, libraries = __test_fake_import_isbns
65
+ # test_file = "data/isbns.txt"
66
+ # library.import_as_isbn_list("Test Library", test_file, on_iterate_cb, on_error_cb)
67
+ # end
68
+ end
@@ -0,0 +1,254 @@
1
+ #!/usr/bin/env ruby
2
+ # Copyright (C) 2005-2006 Laurent Sansonetti
3
+ # Copyright (C) 2011, 2014 Matijs van Zuijlen
4
+ # Incorporates code Copyright (C) 2007 Joseph Method
5
+ #
6
+ # This file is part of Alexandria, a GNOME book collection manager.
7
+ #
8
+ # Alexandria is free software; you can redistribute it and/or
9
+ # modify it under the terms of the GNU General Public License as
10
+ # published by the Free Software Foundation; either version 2 of the
11
+ # License, or (at your option) any later version.
12
+ #
13
+ # Alexandria is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
+ # General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public
19
+ # License along with Alexandria; see the file COPYING. If not,
20
+ # write to the Free Software Foundation, Inc., 51 Franklin Street,
21
+ # Fifth Floor, Boston, MA 02110-1301 USA.
22
+
23
+ require File.expand_path('test_helper.rb', File.dirname(__FILE__))
24
+
25
+ describe Alexandria::BookProviders do
26
+ it 'should be less clever'
27
+
28
+ def assert_correct_search_result(provider, query, search_type = Alexandria::BookProviders::SEARCH_BY_ISBN)
29
+ results = provider.instance.search(query, search_type)
30
+
31
+ puts results.inspect if $DEBUG
32
+
33
+ assert_kind_of(Array, results, "Results are not an array for #{provider}")
34
+ assert(!results.empty?, "Results are empty for #{provider}")
35
+
36
+ if search_type == Alexandria::BookProviders::SEARCH_BY_ISBN
37
+ assert(results.length <= 2, "Results are greater than 2 for #{provider}")
38
+
39
+ book = results.first
40
+
41
+ assert_kind_of(Alexandria::Book, book, "Result is not a Book for #{provider}")
42
+
43
+ canonical_query = Alexandria::Library.canonicalise_ean(query)
44
+ canonical_result = Alexandria::Library.canonicalise_ean(book.isbn)
45
+ assert_equal(canonical_query, canonical_result,
46
+ "Result's isbn #{book.isbn} is not equivalent to the requested isbn #{query} for #{provider}")
47
+
48
+ if results.length == 2
49
+ cover_url = results.last
50
+ assert(cover_url.nil? || cover_url.is_a?(String), "Unexpected cover_url #{cover_url.inspect} for #{provider}")
51
+ end
52
+ else
53
+ assert_kind_of(Alexandria::Book, results.first.first, "Result item is not a Book for #{provider}")
54
+ end
55
+ results
56
+ end
57
+
58
+ it 'should not piss off Rich Burridge' do
59
+ skip 'Amazon requires an API key. Remove it altogether as a provider?'
60
+ assert_correct_search_result(Alexandria::BookProviders::AmazonProvider,
61
+ '033025068X')
62
+ end
63
+
64
+ it 'amazon should work' do
65
+ skip 'Amazon requires an API key. Remove it altogether as a provider?'
66
+ assert_correct_search_result(Alexandria::BookProviders::AmazonProvider,
67
+ '9780385504201')
68
+ end
69
+
70
+ it 'amazon title should work' do
71
+ skip 'Amazon requires an API key. Remove it altogether as a provider?'
72
+ assert_correct_search_result(Alexandria::BookProviders::AmazonProvider,
73
+ 'A Confederacy of Dunces', Alexandria::BookProviders::SEARCH_BY_TITLE)
74
+ end
75
+
76
+ it 'amazon authors should work' do
77
+ skip 'Amazon requires an API key. Remove it altogether as a provider?'
78
+ assert_correct_search_result(Alexandria::BookProviders::AmazonProvider,
79
+ 'John Kennedy Toole', Alexandria::BookProviders::SEARCH_BY_AUTHORS)
80
+ end
81
+
82
+ it 'amazon keyword should work' do
83
+ skip 'Amazon requires an API key. Remove it altogether as a provider?'
84
+ assert_correct_search_result(Alexandria::BookProviders::AmazonProvider,
85
+ 'Confederacy Dunces', Alexandria::BookProviders::SEARCH_BY_KEYWORD)
86
+ end
87
+
88
+ it 'dea should work' do
89
+ assert_correct_search_result(Alexandria::BookProviders::DeaStoreProvider,
90
+ '9788817012980')
91
+ assert_correct_search_result(Alexandria::BookProviders::DeaStoreProvider,
92
+ '9788806134747')
93
+ end
94
+
95
+ # Right? Don't test if dependency isn't present.
96
+
97
+ it 'LOC should work' do
98
+ begin
99
+ require 'zoom'
100
+ rescue LoadError
101
+ skip 'This test needs zoom'
102
+ end
103
+ assert_correct_search_result(Alexandria::BookProviders::LOCProvider,
104
+ '9780805335583')
105
+ # this book has non-ASCII letters
106
+ assert_correct_search_result(Alexandria::BookProviders::LOCProvider,
107
+ '9782070379248')
108
+ end
109
+
110
+ it 'BL should work' do
111
+ begin
112
+ require 'zoom'
113
+ rescue LoadError
114
+ skip 'This test needs zoom'
115
+ end
116
+
117
+ assert_correct_search_result(Alexandria::BookProviders::BLProvider,
118
+ '9781853260803')
119
+ end
120
+
121
+ it 'SBN should work' do
122
+ begin
123
+ require 'zoom'
124
+ rescue LoadError
125
+ skip 'This test needs zoom'
126
+ end
127
+
128
+ assert_correct_search_result(Alexandria::BookProviders::SBNProvider,
129
+ '9788835926436')
130
+ end
131
+
132
+ # providers supposed to be always working
133
+
134
+ it 'Barnes and Noble should work' do
135
+ skip 'Needs fixing'
136
+ assert_correct_search_result(Alexandria::BookProviders::BarnesAndNobleProvider,
137
+ '9780961328917') # see #1433
138
+ end
139
+
140
+ it 'MCU should work' do
141
+ skip 'Needs fixing'
142
+ # this book is without binding information, see bug [#2533]
143
+ assert_correct_search_result(Alexandria::BookProviders::MCUProvider,
144
+ '9788487982033')
145
+ # this book is "agotado" (out of print), see bug [#2518]
146
+ assert_correct_search_result(Alexandria::BookProviders::MCUProvider,
147
+ '9788496075856')
148
+ end
149
+
150
+ it 'Proxis should work' do
151
+ skip 'Needs fixing'
152
+ assert_correct_search_result(Alexandria::BookProviders::ProxisProvider,
153
+ '9789026965746')
154
+ assert_correct_search_result(Alexandria::BookProviders::ProxisProvider,
155
+ '9780586071403')
156
+ end
157
+
158
+ it 'Thalia should work' do
159
+ skip 'Needs fixing'
160
+ # german book
161
+ assert_correct_search_result(Alexandria::BookProviders::ThaliaProvider,
162
+ '9783896673305')
163
+ # international book
164
+ assert_correct_search_result(Alexandria::BookProviders::ThaliaProvider,
165
+ '9780440241904')
166
+ # movie dvd
167
+ assert_correct_search_result(Alexandria::BookProviders::ThaliaProvider,
168
+ '4010232037824')
169
+ # music cd
170
+ assert_correct_search_result(Alexandria::BookProviders::ThaliaProvider,
171
+ '0094638203520')
172
+ end
173
+
174
+ it 'IBS_it should work' do
175
+ skip 'Marked in code as not working; remove implementation entirely.'
176
+ # this tests a book without image but with author
177
+ assert_correct_search_result(Alexandria::BookProviders::IBS_itProvider,
178
+ '9788886973816')
179
+ # this tests a book with image but without author
180
+ assert_correct_search_result(Alexandria::BookProviders::IBS_itProvider,
181
+ '9788807710148')
182
+ end
183
+
184
+ it 'AdLibris should work' do
185
+ skip 'Needs fixing: site has changed'
186
+ assert_correct_search_result(Alexandria::BookProviders::AdLibrisProvider,
187
+ '9789100109332')
188
+ end
189
+
190
+ it 'Siciliano should work' do
191
+ skip 'Needs fixing: no results found'
192
+ assert_correct_search_result(Alexandria::BookProviders::SicilianoProvider,
193
+ '9788599170380')
194
+ end
195
+
196
+ it 'BOL_it should work' do
197
+ skip 'Marked in code as not working; remove implementation entirely.'
198
+ assert_correct_search_result(Alexandria::BookProviders::BOL_itProvider,
199
+ '9788817012980')
200
+ end
201
+
202
+ it 'Webster should work' do
203
+ skip 'Marked in code as not working; remove implementation entirely.'
204
+ # BIT
205
+ assert_correct_search_result(Alexandria::BookProviders::Webster_itProvider,
206
+ '9788817012980')
207
+ # BUK
208
+ assert_correct_search_result(Alexandria::BookProviders::Webster_itProvider,
209
+ '9781853260803')
210
+ # BUS
211
+ assert_correct_search_result(Alexandria::BookProviders::Webster_itProvider,
212
+ '9780307237699')
213
+ # BDE
214
+ assert_correct_search_result(Alexandria::BookProviders::Webster_itProvider,
215
+ '9783442460878')
216
+ end
217
+
218
+ it 'Webster should work with multiple authors' do
219
+ skip 'Marked in code as not working; remove implementation entirely.'
220
+ this_book = assert_correct_search_result(Alexandria::BookProviders::Webster_itProvider,
221
+ '9788804559016')
222
+ assert_kind_of(Array, this_book.authors, 'Not an array!')
223
+ # puts this_book.authors
224
+ assert(this_book.authors.length == 3, 'Wrong number of authors for this book!')
225
+ end
226
+
227
+ it 'Renaud should work' do
228
+ skip 'Marked in code as not working; remove implementation entirely.'
229
+ # adultes
230
+ assert_correct_search_result(Alexandria::BookProviders::RENAUDProvider,
231
+ '9782894723388')
232
+ # jeunesse
233
+ assert_correct_search_result(Alexandria::BookProviders::RENAUDProvider,
234
+ '9782764605059')
235
+ end
236
+
237
+ it 'Worldcat should work' do
238
+ assert_correct_search_result(Alexandria::BookProviders::WorldCatProvider,
239
+ '9780521247108')
240
+ # this one is with <div class=vernacular lang="[^"]+">)
241
+ assert_correct_search_result(Alexandria::BookProviders::WorldCatProvider,
242
+ '9785941454136')
243
+ end
244
+
245
+ it 'Worldcat should work with multiple authors' do
246
+ results = assert_correct_search_result(Alexandria::BookProviders::WorldCatProvider,
247
+ '9785941454136')
248
+ this_book = results.first
249
+ assert_kind_of(Array, this_book.authors, 'Not an array!')
250
+ # puts this_book.authors
251
+ assert(this_book.authors.length == 2, 'Wrong number of authors for this book!')
252
+
253
+ end
254
+ end