alexandria-book-collection-manager 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +28 -25
  3. data/.rubocop_todo.yml +87 -67
  4. data/CHANGELOG.md +12 -1
  5. data/Gemfile +4 -3
  6. data/README.md +16 -6
  7. data/Rakefile +71 -72
  8. data/alexandria-book-collection-manager.gemspec +44 -44
  9. data/bin/alexandria +12 -12
  10. data/lib/alexandria.rb +22 -22
  11. data/lib/alexandria/about.rb +50 -50
  12. data/lib/alexandria/book_providers.rb +50 -50
  13. data/lib/alexandria/book_providers/adlibris.rb +28 -44
  14. data/lib/alexandria/book_providers/amazon_aws.rb +64 -64
  15. data/lib/alexandria/book_providers/amazon_ecs_util.rb +52 -78
  16. data/lib/alexandria/book_providers/barnes_and_noble.rb +34 -34
  17. data/lib/alexandria/book_providers/douban.rb +21 -37
  18. data/lib/alexandria/book_providers/proxis.rb +24 -24
  19. data/lib/alexandria/book_providers/pseudomarc.rb +19 -19
  20. data/lib/alexandria/book_providers/renaud.rb +44 -57
  21. data/lib/alexandria/book_providers/siciliano.rb +39 -39
  22. data/lib/alexandria/book_providers/thalia.rb +33 -33
  23. data/lib/alexandria/book_providers/web.rb +5 -5
  24. data/lib/alexandria/book_providers/worldcat.rb +44 -69
  25. data/lib/alexandria/book_providers/z3950.rb +94 -109
  26. data/lib/alexandria/config.rb +1 -1
  27. data/lib/alexandria/console.rb +3 -3
  28. data/lib/alexandria/export_format.rb +8 -8
  29. data/lib/alexandria/export_library.rb +112 -113
  30. data/lib/alexandria/import_library.rb +45 -45
  31. data/lib/alexandria/import_library_csv.rb +30 -30
  32. data/lib/alexandria/library_collection.rb +4 -4
  33. data/lib/alexandria/library_sort_order.rb +1 -1
  34. data/lib/alexandria/library_store.rb +14 -14
  35. data/lib/alexandria/logging.rb +5 -5
  36. data/lib/alexandria/models/book.rb +1 -1
  37. data/lib/alexandria/models/library.rb +36 -36
  38. data/lib/alexandria/net.rb +5 -5
  39. data/lib/alexandria/preferences.rb +32 -32
  40. data/lib/alexandria/scanners/{cuecat.rb → cue_cat.rb} +13 -13
  41. data/lib/alexandria/scanners/keyboard.rb +5 -5
  42. data/lib/alexandria/smart_library.rb +53 -53
  43. data/lib/alexandria/ui.rb +15 -15
  44. data/lib/alexandria/ui/{dialogs/about_dialog.rb → about_dialog.rb} +1 -1
  45. data/lib/alexandria/ui/{dialogs/acquire_dialog.rb → acquire_dialog.rb} +66 -65
  46. data/lib/alexandria/ui/{dialogs/alert_dialog.rb → alert_dialog.rb} +1 -16
  47. data/lib/alexandria/ui/{dialogs/bad_isbns_dialog.rb → bad_isbns_dialog.rb} +0 -0
  48. data/lib/alexandria/ui/{dialogs/barcode_animation.rb → barcode_animation.rb} +7 -7
  49. data/lib/alexandria/ui/{dialogs/book_properties_dialog.rb → book_properties_dialog.rb} +25 -37
  50. data/lib/alexandria/ui/{dialogs/book_properties_dialog_base.rb → book_properties_dialog_base.rb} +38 -37
  51. data/lib/alexandria/ui/builder_base.rb +1 -1
  52. data/lib/alexandria/ui/callbacks.rb +95 -91
  53. data/lib/alexandria/ui/completion_models.rb +7 -21
  54. data/lib/alexandria/ui/confirm_erase_dialog.rb +33 -0
  55. data/lib/alexandria/ui/conflict_while_copying_dialog.rb +34 -0
  56. data/lib/alexandria/ui/dndable.rb +7 -7
  57. data/lib/alexandria/ui/error_dialog.rb +25 -0
  58. data/lib/alexandria/ui/{dialogs/export_dialog.rb → export_dialog.rb} +22 -42
  59. data/lib/alexandria/ui/icons.rb +6 -6
  60. data/lib/alexandria/ui/iconview.rb +7 -7
  61. data/lib/alexandria/ui/iconview_tooltips.rb +6 -6
  62. data/lib/alexandria/ui/{dialogs/import_dialog.rb → import_dialog.rb} +14 -32
  63. data/lib/alexandria/ui/init.rb +16 -29
  64. data/lib/alexandria/ui/{dialogs/keep_bad_isbn_dialog.rb → keep_bad_isbn_dialog.rb} +6 -4
  65. data/lib/alexandria/ui/libraries_combo.rb +7 -7
  66. data/lib/alexandria/ui/listview.rb +40 -40
  67. data/lib/alexandria/ui/main_app.rb +22 -24
  68. data/lib/alexandria/ui/misc_dialogs.rb +10 -0
  69. data/lib/alexandria/ui/multi_drag_treeview.rb +4 -4
  70. data/lib/alexandria/ui/{dialogs/new_book_dialog.rb → new_book_dialog.rb} +46 -45
  71. data/lib/alexandria/ui/{dialogs/new_book_dialog_manual.rb → new_book_dialog_manual.rb} +20 -19
  72. data/lib/alexandria/ui/new_provider_dialog.rb +99 -0
  73. data/lib/alexandria/ui/{dialogs/new_smart_library_dialog.rb → new_smart_library_dialog.rb} +4 -4
  74. data/lib/alexandria/ui/{dialogs/preferences_dialog.rb → preferences_dialog.rb} +44 -235
  75. data/lib/alexandria/ui/provider_preferences_base_dialog.rb +90 -0
  76. data/lib/alexandria/ui/provider_preferences_dialog.rb +35 -0
  77. data/lib/alexandria/ui/{dialogs/misc_dialogs.rb → really_delete_dialog.rb} +6 -27
  78. data/lib/alexandria/ui/{sidepane.rb → sidepane_manager.rb} +27 -25
  79. data/lib/alexandria/ui/skip_entry_dialog.rb +32 -0
  80. data/lib/alexandria/ui/{dialogs/smart_library_properties_dialog.rb → smart_library_properties_dialog.rb} +2 -2
  81. data/lib/alexandria/ui/{dialogs/smart_library_properties_dialog_base.rb → smart_library_properties_dialog_base.rb} +30 -30
  82. data/lib/alexandria/ui/sound.rb +8 -8
  83. data/lib/alexandria/ui/ui_manager.rb +136 -135
  84. data/lib/alexandria/version.rb +4 -19
  85. data/lib/alexandria/web_themes.rb +8 -8
  86. data/po/cs.po +97 -97
  87. data/po/cy.po +97 -97
  88. data/po/de.po +97 -97
  89. data/po/el.po +97 -97
  90. data/po/es.po +97 -97
  91. data/po/fr.po +97 -97
  92. data/po/ga.po +97 -97
  93. data/po/gl.po +97 -97
  94. data/po/it.po +97 -97
  95. data/po/ja.po +97 -97
  96. data/po/mk.po +97 -97
  97. data/po/nb.po +97 -97
  98. data/po/nl.po +97 -97
  99. data/po/pl.po +97 -97
  100. data/po/pt.po +97 -97
  101. data/po/pt_BR.po +97 -97
  102. data/po/ru.po +97 -97
  103. data/po/sk.po +97 -97
  104. data/po/sv.po +97 -97
  105. data/po/uk.po +97 -97
  106. data/po/zh_TW.po +97 -97
  107. data/schemas/alexandria.schemas +24 -2
  108. data/spec/alexandria/book_providers_spec.rb +65 -82
  109. data/spec/alexandria/book_spec.rb +12 -10
  110. data/spec/alexandria/console_spec.rb +9 -9
  111. data/spec/alexandria/export_library_spec.rb +31 -31
  112. data/spec/alexandria/library_spec.rb +86 -86
  113. data/spec/alexandria/library_store_spec.rb +8 -8
  114. data/spec/alexandria/preferences_spec.rb +18 -17
  115. data/spec/alexandria/scanners/cue_cat_spec.rb +52 -0
  116. data/spec/alexandria/smart_library_spec.rb +15 -15
  117. data/spec/alexandria/ui/about_dialog_spec.rb +14 -0
  118. data/spec/alexandria/ui/acquire_dialog_spec.rb +14 -0
  119. data/spec/alexandria/ui/alert_dialog_spec.rb +16 -0
  120. data/spec/alexandria/ui/bad_isbns_dialog_spec.rb +14 -0
  121. data/spec/alexandria/ui/book_properties_dialog_spec.rb +17 -0
  122. data/spec/alexandria/ui/confirm_erase_dialog_spec.rb +14 -0
  123. data/spec/alexandria/ui/conflict_while_copying_dialog_spec.rb +16 -0
  124. data/spec/alexandria/ui/error_dialog_spec.rb +14 -0
  125. data/spec/alexandria/ui/export_dialog_spec.rb +15 -0
  126. data/spec/alexandria/ui/iconview_spec.rb +7 -21
  127. data/spec/alexandria/ui/import_dialog_spec.rb +14 -0
  128. data/spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb +17 -0
  129. data/spec/alexandria/ui/main_app_spec.rb +6 -6
  130. data/spec/alexandria/ui/new_book_dialog_manual_spec.rb +15 -0
  131. data/spec/alexandria/ui/{dialogs/new_book_dialog_spec.rb → new_book_dialog_spec.rb} +4 -4
  132. data/spec/alexandria/ui/new_provider_dialog_spec.rb +14 -0
  133. data/spec/alexandria/ui/new_smart_library_dialog_spec.rb +14 -0
  134. data/spec/alexandria/ui/preferences_dialog_spec.rb +14 -0
  135. data/spec/alexandria/ui/provider_preferences_dialog_spec.rb +19 -0
  136. data/spec/alexandria/ui/really_delete_dialog_spec.rb +15 -0
  137. data/spec/alexandria/ui/sidepane_manager_spec.rb +15 -0
  138. data/spec/alexandria/ui/skip_entry_dialog_spec.rb +14 -0
  139. data/spec/alexandria/ui/smart_library_properties_dialog_spec.rb +18 -0
  140. data/spec/alexandria/ui/sound_spec.rb +2 -2
  141. data/spec/alexandria/ui/ui_manager_spec.rb +6 -20
  142. data/spec/alexandria/ui/ui_utilities_spec.rb +9 -9
  143. data/spec/alexandria/utilities_spec.rb +6 -6
  144. data/spec/end_to_end/basic_run_spec.rb +24 -36
  145. data/spec/spec_helper.rb +9 -9
  146. data/tasks/dogtail.rake +1 -1
  147. data/tasks/setup.rb +2 -2
  148. data/tasks/spec.rake +11 -11
  149. data/util/rake/fileinstall.rb +25 -25
  150. data/util/rake/gettextgenerate.rb +7 -7
  151. data/util/rake/omfgenerate.rb +7 -7
  152. metadata +59 -33
  153. data/spec/alexandria/scanners/cuecat_spec.rb +0 -67
  154. data/spec/alexandria/ui/dialogs_spec.rb +0 -162
  155. data/spec/alexandria/ui/sidepane_spec.rb +0 -29
