alexandria-book-collection-manager 0.7.8 → 0.7.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +48 -53
  3. data/.rubocop.yml +18 -5
  4. data/.rubocop_todo.yml +31 -37
  5. data/.simplecov +2 -2
  6. data/CHANGELOG.md +37 -0
  7. data/ChangeLog.0 +19 -19
  8. data/INSTALL.md +3 -5
  9. data/README.md +0 -5
  10. data/Rakefile +14 -14
  11. data/alexandria-book-collection-manager.gemspec +35 -34
  12. data/doc/FAQ +2 -2
  13. data/lib/alexandria/about.rb +1 -1
  14. data/lib/alexandria/book_providers/bl_provider.rb +88 -0
  15. data/lib/alexandria/book_providers/loc_provider.rb +38 -0
  16. data/lib/alexandria/book_providers/sbn_provider.rb +108 -0
  17. data/lib/alexandria/book_providers/thalia_provider.rb +1 -1
  18. data/lib/alexandria/book_providers/web.rb +2 -2
  19. data/lib/alexandria/book_providers/worldcat.rb +9 -7
  20. data/lib/alexandria/book_providers/z3950_provider.rb +199 -0
  21. data/lib/alexandria/book_providers.rb +10 -25
  22. data/lib/alexandria/console.rb +2 -2
  23. data/lib/alexandria/default_preferences.rb +1 -1
  24. data/lib/alexandria/export_library.rb +14 -14
  25. data/lib/alexandria/image_fetcher.rb +25 -0
  26. data/lib/alexandria/import_library.rb +10 -10
  27. data/lib/alexandria/library_store.rb +4 -5
  28. data/lib/alexandria/models/book.rb +13 -0
  29. data/lib/alexandria/models/library.rb +15 -23
  30. data/lib/alexandria/preferences.rb +4 -6
  31. data/lib/alexandria/{book_providers/pseudomarc.rb → pseudo_marc_parser.rb} +2 -2
  32. data/lib/alexandria/scanners/cue_cat.rb +1 -1
  33. data/lib/alexandria/smart_library.rb +2 -2
  34. data/lib/alexandria/ui/about_dialog.rb +1 -1
  35. data/lib/alexandria/ui/acquire_dialog.rb +6 -9
  36. data/lib/alexandria/ui/alert_dialog.rb +2 -2
  37. data/lib/alexandria/ui/barcode_animation.rb +1 -1
  38. data/lib/alexandria/ui/book_properties_dialog_base.rb +5 -9
  39. data/lib/alexandria/ui/completion_models.rb +1 -5
  40. data/lib/alexandria/ui/conflict_while_copying_dialog.rb +1 -1
  41. data/lib/alexandria/ui/icons.rb +2 -2
  42. data/lib/alexandria/ui/init.rb +10 -4
  43. data/lib/alexandria/ui/listview.rb +1 -1
  44. data/lib/alexandria/ui/multi_drag_treeview.rb +1 -1
  45. data/lib/alexandria/ui/new_book_dialog.rb +11 -13
  46. data/lib/alexandria/ui/new_book_dialog_manual.rb +1 -1
  47. data/lib/alexandria/ui/preferences_dialog.rb +2 -2
  48. data/lib/alexandria/ui/provider_preferences_base_dialog.rb +1 -1
  49. data/lib/alexandria/ui/really_delete_dialog.rb +1 -1
  50. data/lib/alexandria/ui/ui_manager.rb +17 -25
  51. data/lib/alexandria/version.rb +1 -1
  52. data/lib/alexandria/web_themes.rb +1 -1
  53. data/lib/alexandria.rb +6 -5
  54. data/po/cs.po +90 -125
  55. data/po/cy.po +87 -125
  56. data/po/de.po +96 -125
  57. data/po/el.po +96 -125
  58. data/po/es.po +96 -125
  59. data/po/fr.po +90 -125
  60. data/po/ga.po +83 -124
  61. data/po/gl.po +90 -125
  62. data/po/it.po +90 -125
  63. data/po/ja.po +90 -125
  64. data/po/mk.po +96 -125
  65. data/po/nb.po +90 -125
  66. data/po/nl.po +107 -124
  67. data/po/pl.po +113 -124
  68. data/po/pt.po +90 -125
  69. data/po/pt_BR.po +90 -125
  70. data/po/ru.po +92 -124
  71. data/po/sk.po +90 -125
  72. data/po/sv.po +90 -125
  73. data/po/uk.po +90 -125
  74. data/po/zh_TW.po +90 -125
  75. data/schemas/alexandria.schemas +1 -1
  76. data/share/gnome/help/alexandria/C/adding-books.xml +3 -4
  77. data/share/gnome/help/alexandria/C/introduction.xml +0 -16
  78. data/share/gnome/help/alexandria/C/searching.xml +1 -4
  79. data/share/gnome/help/alexandria/C/settings.xml +0 -30
  80. data/share/gnome/help/alexandria/fr/alexandria.xml +4 -159
  81. data/share/gnome/help/alexandria/ja/adding-books.xml +1 -1
  82. data/share/gnome/help/alexandria/ja/introduction.xml +0 -15
  83. data/share/gnome/help/alexandria/ja/searching.xml +3 -7
  84. data/share/gnome/help/alexandria/ja/settings.xml +0 -27
  85. data/spec/alexandria/book_providers/bl_provider_spec.rb +13 -0
  86. data/spec/alexandria/book_providers/loc_provider_spec.rb +17 -0
  87. data/spec/alexandria/book_providers/sbn_provider_spec.rb +13 -0
  88. data/spec/alexandria/book_providers/thalia_provider_spec.rb +1 -1
  89. data/spec/alexandria/book_providers/world_cat_provider_spec.rb +22 -10
  90. data/spec/alexandria/book_providers_spec.rb +0 -81
  91. data/spec/alexandria/book_spec.rb +5 -3
  92. data/spec/alexandria/export_library_spec.rb +8 -8
  93. data/spec/alexandria/library_spec.rb +83 -51
  94. data/spec/alexandria/library_store_spec.rb +1 -1
  95. data/spec/alexandria/preferences_spec.rb +7 -7
  96. data/spec/alexandria/pseudo_marc_parser_spec.rb +71 -0
  97. data/spec/alexandria/scanners/cue_cat_spec.rb +11 -4
  98. data/spec/alexandria/smart_library_spec.rb +7 -5
  99. data/spec/alexandria/ui/about_dialog_spec.rb +1 -1
  100. data/spec/alexandria/ui/acquire_dialog_spec.rb +1 -1
  101. data/spec/alexandria/ui/alert_dialog_spec.rb +5 -3
  102. data/spec/alexandria/ui/bad_isbns_dialog_spec.rb +1 -1
  103. data/spec/alexandria/ui/book_properties_dialog_spec.rb +4 -4
  104. data/spec/alexandria/ui/confirm_erase_dialog_spec.rb +18 -2
  105. data/spec/alexandria/ui/conflict_while_copying_dialog_spec.rb +1 -1
  106. data/spec/alexandria/ui/error_dialog_spec.rb +13 -2
  107. data/spec/alexandria/ui/export_dialog_spec.rb +3 -3
  108. data/spec/alexandria/ui/iconview_spec.rb +1 -1
  109. data/spec/alexandria/ui/import_dialog_spec.rb +3 -3
  110. data/spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb +1 -1
  111. data/spec/alexandria/ui/new_book_dialog_manual_spec.rb +4 -4
  112. data/spec/alexandria/ui/new_book_dialog_spec.rb +2 -2
  113. data/spec/alexandria/ui/new_provider_dialog_spec.rb +3 -3
  114. data/spec/alexandria/ui/new_smart_library_dialog_spec.rb +9 -7
  115. data/spec/alexandria/ui/preferences_dialog_spec.rb +1 -1
  116. data/spec/alexandria/ui/provider_preferences_dialog_spec.rb +2 -2
  117. data/spec/alexandria/ui/really_delete_dialog_spec.rb +1 -1
  118. data/spec/alexandria/ui/sidepane_manager_spec.rb +1 -1
  119. data/spec/alexandria/ui/skip_entry_dialog_spec.rb +18 -2
  120. data/spec/alexandria/ui/smart_library_properties_dialog_spec.rb +2 -2
  121. data/spec/alexandria/ui/ui_manager_spec.rb +83 -5
  122. data/spec/data/libraries/0.6.2/My Library/9780571147168.yaml +2 -0
  123. data/spec/spec_helper.rb +23 -32
  124. data/util/rake/fileinstall.rb +12 -12
  125. data/util/rake/gettextgenerate.rb +1 -1
  126. data/util/rake/omfgenerate.rb +1 -1
  127. metadata +73 -58
  128. data/lib/alexandria/book_providers/adlibris.rb +0 -191
  129. data/lib/alexandria/book_providers/amazon_aws.rb +0 -239
  130. data/lib/alexandria/book_providers/amazon_ecs_util.rb +0 -373
  131. data/lib/alexandria/book_providers/barnes_and_noble.rb +0 -209
  132. data/lib/alexandria/book_providers/proxis.rb +0 -176
  133. data/lib/alexandria/book_providers/siciliano.rb +0 -256
  134. data/lib/alexandria/book_providers/z3950.rb +0 -408
