alexandria-book-collection-manager 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +9 -0
  3. data/.gitignore +4 -1
  4. data/.rubocop.yml +51 -29
  5. data/.rubocop_todo.yml +33 -155
  6. data/.simplecov +5 -2
  7. data/.travis.yml +10 -4
  8. data/CHANGELOG.md +19 -0
  9. data/INSTALL.md +23 -11
  10. data/README.md +36 -35
  11. data/Rakefile +7 -5
  12. data/alexandria-book-collection-manager.gemspec +8 -3
  13. data/doc/dependency_decisions.yml +22 -3
  14. data/lib/alexandria.rb +2 -2
  15. data/lib/alexandria/book_providers.rb +47 -49
  16. data/lib/alexandria/book_providers/adlibris.rb +8 -13
  17. data/lib/alexandria/book_providers/amazon_aws.rb +47 -60
  18. data/lib/alexandria/book_providers/amazon_ecs_util.rb +283 -298
  19. data/lib/alexandria/book_providers/barnes_and_noble.rb +8 -8
  20. data/lib/alexandria/book_providers/douban.rb +2 -2
  21. data/lib/alexandria/book_providers/proxis.rb +12 -11
  22. data/lib/alexandria/book_providers/pseudomarc.rb +60 -70
  23. data/lib/alexandria/book_providers/siciliano.rb +5 -6
  24. data/lib/alexandria/book_providers/thalia.rb +8 -9
  25. data/lib/alexandria/book_providers/worldcat.rb +25 -31
  26. data/lib/alexandria/book_providers/z3950.rb +62 -69
  27. data/lib/alexandria/default_preferences.rb +37 -0
  28. data/lib/alexandria/execution_queue.rb +13 -12
  29. data/lib/alexandria/export_library.rb +4 -8
  30. data/lib/alexandria/import_library.rb +38 -62
  31. data/lib/alexandria/import_library_csv.rb +16 -16
  32. data/lib/alexandria/library_sort_order.rb +3 -1
  33. data/lib/alexandria/library_store.rb +16 -16
  34. data/lib/alexandria/logging.rb +4 -8
  35. data/lib/alexandria/models/book.rb +2 -2
  36. data/lib/alexandria/models/library.rb +18 -14
  37. data/lib/alexandria/net.rb +1 -2
  38. data/lib/alexandria/preferences.rb +27 -31
  39. data/lib/alexandria/scanners.rb +2 -2
  40. data/lib/alexandria/scanners/cue_cat.rb +5 -5
  41. data/lib/alexandria/scanners/keyboard.rb +1 -1
  42. data/lib/alexandria/smart_library.rb +22 -26
  43. data/lib/alexandria/ui.rb +7 -7
  44. data/lib/alexandria/ui/about_dialog.rb +1 -1
  45. data/lib/alexandria/ui/acquire_dialog.rb +9 -10
  46. data/lib/alexandria/ui/alert_dialog.rb +34 -19
  47. data/lib/alexandria/ui/bad_isbns_dialog.rb +13 -9
  48. data/lib/alexandria/ui/barcode_animation.rb +5 -5
  49. data/lib/alexandria/ui/book_properties_dialog.rb +2 -2
  50. data/lib/alexandria/ui/book_properties_dialog_base.rb +23 -17
  51. data/lib/alexandria/ui/callbacks.rb +141 -120
  52. data/lib/alexandria/ui/completion_models.rb +1 -1
  53. data/lib/alexandria/ui/confirm_erase_dialog.rb +1 -1
  54. data/lib/alexandria/ui/conflict_while_copying_dialog.rb +1 -1
  55. data/lib/alexandria/ui/error_dialog.rb +1 -1
  56. data/lib/alexandria/ui/export_dialog.rb +13 -15
  57. data/lib/alexandria/ui/icons.rb +34 -40
  58. data/lib/alexandria/ui/iconview_tooltips.rb +40 -53
  59. data/lib/alexandria/ui/import_dialog.rb +48 -47
  60. data/lib/alexandria/ui/init.rb +3 -2
  61. data/lib/alexandria/ui/keep_bad_isbn_dialog.rb +2 -2
  62. data/lib/alexandria/ui/libraries_combo.rb +10 -9
  63. data/lib/alexandria/ui/listview.rb +5 -6
  64. data/lib/alexandria/ui/main_app.rb +2 -2
  65. data/lib/alexandria/ui/multi_drag_treeview.rb +4 -6
  66. data/lib/alexandria/ui/new_book_dialog.rb +52 -52
  67. data/lib/alexandria/ui/new_provider_dialog.rb +12 -11
  68. data/lib/alexandria/ui/new_smart_library_dialog.rb +39 -27
  69. data/lib/alexandria/ui/preferences_dialog.rb +23 -82
  70. data/lib/alexandria/ui/provider_preferences_base_dialog.rb +9 -5
  71. data/lib/alexandria/ui/provider_preferences_dialog.rb +5 -5
  72. data/lib/alexandria/ui/really_delete_dialog.rb +1 -1
  73. data/lib/alexandria/ui/sidepane_manager.rb +35 -37
  74. data/lib/alexandria/ui/skip_entry_dialog.rb +3 -2
  75. data/lib/alexandria/ui/smart_library_properties_dialog.rb +35 -36
  76. data/lib/alexandria/ui/smart_library_properties_dialog_base.rb +59 -138
  77. data/lib/alexandria/ui/smart_library_rule_box.rb +119 -0
  78. data/lib/alexandria/ui/sound.rb +4 -6
  79. data/lib/alexandria/ui/ui_manager.rb +62 -64
  80. data/lib/alexandria/version.rb +2 -2
  81. data/lib/alexandria/web_themes.rb +15 -15
  82. data/po/cs.po +991 -874
  83. data/po/cy.po +957 -870
  84. data/po/de.po +991 -866
  85. data/po/el.po +987 -863
  86. data/po/es.po +986 -862
  87. data/po/fr.po +988 -868
  88. data/po/ga.po +910 -822
  89. data/po/gl.po +983 -863
  90. data/po/it.po +984 -862
  91. data/po/ja.po +969 -849
  92. data/po/mk.po +983 -859
  93. data/po/nb.po +982 -862
  94. data/po/nl.po +992 -869
  95. data/po/pl.po +1018 -963
  96. data/po/pt.po +983 -852
  97. data/po/pt_BR.po +983 -863
  98. data/po/ru.po +992 -869
  99. data/po/sk.po +986 -864
  100. data/po/sv.po +980 -860
  101. data/po/uk.po +975 -861
  102. data/po/zh_TW.po +974 -854
  103. data/share/alexandria/glade/main_app__builder.glade +6 -21
  104. data/share/gnome/help/alexandria/C/smart-libraries.xml +2 -2
  105. data/share/gnome/help/alexandria/C/working-with-libraries.xml +1 -1
  106. data/share/gnome/help/alexandria/fr/alexandria.xml +1 -1
  107. data/share/gnome/help/alexandria/ja/smart-libraries.xml +1 -1
  108. data/spec/alexandria/book_providers/world_cat_provider_spec.rb +160 -0
  109. data/spec/alexandria/book_providers_spec.rb +73 -129
  110. data/spec/alexandria/console_spec.rb +0 -5
  111. data/spec/alexandria/export_library_spec.rb +27 -38
  112. data/spec/alexandria/library_spec.rb +56 -44
  113. data/spec/alexandria/preferences_spec.rb +29 -3
  114. data/spec/alexandria/scanners/cue_cat_spec.rb +1 -1
  115. data/spec/alexandria/ui/about_dialog_spec.rb +1 -1
  116. data/spec/alexandria/ui/acquire_dialog_spec.rb +1 -1
  117. data/spec/alexandria/ui/alert_dialog_spec.rb +1 -1
  118. data/spec/alexandria/ui/bad_isbns_dialog_spec.rb +1 -1
  119. data/spec/alexandria/ui/book_properties_dialog_spec.rb +1 -1
  120. data/spec/alexandria/ui/confirm_erase_dialog_spec.rb +1 -1
  121. data/spec/alexandria/ui/conflict_while_copying_dialog_spec.rb +1 -1
  122. data/spec/alexandria/ui/error_dialog_spec.rb +1 -1
  123. data/spec/alexandria/ui/export_dialog_spec.rb +1 -1
  124. data/spec/alexandria/ui/icons_spec.rb +26 -0
  125. data/spec/alexandria/ui/iconview_spec.rb +1 -1
  126. data/spec/alexandria/ui/import_dialog_spec.rb +30 -3
  127. data/spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb +1 -1
  128. data/spec/alexandria/ui/main_app_spec.rb +1 -1
  129. data/spec/alexandria/ui/new_book_dialog_manual_spec.rb +1 -1
  130. data/spec/alexandria/ui/new_provider_dialog_spec.rb +19 -3
  131. data/spec/alexandria/ui/new_smart_library_dialog_spec.rb +28 -3
  132. data/spec/alexandria/ui/preferences_dialog_spec.rb +1 -1
  133. data/spec/alexandria/ui/provider_preferences_dialog_spec.rb +23 -8
  134. data/spec/alexandria/ui/really_delete_dialog_spec.rb +1 -1
  135. data/spec/alexandria/ui/sidepane_manager_spec.rb +2 -2
  136. data/spec/alexandria/ui/skip_entry_dialog_spec.rb +1 -1
  137. data/spec/alexandria/ui/smart_library_properties_dialog_spec.rb +21 -7
  138. data/spec/alexandria/ui/ui_manager_spec.rb +39 -2
  139. data/spec/spec_helper.rb +46 -3
  140. data/tasks/spec.rake +3 -5
  141. data/util/rake/fileinstall.rb +12 -11
  142. metadata +82 -10
  143. data/spec/alexandria/ui/ui_utilities_spec.rb +0 -62
  144. data/spec/alexandria/utilities_spec.rb +0 -52