@@ -0,0 +1,14 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::AboutDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ described_class.new parent
13
+ end
14
+ end
@@ -0,0 +1,14 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::AcquireDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ described_class.new parent
13
+ end
14
+ end
@@ -0,0 +1,16 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::AlertDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ described_class.new(parent, "Hello",
13
+ Gtk::Stock::DIALOG_QUESTION,
14
+ [[Gtk::Stock::CANCEL, :cancel]], "Hi there")
15
+ end
16
+ end
@@ -0,0 +1,14 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::BadIsbnsDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ described_class.new parent, "Careful", []
13
+ end
14
+ 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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::BookPropertiesDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ library = instance_double(Alexandria::Library, name: "Bar Library", cover: "")
13
+ book = Alexandria::Book.new("Foo Book", ["Jane Doe"], "98765432", "Bar Publisher",
14
+ 1972, "edition")
15
+ described_class.new parent, library, book
16
+ end
17
+ end
@@ -0,0 +1,14 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::ConfirmEraseDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ described_class.new parent, "foo-file"
13
+ end
14
+ end
@@ -0,0 +1,16 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::ConflictWhileCopyingDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ library = instance_double(Alexandria::Library, name: "Bar Library")
13
+ book = instance_double(Alexandria::Book, title: "Foo Book")
14
+ described_class.new parent, library, book
15
+ end
16
+ end
@@ -0,0 +1,14 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::ErrorDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ described_class.new parent, "Boom", "It went boom"
13
+ end
14
+ end
@@ -0,0 +1,15 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::ExportDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ library = instance_double(Alexandria::Library, name: "Bar Library")
13
+ described_class.new parent, library, :ascending
14
+ end
15
+ end
@@ -1,29 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (C) 2008 Joseph Method
4
- # Copyright (C) 2014 Matijs van Zuijlen
3
+ # This file is part of Alexandria.
5
4
  #