@@ -165,27 +165,6 @@ Date : 30 décembre 2005
165
165
  <!--retrieves and displays book information (including cover pictures) from online libraries:-->
166
166
  </para>
167
167
  <itemizedlist>
168
- <listitem>
169
- <para>
170
- <orgname>Amazon</orgname> (.com, .co.uk, .de et .jp)&nbsp;;
171
- </para>
172
- </listitem>
173
- <listitem>
174
- <para>
175
- <orgname>Proxis</orgname>&nbsp;;
176
- </para>
177
- </listitem>
178
- <listitem>
179
- <para>
180
- <orgname>Barnes and Noble</orgname>&nbsp;;
181
- </para>
182
- </listitem>
183
- <listitem>
184
- <para>
185
- <orgname>Ministère de la Culture espagnole</orgname>&nbsp;;
186
- <!--the Spanish Ministry of Culture-->
187
- </para>
188
- </listitem>
189
168
  <listitem>
190
169
  <para>
191
170
  <orgname>Amadeus Buch</orgname>&nbsp;;
@@ -618,15 +597,14 @@ Date : 30 décembre 2005
618
597
  ajouter, vous pouvez rechercher par le titre,
619
598
  les auteurs ou des mots clés.
620
599
  &app; recherche les livres qui correspondent aux critères définis
