alexandria-book-collection-manager 0.6.9.pre1 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +10 -4
- data/.rubocop_todo.yml +21 -79
- data/CHANGELOG.md +9 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/alexandria-book-collection-manager.gemspec +26 -4
- data/bin/alexandria +1 -1
- data/doc/AUTHORS +2 -1
- data/lib/alexandria.rb +1 -1
- data/lib/alexandria/about.rb +6 -6
- data/lib/alexandria/book_providers.rb +1 -1
- data/lib/alexandria/book_providers/adlibris.rb +4 -4
- data/lib/alexandria/book_providers/barnes_and_noble.rb +9 -5
- data/lib/alexandria/book_providers/bol_it.rb +0 -2
- data/lib/alexandria/book_providers/ibs_it.rb +0 -2
- data/lib/alexandria/book_providers/mcu.rb +3 -5
- data/lib/alexandria/book_providers/proxis.rb +1 -5
- data/lib/alexandria/book_providers/renaud.rb +0 -2
- data/lib/alexandria/book_providers/thalia.rb +10 -8
- data/lib/alexandria/book_providers/webster_it.rb +0 -2
- data/lib/alexandria/book_providers/worldcat.rb +8 -4
- data/lib/alexandria/book_providers/z3950.rb +2 -8
- data/lib/alexandria/execution_queue.rb +1 -3
- data/lib/alexandria/export_library.rb +2 -7
- data/lib/alexandria/import_library.rb +1 -6
- data/lib/alexandria/logging.rb +1 -1
- data/lib/alexandria/models/book.rb +2 -2
- data/lib/alexandria/models/library.rb +5 -7
- data/lib/alexandria/preferences.rb +1 -1
- data/lib/alexandria/scanners.rb +4 -3
- data/lib/alexandria/scanners/cuecat.rb +1 -1
- data/lib/alexandria/smart_library.rb +4 -3
- data/lib/alexandria/ui/callbacks.rb +2 -2
- data/lib/alexandria/ui/completion_models.rb +22 -19
- data/lib/alexandria/ui/dialogs/acquire_dialog.rb +2 -4
- data/lib/alexandria/ui/dialogs/barcode_animation.rb +1 -1
- data/lib/alexandria/ui/dialogs/book_properties_dialog.rb +1 -3
- data/lib/alexandria/ui/dialogs/book_properties_dialog_base.rb +0 -4
- data/lib/alexandria/ui/dialogs/export_dialog.rb +1 -3
- data/lib/alexandria/ui/dialogs/import_dialog.rb +4 -4
- data/lib/alexandria/ui/dialogs/new_book_dialog.rb +8 -11
- data/lib/alexandria/ui/dialogs/new_book_dialog_manual.rb +4 -5
- data/lib/alexandria/ui/dialogs/new_smart_library_dialog.rb +15 -9
- data/lib/alexandria/ui/dialogs/preferences_dialog.rb +20 -23
- data/lib/alexandria/ui/dialogs/smart_library_properties_dialog_base.rb +10 -14
- data/lib/alexandria/ui/dndable.rb +0 -1
- data/lib/alexandria/ui/gtk_thread_help.rb +2 -1
- data/lib/alexandria/ui/icons.rb +3 -3
- data/lib/alexandria/ui/iconview_tooltips.rb +9 -5
- data/lib/alexandria/ui/init.rb +6 -6
- data/lib/alexandria/ui/listview.rb +4 -4
- data/lib/alexandria/ui/main_app.rb +1 -1
- data/lib/alexandria/ui/multi_drag_treeview.rb +3 -5
- data/lib/alexandria/ui/sidepane.rb +26 -10
- data/lib/alexandria/ui/ui_manager.rb +5 -9
- data/lib/alexandria/undo_manager.rb +0 -2
- data/lib/alexandria/version.rb +3 -3
- data/lib/alexandria/web_themes.rb +1 -3
- data/{test/providers_test.rb → spec/alexandria/book_providers_spec.rb} +17 -15
- data/{test/book_test.rb → spec/alexandria/book_spec.rb} +4 -4
- data/spec/alexandria/library_spec.rb +189 -141
- data/spec/alexandria/scanners/cuecat_spec.rb +0 -2
- data/spec/alexandria/ui/main_app_spec.rb +13 -8
- data/spec/alexandria/ui/sidepane_spec.rb +1 -1
- data/spec/alexandria/ui/ui_utilities_spec.rb +1 -1
- data/{test → spec}/data/isbns.txt +0 -0
- data/tasks/spec.rake +2 -0
- data/util/rake/fileinstall.rb +1 -1
- metadata +32 -16
- data/tasks/test.rake +0 -38
- data/test/application_test.rb +0 -39
- data/test/isbn_test.rb +0 -68
- data/test/test_helper.rb +0 -42
@@ -21,7 +21,7 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
21
21
|
describe Alexandria::UI::SidePaneManager do
|
22
22
|
it 'should work' do
|
23
23
|
library_listview = double(Gtk::TreeView).as_null_object
|
24
|
-
parent = double(Object, main_app: nil)
|
24
|
+
parent = double(Object, main_app: nil, append_library: nil)
|
25
25
|
Alexandria::UI::SidePaneManager.new library_listview, parent
|
26
26
|
end
|
27
27
|
end
|
File without changes
|
data/tasks/spec.rake
CHANGED
data/util/rake/fileinstall.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,34 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alexandria-book-collection-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.9
|
4
|
+
version: 0.6.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
+
- Alexander McCormmach
|
8
|
+
- Aymeric Nys
|
9
|
+
- Cathal Mc Ginley
|
10
|
+
- Claudio Belotti
|
11
|
+
- Constantine Evans
|
12
|
+
- Dafydd Harries
|
13
|
+
- Javier Fernandez-Sanguino Pena
|
14
|
+
- Joseph Method
|
15
|
+
- Kevin Schultz
|
16
|
+
- Laurent Sansonetti
|
17
|
+
- Marco Costantini
|
18
|
+
- Mathieu Leduc-Hamel
|
7
19
|
- Matijs van Zuijlen
|
20
|
+
- Owain Evans
|
21
|
+
- Pascal Terjan
|
22
|
+
- Rene Samselnig
|
23
|
+
- Robby Stephenson
|
24
|
+
- Sun Ning
|
25
|
+
- Takayuki Kusano
|
26
|
+
- Timothy Malone
|
27
|
+
- Zachary P. Landau
|
8
28
|
autorequire:
|
9
29
|
bindir: bin
|
10
30
|
cert_chain: []
|
11
|
-
date: 2015-
|
31
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
32
|
dependencies:
|
13
33
|
- !ruby/object:Gem::Dependency
|
14
34
|
name: gettext
|
@@ -58,28 +78,28 @@ dependencies:
|
|
58
78
|
requirements:
|
59
79
|
- - "~>"
|
60
80
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
81
|
+
version: '3.0'
|
62
82
|
type: :runtime
|
63
83
|
prerelease: false
|
64
84
|
version_requirements: !ruby/object:Gem::Requirement
|
65
85
|
requirements:
|
66
86
|
- - "~>"
|
67
87
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
88
|
+
version: '3.0'
|
69
89
|
- !ruby/object:Gem::Dependency
|
70
90
|
name: gstreamer
|
71
91
|
requirement: !ruby/object:Gem::Requirement
|
72
92
|
requirements:
|
73
93
|
- - "~>"
|
74
94
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
95
|
+
version: '3.0'
|
76
96
|
type: :runtime
|
77
97
|
prerelease: false
|
78
98
|
version_requirements: !ruby/object:Gem::Requirement
|
79
99
|
requirements:
|
80
100
|
- - "~>"
|
81
101
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
102
|
+
version: '3.0'
|
83
103
|
- !ruby/object:Gem::Dependency
|
84
104
|
name: minitest
|
85
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -380,6 +400,8 @@ files:
|
|
380
400
|
- share/sounds/alexandria/good_scan.wav
|
381
401
|
- share/sounds/alexandria/scanning.ogg
|
382
402
|
- share/sounds/alexandria/scanning.wav
|
403
|
+
- spec/alexandria/book_providers_spec.rb
|
404
|
+
- spec/alexandria/book_spec.rb
|
383
405
|
- spec/alexandria/library_spec.rb
|
384
406
|
- spec/alexandria/preferences_spec.rb
|
385
407
|
- spec/alexandria/scanners/cuecat_spec.rb
|
@@ -392,6 +414,7 @@ files:
|
|
392
414
|
- spec/alexandria/ui/ui_manager_spec.rb
|
393
415
|
- spec/alexandria/ui/ui_utilities_spec.rb
|
394
416
|
- spec/alexandria/utilities_spec.rb
|
417
|
+
- spec/data/isbns.txt
|
395
418
|
- spec/data/libraries/0.6.1-noisbn/My Library/0201398257.yaml
|
396
419
|
- spec/data/libraries/0.6.1-noisbn/My Library/1565920007.yaml
|
397
420
|
- spec/data/libraries/0.6.1/My Library/0192812173.yaml
|
@@ -412,13 +435,6 @@ files:
|
|
412
435
|
- tasks/rdoc.rake
|
413
436
|
- tasks/setup.rb
|
414
437
|
- tasks/spec.rake
|
415
|
-
- tasks/test.rake
|
416
|
-
- test/application_test.rb
|
417
|
-
- test/book_test.rb
|
418
|
-
- test/data/isbns.txt
|
419
|
-
- test/isbn_test.rb
|
420
|
-
- test/providers_test.rb
|
421
|
-
- test/test_helper.rb
|
422
438
|
- util/rake/fileinstall.rb
|
423
439
|
- util/rake/gettextgenerate.rb
|
424
440
|
- util/rake/omfgenerate.rb
|
@@ -439,12 +455,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
439
455
|
version: 1.9.3
|
440
456
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
441
457
|
requirements:
|
442
|
-
- - "
|
458
|
+
- - ">="
|
443
459
|
- !ruby/object:Gem::Version
|
444
|
-
version:
|
460
|
+
version: '0'
|
445
461
|
requirements: []
|
446
462
|
rubyforge_project:
|
447
|
-
rubygems_version: 2.4.5
|
463
|
+
rubygems_version: 2.4.5.1
|
448
464
|
signing_key:
|
449
465
|
specification_version: 4
|
450
466
|
summary: GNOME application for managing collections of books
|
data/tasks/test.rake
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# -*- ruby -*-
|
2
|
-
#--
|
3
|
-
# Copyright (C) 2011 Matijs van Zuijlen
|
4
|
-
#
|
5
|
-
# This file is part of the Alexandria build system.
|
6
|
-
#
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
8
|
-
# a copy of this software and associated documentation files (the
|
9
|
-
# "Software"), to deal in the Software without restriction, including
|
10
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
11
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
12
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
13
|
-
# the following conditions:
|
14
|
-
#
|
15
|
-
# The above copyright notice and this permission notice shall be
|
16
|
-
# included in all copies or substantial portions of the Software.
|
17
|
-
#
|
18
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
19
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
20
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
21
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
22
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
23
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
24
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
25
|
-
#++
|
26
|
-
|
27
|
-
require 'rake/testtask'
|
28
|
-
|
29
|
-
namespace :test do
|
30
|
-
Rake::TestTask.new(:run) do |t|
|
31
|
-
t.libs = ['lib']
|
32
|
-
t.test_files = FileList['test/*_test.rb']
|
33
|
-
t.ruby_opts += ['-w']
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
desc 'Alias for test:run'
|
38
|
-
task :test => 'test:run'
|
data/test/application_test.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2005-2006 Laurent Sansonetti
|
3
|
-
# Copyright (C) 2011, 2014 Matijs van Zuijlen
|
4
|
-
#
|
5
|
-
# This file is part of Alexandria, a GNOME book collection manager.
|
6
|
-
#
|
7
|
-
# Alexandria is free software; you can redistribute it and/or
|
8
|
-
# modify it under the terms of the GNU General Public License as
|
9
|
-
# published by the Free Software Foundation; either version 2 of the
|
10
|
-
# License, or (at your option) any later version.
|
11
|
-
#
|
12
|
-
# Alexandria is distributed in the hope that it will be useful,
|
13
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
15
|
-
# General Public License for more details.
|
16
|
-
#
|
17
|
-
# You should have received a copy of the GNU General Public
|
18
|
-
# License along with Alexandria; see the file COPYING. If not,
|
19
|
-
# write to the Free Software Foundation, Inc., 51 Franklin Street,
|
20
|
-
# Fifth Floor, Boston, MA 02110-1301 USA.
|
21
|
-
|
22
|
-
require File.expand_path('test_helper.rb', File.dirname(__FILE__))
|
23
|
-
|
24
|
-
ENV['http_proxy'] = nil if !ENV['http_proxy'].nil? \
|
25
|
-
and URI.parse(ENV['http_proxy']).userinfo.nil?
|
26
|
-
|
27
|
-
class TestAlexandriaApplication < MiniTest::Test
|
28
|
-
def test_application_runs
|
29
|
-
Alexandria::UI::Icons.init
|
30
|
-
@main_app = Alexandria::UI::MainApp.instance
|
31
|
-
|
32
|
-
Gtk.timeout_add(100) do
|
33
|
-
@main_app.main_app.destroy
|
34
|
-
Gtk.main_quit
|
35
|
-
end
|
36
|
-
|
37
|
-
Gtk.main
|
38
|
-
end
|
39
|
-
end
|
data/test/isbn_test.rb
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
# Copyright (C) 2004-2006 Dafydd Harries
|
3
|
-
# Copyright (C) 2011, 2014 Matijs van Zuijlen
|
4
|
-
#
|
5
|
-
# This file is part of Alexandria, a GNOME book collection manager.
|
6
|
-
#
|
7
|
-
# Alexandria is free software; you can redistribute it and/or
|
8
|
-
# modify it under the terms of the GNU General Public License as
|
9
|
-
# published by the Free Software Foundation; either version 2 of the
|
10
|
-
# License, or (at your option) any later version.
|
11
|
-
#
|
12
|
-
# Alexandria is distributed in the hope that it will be useful,
|
13
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
15
|
-
# General Public License for more details.
|
16
|
-
#
|
17
|
-
# You should have received a copy of the GNU General Public
|
18
|
-
# License along with Alexandria; see the file COPYING. If not,
|
19
|
-
# write to the Free Software Foundation, Inc., 51 Franklin Street,
|
20
|
-
# Fifth Floor, Boston, MA 02110-1301 USA.
|
21
|
-
|
22
|
-
require File.expand_path('test_helper.rb', File.dirname(__FILE__))
|
23
|
-
|
24
|
-
require 'alexandria/import_library'
|
25
|
-
|
26
|
-
class TestISBN < MiniTest::Test
|
27
|
-
def __test_fake_import_isbns
|
28
|
-
libraries = Alexandria::Libraries.instance
|
29
|
-
library = Alexandria::Library.new('Test Library')
|
30
|
-
libraries.add_library(library)
|
31
|
-
[library, libraries]
|
32
|
-
end
|
33
|
-
|
34
|
-
def test_valid_ISBN
|
35
|
-
for x in ['014143984X', '0-345-43192-8']
|
36
|
-
assert Alexandria::Library.valid_isbn?(x)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def test_valid_EAN
|
41
|
-
assert Alexandria::Library.valid_ean?('9780345431929')
|
42
|
-
|
43
|
-
# Regression test: this EAN has a checksum of 10, which should be
|
44
|
-
# treated like a checksum of 0.
|
45
|
-
assert Alexandria::Library.valid_ean?('9784047041790')
|
46
|
-
end
|
47
|
-
|
48
|
-
def test_canonical_ISBN
|
49
|
-
assert_equal '014143984X',
|
50
|
-
Alexandria::Library.canonicalise_isbn('014143984X')
|
51
|
-
assert_equal '0345431928',
|
52
|
-
Alexandria::Library.canonicalise_isbn('0-345-43192-8')
|
53
|
-
assert_equal '3522105907',
|
54
|
-
Alexandria::Library.canonicalise_isbn('3522105907')
|
55
|
-
# EAN number
|
56
|
-
assert_equal '0345431928',
|
57
|
-
Alexandria::Library.canonicalise_isbn('9780345431929')
|
58
|
-
end
|
59
|
-
|
60
|
-
# Doesn't work quite yet.
|
61
|
-
# def test_ISBN_import_bad_number
|
62
|
-
# on_iterate_cb = proc { }
|
63
|
-
# on_error_cb = proc { }
|
64
|
-
# library, libraries = __test_fake_import_isbns
|
65
|
-
# test_file = "data/isbns.txt"
|
66
|
-
# library.import_as_isbn_list("Test Library", test_file, on_iterate_cb, on_error_cb)
|
67
|
-
# end
|
68
|
-
end
|
data/test/test_helper.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2011, 2014 Matijs van Zuijlen
|
3
|
-
# Incorporates code Copyright (C) 2007 Joseph Method
|
4
|
-
#
|
5
|
-
# This file is part of Alexandria, a GNOME book collection manager.
|
6
|
-
#
|
7
|
-
# Alexandria is free software; you can redistribute it and/or
|
8
|
-
# modify it under the terms of the GNU General Public License as
|
9
|
-
# published by the Free Software Foundation; either version 2 of the
|
10
|
-
# License, or (at your option) any later version.
|
11
|
-
#
|
12
|
-
# Alexandria is distributed in the hope that it will be useful,
|
13
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
15
|
-
# General Public License for more details.
|
16
|
-
#
|
17
|
-
# You should have received a copy of the GNU General Public
|
18
|
-
# License along with Alexandria; see the file COPYING. If not,
|
19
|
-
# write to the Free Software Foundation, Inc., 51 Franklin Street,
|
20
|
-
# Fifth Floor, Boston, MA 02110-1301 USA.
|
21
|
-
|
22
|
-
require 'minitest/autorun'
|
23
|
-
|
24
|
-
require 'gettext'
|
25
|
-
require 'alexandria'
|
26
|
-
|
27
|
-
LIBDIR = File.expand_path(File.join(File.dirname(__FILE__), '/data/libraries'))
|
28
|
-
TESTDIR = File.join(LIBDIR, 'test')
|
29
|
-
|
30
|
-
def an_artist_of_the_floating_world
|
31
|
-
Alexandria::Book.new('An Artist of the Floating World',
|
32
|
-
'Kazuo Ishiguro',
|
33
|
-
'9780571147168',
|
34
|
-
'Faber and Faber', 1999,
|
35
|
-
'Paperback')
|
36
|
-
end
|
37
|
-
|
38
|
-
module Alexandria
|
39
|
-
class Library
|
40
|
-
DIR.replace TESTDIR
|
41
|
-
end
|
42
|
-
end
|