6
- # Alexandria is free software; you can redistribute it and/or
7
- # modify it under the terms of the GNU General Public License as
8
- # published by the Free Software Foundation; either version 2 of the
9
- # License, or (at your option) any later version.
10
- #
11
- # Alexandria is distributed in the hope that it will be useful,
12
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- # General Public License for more details.
15
- #
16
- # You should have received a copy of the GNU General Public
17
- # License along with Alexandria; see the file COPYING. If not,
18
- # write to the Free Software Foundation, Inc., 51 Franklin Street,
19
- # Fifth Floor, Boston, MA 02110-1301 USA.
5
+ # See the file README.md for authorship and licensing information.
20
6
 
21
- require File.dirname(__FILE__) + '/../../spec_helper'
7
+ require File.dirname(__FILE__) + "/../../spec_helper"
22
8
 
23
9
  describe Alexandria::UI::IconViewManager do
24
- it 'should work' do
25
- iconview = double(Gtk::IconView).as_null_object
26
- parent = double(Object, iconview: iconview).as_null_object
27
- Alexandria::UI::IconViewManager.new iconview, parent
10
+ it "works" do
11
+ iconview = instance_double(Gtk::IconView).as_null_object
12
+ parent = instance_double(Alexandria::UI::UIManager, iconview: iconview).as_null_object
13
+ described_class.new iconview, parent
28
14
  end