621
- à partir de fournisseurs d&#8217;informations en ligne tel
622
- qu&#8217;<ulink url="http://www.amazon.fr">Amazon</ulink>.
600
+ à partir de fournisseurs d&#8217;informations en ligne.
623
601
  Vous pouvez ensuite sélectionner le livre désiré à partir de la liste
624
602
  affichée et cliquer sur le bouton
625
603
  <guibutton>A<accel>j</accel>outer</guibutton> pour
626
604
  l&#8217;intégrer à votre bibliothèque.
627
605
  <!--If you do not know the ISBN of the book you wish to add, you can specify
628
606
  either the Title, the Authors or the Keywords, and &app; will search
629
- your online information provider, such as Amazon, for books that match.
607
+ your online information provider for books that match.
630
608
  You can then select the desired book from the displayed list and
631
609
  click <guibutton>Add</guibutton> to the book to the selected library.-->
632
610
  </para>
@@ -1610,55 +1588,21 @@ Date : 30 décembre 2005
1610
1588
  </title>
1611
1589
  <para>
1612
1590
  Pour trouver plus d&#8217;informations au sujet de vos livres, vous
1613
- pouvez utiliser &app; pour ouvrir une page web sur
1614
- <orgname>Amazon</orgname>, <orgname>Barnes and Noble</orgname>
1615
- ou chez l&#8217;un des autres fournisseurs d&#8217;informations en ligne
1591
+ pouvez utiliser &app; pour ouvrir une page web
1592
+ chez l&#8217;un des fournisseurs d&#8217;informations en ligne
1616
1593
  et être dirigé directement à la page du livre concerné.
1617
1594
  Pour cela, sélectionnez le livre, cliquez dessus avec le bouton
1618
1595
  <mousebutton>droit</mousebutton> de la souris,
1619
1596
  et à partir du menu contextuel choisissez
1620
1597
  <guimenu>Afficher les <accel>i</accel>nformations en ligne</guimenu>
1621
1598
  puis sélectionnez le fournisseur dans la liste présentée.
1622
- <!--If you want to find out more information about your book, you
1623
- can use &app; to open the web page of Amazon, Barnes and Noble,
1624
- or one of the other online information providers and be
1625
- taken directly to the relevant book. Simply select the book you
1626
- wish to know more about, right-click on it, and from the menu
1627
- <guimenuitem>Display Online Information</guimenuitem>, choose
1628
- from either Amazon, Barnes and Nobel, Proxis,
1629
- Spanish Culture Ministry, Amadeus Buch, or
1630
- Internet Bookshop Italia.-->
1631
1599
  </para>
1632
- <tip>
1633
- <para>
1634
- Le menu
1635
- <menuchoice>
1636
- <guimenu>Afficher les <accel>i</accel>nformations en ligne</guimenu>
1637
- <guimenuitem>Sur <accel>A</accel>mazon</guimenuitem>
1638
- </menuchoice>
1639
- vous envoie sur le site d&#8217;<orgname>Amazon</orgname> .com,
1640
- .ca, .co.uk, .de, .fr, ou .jp en fonction de votre
1641
- configuration pour ce fournisseur (voir
1642
- <xref linkend="alexandria-amazon-prefs"/>).
1643
- <!--The
1644
- <menuchoice>
1645
- <guimenu>Display Online Information</guimenu>
1646
- <guimenuitem>At Amazon</guimenuitem>
1647
- </menuchoice>
1648
- choice will take you to the Amazon .com, .co.uk, .de, or jp
1649
- site, as set up in the
1650
- <xref linkend="alexandria-amazon-prefs"/>.-->
1651
- </para>
1652
- </tip>
1653
1600
  <caution>