@@ -3,7 +3,7 @@
3
3
  # -*- ruby -*-
4
4
  #--
5
5
  # Copyright (C) 2009 Cathal Mc Ginley
6
- # Copyright (C) 2011 Matijs van Zuijlen
6
+ # Copyright (C) 2011, 2020 Matijs van Zuijlen
7
7
  #
8
8
  # This file is part of the Alexandria build system.
9
9
  #
@@ -105,7 +105,7 @@ class FileInstallTask < Rake::TaskLib
105
105
  @dirs_to_remove_globs.each do |glob|
106
106
  regex = glob2regex(glob)
107
107
  all_dirs.each do |dir|
108
- dir += "/" unless dir =~ %r{/$}
108
+ dir += "/" unless dir.end_with?("/")
109
109
  to_delete << Regexp.last_match[1] if regex =~ dir
110
110
  end
111
111
  end
@@ -190,7 +190,7 @@ class FileInstallTask < Rake::TaskLib
190
190
  end
191
191
 
192
192
  def glob2regex(pathglob)
193
- pathglob += "/" if /\*\*$/.match?(pathglob)
193
+ pathglob += "/" if pathglob.end_with?("**")
194
194
  real_parts = pathglob.split("**/")
195
195
  real_parts.each do |part|
196
196
  part.gsub!(".", '\\.')