29
15
  end
@@ -0,0 +1,14 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::ImportDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ described_class.new parent
13
+ end
14
+ 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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::KeepBadISBNDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ book = instance_double(Alexandria::Book,
13
+ title: "Foo Book",
14
+ isbn: "98765432")
15
+ described_class.new parent, book
16
+ end
17
+ end
@@ -19,26 +19,26 @@
19
19
  # write to the Free Software Foundation, Inc., 51 Franklin Street,
20
20
  # Fifth Floor, Boston, MA 02110-1301 USA.
21
21
 
22
- require File.dirname(__FILE__) + '/../../spec_helper'
22
+ require File.dirname(__FILE__) + "/../../spec_helper"
23
23
 
24
24
  # break this up!
25
25
 
26
26
  describe CellRendererToggle do
27
- it 'should work'
27
+ it "should work"
28
28
  end
29
29
 
30
30
  describe Gtk::ActionGroup do
31
- it 'should work'
31
+ it "should work"
32
32
  end
33
33
 
34
34
  describe Gtk::IconView do
35
- it 'should work'
35
+ it "should work"
36
36
  end
37
37
 
38
38
  describe Alexandria::UI::MainApp do
39
- it 'should be a singleton' do
39
+ it "is a singleton" do
40
40
  expect do
41
- Alexandria::UI::MainApp.new
41
+ described_class.new
42
42
  end.to raise_error NoMethodError