1654
1601
  <para>
1655
1602
  Les sources d&#8217;informations en ligne n&#8217;ont pas une liste
1656
1603
  complète de livres et il est possible que vous deviez
1657
1604
  essayer plusieurs fournisseurs pour trouver
1658
1605
  l&#8217;information recherchée.
1659
- <!--Not every online information source has a complete list of
1660
- books and you may have to try several different providers
1661
- to find the information you want.-->
1662
1606
  </para>
1663
1607
  </caution>
1664
1608
  </sect2>
@@ -1964,35 +1908,7 @@ Date : 30 décembre 2005
1964
1908
  en déplaçant chaque source en utilisant
1965
1909
  les boutons <guibutton><accel>V</accel>ers le haut</guibutton>
1966
1910
  ou <guibutton><accel>V</accel>ers le bas</guibutton>.
1967
- <!--&app; can download information from a variety of different
1968
- online sources; some of these sources have additional options
1969
- to control how the information is downloaded. &app; will
1970
- search each of the sources in turn, in the order displayed in
1971
- the list. You can change the order in which the sources are
1972
- searched by moving each source up or down using the
1973
- <guibutton>Up</guibutton> and <guibutton>Down</guibutton> buttons.-->
1974
1911
  <itemizedlist>
1975
- <listitem>
1976
- <para>
1977
- <xref linkend="alexandria-amazon-prefs"/>&nbsp;;
1978
- </para>
1979
- </listitem>
1980
- <listitem>
1981
- <para>
1982
- <xref linkend="alexandria-proxis-prefs"/>&nbsp;;
1983
- </para>
1984
- </listitem>
1985
- <listitem>
1986
- <para>
1987
- Ministère de la Culture espagnol&nbsp;;
1988
- <!--The Spanish Culture Ministry-->
1989
- </para>
1990
- </listitem>
1991
- <listitem>
1992
- <para>
1993
- Barnes and Noble&nbsp;;
1994
- </para>
1995
- </listitem>
1996
1912
  <listitem>
1997
1913
  <para>
1998
1914
  Amadeus Buch&nbsp;;
@@ -2035,77 +1951,6 @@ Date : 30 décembre 2005
2035
1951
  </para>
2036
1952
 
2037
1953
 
2038
- <sect3 id="alexandria-amazon-prefs">
2039
- <title>
2040
- Préférences pour <orgname>Amazon</orgname>
2041
- <!-- Amazon preferences-->
2042
- </title>
2043
- <para>
2044
- &app; peut télécharger les informations d&#8217;un livre à partir
2045
- de différents sites web d&#8217;<orgname>Amazon</orgname>.
2046
- Les sites actuellement supportés sont&nbsp;:
2047
- amazon.com (us), .ca, .co.uk (uk), .de, .fr et .jp.
2048
- Pour changer le site utilisé, sélectionnez
2049
- <guilabel>Amazon</guilabel> à partir de la liste des
2050
- fournisseurs et cliquez sur
2051
- <guibutton><accel>C</accel>onfigurer</guibutton>.
2052
- Ensuite choisissez dans le menu déroulant
2053
- <guilabel><accel>L</accel>angue</guilabel> le site
2054
- qui vous convient.
2055
- <!--&app; can download book information from different amazon
2056
- websites - currently, amazon.com, .co.uk, .de and .jp.
2057
- To change which site to use, select Amazon from the
2058
- Provider list, and click on <guibutton>Setup</guibutton>.
2059
- Then choose either <guilabel>UK, DE, JP</guilabel> or
2060
- <guilabel>US</guilabel> from the drop-down menu.-->
2061
- </para>
2062
-
2063
- <warning>
2064
- <para>
2065
- <guilabel><accel>J</accel>eton de développeur</guilabel>
2066
- et <guilabel><accel>I</accel>dentifiant d&#8217;associé</guilabel>
2067
- peuvent être changés si vous avez un compte de service web
2068
- d&#8217;<orgname>Amazon</orgname>. Vous pouvez obtenir
2069
- un compte à l&#8217;adresse
2070
- <ulink url="https://aws-portal.amazon.com/gp/aws/developer/registration/index.html/002-9602971-5248069">aws-portal.amazon.com</ulink>.
2071
- Si vous ne savez pas ce que cela signifie, alors vous pouvez
2072
- laisser ces champs tels quels.
2073
- <!--The <guilabel>Development token</guilabel> and
2074
- <guilabel>Associate ID</guilabel> can be changed if you
2075
- have an amazon web services account. You sign for an
2076
- Amazon Web Services account at
2077
- <ulink url="https://aws-portal.amazon.com/gp/aws/developer/registration/index.html/002-9602971-5248069">aws-portal.amazon.com</ulink>.
2078
- If you don&#8217;t know what this means, then you can leave
2079
- these values alone.-->
2080
- </para>
2081
- </warning>
2082
- </sect3>
2083
-
2084
-
2085
- <sect3 id="alexandria-proxis-prefs">
2086
- <title>
2087
- Préférences <orgname>Proxis</orgname>
2088
- <!--Proxis preferences-->
2089
- </title>
2090
- <para>
2091
- &app; peut chercher dans le site web de
2092
- <orgname>Proxis</orgname> pour des livres en
2093
- anglais (en), français (fr) ou néerlandais (nl). Pour changer
2094
- la langue utilisée, sélectionnez <guilabel>Proxis</guilabel>
2095
- dans la liste
2096
- <guilabel><accel>F</accel>ournisseurs</guilabel> et cliquez
2097
- sur <guibutton><accel>C</accel>onfigurer</guibutton>.
2098
- Ensuite, sélectionnez la langue dans le menu déroulant
2099
- <guilabel><accel>L</accel>angue</guilabel>.
2100
- <!--&app; can search the Proxis website for books in either
2101
- English, French or Dutch. To change which language to use,
2102
- select Proxis from the Provider list, and click on
2103
- <guibutton>Setup</guibutton>. Then chose either
2104
- <guilabel>en, fr</guilabel> or <guilabel>nl</guilabel> from
2105
- the drop-down menu.-->
2106
- </para>
2107
- </sect3>
2108
-
2109
1954
  <sect3 id="alexandria-britlib-prefs">