@@ -210,16 +210,16 @@ class FileInstallTask < Rake::TaskLib
210
210
  end
211
211
  end
212
212
 
213
- # Delete the directory at the given Pathname +p+ if all its children
213
+ # Delete the directory at the given Pathname +path+ if all its children
214
214
  # can be similarly deleted, and if it is then empty.
215
- def delete_if_empty(p)
216
- return false unless p.directory?
215
+ def delete_if_empty(path)
216
+ return false unless path.directory?
217
217
 
218
- p.children.each do |c|
218
+ path.children.each do |c|
219
219
  delete_if_empty(c)
220
220
  end
221
- if p.children.empty?
222
- p.delete # TODO: optional verbose output here
221
+ if path.children.empty?
222
+ path.delete # TODO: optional verbose output here
223
223
  true
224
224
  else
225
225
  false
@@ -229,6 +229,7 @@ class FileInstallTask < Rake::TaskLib
229
229
  class FileGroup
230
230
  attr_reader :mode
231
231
  attr_accessor :description
232
+
232
233
  def initialize(src_dir, file_glob, dest_dir, mode = 0o644)
233
234
  @src_dir = src_dir
234
235
  @file_glob = file_glob
@@ -290,5 +291,5 @@ class FileInstallTask < Rake::TaskLib
290
291
  all_dirs_set << File.dirname(file)
291
292
  end
292
293
  end