43
43
  end
44
44
  end
@@ -0,0 +1,15 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::NewBookDialogManual do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ library = instance_double(Alexandria::Library)
13
+ described_class.new parent, library
14
+ end
15
+ end
@@ -4,18 +4,18 @@
4
4
  #
5
5
  # See the file README.md for authorship and licensing information.
6
6
 
7
- require 'spec_helper'
7
+ require "spec_helper"
8
8
 
9
9
  describe Alexandria::UI::NewBookDialog do
10
10
  let(:parent) { Gtk::Window.new :toplevel }
11
11
  let(:model) { Gtk::ListStore.new(String, String, GdkPixbuf::Pixbuf) }
12
12
 
13
- it 'should work' do
13
+ it "works" do
14
14
  described_class.new parent
15
15
  end
16
16
 
17
- it 'can copy search results into result treeview' do
18
- results = [[an_artist_of_the_floating_world, 'cover-url']]
17
+ it "can copy search results into result treeview" do
18
+ results = [[an_artist_of_the_floating_world, "cover-url"]]
19
19
  dialog = described_class.new parent
20
20
  dialog.copy_results_to_treeview_model results, model
21
21
  end
@@ -0,0 +1,14 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::NewProviderDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ described_class.new parent
13
+ end
14
+ end
@@ -0,0 +1,14 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::NewSmartLibraryDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ described_class.new parent
13
+ end
14
+ end
@@ -0,0 +1,14 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::PreferencesDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ described_class.new(parent) {}
13
+ end
14
+ end
@@ -0,0 +1,19 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::ProviderPreferencesDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ preferences = instance_double(Alexandria::BookProviders::Preferences,
13
+ length: 0, read: [])
14
+ provider = instance_double(Alexandria::BookProviders::GenericProvider,
15
+ fullname: "FooProvider",
16
+ prefs: preferences)
17
+ described_class.new parent, provider
18
+ end
19
+ end
@@ -0,0 +1,15 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::ReallyDeleteDialog do
10
+ it "works" do
11
+ library = instance_double(Alexandria::Library, name: "Bar Library", empty?: false, size: 12)
12
+ parent = Gtk::Window.new :toplevel
13
+ described_class.new parent, library
14
+ end
15
+ end
@@ -0,0 +1,15 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::SidePaneManager do
10
+ it "works" do
11
+ library_listview = instance_double(Gtk::TreeView).as_null_object
12
+ parent = instance_double(Alexandria::UI::UIManager, main_app: nil, append_library: nil)
13
+ described_class.new library_listview, parent
14
+ end
15
+ end
@@ -0,0 +1,14 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::SkipEntryDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ described_class.new parent, "Foo"
13
+ end
14
+ end
@@ -0,0 +1,18 @@
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 File.dirname(__FILE__) + "/../../spec_helper"
8
+
9
+ describe Alexandria::UI::SmartLibraryPropertiesDialog do
10
+ it "works" do
11
+ parent = Gtk::Window.new :toplevel
12
+ smart_library = instance_double(Alexandria::SmartLibrary,
13
+ name: "Foo",
14
+ rules: [],
15
+ predicate_operator_rule: :any)
16
+ described_class.new parent, smart_library
17
+ end
18
+ end
@@ -17,10 +17,10 @@
17
17
  # write to the Free Software Foundation, Inc., 51 Franklin Street,
18
18
  # Fifth Floor, Boston, MA 02110-1301 USA.
19
19
 
20
- require 'spec_helper'
20
+ require "spec_helper"
21
21
 
22
22
  describe Alexandria::UI::SoundEffectsPlayer do
23
- it 'can be instantiated' do
23
+ it "can be instantiated" do
24
24
  player = described_class.new
25
25
  expect(player).to be_instance_of described_class
26
26
  end