2110
1955
  <title>
2111
1956
  Préférences <orgname>Bibliothèque Britannique</orgname>
@@ -101,7 +101,7 @@
101
101
 
102
102
  <para>
103
103
  追加したい本のISBNが分からない場合には、本のタイトルや作者、キーワードを入力すると、
104
- &app; はAmazonなどのオンライン情報のプロバイダーから本を検索します。
104
+ &app; はオンライン情報のプロバイダーから本を検索します。
105
105
  リストに表示された検索結果から追加したい本を選択し、<guibutton>追加</guibutton>
106
106
  のボタンを押して選択したライブラリに本を追加できます。</para>
107
107
 
@@ -21,21 +21,6 @@
21
21
  オンラインの図書館や書店から本の情報(や本の表紙)を検索して表示できます。
22
22
  例として、
23
23
  <itemizedlist>
24
- <listitem>
25
- <para>
26
- <ulink url="http://www.amazon.com">Amazon</ulink>
27
- (amazon.comの他に .co.uk, .fr, .de, .ja, .caのウェブサイトを検索できます)
28
- </para>
29
- </listitem>
30
-
31
- <listitem>
32
- <para><ulink url="http://www.proxis.be">Proxis</ulink></para>
33
- </listitem>
34
-
35
- <listitem>
36
- <para><ulink url="http://www.barnesandnoble.com">Barnes and Noble</ulink></para>
37
- </listitem>
38
-
39
24
  <listitem>
40
25
  <para><ulink url="http://www.thalia.de">Thalia</ulink></para>
41
26
  </listitem>
@@ -87,15 +87,11 @@
87
87
  <!-- ========= Finding out more online =========== -->
88
88
  <section id="searching-more-online">
89
89
  <title>オンラインで本に関する詳細な情報を探すには</title>
90
- <para>もし本について詳細な情報を知りたければ、&app; はAmazonやBarnes and Noble
91
- などのオンライン情報プロバイダーのウェブページを開いて、その本に関する情報を直接得ることが
90
+ <para>もし本について詳細な情報を知りたければ、&app; は
91
+ オンライン情報プロバイダーのウェブページを開いて、その本に関する情報を直接得ることが
92
92
  出来ます。より詳しく知りたい本を選択して右クリックし、
93
- <guimenuitem>オンライン情報の表示</guimenuitem>を選択して、Amazonなどのプロバイダーを
93
+ <guimenuitem>オンライン情報の表示</guimenuitem>を選択して、プロバイダーを
94
94
  選択してください。</para>
95
- <tip>
96
- <para><menuchoice><guimenu>オンライン情報の表示</guimenu><guimenuitem>Amazon</guimenuitem></menuchoice>を選択した時は、<xref linkend="alexandria-amazon-prefs"/>で
97
- 設定した amazon.com, co.uk, .de, .jpのいずれかのサイトが選択されます。</para>
98
- </tip>
99
95
  <caution>