293
- end # class FileGroup
294
- end # class FileInstallTask
294
+ end
295
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexandria-book-collection-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander McCormmach
@@ -28,7 +28,7 @@ authors:
28
28
  autorequire:
29
29
  bindir: bin
30
30
  cert_chain: []
31
- date: 2020-05-11 00:00:00.000000000 Z
31
+ date: 2020-11-01 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: gettext
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 3.4.1
53
+ version: 3.4.3
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 3.4.1
60
+ version: 3.4.3
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: gtk3
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 3.4.1
67
+ version: 3.4.3
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: 3.4.1
74
+ version: 3.4.3
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: hpricot
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +134,14 @@ dependencies:
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: 3.1.0
137
+ version: 3.2.0
138
138
  type: :runtime
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: 3.1.0
144
+ version: 3.2.0
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: zoom
147
147
  requirement: !ruby/object:Gem::Requirement
@@ -212,6 +212,76 @@ dependencies:
212
212
  - - "~>"
213
213
  - !ruby/object:Gem::Version
214
214
  version: '3.0'
215
+ - !ruby/object:Gem::Dependency
216
+ name: rubocop
217
+ requirement: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - "~>"
220
+ - !ruby/object:Gem::Version
221
+ version: 0.93.1
222
+ type: :development
223
+ prerelease: false
224
+ version_requirements: !ruby/object:Gem::Requirement
225
+ requirements:
226
+ - - "~>"
227
+ - !ruby/object:Gem::Version
228
+ version: 0.93.1
229
+ - !ruby/object:Gem::Dependency
230
+ name: rubocop-i18n
231
+ requirement: !ruby/object:Gem::Requirement
232
+ requirements:
233
+ - - "~>"
234
+ - !ruby/object:Gem::Version
235
+ version: 2.0.2
236
+ type: :development
237
+ prerelease: false
238
+ version_requirements: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - "~>"
241
+ - !ruby/object:Gem::Version
242
+ version: 2.0.2
243
+ - !ruby/object:Gem::Dependency
244
+ name: rubocop-performance
245
+ requirement: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - "~>"
248
+ - !ruby/object:Gem::Version
249
+ version: 1.8.0
250
+ type: :development
251
+ prerelease: false
252
+ version_requirements: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - "~>"
255
+ - !ruby/object:Gem::Version
256
+ version: 1.8.0
257
+ - !ruby/object:Gem::Dependency
258
+ name: rubocop-rspec
259
+ requirement: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - "~>"
262
+ - !ruby/object:Gem::Version
263
+ version: 1.44.1
264
+ type: :development
265
+ prerelease: false
266
+ version_requirements: !ruby/object:Gem::Requirement
267
+ requirements:
268
+ - - "~>"
269
+ - !ruby/object:Gem::Version
270
+ version: 1.44.1
271
+ - !ruby/object:Gem::Dependency
272
+ name: webmock
273
+ requirement: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - "~>"
276
+ - !ruby/object:Gem::Version
277
+ version: '3.9'
278
+ type: :development
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ requirements:
282
+ - - "~>"
283
+ - !ruby/object:Gem::Version
284
+ version: '3.9'
215
285
  description:
216
286
  email:
217
287
  - matijs@matijs.net
@@ -220,6 +290,7 @@ executables:
220
290
  extensions: []
221
291
  extra_rdoc_files: []
222
292
  files:
293
+ - ".github/dependabot.yml"
223
294
  - ".gitignore"
224
295
  - ".hound.yml"
225
296
  - ".reek"
@@ -324,6 +395,7 @@ files:
324
395
  - lib/alexandria/ui/skip_entry_dialog.rb
325
396
  - lib/alexandria/ui/smart_library_properties_dialog.rb
326
397
  - lib/alexandria/ui/smart_library_properties_dialog_base.rb
398
+ - lib/alexandria/ui/smart_library_rule_box.rb
327
399
  - lib/alexandria/ui/sound.rb
328
400
  - lib/alexandria/ui/ui_manager.rb
329
401
  - lib/alexandria/undo_manager.rb
@@ -482,6 +554,7 @@ files:
482
554
  - share/sounds/alexandria/good_scan.wav
483
555
  - share/sounds/alexandria/scanning.ogg
484
556
  - share/sounds/alexandria/scanning.wav
