alexandria-book-collection-manager 0.7.2 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/ruby.yml +77 -0
- data/.gitignore +5 -1
- data/.hound.yml +2 -0
- data/.rubocop.yml +87 -37
- data/.rubocop_todo.yml +62 -191
- data/.simplecov +5 -2
- data/CHANGELOG.md +63 -0
- data/Gemfile +4 -3
- data/INSTALL.md +26 -14
- data/README.md +52 -42
- data/Rakefile +93 -109
- data/TODO.md +9 -1
- data/alexandria-book-collection-manager.gemspec +50 -43
- data/bin/alexandria +30 -53
- data/doc/FAQ +2 -6
- data/doc/dependency_decisions.yml +27 -8
- data/lib/alexandria.rb +27 -37
- data/lib/alexandria/about.rb +50 -50
- data/lib/alexandria/book_providers.rb +90 -97
- data/lib/alexandria/book_providers/adlibris.rb +41 -76
- data/lib/alexandria/book_providers/amazon_aws.rb +96 -100
- data/lib/alexandria/book_providers/amazon_ecs_util.rb +295 -322
- data/lib/alexandria/book_providers/barnes_and_noble.rb +48 -45
- data/lib/alexandria/book_providers/douban.rb +26 -42
- data/lib/alexandria/book_providers/proxis.rb +44 -55
- data/lib/alexandria/book_providers/pseudomarc.rb +77 -85
- data/lib/alexandria/book_providers/siciliano.rb +64 -65
- data/lib/alexandria/book_providers/thalia.rb +42 -41
- data/lib/alexandria/book_providers/web.rb +15 -33
- data/lib/alexandria/book_providers/worldcat.rb +70 -97
- data/lib/alexandria/book_providers/z3950.rb +160 -173
- data/lib/alexandria/config.rb +1 -1
- data/lib/alexandria/console.rb +8 -21
- data/lib/alexandria/default_preferences.rb +37 -0
- data/lib/alexandria/execution_queue.rb +15 -13
- data/lib/alexandria/export_format.rb +47 -0
- data/lib/alexandria/export_library.rb +193 -300
- data/lib/alexandria/import_library.rb +108 -141
- data/lib/alexandria/import_library_csv.rb +43 -46
- data/lib/alexandria/library_collection.rb +79 -0
- data/lib/alexandria/library_sort_order.rb +45 -0
- data/lib/alexandria/library_store.rb +233 -0
- data/lib/alexandria/logging.rb +11 -13
- data/lib/alexandria/models/book.rb +13 -20
- data/lib/alexandria/models/library.rb +81 -353
- data/lib/alexandria/net.rb +5 -6
- data/lib/alexandria/preferences.rb +73 -87
- data/lib/alexandria/scanners.rb +2 -2
- data/lib/alexandria/scanners/{cuecat.rb → cue_cat.rb} +20 -18
- data/lib/alexandria/scanners/keyboard.rb +8 -8
- data/lib/alexandria/smart_library.rb +133 -170
- data/lib/alexandria/ui.rb +15 -15
- data/lib/alexandria/ui/about_dialog.rb +49 -0
- data/lib/alexandria/ui/{dialogs/acquire_dialog.rb → acquire_dialog.rb} +119 -136
- data/lib/alexandria/ui/alert_dialog.rb +64 -0
- data/lib/alexandria/ui/bad_isbns_dialog.rb +41 -0
- data/lib/alexandria/ui/{dialogs/barcode_animation.rb → barcode_animation.rb} +16 -15
- data/lib/alexandria/ui/{dialogs/book_properties_dialog.rb → book_properties_dialog.rb} +39 -52
- data/lib/alexandria/ui/book_properties_dialog_base.rb +318 -0
- data/lib/alexandria/ui/builder_base.rb +7 -27
- data/lib/alexandria/ui/calendar_popup.rb +58 -0
- data/lib/alexandria/ui/callbacks.rb +189 -183
- data/lib/alexandria/ui/completion_models.rb +10 -23
- data/lib/alexandria/ui/confirm_erase_dialog.rb +33 -0
- data/lib/alexandria/ui/conflict_while_copying_dialog.rb +34 -0
- data/lib/alexandria/ui/dndable.rb +7 -7
- data/lib/alexandria/ui/error_dialog.rb +25 -0
- data/lib/alexandria/ui/export_dialog.rb +142 -0
- data/lib/alexandria/ui/icons.rb +47 -63
- data/lib/alexandria/ui/iconview.rb +12 -10
- data/lib/alexandria/ui/iconview_tooltips.rb +41 -54
- data/lib/alexandria/ui/import_dialog.rb +157 -0
- data/lib/alexandria/ui/init.rb +21 -33
- data/lib/alexandria/ui/keep_bad_isbn_dialog.rb +36 -0
- data/lib/alexandria/ui/libraries_combo.rb +16 -14
- data/lib/alexandria/ui/listview.rb +73 -87
- data/lib/alexandria/ui/main_app.rb +24 -26
- data/lib/alexandria/ui/misc_dialogs.rb +10 -0
- data/lib/alexandria/ui/multi_drag_treeview.rb +28 -41
- data/lib/alexandria/ui/{dialogs/new_book_dialog.rb → new_book_dialog.rb} +156 -194
- data/lib/alexandria/ui/new_book_dialog_manual.rb +139 -0
- data/lib/alexandria/ui/new_provider_dialog.rb +100 -0
- data/lib/alexandria/ui/new_smart_library_dialog.rb +74 -0
- data/lib/alexandria/ui/preferences_dialog.rb +313 -0
- data/lib/alexandria/ui/provider_preferences_base_dialog.rb +95 -0
- data/lib/alexandria/ui/provider_preferences_dialog.rb +35 -0
- data/lib/alexandria/ui/really_delete_dialog.rb +53 -0
- data/lib/alexandria/ui/{sidepane.rb → sidepane_manager.rb} +56 -68
- data/lib/alexandria/ui/skip_entry_dialog.rb +33 -0
- data/lib/alexandria/ui/smart_library_properties_dialog.rb +60 -0
- data/lib/alexandria/ui/smart_library_properties_dialog_base.rb +242 -0
- data/lib/alexandria/ui/smart_library_rule_box.rb +119 -0
- data/lib/alexandria/ui/sound.rb +11 -13
- data/lib/alexandria/ui/ui_manager.rb +236 -251
- data/lib/alexandria/undo_manager.rb +1 -0
- data/lib/alexandria/version.rb +4 -19
- data/lib/alexandria/web_themes.rb +22 -21
- data/po/Makefile +2 -2
- data/po/cs.po +993 -880
- data/po/cy.po +957 -874
- data/po/de.po +990 -869
- data/po/el.po +989 -869
- data/po/es.po +985 -865
- data/po/fr.po +986 -870
- data/po/ga.po +907 -823
- data/po/gl.po +981 -865
- data/po/it.po +986 -868
- data/po/ja.po +969 -853
- data/po/mk.po +983 -863
- data/po/nb.po +979 -863
- data/po/nl.po +983 -864
- data/po/pl.po +1017 -974
- data/po/pt.po +988 -861
- data/po/pt_BR.po +984 -868
- data/po/ru.po +992 -873
- data/po/sk.po +987 -869
- data/po/sv.po +977 -861
- data/po/uk.po +975 -865
- data/po/zh_TW.po +976 -860
- data/schemas/alexandria.schemas +25 -3
- data/share/alexandria/glade/acquire_dialog__builder.glade +15 -12
- data/share/alexandria/glade/book_properties_dialog__builder.glade +171 -299
- data/share/alexandria/glade/main_app__builder.glade +24 -33
- data/share/alexandria/glade/new_book_dialog__builder.glade +27 -59
- data/share/alexandria/glade/preferences_dialog__builder.glade +250 -290
- data/share/gnome/help/alexandria/C/introduction.xml +0 -8
- data/share/gnome/help/alexandria/C/searching.xml +1 -1
- data/share/gnome/help/alexandria/C/smart-libraries.xml +2 -2
- data/share/gnome/help/alexandria/C/working-with-libraries.xml +1 -1
- data/share/gnome/help/alexandria/fr/alexandria.xml +1 -1
- data/share/gnome/help/alexandria/ja/introduction.xml +0 -8
- data/share/gnome/help/alexandria/ja/smart-libraries.xml +1 -1
- data/spec/alexandria/book_providers/world_cat_provider_spec.rb +160 -0
- data/spec/alexandria/book_providers_spec.rb +75 -171
- data/spec/alexandria/book_spec.rb +12 -10
- data/spec/alexandria/console_spec.rb +27 -0
- data/spec/alexandria/export_library_spec.rb +130 -0
- data/spec/alexandria/library_spec.rb +128 -172
- data/spec/alexandria/library_store_spec.rb +37 -0
- data/spec/alexandria/preferences_spec.rb +44 -17
- data/spec/alexandria/scanners/cue_cat_spec.rb +52 -0
- data/spec/alexandria/smart_library_spec.rb +30 -25
- data/spec/alexandria/ui/about_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/acquire_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/alert_dialog_spec.rb +16 -0
- data/spec/alexandria/ui/bad_isbns_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/book_properties_dialog_spec.rb +17 -0
- data/spec/alexandria/ui/confirm_erase_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/conflict_while_copying_dialog_spec.rb +16 -0
- data/spec/alexandria/ui/error_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/export_dialog_spec.rb +36 -0
- data/spec/alexandria/ui/icons_spec.rb +26 -0
- data/spec/alexandria/ui/iconview_spec.rb +7 -21
- data/spec/alexandria/ui/import_dialog_spec.rb +46 -0
- data/spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb +17 -0
- data/spec/alexandria/ui/main_app_spec.rb +7 -34
- data/spec/alexandria/ui/new_book_dialog_manual_spec.rb +15 -0
- data/spec/alexandria/ui/new_book_dialog_spec.rb +22 -0
- data/spec/alexandria/ui/new_provider_dialog_spec.rb +30 -0
- data/spec/alexandria/ui/new_smart_library_dialog_spec.rb +39 -0
- data/spec/alexandria/ui/preferences_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/provider_preferences_dialog_spec.rb +34 -0
- data/spec/alexandria/ui/really_delete_dialog_spec.rb +16 -0
- data/spec/alexandria/ui/sidepane_manager_spec.rb +15 -0
- data/spec/alexandria/ui/skip_entry_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/smart_library_properties_dialog_spec.rb +49 -0
- data/spec/alexandria/ui/sound_spec.rb +2 -2
- data/spec/alexandria/ui/ui_manager_spec.rb +43 -20
- data/spec/end_to_end/basic_run_spec.rb +52 -0
- data/spec/spec_helper.rb +65 -33
- data/tasks/setup.rb +2 -2
- data/tasks/spec.rake +16 -3
- data/util/rake/fileinstall.rb +39 -35
- data/util/rake/gettextgenerate.rb +7 -7
- data/util/rake/omfgenerate.rb +7 -7
- metadata +178 -45
- data/dogtail/basic_run_test.py +0 -9
- data/lib/alexandria/book_providers/deastore.rb +0 -265
- data/lib/alexandria/book_providers/mcu.rb +0 -182
- data/lib/alexandria/book_providers/renaud.rb +0 -149
- data/lib/alexandria/ui/dialogs/about_dialog.rb +0 -61
- data/lib/alexandria/ui/dialogs/alert_dialog.rb +0 -72
- data/lib/alexandria/ui/dialogs/bad_isbns_dialog.rb +0 -51
- data/lib/alexandria/ui/dialogs/book_properties_dialog_base.rb +0 -426
- data/lib/alexandria/ui/dialogs/export_dialog.rb +0 -171
- data/lib/alexandria/ui/dialogs/import_dialog.rb +0 -196
- data/lib/alexandria/ui/dialogs/misc_dialogs.rb +0 -87
- data/lib/alexandria/ui/dialogs/new_book_dialog_manual.rb +0 -154
- data/lib/alexandria/ui/dialogs/new_smart_library_dialog.rb +0 -74
- data/lib/alexandria/ui/dialogs/preferences_dialog.rb +0 -568
- data/lib/alexandria/ui/dialogs/smart_library_properties_dialog.rb +0 -59
- data/lib/alexandria/ui/dialogs/smart_library_properties_dialog_base.rb +0 -420
- data/spec/alexandria/scanners/cuecat_spec.rb +0 -67
- data/spec/alexandria/ui/dialogs_spec.rb +0 -96
- data/spec/alexandria/ui/sidepane_spec.rb +0 -29
- data/spec/alexandria/ui/ui_utilities_spec.rb +0 -62
- data/spec/alexandria/utilities_spec.rb +0 -52
- data/tasks/dogtail.rake +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88a834cc5346bc0704749533797d91e6ff2a04c372e066fe9f91ca239baa63f1
|
4
|
+
data.tar.gz: 4a68efa9e12431f6ea356325b4bcee4a702a7f1f49710860a399657866c158e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 213ed219cd387370ff664b32b108aff3e6655e07579962f436f013616e02e423ef17afb6ed6bc6f036d2c5de863a9b51f8c5d5de5e8f33b9a51a0dff6522da61
|
7
|
+
data.tar.gz: c6440f573914defb43a7a9f451a4cf5e9091275039137c4dabd02d2290c72e87a17d35f62db08f7669d1a66f51ea53e5ef1b1e170cdd3beea237df1d3a1f5dd4
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and
|
2
|
+
# run tests with Rake
|
3
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
4
|
+
|
5
|
+
name: Ruby
|
6
|
+
|
7
|
+
on:
|
8
|
+
push:
|
9
|
+
branches: [ master ]
|
10
|
+
pull_request:
|
11
|
+
branches: [ master ]
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
test:
|
15
|
+
|
16
|
+
runs-on: ubuntu-latest
|
17
|
+
|
18
|
+
strategy:
|
19
|
+
matrix:
|
20
|
+
ruby: [2.5, 2.6, 2.7]
|
21
|
+
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v2
|
24
|
+
- name: Install non-ruby dependencies
|
25
|
+
run: |
|
26
|
+
# Needed for gtk3 gem
|
27
|
+
sudo apt-get install libgtk-3-dev
|
28
|
+
# Needed for gstreamer gem
|
29
|
+
sudo apt-get install libgstreamer1.0-dev
|
30
|
+
# Needed for GooCanvas::Canvas widget
|
31
|
+
sudo apt-get install libgoocanvas-2.0-dev
|
32
|
+
# Needed for zoom gem
|
33
|
+
sudo apt-get install libyaz-dev
|
34
|
+
# Needed for intltool-merge executable
|
35
|
+
sudo apt-get install intltool
|
36
|
+
# Needed for gconftool-2 executable
|
37
|
+
sudo apt-get install gconf2
|
38
|
+
# Needed to provide A11y dbus service to silence warnings
|
39
|
+
sudo apt-get install at-spi2-core
|
40
|
+
# Needed to set up sound player pipeline
|
41
|
+
sudo apt-get install gstreamer1.0-plugins-good
|
42
|
+
# Needed to play sound
|
43
|
+
sudo apt-get install pulseaudio
|
44
|
+
# Provides xvfb-run
|
45
|
+
sudo apt-get install xvfb
|
46
|
+
|
47
|
+
- name: Set up Ruby
|
48
|
+
uses: ruby/setup-ruby@v1
|
49
|
+
with:
|
50
|
+
ruby-version: ${{ matrix.ruby }}
|
51
|
+
bundler-cache: true
|
52
|
+
- name: Run unit tests
|
53
|
+
run: xvfb-run bundle exec rake spec:unit
|
54
|
+
- name: Run end-to-end tests in a dbus session
|
55
|
+
run: xvfb-run dbus-run-session bundle exec rake spec:end_to_end
|
56
|
+
|
57
|
+
rubocop:
|
58
|
+
|
59
|
+
runs-on: ubuntu-latest
|
60
|
+
|
61
|
+
steps:
|
62
|
+
- uses: actions/checkout@v2
|
63
|
+
- name: Install non-ruby dependencies
|
64
|
+
run: |
|
65
|
+
# Needed for gtk3 gem
|
66
|
+
sudo apt-get install libgtk-3-dev
|
67
|
+
# Needed for gstreamer gem
|
68
|
+
sudo apt-get install libgstreamer1.0-dev
|
69
|
+
# Needed for zoom gem
|
70
|
+
sudo apt-get install libyaz-dev
|
71
|
+
- name: Set up Ruby
|
72
|
+
uses: ruby/setup-ruby@v1
|
73
|
+
with:
|
74
|
+
ruby-version: 2.7
|
75
|
+
bundler-cache: true
|
76
|
+
- name: Run RuboCop
|
77
|
+
run: bundle exec rubocop -P
|
data/.gitignore
CHANGED
@@ -3,12 +3,16 @@ config.save
|
|
3
3
|
alexandria.desktop
|
4
4
|
alexandria.desktop.in.h
|
5
5
|
.svn-authors
|
6
|
-
lib/alexandria/default_preferences.rb
|
7
6
|
Gemfile.lock
|
8
7
|
.yardoc/
|
9
8
|
share/locale/
|
10
9
|
share/omf/alexandria/*.omf
|
10
|
+
spec/examples.txt
|
11
11
|
pkg/
|
12
12
|
coverage/
|
13
13
|
tmp/
|
14
|
+
po/*.po~
|
15
|
+
po/*.mo
|
16
|
+
po/*.pot
|
14
17
|
*.gem
|
18
|
+
*.glade~
|
data/.hound.yml
ADDED
data/.rubocop.yml
CHANGED
@@ -1,18 +1,47 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
require:
|
4
|
+
- rubocop-performance
|
5
|
+
- rubocop-rspec
|
6
|
+
- rubocop-i18n
|
7
|
+
|
1
8
|
AllCops:
|
2
9
|
Exclude:
|
3
10
|
- 'lib/alexandria/default_preferences.rb'
|
4
11
|
- 'pkg/**/*'
|
5
|
-
|
12
|
+
- 'vendor/bundle/**/*'
|
13
|
+
NewCops: enable
|
14
|
+
TargetRubyVersion: 2.5
|
15
|
+
|
16
|
+
# Choose GetText-style I18n cops
|
17
|
+
GetText:
|
18
|
+
Enabled: true
|
19
|
+
# Exclude non-user-facing code
|
20
|
+
Exclude:
|
21
|
+
- Rakefile
|
22
|
+
- 'util/**/*'
|
23
|
+
- 'spec/**/*'
|
24
|
+
RailsI18n:
|
25
|
+
Enabled: false
|
6
26
|
|
7
|
-
#
|
8
|
-
|
9
|
-
|
27
|
+
# This code has a lot of pre-existing translations with percent-style
|
28
|
+
# formatting. Maybe one day someone will re-do all of them ...
|
29
|
+
GetText/DecorateStringFormattingUsingPercent:
|
30
|
+
Enabled: false
|
10
31
|
|
11
|
-
#
|
12
|
-
|
13
|
-
|
14
|
-
|
32
|
+
# Make BeginEndAlignment behavior match EndAlignment
|
33
|
+
Layout/BeginEndAlignment:
|
34
|
+
EnforcedStyleAlignWith: begin
|
35
|
+
|
36
|
+
Layout/HashAlignment:
|
37
|
+
EnforcedColonStyle: key
|
38
|
+
EnforcedHashRocketStyle: table
|
15
39
|
|
40
|
+
# Be lenient with line length
|
41
|
+
Layout/LineLength:
|
42
|
+
Max: 92
|
43
|
+
|
44
|
+
# Don't force lonely closing parentheses
|
16
45
|
Layout/MultilineMethodCallBraceLayout:
|
17
46
|
EnforcedStyle: same_line
|
18
47
|
|
@@ -21,71 +50,98 @@ Layout/MultilineMethodCallBraceLayout:
|
|
21
50
|
Layout/MultilineMethodCallIndentation:
|
22
51
|
EnforcedStyle: indented
|
23
52
|
|
24
|
-
#
|
53
|
+
# Multi-line assignment should be simply indented. Aligning them makes it even
|
54
|
+
# harder to keep a sane line length.
|
55
|
+
Layout/MultilineOperationIndentation:
|
56
|
+
EnforcedStyle: indented
|
57
|
+
|
58
|
+
# Force consistent spacing independent of block contents
|
25
59
|
Layout/SpaceBeforeBlockBraces:
|
26
60
|
EnforcedStyleForEmptyBraces: space
|
27
61
|
|
62
|
+
# Assume the programmer knows how bracketed block syntax works
|
63
|
+
Lint/AmbiguousBlockAssociation:
|
64
|
+
Enabled: false
|
65
|
+
|
28
66
|
# Allow if (foo = get_foo) style
|
29
67
|
Lint/AssignmentInCondition:
|
30
68
|
AllowSafeAssignment: true
|
31
69
|
|
70
|
+
# This cop's reach is too broad
|
71
|
+
# See https://github.com/rubocop-hq/rubocop/pull/8480
|
72
|
+
Lint/MissingSuper:
|
73
|
+
Enabled: false
|
74
|
+
|
32
75
|
# Blocks in specs can be any size
|
33
76
|
Metrics/BlockLength:
|
34
77
|
Exclude:
|
35
78
|
- 'spec/**/*'
|
36
79
|
|
37
|
-
# Be lenient with line length
|
38
|
-
Metrics/LineLength:
|
39
|
-
Max: 110
|
40
|
-
|
41
80
|
Naming/AccessorMethodName:
|
42
81
|
Enabled: false
|
43
82
|
|
44
|
-
#
|
45
|
-
|
46
|
-
|
83
|
+
# Avoid one-letter exception variable name
|
84
|
+
Naming/RescuedExceptionsVariableName:
|
85
|
+
PreferredName: ex
|
86
|
+
|
87
|
+
Performance/EndWith:
|
88
|
+
AutoCorrect: true
|
89
|
+
|
90
|
+
Performance/StartWith:
|
91
|
+
AutoCorrect: true
|
92
|
+
|
93
|
+
# End-to-end specs do not describe classes
|
94
|
+
RSpec/DescribeClass:
|
95
|
+
Exclude:
|
96
|
+
- 'spec/end_to_end/**/*_spec.rb'
|
97
|
+
|
98
|
+
RSpec/ExampleLength:
|
99
|
+
Max: 8
|
100
|
+
Exclude:
|
101
|
+
- 'spec/end_to_end/**/*_spec.rb'
|
47
102
|
|
48
103
|
# Allow and/or for control flow only
|
49
104
|
Style/AndOr:
|
50
|
-
|
51
|
-
|
52
|
-
# Prefer old school format strings
|
53
|
-
Style/FormatStringToken:
|
54
|
-
EnforcedStyle: unannotated
|
105
|
+
EnforcedStyle: conditionals
|
55
106
|
|
56
107
|
# Require at least two dependent lines before suggesting a guard clause
|
57
108
|
Style/GuardClause:
|
58
109
|
MinBodyLength: 2
|
59
110
|
|
60
|
-
# Not all objects that handle #== 0 also handle #zero?
|
61
|
-
Style/NumericPredicate:
|
62
|
-
Enabled: false
|
63
|
-
|
64
111
|
# Sometimes an if statement just looks better than next with a guard clause
|
65
112
|
Style/Next:
|
66
113
|
Enabled: false
|
67
114
|
|
115
|
+
# Not all objects that handle #== 0 also handle #zero?
|
116
|
+
Style/NumericPredicate:
|
117
|
+
Enabled: false
|
118
|
+
|
68
119
|
# Use older RuboCop default
|
69
120
|
Style/PercentLiteralDelimiters:
|
70
121
|
PreferredDelimiters:
|
122
|
+
'%W': ()
|
71
123
|
'%w': ()
|
72
124
|
|
73
125
|
# Allow explicit return with multiple return values
|
74
126
|
Style/RedundantReturn:
|
75
127
|
AllowMultipleReturnValues: true
|
76
128
|
|
77
|
-
# Always use raise to raise exceptions
|
78
|
-
Style/SignalException:
|
79
|
-
EnforcedStyle: only_raise
|
80
|
-
|
81
129
|
Style/SingleLineBlockParams:
|
82
130
|
Enabled: false
|
83
131
|
|
84
|
-
#
|
132
|
+
# Allow all ways to construct strings for now
|
133
|
+
Style/StringConcatenation:
|
134
|
+
Enabled: false
|
135
|
+
|
136
|
+
# Do not commit to use of interpolation
|
137
|
+
Style/StringLiterals:
|
138
|
+
EnforcedStyle: double_quotes
|
139
|
+
|
140
|
+
# Prefer symbols to look like symbols
|
85
141
|
Style/SymbolArray:
|
86
142
|
EnforcedStyle: brackets
|
87
143
|
|
88
|
-
# Accessors are only trivial if they match the ivar name
|
144
|
+
# Accessors are only trivial if they match the ivar name
|
89
145
|
Style/TrivialAccessors:
|
90
146
|
ExactNameMatch: true
|
91
147
|
|
@@ -96,9 +152,3 @@ Style/TrailingCommaInArrayLiteral:
|
|
96
152
|
# Alexandria uses regular arrays
|
97
153
|
Style/WordArray:
|
98
154
|
Enabled: false
|
99
|
-
|
100
|
-
# Not all objects that handle #length also handle #empty?
|
101
|
-
Style/ZeroLengthPredicate:
|
102
|
-
Enabled: false
|
103
|
-
|
104
|
-
inherit_from: .rubocop_todo.yml
|
data/.rubocop_todo.yml
CHANGED
@@ -1,170 +1,100 @@
|
|
1
1
|
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
#
|
2
|
+
# `rubocop --auto-gen-config --no-offense-counts --no-auto-gen-timestamp`
|
3
|
+
# using RuboCop version 0.93.1.
|
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
|
-
#
|
10
|
-
# Cop supports --auto-correct.
|
11
|
-
# Configuration parameters: EnforcedStyle.
|
12
|
-
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
|
13
|
-
Layout/IndentHeredoc:
|
14
|
-
Exclude:
|
15
|
-
- 'Rakefile'
|
16
|
-
- 'bin/alexandria'
|
17
|
-
- 'lib/alexandria/export_library.rb'
|
18
|
-
- 'lib/alexandria/ui/dialogs/about_dialog.rb'
|
19
|
-
|
20
|
-
# Offense count: 6
|
21
|
-
Lint/HandleExceptions:
|
22
|
-
Exclude:
|
23
|
-
- 'lib/alexandria/import_library_csv.rb'
|
24
|
-
- 'lib/alexandria/models/library.rb'
|
25
|
-
- 'lib/alexandria/ui/dialogs/book_properties_dialog.rb'
|
26
|
-
- 'lib/alexandria/ui/dialogs/import_dialog.rb'
|
27
|
-
|
28
|
-
# Offense count: 2
|
29
|
-
Lint/IneffectiveAccessModifier:
|
30
|
-
Exclude:
|
31
|
-
- 'lib/alexandria/logging.rb'
|
32
|
-
- 'lib/alexandria/web_themes.rb'
|
33
|
-
|
34
|
-
# Offense count: 1
|
35
|
-
Lint/UnreachableCode:
|
36
|
-
Exclude:
|
37
|
-
- 'lib/alexandria/ui/dialogs/export_dialog.rb'
|
38
|
-
|
39
|
-
# Offense count: 1
|
40
|
-
Lint/UriEscapeUnescape:
|
41
|
-
Exclude:
|
42
|
-
- 'lib/alexandria/book_providers/amazon_ecs_util.rb'
|
43
|
-
|
44
|
-
# Offense count: 2
|
45
|
-
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
46
|
-
Lint/UselessAccessModifier:
|
47
|
-
Exclude:
|
48
|
-
- 'lib/alexandria/logging.rb'
|
49
|
-
|
50
|
-
# Offense count: 2
|
51
|
-
Lint/UselessAssignment:
|
52
|
-
Exclude:
|
53
|
-
- 'lib/alexandria/models/library.rb'
|
54
|
-
- 'lib/alexandria/smart_library.rb'
|
55
|
-
|
56
|
-
# Offense count: 165
|
9
|
+
# Configuration parameters: IgnoredMethods.
|
57
10
|
Metrics/AbcSize:
|
58
|
-
Max:
|
11
|
+
Max: 111
|
59
12
|
|
60
|
-
#
|
61
|
-
#
|
13
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
14
|
+
# ExcludedMethods: refine
|
62
15
|
Metrics/BlockLength:
|
63
|
-
Max:
|
16
|
+
Max: 64
|
64
17
|
|
65
|
-
# Offense count: 13
|
66
18
|
# Configuration parameters: CountBlocks.
|
67
19
|
Metrics/BlockNesting:
|
68
20
|
Max: 5
|
69
21
|
|
70
|
-
#
|
71
|
-
# Configuration parameters: CountComments.
|
22
|
+
# Configuration parameters: CountComments, CountAsOne.
|
72
23
|
Metrics/ClassLength:
|
73
|
-
Max:
|
24
|
+
Max: 990
|
74
25
|
|
75
|
-
#
|
26
|
+
# Configuration parameters: IgnoredMethods.
|
76
27
|
Metrics/CyclomaticComplexity:
|
77
|
-
Max:
|
28
|
+
Max: 27
|
78
29
|
|
79
|
-
#
|
80
|
-
# Configuration parameters: CountComments.
|
30
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
81
31
|
Metrics/MethodLength:
|
82
|
-
Max:
|
32
|
+
Max: 98
|
83
33
|
|
84
|
-
#
|
85
|
-
# Configuration parameters: CountComments.
|
34
|
+
# Configuration parameters: CountComments, CountAsOne.
|
86
35
|
Metrics/ModuleLength:
|
87
|
-
Max:
|
36
|
+
Max: 361
|
88
37
|
|
89
|
-
# Offense count: 10
|
90
38
|
# Configuration parameters: CountKeywordArgs.
|
91
39
|
Metrics/ParameterLists:
|
92
40
|
Max: 7
|
93
41
|
|
94
|
-
#
|
42
|
+
# Configuration parameters: IgnoredMethods.
|
95
43
|
Metrics/PerceivedComplexity:
|
96
|
-
Max:
|
44
|
+
Max: 27
|
97
45
|
|
98
|
-
# Offense count: 8
|
99
46
|
Naming/BinaryOperatorParameterName:
|
100
47
|
Exclude:
|
101
|
-
- 'lib/alexandria/book_providers.rb'
|
102
48
|
- 'lib/alexandria/book_providers/amazon_ecs_util.rb'
|
103
|
-
- 'lib/alexandria/models/book.rb'
|
104
|
-
- 'lib/alexandria/models/library.rb'
|
105
|
-
- 'lib/alexandria/smart_library.rb'
|
106
|
-
- 'lib/alexandria/ui/multi_drag_treeview.rb'
|
107
49
|
|
108
|
-
#
|
109
|
-
#
|
110
|
-
# Blacklist: END, (?-mix:EO[A-Z]{1})
|
50
|
+
# Configuration parameters: ForbiddenDelimiters.
|
51
|
+
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
111
52
|
Naming/HeredocDelimiterNaming:
|
112
53
|
Exclude:
|
113
54
|
- 'Rakefile'
|
114
55
|
- 'bin/alexandria'
|
115
56
|
- 'lib/alexandria/export_library.rb'
|
116
|
-
- 'lib/alexandria/ui/
|
117
|
-
|
118
|
-
# Offense count: 2
|
119
|
-
Naming/MemoizedInstanceVariableName:
|
120
|
-
Exclude:
|
121
|
-
- 'lib/alexandria/logging.rb'
|
57
|
+
- 'lib/alexandria/ui/about_dialog.rb'
|
122
58
|
|
123
|
-
#
|
124
|
-
# Configuration parameters: EnforcedStyle.
|
125
|
-
# SupportedStyles: snake_case, camelCase
|
126
|
-
Naming/MethodName:
|
127
|
-
Exclude:
|
128
|
-
- 'lib/alexandria/book_providers/mcu.rb'
|
129
|
-
|
130
|
-
# Offense count: 4
|
131
|
-
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
|
59
|
+
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
|
132
60
|
# NamePrefix: is_, has_, have_
|
133
|
-
#
|
134
|
-
#
|
61
|
+
# ForbiddenPrefixes: is_, has_, have_
|
62
|
+
# AllowedMethods: is_a?
|
135
63
|
# MethodDefinitionMacros: define_method, define_singleton_method
|
136
64
|
Naming/PredicateName:
|
137
65
|
Exclude:
|
138
66
|
- 'spec/**/*'
|
139
67
|
- 'lib/alexandria/book_providers/amazon_ecs_util.rb'
|
140
|
-
- 'lib/alexandria/ui/
|
68
|
+
- 'lib/alexandria/ui/smart_library_properties_dialog_base.rb'
|
141
69
|
- 'lib/alexandria/web_themes.rb'
|
142
70
|
|
143
|
-
#
|
144
|
-
|
145
|
-
# AllowedNames: io, id
|
146
|
-
Naming/UncommunicativeMethodParamName:
|
71
|
+
# Configuration parameters: CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
72
|
+
RSpec/FilePath:
|
147
73
|
Exclude:
|
148
|
-
- '
|
149
|
-
- '
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
- 'lib/alexandria/ui/init.rb'
|
154
|
-
- 'util/rake/fileinstall.rb'
|
74
|
+
- 'spec/alexandria/ui/iconview_spec.rb'
|
75
|
+
- 'spec/alexandria/ui/sound_spec.rb'
|
76
|
+
|
77
|
+
RSpec/MultipleExpectations:
|
78
|
+
Max: 7
|
155
79
|
|
156
|
-
# Offense count: 8
|
157
80
|
# Cop supports --auto-correct.
|
158
|
-
# Configuration parameters:
|
81
|
+
# Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
|
82
|
+
# SupportedStyles: inflected, explicit
|
83
|
+
RSpec/PredicateMatcher:
|
84
|
+
Exclude:
|
85
|
+
- 'spec/alexandria/export_library_spec.rb'
|
86
|
+
- 'spec/alexandria/library_spec.rb'
|
87
|
+
- 'spec/alexandria/library_store_spec.rb'
|
88
|
+
- 'spec/alexandria/scanners/cue_cat_spec.rb'
|
89
|
+
|
90
|
+
# Cop supports --auto-correct.
|
91
|
+
# Configuration parameters: EnforcedStyle.
|
159
92
|
# SupportedStyles: nested, compact
|
160
93
|
Style/ClassAndModuleChildren:
|
161
94
|
Exclude:
|
162
|
-
- 'lib/alexandria/ui/dialogs/import_dialog.rb'
|
163
|
-
- 'lib/alexandria/ui/dialogs/preferences_dialog.rb'
|
164
|
-
- 'lib/alexandria/ui/icons.rb'
|
165
95
|
- 'lib/alexandria/ui/init.rb'
|
96
|
+
- 'lib/alexandria/ui/provider_preferences_base_dialog.rb'
|
166
97
|
|
167
|
-
# Offense count: 17
|
168
98
|
Style/ClassVars:
|
169
99
|
Exclude:
|
170
100
|
- 'lib/alexandria/book_providers/amazon_ecs_util.rb'
|
@@ -172,94 +102,35 @@ Style/ClassVars:
|
|
172
102
|
- 'lib/alexandria/logging.rb'
|
173
103
|
- 'lib/alexandria/models/library.rb'
|
174
104
|
- 'lib/alexandria/smart_library.rb'
|
175
|
-
- 'lib/alexandria/ui/
|
176
|
-
- 'lib/alexandria/ui/
|
177
|
-
- 'lib/alexandria/ui/
|
178
|
-
|
179
|
-
# Offense count: 12
|
180
|
-
Style/CommentedKeyword:
|
181
|
-
Exclude:
|
182
|
-
- 'lib/alexandria/book_providers.rb'
|
183
|
-
- 'lib/alexandria/book_providers/barnes_and_noble.rb'
|
184
|
-
- 'lib/alexandria/book_providers/worldcat.rb'
|
185
|
-
- 'lib/alexandria/ui/dialogs/book_properties_dialog_base.rb'
|
186
|
-
- 'lib/alexandria/ui/dialogs/new_book_dialog.rb'
|
187
|
-
- 'util/rake/fileinstall.rb'
|
105
|
+
- 'lib/alexandria/ui/acquire_dialog.rb'
|
106
|
+
- 'lib/alexandria/ui/book_properties_dialog_base.rb'
|
107
|
+
- 'lib/alexandria/ui/new_book_dialog.rb'
|
188
108
|
|
189
|
-
# Offense count: 118
|
190
109
|
Style/Documentation:
|
191
110
|
Enabled: false
|
192
111
|
|
193
|
-
# Offense count: 6
|
194
112
|
# Configuration parameters: EnforcedStyle.
|
195
|
-
# SupportedStyles:
|
196
|
-
Style/
|
197
|
-
Exclude:
|
198
|
-
- 'lib/alexandria/book_providers/amazon_ecs_util.rb'
|
199
|
-
- 'lib/alexandria/book_providers/douban.rb'
|
200
|
-
- 'lib/alexandria/book_providers/renaud.rb'
|
201
|
-
- 'spec/alexandria/library_spec.rb'
|
202
|
-
|
203
|
-
# Offense count: 34
|
204
|
-
# Configuration parameters: MinBodyLength.
|
205
|
-
Style/GuardClause:
|
206
|
-
Enabled: false
|
207
|
-
|
208
|
-
# Offense count: 4
|
209
|
-
Style/IdenticalConditionalBranches:
|
210
|
-
Exclude:
|
211
|
-
- 'lib/alexandria/book_providers/amazon_aws.rb'
|
212
|
-
- 'lib/alexandria/ui/ui_manager.rb'
|
213
|
-
|
214
|
-
# Offense count: 4
|
215
|
-
Style/IfInsideElse:
|
216
|
-
Exclude:
|
217
|
-
- 'lib/alexandria/book_providers/proxis.rb'
|
218
|
-
- 'lib/alexandria/book_providers/web.rb'
|
219
|
-
- 'lib/alexandria/preferences.rb'
|
220
|
-
- 'lib/alexandria/ui/ui_manager.rb'
|
221
|
-
|
222
|
-
# Offense count: 2
|
223
|
-
Style/MethodMissing:
|
224
|
-
Exclude:
|
225
|
-
- 'lib/alexandria/book_providers.rb'
|
226
|
-
- 'lib/alexandria/preferences.rb'
|
227
|
-
|
228
|
-
# Offense count: 1
|
229
|
-
Style/MultilineTernaryOperator:
|
113
|
+
# SupportedStyles: annotated, template, unannotated
|
114
|
+
Style/FormatStringToken:
|
230
115
|
Exclude:
|
116
|
+
- 'lib/alexandria/ui/acquire_dialog.rb'
|
117
|
+
- 'lib/alexandria/ui/dndable.rb'
|
231
118
|
- 'lib/alexandria/ui/listview.rb'
|
119
|
+
- 'lib/alexandria/ui/new_book_dialog.rb'
|
232
120
|
|
233
|
-
#
|
234
|
-
#
|
235
|
-
|
236
|
-
# SupportedStyles: slashes, percent_r, mixed
|
237
|
-
Style/RegexpLiteral:
|
121
|
+
# Configuration parameters: AllowedMethods.
|
122
|
+
# AllowedMethods: respond_to_missing?
|
123
|
+
Style/OptionalBooleanParameter:
|
238
124
|
Exclude:
|
239
|
-
- 'lib/alexandria/book_providers
|
240
|
-
- 'lib/alexandria/book_providers/
|
241
|
-
- 'lib/alexandria/book_providers/douban.rb'
|
242
|
-
- 'lib/alexandria/book_providers/mcu.rb'
|
243
|
-
- 'lib/alexandria/book_providers/proxis.rb'
|
244
|
-
- 'lib/alexandria/book_providers/pseudomarc.rb'
|
245
|
-
- 'lib/alexandria/book_providers/renaud.rb'
|
125
|
+
- 'lib/alexandria/book_providers.rb'
|
126
|
+
- 'lib/alexandria/book_providers/barnes_and_noble.rb'
|
246
127
|
- 'lib/alexandria/book_providers/siciliano.rb'
|
247
128
|
- 'lib/alexandria/book_providers/thalia.rb'
|
129
|
+
- 'lib/alexandria/book_providers/worldcat.rb'
|
130
|
+
- 'lib/alexandria/console.rb'
|
131
|
+
- 'lib/alexandria/execution_queue.rb'
|
132
|
+
- 'lib/alexandria/export_format.rb'
|
133
|
+
- 'lib/alexandria/library_sort_order.rb'
|
248
134
|
- 'lib/alexandria/models/library.rb'
|
249
|
-
- 'lib/alexandria/ui/
|
250
|
-
- 'lib/alexandria/ui/sidepane.rb'
|
135
|
+
- 'lib/alexandria/ui/ui_manager.rb'
|
251
136
|
- 'util/rake/fileinstall.rb'
|
252
|
-
- 'util/rake/gettextgenerate.rb'
|
253
|
-
|
254
|
-
# Offense count: 78
|
255
|
-
# Cop supports --auto-correct.
|
256
|
-
# Configuration parameters: EnforcedStyle.
|
257
|
-
# SupportedStyles: implicit, explicit
|
258
|
-
Style/RescueStandardError:
|
259
|
-
Enabled: false
|
260
|
-
|
261
|
-
# Offense count: 3
|
262
|
-
Style/StructInheritance:
|
263
|
-
Exclude:
|
264
|
-
- 'lib/alexandria/smart_library.rb'
|
265
|
-
- 'lib/alexandria/ui/multi_drag_treeview.rb'
|