100
96
  <para>すべてのオンライン情報源が、本に関する完璧な情報を持っているわけではありません。
101
97
  欲しい情報を得るために、別のプロバイダーをいくつか試す必要があるかもしれません。</para>
@@ -37,10 +37,7 @@
37
37
  <guibutton>上へ</guibutton>と<guibutton>下へ</guibutton>のボタンを使って
38
38
  検索する情報源の順番を変えることができます。
39
39
  <itemizedlist>
40
- <listitem><para><xref linkend="alexandria-amazon-prefs"/></para></listitem>
41
- <listitem><para><xref linkend="alexandria-proxis-prefs"/></para></listitem>
42
40
  <listitem><para>スペイン文化省</para></listitem>
43
- <listitem><para>Barnes and Noble</para></listitem>
44
41
  <listitem><para>Amadeus Buch</para></listitem>
45
42
  <listitem><para>Internet Bookshop Italia</para></listitem>
46
43
  <listitem><para><xref linkend="alexandria-britlib-prefs"/></para></listitem>
@@ -55,30 +52,6 @@
55
52
  </para>
56
53
 
57
54
 
58
- <sect3 id="alexandria-amazon-prefs">
59
- <title>Amazonの設定</title>
60
- <para>&app; はいくつかの異なるAmazonのサイトから本の情報をダウンロード出来ます。
61
- 現時点では、amazon.com, .co.uk, .de, .jp, .fr, .ca です。使用するサイトを
62
- 変更するには、プロバイダーの一覧からAmazonを選択し、<guibutton>セットアップ</guibutton>
63
- をクリックします。次にドロップダウンメニューから<guilabel>UK, DE, JP, FR, CA, US</guilabel>
64
- のいずれかを選択します。</para>
65
- <warning>
66
- <para><guilabel>デベロッパートークン</guilabel>と <guilabel>アソシエイトID</guilabel>は、もしあなたがAmazonのウェブサービスアカウントを持っていればそれに変更できます。
67
- <ulink url="https://aws-portal.amazon.com/gp/aws/developer/registration/index.html/002-9602971-5248069">aws-portal.amazon.com</ulink>でAmazon
68
- ウェブサービスアカウントのサインアップをしてください。もしこの意味が分からなければ、
69
- 変更せずにデフォルトのままにしておいてください。</para>
70
- </warning>
71
- </sect3>
72
-
73
-
74
- <sect3 id="alexandria-proxis-prefs">
75
- <title>Proxisの設定</title>
76
- <para>&app; は Proxisのウェブサイトで英語またはフランス語、またはオランダ語で
77
- 本を検索できます。どの言語で検索するかを選択するには、プロバイダーの一覧からProxisを
78
- 選択し、<guibutton>セットアップ</guibutton>をクリックします。次にドロップダウンメニュー
79
- から<guilabel>en, fr, nl</guilabel>のいずれかを選択します。</para>
80
- </sect3>
81
-
82
55
  <sect3 id="alexandria-britlib-prefs">
83
56
  <title>大英図書館の設定</title>
84
57
  <para>大英図書館のアカウントを持っているなら、ダイアログでz39.50サービス用の
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is part of Alexandria.
4
+ #
5
+ # See the file README.md for authorship and licensing information.
6
+
7
+ require "spec_helper"
8
+
9
+ describe Alexandria::BookProviders::BLProvider do
10
+ it "works" do
11
+ expect(described_class).to have_correct_search_result_for "9781853260803"
12
+ end
13
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is part of Alexandria.
4
+ #
5
+ # See the file README.md for authorship and licensing information.
6
+
7
+ require "spec_helper"
8
+
9
+ describe Alexandria::BookProviders::LOCProvider do
10
+ it "works for a book with ASCII title" do
11
+ expect(described_class).to have_correct_search_result_for "9780805335583"
12
+ end
13
+
14
+ it "works for a book with a title with non-ASCII letters" do
15
+ expect(described_class).to have_correct_search_result_for "9782070379248"
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is part of Alexandria.
4
+ #
5
+ # See the file README.md for authorship and licensing information.
6
+
7
+ require "spec_helper"
8
+
9
+ describe Alexandria::BookProviders::SBNProvider do
10
+ it "works" do
11
+ expect(described_class).to have_correct_search_result_for "9788835926436"
12
+ end
13
+ end
@@ -114,6 +114,6 @@ RSpec.describe Alexandria::BookProviders::ThaliaProvider do
114
114
  stub_request(:get, "https://www.thalia.de/shop/home/artikeldetails/ID134292338.html")
115
115
  .to_return(status: 200, body: normal_people_details, headers: {})
116
116
 