557
+ - spec/alexandria/book_providers/world_cat_provider_spec.rb
485
558
  - spec/alexandria/book_providers_spec.rb
486
559
  - spec/alexandria/book_spec.rb
487
560
  - spec/alexandria/console_spec.rb
@@ -500,6 +573,7 @@ files:
500
573
  - spec/alexandria/ui/conflict_while_copying_dialog_spec.rb
501
574
  - spec/alexandria/ui/error_dialog_spec.rb
502
575
  - spec/alexandria/ui/export_dialog_spec.rb
576
+ - spec/alexandria/ui/icons_spec.rb
503
577
  - spec/alexandria/ui/iconview_spec.rb
504
578
  - spec/alexandria/ui/import_dialog_spec.rb
505
579
  - spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb
@@ -516,8 +590,6 @@ files:
516
590
  - spec/alexandria/ui/smart_library_properties_dialog_spec.rb
517
591
  - spec/alexandria/ui/sound_spec.rb
518
592
  - spec/alexandria/ui/ui_manager_spec.rb
519
- - spec/alexandria/ui/ui_utilities_spec.rb
520
- - spec/alexandria/utilities_spec.rb
521
593
  - spec/data/isbns.txt
522
594
  - spec/data/libraries/0.6.1-noisbn/My Library/0201398257.yaml
523
595
  - spec/data/libraries/0.6.1-noisbn/My Library/1565920007.yaml
@@ -1,62 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright (C) 2007 Joseph Method
4
- # Copyright (C) 2011, 2014-2016 Matijs van Zuijlen
5
- #
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.
20
-
21
- require File.dirname(__FILE__) + "/../../spec_helper"
22
-
23
- # from completion_models
24
- describe Gtk::Entry do
25
- it "should extend Gtk::Entry"
26
- end
27
-
28
- describe Alexandria::UI::CompletionModels do
29
- it "should work"
30
- end
31
-
32
- # from glade_base
33
-
34
- describe Alexandria::UI::BuilderBase do
35
- it "should be revisited"
36
- end
37
-
38
- # from icons
39
-
40
- describe GdkPixbuf::Pixbuf do
41
- it "should extend GdkPixbuf::PixBuf"
42
- end
43
-
44
- describe Alexandria::UI::Icons do
45
- it "should aid identification"
46
- end
47
-
48
- # from libraries_combo
49
-
50
- describe Gtk::ComboBox do
51
- it "should extend Gtk::ComboBox"
52
- end
53
-
54
- # from multi_drag_treeview
55
-
56
- describe Gdk::Event do
57
- it "should extend Gdk::Event"
58
- end
59
-
60
- describe Gtk::TreeView do
61
- it "should extend Gtk::TreeView"
62
- end
@@ -1,52 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright (C) 2007 Joseph Method
4
- #
5
- # Alexandria is free software; you can redistribute it and/or
6
- # modify it under the terms of the GNU General Public License as
7
- # published by the Free Software Foundation; either version 2 of the
8
- # License, or (at your option) any later version.
9
- #
10
- # Alexandria is distributed in the hope that it will be useful,
11
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- # General Public License for more details.
14
- #
15
- # You should have received a copy of the GNU General Public
16
- # License along with Alexandria; see the file COPYING. If not,
17
- # write to the Free Software Foundation, Inc., 51 Franklin Street,
18
- # Fifth Floor, Boston, MA 02110-1301 USA.
19
-
20
- require File.dirname(__FILE__) + "/../spec_helper"
21
-
22
- describe Alexandria::ExecutionQueue do
23
- it "should not have so many u's and e's"
24
- end
25
-
26
- describe Alexandria::ExportFormat do
27
- it "should justify its existence"
28
- end
29
-
30
- describe Alexandria::ImportFilter do
31
- it "should justify its 'importance'"
32
- end
33
-
34
- describe Alexandria::Logger do
35
- it "should fulfill its function"
36
- end
37
-
38
- describe Alexandria::UndoManager do
39
- it "should make right what is wrong"
40
- end
41
-
42
- describe Time do
43
- it "should clarify what it's doing"
44
- end
45
-
46
- describe String do
47
- it "should do what it does"
48
- end
49
-
50
- describe Alexandria::WebTheme do
51
- it "should be themeable"
52
- end