alexandria-book-collection-manager 0.7.9 → 0.7.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +5 -1
  3. data/.github/workflows/ruby.yml +36 -22
  4. data/.rubocop.yml +12 -3
  5. data/.rubocop_todo.yml +35 -47
  6. data/.simplecov +2 -2
  7. data/CHANGELOG.md +71 -24
  8. data/Gemfile +0 -6
  9. data/Rakefile +5 -5
  10. data/alexandria-book-collection-manager.gemspec +24 -21
  11. data/bin/rake +28 -0
  12. data/bin/rspec +28 -0
  13. data/doc/dependency_decisions.yml +32 -26
  14. data/{bin → exe}/alexandria +1 -3
  15. data/lib/alexandria/about.rb +1 -0
  16. data/lib/alexandria/book_providers/bl_provider.rb +4 -6
  17. data/lib/alexandria/book_providers/{douban.rb → douban_provider.rb} +1 -1
  18. data/lib/alexandria/book_providers/loc_provider.rb +2 -6
  19. data/lib/alexandria/book_providers/sbn_provider.rb +2 -12
  20. data/lib/alexandria/book_providers/thalia_provider.rb +5 -6
  21. data/lib/alexandria/book_providers/{web.rb → website_based_provider.rb} +20 -1
  22. data/lib/alexandria/book_providers/{worldcat.rb → world_cat_provider.rb} +3 -4
  23. data/lib/alexandria/book_providers/z3950_provider.rb +25 -27
  24. data/lib/alexandria/book_providers.rb +14 -10
  25. data/lib/alexandria/config.rb +2 -2
  26. data/lib/alexandria/console.rb +12 -10
  27. data/lib/alexandria/export_format.rb +3 -2
  28. data/lib/alexandria/export_library.rb +35 -40
  29. data/lib/alexandria/import_library.rb +3 -4
  30. data/lib/alexandria/import_library_csv.rb +2 -2
  31. data/lib/alexandria/library_collection.rb +1 -1
  32. data/lib/alexandria/library_store.rb +20 -15
  33. data/lib/alexandria/logging.rb +22 -21
  34. data/lib/alexandria/models/book.rb +1 -2
  35. data/lib/alexandria/models/library.rb +7 -8
  36. data/lib/alexandria/preferences.rb +7 -19
  37. data/lib/alexandria/{book_providers/pseudomarc.rb → pseudo_marc_parser.rb} +2 -2
  38. data/lib/alexandria/scanners/cue_cat.rb +5 -9
  39. data/lib/alexandria/scanners/{keyboard.rb → keyboard_wedge.rb} +3 -3
  40. data/lib/alexandria/scanners.rb +2 -2
  41. data/lib/alexandria/smart_library.rb +9 -5
  42. data/lib/alexandria/ui/acquire_dialog.rb +42 -45
  43. data/lib/alexandria/ui/alert_dialog.rb +3 -3
  44. data/lib/alexandria/ui/barcode_animation.rb +3 -3
  45. data/lib/alexandria/ui/book_properties_dialog.rb +9 -9
  46. data/lib/alexandria/ui/book_properties_dialog_base.rb +13 -14
  47. data/lib/alexandria/ui/builder_base.rb +1 -1
  48. data/lib/alexandria/ui/callbacks.rb +8 -7
  49. data/lib/alexandria/ui/confirm_erase_dialog.rb +1 -0
  50. data/lib/alexandria/ui/conflict_while_copying_dialog.rb +1 -0
  51. data/lib/alexandria/ui/export_dialog.rb +1 -0
  52. data/lib/alexandria/ui/{iconview.rb → icon_view_manager.rb} +1 -0
  53. data/lib/alexandria/ui/icons.rb +2 -2
  54. data/lib/alexandria/ui/iconview_tooltips.rb +1 -1
  55. data/lib/alexandria/ui/init.rb +10 -4
  56. data/lib/alexandria/ui/keep_bad_isbn_dialog.rb +1 -0
  57. data/lib/alexandria/ui/libraries_combo.rb +1 -0
  58. data/lib/alexandria/ui/listview.rb +2 -0
  59. data/lib/alexandria/ui/main_app.rb +3 -1
  60. data/lib/alexandria/ui/multi_drag_treeview.rb +0 -2
  61. data/lib/alexandria/ui/new_book_dialog.rb +15 -20
  62. data/lib/alexandria/ui/new_book_dialog_manual.rb +7 -7
  63. data/lib/alexandria/ui/new_provider_dialog.rb +1 -0
  64. data/lib/alexandria/ui/new_smart_library_dialog.rb +2 -1
  65. data/lib/alexandria/ui/preferences_dialog.rb +4 -4
  66. data/lib/alexandria/ui/provider_preferences_dialog.rb +1 -0
  67. data/lib/alexandria/ui/really_delete_dialog.rb +1 -0
  68. data/lib/alexandria/ui/sidepane_manager.rb +49 -48
  69. data/lib/alexandria/ui/skip_entry_dialog.rb +1 -0
  70. data/lib/alexandria/ui/smart_library_properties_dialog.rb +1 -0
  71. data/lib/alexandria/ui/smart_library_properties_dialog_base.rb +2 -1
  72. data/lib/alexandria/ui/{sound.rb → sound_effects_player.rb} +3 -0
  73. data/lib/alexandria/ui/ui_manager.rb +194 -143
  74. data/lib/alexandria/ui.rb +1 -0
  75. data/lib/alexandria/version.rb +1 -1
  76. data/lib/alexandria/web_themes.rb +1 -1
  77. data/lib/alexandria.rb +6 -5
  78. data/po/Makefile +1 -1
  79. data/po/it.po +64 -82
  80. data/spec/alexandria/book_providers/bl_provider_spec.rb +11 -2
  81. data/spec/alexandria/book_providers/douban_provider_spec.rb +17 -0
  82. data/spec/alexandria/book_providers/loc_provider_spec.rb +10 -2
  83. data/spec/alexandria/book_providers/sbn_provider_spec.rb +10 -2
  84. data/spec/alexandria/book_providers/thalia_provider_spec.rb +9 -1
  85. data/spec/alexandria/book_providers/world_cat_provider_spec.rb +30 -10
  86. data/spec/alexandria/book_providers/z3950_provider_spec.rb +22 -0
  87. data/spec/alexandria/book_spec.rb +5 -3
  88. data/spec/alexandria/console_spec.rb +1 -1
  89. data/spec/alexandria/export_library_spec.rb +65 -19
  90. data/spec/alexandria/library_collection_spec.rb +24 -0
  91. data/spec/alexandria/library_spec.rb +68 -53
  92. data/spec/alexandria/library_store_spec.rb +33 -1
  93. data/spec/alexandria/preferences_spec.rb +7 -7
  94. data/spec/alexandria/pseudo_marc_parser_spec.rb +71 -0
  95. data/spec/alexandria/scanners/cue_cat_spec.rb +11 -4
  96. data/spec/alexandria/scanners/keyboard_wedge_spec.rb +47 -0
  97. data/spec/alexandria/smart_library_spec.rb +7 -5
  98. data/spec/alexandria/ui/about_dialog_spec.rb +2 -2
  99. data/spec/alexandria/ui/acquire_dialog_spec.rb +8 -3
  100. data/spec/alexandria/ui/alert_dialog_spec.rb +6 -4
  101. data/spec/alexandria/ui/bad_isbns_dialog_spec.rb +2 -2
  102. data/spec/alexandria/ui/book_properties_dialog_spec.rb +5 -5
  103. data/spec/alexandria/ui/confirm_erase_dialog_spec.rb +19 -3
  104. data/spec/alexandria/ui/conflict_while_copying_dialog_spec.rb +2 -2
  105. data/spec/alexandria/ui/error_dialog_spec.rb +14 -3
  106. data/spec/alexandria/ui/export_dialog_spec.rb +6 -6
  107. data/spec/alexandria/ui/{iconview_spec.rb → icon_view_manager_spec.rb} +2 -2
  108. data/spec/alexandria/ui/import_dialog_spec.rb +3 -3
  109. data/spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb +2 -2
  110. data/spec/alexandria/ui/main_app_spec.rb +0 -2
  111. data/spec/alexandria/ui/new_book_dialog_manual_spec.rb +5 -5
  112. data/spec/alexandria/ui/new_book_dialog_spec.rb +7 -4
  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 +2 -2
  116. data/spec/alexandria/ui/provider_preferences_dialog_spec.rb +22 -7
  117. data/spec/alexandria/ui/really_delete_dialog_spec.rb +2 -2
  118. data/spec/alexandria/ui/sidepane_manager_spec.rb +2 -2
  119. data/spec/alexandria/ui/skip_entry_dialog_spec.rb +19 -3
  120. data/spec/alexandria/ui/smart_library_properties_dialog_spec.rb +2 -2
  121. data/spec/alexandria/ui/ui_manager_spec.rb +7 -5
  122. data/spec/end_to_end/basic_run_spec.rb +2 -1
  123. data/spec/spec_helper.rb +26 -33
  124. data/tasks/setup.rb +1 -1
  125. data/util/rake/fileinstall.rb +12 -13
  126. data/util/rake/gettextgenerate.rb +1 -1
  127. data/util/rake/omfgenerate.rb +1 -1
  128. metadata +97 -64
  129. /data/spec/alexandria/ui/{sound_spec.rb → sound_effects_player_spec.rb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 680cc4d6ee5efa35b819f163452593c352c9323efcd06baad69458e46ac16dfc
4
- data.tar.gz: a1153041ada7d8641d84d5b118209c05247d9651bcddc5f92164745f62f7289c
3
+ metadata.gz: 17f6d9c171483c9cf0ebe22448f55b811b7d7bc9f25bbcf27795c63d91364069
4
+ data.tar.gz: cf81a5fd962eb54938899f648b18e13ea7f5510549ca4dd815da8a87d17349d1
5
5
  SHA512:
6
- metadata.gz: c7b860e3c6726fcda6877d44a84d88a62daebdc768a4d4acc6756f2a712257b1eebc783a9a1f7d3ad81219c85f2b4c4a4a84d6e8cc4126bb6847109fa9da7020
7
- data.tar.gz: 99e777a212dcad283f0e9722b2836b41c51442cb6153b5f76a0cd03ec87977733112bffc73899ca1c8081e32f68da50bace883b5c7eb0410174b8a0e05e2a6fe
6
+ metadata.gz: b6c228918d92f7d0dd73264117a2113cd99e02b29756327dd6031354a6fc6b12c7bc8e2fc9410665b028732d712bee15127790c9657c933fcdd6547425acfaf7
7
+ data.tar.gz: f4429a9e61993d90cf967d8c924f0c152512e713e92ed5fd955b32ca087946f1609e60965d1ccc8d9c1baf8838138618a93bbddb2a3bcdff87a92a471b86df4a
@@ -6,4 +6,8 @@ updates:
6
6
  - package-ecosystem: "bundler"
7
7
  directory: "/"
8
8
  schedule:
9
- interval: "daily"
9
+ interval: "weekly"
10
+ - package-ecosystem: "github-actions"
11
+ directory: "/"
12
+ schedule:
13
+ interval: "monthly"
@@ -4,69 +4,83 @@
4
4
 
5
5
  name: CI
6
6
 
7
- on:
7
+ "on":
8
8
  push:
9
- branches: [ master ]
9
+ branches: [master]
10
10
  pull_request:
11
- branches: [ master ]
12
- schedule:
13
- - cron: '16 4 12 * *'
11
+ branches: [master]
12
+ workflow_dispatch:
14
13
 
15
14
  jobs:
16
15
  test:
17
16
 
18
- runs-on: ubuntu-latest
17
+ runs-on: ubuntu-22.04
19
18
 
20
19
  strategy:
20
+ fail-fast: false
21
21
  matrix:
22
- ruby: [2.6, 2.7, "3.0", "3.1"]
22
+ ruby: ["3.2", "3.3", "3.4", "4.0"]
23
23
 
24
24
  steps:
25
- - uses: actions/checkout@v2
25
+ - uses: actions/checkout@v6
26
+
26
27
  - name: Install non-ruby dependencies
27
28
  run: |
28
29
  sudo apt-get update
30
+
31
+ sudo apt-get remove libunwind-14-dev # Prevent conflict with libunwind-dev, needed by libgstreamer1.0-dev
32
+
29
33
  sudo apt-get install libgtk-3-dev # Needed for gtk3 gem
30
34
  sudo apt-get install libgstreamer1.0-dev # Needed for gstreamer gem
31
- sudo apt-get install libgoocanvas-2.0-dev # Needed for GooCanvas::Canvas widget
32
35
  sudo apt-get install libyaz-dev # Needed for zoom gem
36
+
37
+ sudo apt-get install libgoocanvas-2.0-dev # Needed for GooCanvas::Canvas widget
33
38
  sudo apt-get install intltool # Needed for intltool-merge executable
34
39
  sudo apt-get install gconf2 # Needed for gconftool-2 executable
35
40
  sudo apt-get install at-spi2-core # Needed to provide A11y dbus service to silence warnings
36
- sudo apt-get install gstreamer1.0-plugins-good # Needed to set up sound player pipeline
37
- sudo apt-get install pulseaudio # Needed to play sound
41
+
42
+ # Set up sound
43
+ sudo apt-get install gir1.2-gst-plugins-base-1.0 # Needed for GstAudio-1.0.typelib
44
+ sudo apt-get install gstreamer1.0-plugins-good # Needed to set up sound player pipeline
45
+ sudo apt-get install pulseaudio # Needed to play sound
46
+
38
47
  sudo apt-get install xvfb # Provides xvfb-run
39
- sudo apt-get install yaru-theme-icon # Needed to avoid warnings about missing icons on Ubuntu 20.04
48
+ sudo apt-get install yaru-theme-icon # Needed to avoid warnings about missing icons
40
49
 
41
50
  - name: Set up Ruby
42
51
  uses: ruby/setup-ruby@v1
43
52
  with:
44
53
  ruby-version: ${{ matrix.ruby }}
45
54
  bundler-cache: true
55
+
46
56
  - name: Run unit tests
47
57
  run: xvfb-run bundle exec rake spec:unit
58
+
48
59
  - name: Run end-to-end tests in a dbus session
49
60
  run: xvfb-run dbus-run-session bundle exec rake spec:end_to_end
50
61
 
51
- rubocop:
62
+ lint:
52
63
 
53
- runs-on: ubuntu-latest
64
+ runs-on: ubuntu-22.04
54
65
 
55
66
  steps:
56
- - uses: actions/checkout@v2
67
+ - uses: actions/checkout@v6
68
+
57
69
  - name: Install non-ruby dependencies
58
70
  run: |
59
71
  sudo apt-get update
60
- # Needed for gtk3 gem
61
- sudo apt-get install libgtk-3-dev
62
- # Needed for gstreamer gem
63
- sudo apt-get install libgstreamer1.0-dev
64
- # Needed for zoom gem
65
- sudo apt-get install libyaz-dev
72
+
73
+ sudo apt-get remove libunwind-14-dev # Prevent conflict with libunwind-dev, needed by libgstreamer1.0-dev
74
+
75
+ sudo apt-get install libgtk-3-dev # Needed for gtk3 gem
76
+ sudo apt-get install libgstreamer1.0-dev # Needed for gstreamer gem
77
+ sudo apt-get install libyaz-dev # Needed for zoom gem
78
+
66
79
  - name: Set up Ruby
67
80
  uses: ruby/setup-ruby@v1
68
81
  with:
69
- ruby-version: 2.7
82
+ ruby-version: "3.3"
70
83
  bundler-cache: true
84
+
71
85
  - name: Run RuboCop
72
86
  run: bundle exec rubocop -P
data/.rubocop.yml CHANGED
@@ -4,7 +4,7 @@ inherit_mode:
4
4
  merge:
5
5
  - Exclude
6
6
 
7
- require:
7
+ plugins:
8
8
  - rubocop-performance
9
9
  - rubocop-rake
10
10
  - rubocop-rspec
@@ -15,7 +15,11 @@ AllCops:
15
15
  - 'lib/alexandria/default_preferences.rb'
16
16
  - 'pkg/**/*'
17
17
  NewCops: enable
18
- TargetRubyVersion: 2.6
18
+ TargetRubyVersion: 3.2
19
+
20
+ # Put development dependencies in the gemspec so rubygems.org knows about them
21
+ Gemspec/DevelopmentDependencies:
22
+ EnforcedStyle: gemspec
19
23
 
20
24
  # Choose GetText-style I18n cops
21
25
  I18n/GetText:
@@ -23,8 +27,9 @@ I18n/GetText:
23
27
  # Exclude non-user-facing code
24
28
  Exclude:
25
29
  - Rakefile
26
- - 'util/**/*'
30
+ - 'bin/*'
27
31
  - 'spec/**/*'
32
+ - 'util/**/*'
28
33
  I18n/RailsI18n:
29
34
  Enabled: false
30
35
 
@@ -93,6 +98,10 @@ Metrics/BlockLength:
93
98
  Naming/AccessorMethodName:
94
99
  Enabled: false
95
100
 
101
+ # Most methods that return a boolean are not predicate methods
102
+ Naming/PredicateMethod:
103
+ Enabled: false
104
+
96
105
  # Avoid one-letter exception variable name
97
106
  Naming/RescuedExceptionsVariableName:
98
107
  PreferredName: ex
data/.rubocop_todo.yml CHANGED
@@ -1,95 +1,74 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config --no-offense-counts --no-auto-gen-timestamp`
3
- # using RuboCop version 1.24.1.
3
+ # using RuboCop version 1.76.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
9
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
10
10
  Lint/DuplicateBranch:
11
11
  Exclude:
12
12
  - 'lib/alexandria/book_providers/sbn_provider.rb'
13
13
  - 'util/rake/fileinstall.rb'
14
14
 
15
- # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
15
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
16
16
  Metrics/AbcSize:
17
- Max: 111
17
+ Max: 101
18
18
 
19
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
20
- # IgnoredMethods: refine
19
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
20
+ # AllowedMethods: refine
21
21
  Metrics/BlockLength:
22
- Max: 64
22
+ Max: 57
23
23
 
24
- # Configuration parameters: CountBlocks.
24
+ # Configuration parameters: CountBlocks, CountModifierForms.
25
25
  Metrics/BlockNesting:
26
26
  Max: 5
27
27
 
28
28
  # Configuration parameters: CountComments, CountAsOne.
29
29
  Metrics/ClassLength:
30
- Max: 991
30
+ Max: 430
31
31
 
32
- # Configuration parameters: IgnoredMethods.
32
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
33
33
  Metrics/CyclomaticComplexity:
34
- Max: 22
34
+ Max: 21
35
35
 
36
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
36
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
37
37
  Metrics/MethodLength:
38
38
  Max: 98
39
39
 
40
40
  # Configuration parameters: CountComments, CountAsOne.
41
41
  Metrics/ModuleLength:
42
- Max: 361
42
+ Max: 362
43
43
 
44
44
  # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
45
45
  Metrics/ParameterLists:
46
46
  Max: 7
47
47
 
48
- # Configuration parameters: IgnoredMethods.
48
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
49
49
  Metrics/PerceivedComplexity:
50
50
  Max: 27
51
51
 
52
52
  # Configuration parameters: ForbiddenDelimiters.
53
- # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
53
+ # ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
54
54
  Naming/HeredocDelimiterNaming:
55
55
  Exclude:
56
56
  - 'Rakefile'
57
- - 'bin/alexandria'
57
+ - 'exe/alexandria'
58
58
  - 'lib/alexandria/export_library.rb'
59
59
  - 'lib/alexandria/ui/about_dialog.rb'
60
60
 
61
- # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
62
- # NamePrefix: is_, has_, have_
63
- # ForbiddenPrefixes: is_, has_, have_
61
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
62
+ # NamePrefix: is_, has_, have_, does_
63
+ # ForbiddenPrefixes: is_, has_, have_, does_
64
64
  # AllowedMethods: is_a?
65
65
  # MethodDefinitionMacros: define_method, define_singleton_method
66
- Naming/PredicateName:
66
+ Naming/PredicatePrefix:
67
67
  Exclude:
68
68
  - 'lib/alexandria/ui/smart_library_properties_dialog_base.rb'
69
69
  - 'lib/alexandria/web_themes.rb'
70
70
 
71
- # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
72
- # Include: **/*_spec*rb*, **/spec/**/*
73
- RSpec/FilePath:
74
- Exclude:
75
- - 'spec/alexandria/console_spec.rb'
76
- - 'spec/alexandria/ui/iconview_spec.rb'
77
- - 'spec/alexandria/ui/sound_spec.rb'
78
-
79
- RSpec/MultipleExpectations:
80
- Max: 7
81
-
82
- # Cop supports --auto-correct.
83
- # Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
84
- # SupportedStyles: inflected, explicit
85
- RSpec/PredicateMatcher:
86
- Exclude:
87
- - 'spec/alexandria/export_library_spec.rb'
88
- - 'spec/alexandria/library_spec.rb'
89
- - 'spec/alexandria/library_store_spec.rb'
90
- - 'spec/alexandria/scanners/cue_cat_spec.rb'
91
-
92
- # Cop supports --auto-correct.
71
+ # This cop supports safe autocorrection (--autocorrect).
93
72
  Rake/Desc:
94
73
  Exclude:
95
74
  - 'Rakefile'
@@ -99,9 +78,11 @@ Rake/DuplicateTask:
99
78
  Exclude:
100
79
  - 'Rakefile'
101
80
 
102
- # Cop supports --auto-correct.
103
- # Configuration parameters: EnforcedStyle.
81
+ # This cop supports unsafe autocorrection (--autocorrect-all).
82
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForClasses, EnforcedStyleForModules.
104
83
  # SupportedStyles: nested, compact
84
+ # SupportedStylesForClasses: ~, nested, compact
85
+ # SupportedStylesForModules: ~, nested, compact
105
86
  Style/ClassAndModuleChildren:
106
87
  Exclude:
107
88
  - 'lib/alexandria/ui/init.rb'
@@ -121,19 +102,26 @@ Style/ClassVars:
121
102
  Style/Documentation:
122
103
  Enabled: false
123
104
 
124
- # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
105
+ # This cop supports safe autocorrection (--autocorrect).
106
+ # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
125
107
  # SupportedStyles: annotated, template, unannotated
126
108
  Style/FormatStringToken:
127
109
  Exclude:
128
110
  - 'lib/alexandria/ui/new_book_dialog.rb'
129
111
 
112
+ # This cop supports unsafe autocorrection (--autocorrect-all).
113
+ # Configuration parameters: AllowedReceivers.
114
+ # AllowedReceivers: Thread.current
115
+ Style/HashEachMethods:
116
+ Exclude:
117
+ - 'lib/alexandria/ui/new_book_dialog.rb'
118
+
130
119
  # Configuration parameters: AllowedMethods.
131
120
  # AllowedMethods: respond_to_missing?
132
121
  Style/OptionalBooleanParameter:
133
122
  Exclude:
134
123
  - 'lib/alexandria/book_providers.rb'
135
- - 'lib/alexandria/book_providers/worldcat.rb'
136
- - 'lib/alexandria/console.rb'
124
+ - 'lib/alexandria/book_providers/world_cat_provider.rb'
137
125
  - 'lib/alexandria/execution_queue.rb'
138
126
  - 'lib/alexandria/export_format.rb'
139
127
  - 'lib/alexandria/library_sort_order.rb'
data/.simplecov CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  SimpleCov.start do
4
- add_group "Main", "lib"
5
- add_group "Specs", "spec"
4
+ add_group "Main", "lib/"
5
+ add_group "Specs", "spec/"
6
6
  enable_coverage :branch
7
7
  end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.11 / 2026-01-10
4
+
5
+ * Support Ruby 3.2 through 4.0
6
+ ([#216], [#235], [#213], [#252], [#255], [#264], [#278] and [#284] by [mvz])
7
+ * Update Italian translation ([#272] by [albanobattistella])
8
+ * Remove broken or obsolete online book viewing URLs ([#207] by [mvz])
9
+ * Improve KeyboardWedge scanner ([#231] by [mvz])
10
+ * Prevent Nokogiri's custom libxml memory management breaking Gtk+ widget
11
+ ([#247] by [mvz])
12
+ * Replace zoom with alexandria-zoom ([#224] by [mvz])
13
+ * Update gstreamer and gtk3 dependencies ([#219], [#244] and [#275] by [mvz])
14
+ * Loosen, simplify and update marc version requirement ([#266] by [mvz])
15
+
16
+ [albanobattistella]: https://github.com/albanobattistella
17
+
18
+ [#207]: https://github.com/mvz/alexandria-book-collection-manager/pull/207
19
+ [#213]: https://github.com/mvz/alexandria-book-collection-manager/pull/213
20
+ [#216]: https://github.com/mvz/alexandria-book-collection-manager/pull/216
21
+ [#219]: https://github.com/mvz/alexandria-book-collection-manager/pull/219
22
+ [#224]: https://github.com/mvz/alexandria-book-collection-manager/pull/224
23
+ [#231]: https://github.com/mvz/alexandria-book-collection-manager/pull/231
24
+ [#235]: https://github.com/mvz/alexandria-book-collection-manager/pull/235
25
+ [#244]: https://github.com/mvz/alexandria-book-collection-manager/pull/244
26
+ [#247]: https://github.com/mvz/alexandria-book-collection-manager/pull/247
27
+ [#252]: https://github.com/mvz/alexandria-book-collection-manager/pull/252
28
+ [#255]: https://github.com/mvz/alexandria-book-collection-manager/pull/255
29
+ [#264]: https://github.com/mvz/alexandria-book-collection-manager/pull/264
30
+ [#266]: https://github.com/mvz/alexandria-book-collection-manager/pull/266
31
+ [#270]: https://github.com/mvz/alexandria-book-collection-manager/pull/270
32
+ [#271]: https://github.com/mvz/alexandria-book-collection-manager/pull/271
33
+ [#272]: https://github.com/mvz/alexandria-book-collection-manager/pull/272
34
+ [#275]: https://github.com/mvz/alexandria-book-collection-manager/pull/275
35
+ [#278]: https://github.com/mvz/alexandria-book-collection-manager/pull/278
36
+ [#284]: https://github.com/mvz/alexandria-book-collection-manager/pull/284
37
+
38
+ ## 0.7.10 / 2022-10-14
39
+
40
+ * Loosen dependency on the marc gem
41
+ * Update dependency on the gtk3 and gstreamer gems
42
+ * Make Alexandria's own MARC parser handle nil records ([#198] by [mvz])
43
+ * Support upcoming Ruby 3.2
44
+
45
+ [#198]: https://github.com/mvz/alexandria-book-collection-manager/pull/198
46
+
3
47
  ## 0.7.9 / 2022-02-04
4
48
 
5
49
  * Drop support for Ruby 2.5
@@ -19,6 +63,18 @@
19
63
  * Fix source for shared items to install ([#139] by [mvz])
20
64
  * Various dependency updates
21
65
 
66
+ [mvz]: https://github.com/mvz
67
+
68
+ [#139]: https://github.com/mvz/alexandria-book-collection-manager/pull/139
69
+ [#136]: https://github.com/mvz/alexandria-book-collection-manager/pull/136
70
+ [#134]: https://github.com/mvz/alexandria-book-collection-manager/pull/134
71
+ [#133]: https://github.com/mvz/alexandria-book-collection-manager/pull/133
72
+ [#120]: https://github.com/mvz/alexandria-book-collection-manager/pull/120
73
+ [#119]: https://github.com/mvz/alexandria-book-collection-manager/pull/119
74
+ [#118]: https://github.com/mvz/alexandria-book-collection-manager/pull/118
75
+ [#115]: https://github.com/mvz/alexandria-book-collection-manager/pull/115
76
+ [#112]: https://github.com/mvz/alexandria-book-collection-manager/pull/112
77
+
22
78
  ## 0.7.8 / 2020-11-29
23
79
 
24
80
  * Fix ThaliaProvider
@@ -34,6 +90,8 @@
34
90
  * Fix calendar popups in Smart Library and Book Properties dialogs
35
91
  * Fix crashes when activating Export and Import menu items
36
92
 
93
+ [#88]: https://github.com/mvz/alexandria-book-collection-manager/pull/88
94
+
37
95
  ## 0.7.6 / 2020-11-01
38
96
 
39
97
  * Make more strings translatable with help from rubocop-i18n
@@ -48,6 +106,13 @@
48
106
  * Improve installation instructions
49
107
  * Improve README ([#83] by [Happy][HappyFacade])
50
108
 
109
+ [piotrdrag]: https://github.com/piotrdrag
110
+ [HappyFacade]: https://github.com/HappyFacade
111
+
112
+ [#83]: https://github.com/mvz/alexandria-book-collection-manager/pull/83
113
+ [#64]: https://github.com/mvz/alexandria-book-collection-manager/pull/64
114
+ [#51]: https://github.com/mvz/alexandria-book-collection-manager/pull/51
115
+
51
116
  ## 0.7.5 / 2020-05-11
52
117
 
53
118
  * Avoid crash when opening Import dialog
@@ -60,10 +125,13 @@
60
125
 
61
126
  * Drop support for Ruby 2.3
62
127
  * Avoid passing nil to Gtk method #visible=, which expects a boolean
63
- ([#22], by [Joseph Haig][jrmhaig])
128
+ ([#23], by [Joseph Haig][jrmhaig])
64
129
  * Update dependencies on gtk3 and gstreamer to 3.4.1
65
130
  * Fix WorldCat provider to use https
66
131
 
132
+ [jrmhaig]: https://github.com/jrmhaig
133
+ [#23]: https://github.com/mvz/alexandria-book-collection-manager/pull/23
134
+
67
135
  ## 0.7.3 / 2019-02-27
68
136
 
69
137
  * Remove DeaStore provider since the site is no longer online
@@ -77,6 +145,8 @@
77
145
  * Fix setup of default scanner when no scanner is configured
78
146
  * Update `YAML.safe_load` calls to new API, silencing deprecation warnings
79
147
 
148
+ [#19]: https://github.com/mvz/alexandria-book-collection-manager/issues/19
149
+
80
150
  ## 0.7.2 / 2018-03-18
81
151
 
82
152
  * Update dependencies
@@ -127,26 +197,3 @@
127
197
  * Amazon queries now use a Associate Tag, a new requirement of
128
198
  Amazon's Product Advertising API. Thanks to Stephen McCamant for
129
199
  providing the patch.
130
-
131
- <!-- contributors -->
132
- [jrmhaig]: https://github.com/jrmhaig
133
- [mvz]: https://github.com/mvz
134
- [piotrdrag]: https://github.com/piotrdrag
135
- [HappyFacade]: https://github.com/HappyFacade
136
-
137
- <!-- issues and pull requests -->
138
- [#139]: https://github.com/mvz/alexandria-book-collection-manager/pull/139
139
- [#136]: https://github.com/mvz/alexandria-book-collection-manager/pull/136
140
- [#134]: https://github.com/mvz/alexandria-book-collection-manager/pull/134
141
- [#133]: https://github.com/mvz/alexandria-book-collection-manager/pull/133
142
- [#120]: https://github.com/mvz/alexandria-book-collection-manager/pull/120
143
- [#119]: https://github.com/mvz/alexandria-book-collection-manager/pull/119
144
- [#118]: https://github.com/mvz/alexandria-book-collection-manager/pull/118
145
- [#115]: https://github.com/mvz/alexandria-book-collection-manager/pull/115
146
- [#112]: https://github.com/mvz/alexandria-book-collection-manager/pull/112
147
- [#88]: https://github.com/mvz/alexandria-book-collection-manager/pull/88
148
- [#83]: https://github.com/mvz/alexandria-book-collection-manager/pull/83
149
- [#64]: https://github.com/mvz/alexandria-book-collection-manager/pull/64
150
- [#51]: https://github.com/mvz/alexandria-book-collection-manager/pull/51
151
- [#23]: https://github.com/mvz/alexandria-book-collection-manager/pull/23
152
- [#19]: https://github.com/mvz/alexandria-book-collection-manager/issues/19
data/Gemfile CHANGED
@@ -4,9 +4,3 @@ source "https://rubygems.org"
4
4
 
5
5
  # The gem's dependencies are specified in the gemspec
6
6
  gemspec
7
-
8
- group :development, :test do
9
- gem "pry"
10
- gem "simplecov"
11
- gem "yard", "~> 0.9.5"
12
- end
data/Rakefile CHANGED
@@ -15,12 +15,12 @@ require "omfgenerate"
15
15
 
16
16
  require_relative "lib/alexandria/version"
17
17
 
18
- stage_dir = ENV["DESTDIR"] || "tmp"
19
- prefix_dir = ENV["PREFIX"] || "/usr"
18
+ stage_dir = ENV.fetch("DESTDIR", "tmp")
19
+ prefix_dir = ENV.fetch("PREFIX", "/usr")
20
20
 
21
21
  PROJECT = "alexandria"
22
22
  PREFIX = prefix_dir
23
- share_dir = ENV["SHARE"] || "#{PREFIX}/share"
23
+ share_dir = ENV.fetch("SHARE", "#{PREFIX}/share")
24
24
  SHARE = share_dir
25
25
 
26
26
  GettextGenerateTask.new(PROJECT) do |g|
@@ -43,7 +43,7 @@ ICON_FILE_GLOBS = ["share/app-icon/**/*.png",
43
43
  PIXMAP_GLOBS = "share/app-icon/32x32/*.xpm"
44
44
 
45
45
  def install_common(install_task)
46
- install_task.install_exe("bin", "bin/*", "#{PREFIX}/bin")
46
+ install_task.install_exe("exe", "exe/*", "#{PREFIX}/bin")
47
47
  install_task.install("lib", "lib/**/*.rb", install_task.rubylib)
48
48
 
49
49
  install_task.install("share", SHARE_FILE_GLOBS, SHARE)
@@ -148,7 +148,7 @@ file "lib/alexandria/default_preferences.rb" => ["Rakefile", SCHEMA_PATH] do |f|
148
148
  end
149
149
  default = ary.inspect
150
150
  else
151
- default = convert_with_type(default, type).inspect.to_s
151
+ default = convert_with_type(default, type).inspect
152
152
  end
153
153
 
154
154
  generated_lines << varname.inspect + " => " + default
@@ -31,39 +31,42 @@ Gem::Specification.new do |spec|
31
31
  spec.email = ["matijs@matijs.net"]
32
32
 
33
33
  spec.summary = "GNOME application for managing collections of books"
34
-
35
34
  spec.homepage = "http://www.github.com/mvz/alexandria-book-collection-manager"
36
- spec.license = "GPL-2.0+"
37
35
 
38
- spec.required_ruby_version = ">= 2.6.0"
36
+ spec.license = "GPL-2.0-or-later"
37
+ spec.required_ruby_version = ">= 3.2.0"
39
38
 
40
39
  spec.metadata["rubygems_mfa_required"] = "true"
41
40
 
42
41
  spec.files = `git ls-files -z`.split("\0") |
43
42
  ["lib/alexandria/default_preferences.rb"]
43
+ spec.bindir = "exe"
44
44
 
45
45
  spec.executables = ["alexandria"]
46
46
 
47
47
  spec.require_paths = ["lib"]
48
48
  spec.rdoc_options = ["--main", "README.md"]
49
49
 
50
- spec.add_runtime_dependency("gettext", ["~> 3.1"])
51
- spec.add_runtime_dependency("gstreamer", ["~> 3.5.0"])
52
- spec.add_runtime_dependency("gtk3", ["~> 3.5.0"])
53
- spec.add_runtime_dependency("htmlentities", ["~> 4.3"])
54
- spec.add_runtime_dependency("image_size", ["~> 3.0"])
55
- spec.add_runtime_dependency("marc", ">= 1.0", "< 1.2")
56
- spec.add_runtime_dependency("nokogiri", ["~> 1.11"])
57
- spec.add_runtime_dependency("psych", ">= 3.2", "< 4.1")
58
- spec.add_runtime_dependency("zoom", ["~> 0.5.0"])
50
+ spec.add_dependency "alexandria-zoom", ["~> 0.6.0"]
51
+ spec.add_dependency "csv", "~> 3.2"
52
+ spec.add_dependency "gettext", ["~> 3.1"]
53
+ spec.add_dependency "gstreamer", "~> 4.3.0"
54
+ spec.add_dependency "gtk3", "~> 4.3.0"
55
+ spec.add_dependency "htmlentities", ["~> 4.3"]
56
+ spec.add_dependency "image_size", ["~> 3.0"]
57
+ spec.add_dependency "logger", "~> 1.7"
58
+ spec.add_dependency "marc", "~> 1.3"
59
+ spec.add_dependency "nokogiri", ["~> 1.11"]
60
+ spec.add_dependency "observer", "~> 0.1.2"
59
61
 
60
- spec.add_development_dependency("gnome_app_driver", "~> 0.3.0")
61
- spec.add_development_dependency("rake", ["~> 13.0"])
62
- spec.add_development_dependency("rspec", ["~> 3.0"])
63
- spec.add_development_dependency("rubocop", "~> 1.25")
64
- spec.add_development_dependency("rubocop-i18n", ["~> 3.0"])
65
- spec.add_development_dependency("rubocop-performance", "~> 1.13")
66
- spec.add_development_dependency("rubocop-rake", "~> 0.6.0")
67
- spec.add_development_dependency("rubocop-rspec", "~> 2.7")
68
- spec.add_development_dependency("webmock", "~> 3.9")
62
+ spec.add_development_dependency "gnome_app_driver", "~> 0.3.2"
63
+ spec.add_development_dependency "rake", ["~> 13.0"]
64
+ spec.add_development_dependency "rspec", ["~> 3.0"]
65
+ spec.add_development_dependency "rubocop", "~> 1.79"
66
+ spec.add_development_dependency "rubocop-i18n", "~> 3.2"
67
+ spec.add_development_dependency "rubocop-performance", "~> 1.25"
68
+ spec.add_development_dependency "rubocop-rake", "~> 0.7.1"
69
+ spec.add_development_dependency "rubocop-rspec", "~> 3.6"
70
+ spec.add_development_dependency "simplecov", "~> 0.22.0"
71
+ spec.add_development_dependency "webmock", "~> 3.9"
69
72
  end
data/bin/rake ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rake' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
+
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.\n" \
20
+ "Replace `bin/bundle` by running `bundle binstubs bundler --force`, " \
21
+ "then run this command again.")
22
+ end
23
+ end
24
+
25
+ require "rubygems"
26
+ require "bundler/setup"
27
+
28
+ load Gem.bin_path("rake", "rake")
data/bin/rspec ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rspec' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
+
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.\n" \
20
+ "Replace `bin/bundle` by running `bundle binstubs bundler --force`, " \
21
+ "then run this command again.")
22
+ end
23
+ end
24
+
25
+ require "rubygems"
26
+ require "bundler/setup"
27
+
28
+ load Gem.bin_path("rspec-core", "rspec")