117
- assert_correct_search_result(described_class, "9780571334650")
117
+ expect(described_class).to have_correct_search_result_for "9780571334650"
118
118
  end
119
119
  end
@@ -139,22 +139,34 @@ RSpec.describe Alexandria::BookProviders::WorldCatProvider do
139
139
  "sky-catalogue-20000-ed-by-alan-hirshfeld-and-roger-w-sinnott" \
140
140
  "/oclc/476534140&referer=brief_results")
141
141
  .to_return(status: 200, body: +sky_catalog_details, headers: {})
142
- assert_correct_search_result(described_class, "9780521247108")
142
+ expect(described_class).to have_correct_search_result_for "9780521247108"
143
143
  end
144
144
 
145
145
  it "works with vernacular" do
146
146
  stub_request(:get, "https://www.worldcat.org/search?q=isbn:9785941454136&qt=advanced")
147
147
  .to_return(status: 200, body: +florence_ru_details, headers: {})
148
- assert_correct_search_result(described_class, "9785941454136")
148
+ expect(described_class).to have_correct_search_result_for "9785941454136"
149
149
  end
150
150
 
151
- it "works with multiple authors" do
152
- stub_request(:get, "https://www.worldcat.org/search?q=isbn:9785941454136&qt=advanced")
153
- .to_return(status: 200, body: +florence_ru_details, headers: {})
154
- results = assert_correct_search_result(described_class,
155
- "9785941454136")
156
- this_book = results.first
157
- expect(this_book.authors).to be_instance_of(Array), "Not an array!"
158
- expect(this_book.authors.length).to eq(2), "Wrong number of authors for this book!"
151
+ context "when book has multiple authors" do
152
+ let(:search_result) do
153
+ described_class.instance.search("9785941454136",
154
+ Alexandria::BookProviders::SEARCH_BY_ISBN)
155
+ rescue SocketError
156
+ skip "Service is offline"
157
+ end
158
+
159
+ before do
160
+ stub_request(:get, "https://www.worldcat.org/search?q=isbn:9785941454136&qt=advanced")
161
+ .to_return(status: 200, body: +florence_ru_details, headers: {})
162
+ end
163
+
164
+ it "returns all authors" do
165
+ this_book, = search_result
166
+ aggregate_failures do
167
+ expect(this_book.authors).to be_instance_of(Array), "Not an array!"
168
+ expect(this_book.authors.length).to eq(2), "Wrong number of authors for this book!"
169
+ end
170
+ end
159
171
  end
160
172
  end
@@ -8,85 +8,4 @@ require "spec_helper"
8
8
 
9
9
  describe Alexandria::BookProviders do
10
10
  it "should be less clever"
11
-
12
- describe Alexandria::BookProviders::AmazonProvider do
13
- before do
14
- skip "Amazon requires an API key. Remove it altogether as a provider?"
15
- end
16
-
17
- it "does not piss off Rich Burridge" do
18
- assert_correct_search_result(described_class, "033025068X")
19
- end
20
-
21
- it "works" do
22
- assert_correct_search_result(described_class, "9780385504201")
23
- end
24
-
25
- it "works when searching for title" do
26
- assert_correct_search_result(described_class, "A Confederacy of Dunces",
27
- Alexandria::BookProviders::SEARCH_BY_TITLE)
28
- end
29
-
30
- it "amazon authors should work" do
31
- assert_correct_search_result(described_class, "John Kennedy Toole",
32
- Alexandria::BookProviders::SEARCH_BY_AUTHORS)
33
- end
34
-
35
- it "amazon keyword should work" do
36
- assert_correct_search_result(described_class, "Confederacy Dunces",
37
- Alexandria::BookProviders::SEARCH_BY_KEYWORD)
38
- end
39
- end
40
-
41
- describe Alexandria::BookProviders::LOCProvider do
42
- it "works for a book with ASCII title" do
43
- assert_correct_search_result(described_class, "9780805335583")
44
- end
45
-
46
- it "works for a book with a title with non-ASCII letters" do
47
- assert_correct_search_result(described_class, "9782070379248")
48
- end
49
- end
50
-
51
- describe Alexandria::BookProviders::BLProvider do
52
- it "works" do
53
- skip "Not working: connect failed"
54
- assert_correct_search_result(described_class, "9781853260803")
55
- end
56
- end
57
-
58
- describe Alexandria::BookProviders::SBNProvider do
59
- it "works" do
60
- assert_correct_search_result(described_class, "9788835926436")
61
- end
62
- end
63
-
64
- describe Alexandria::BookProviders::BarnesAndNobleProvider do
65
- it "works" do
66
- skip "Barnes and Noble is not operational at the moment"
67
- assert_correct_search_result(described_class, "9780961328917") # see #1433
68
- end
69
- end
70
-
71
- describe Alexandria::BookProviders::ProxisProvider do
72
- it "works" do
73
- skip "Needs fixing"
74
- assert_correct_search_result(described_class, "9789026965746")
75
- assert_correct_search_result(described_class, "9780586071403")
76
- end
77
- end
78
-
79
- describe Alexandria::BookProviders::AdLibrisProvider do
80
- it "works" do
81
- skip "Needs fixing: site has changed"
82
- assert_correct_search_result(described_class, "9789100109332")
83
- end
84
- end
85
-
86
- describe Alexandria::BookProviders::SicilianoProvider do
87
- it "works" do
88
- skip "Needs fixing: no results found"
89
- assert_correct_search_result(described_class, "9788599170380")
90
- end
91
- end
92
11
  end
@@ -22,16 +22,18 @@ require "spec_helper"
22
22
 
23
23
  describe Alexandria::Book do
24
24
  it "is a thing" do
25
- an_artist_of_the_floating_world
25
+ expect(an_artist_of_the_floating_world).to be_a described_class
26
26
  end
27
27
 
28
28
  it "establishes equality only with books with the same identity" do
29
29
  book = an_artist_of_the_floating_world
30
30
  same_book = an_artist_of_the_floating_world
31
- expect(same_book).to eq book
32
31
  different_book = an_artist_of_the_floating_world
33
32
  different_book.isbn = "9780571147999"
34
- expect(different_book).not_to eq book
33
+ aggregate_failures do
34
+ expect(same_book).to eq book
35
+ expect(different_book).not_to eq book
36
+ end
35
37
  end
36
38
 
37
39
  describe "#rating" do
@@ -24,7 +24,7 @@ RSpec.describe Alexandria::ExportLibrary do
24
24
  end
25
25
 
26
26
  after do
27
- FileUtils.rm_rf(outfile) if File.exist? outfile
27
+ FileUtils.rm_rf(outfile)
28
28
  end
29
29
 
30
30
  describe "#export_as_csv_list" do
@@ -59,8 +59,8 @@ RSpec.describe Alexandria::ExportLibrary do
59
59
  index = File.join(outfile, "index.html")
60
60
 
61
61
  aggregate_failures do
62
- expect(File.exist?(outfile)).to be_truthy
63
- expect(File.exist?(index)).to be_truthy
62
+ expect(outfile).to be_an_existing_file
63
+ expect(index).to be_an_existing_file
64
64
  expect(File.size(index)).to be_nonzero
65
65
  end
66
66
  end
@@ -72,7 +72,7 @@ RSpec.describe Alexandria::ExportLibrary do
72
72
  it "can export unsorted" do
73
73
  format.invoke(my_library, unsorted, outfile)
74
74
  aggregate_failures do
75
- expect(File.exist?(outfile)).to be_truthy
75
+ expect(outfile).to be_an_existing_file
76
76
  expect(File.size(outfile)).to be_nonzero
77
77
  end
78
78
  end
@@ -84,7 +84,7 @@ RSpec.describe Alexandria::ExportLibrary do
84
84
  it "can export unsorted" do
85
85
  format.invoke(my_library, unsorted, outfile)
86
86
  aggregate_failures do
87
- expect(File.exist?(outfile)).to be_truthy
87
+ expect(outfile).to be_an_existing_file
88
88
  expect(File.size(outfile)).to be_nonzero
89
89
  end
90
90
  end
@@ -96,7 +96,7 @@ RSpec.describe Alexandria::ExportLibrary do
96
96
  it "can export unsorted" do
97
97
  format.invoke(my_library, unsorted, outfile)
98
98
  aggregate_failures do
99
- expect(File.exist?(outfile)).to be_truthy
99
+ expect(outfile).to be_an_existing_file
100
100
  expect(File.size(outfile)).to be_nonzero
101
101
  end
102
102
  end
@@ -108,7 +108,7 @@ RSpec.describe Alexandria::ExportLibrary do
108
108
  it "can export unsorted" do
109
109
  format.invoke(my_library, unsorted, outfile)
110
110
  aggregate_failures do
111
- expect(File.exist?(outfile)).to be_truthy
111
+ expect(outfile).to be_an_existing_file
112
112
  expect(File.size(outfile)).to be_nonzero
113
113
  end
114
114
  end
@@ -122,7 +122,7 @@ RSpec.describe Alexandria::ExportLibrary do
122
122
  index = File.join(outfile, "index.linx")
123
123
 
124
124
  aggregate_failures do
125
- expect(File.exist?(outfile)).to be_truthy
125
+ expect(outfile).to be_an_existing_file
126
126
  expect(File.size(index)).to be_nonzero
127
127
  end
128
128
  end