enju_biblio 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/picture_files_controller.rb +1 -1
- data/app/models/item.rb +1 -1
- data/app/models/manifestation.rb +22 -2
- data/app/models/resource_import_file.rb +4 -4
- data/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +5 -0
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/cassette_library/ImportRequest/import/should_import_bibliographic_record.yml +38 -655
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/should_import_without_errors.yml +43 -191
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_isbn_which_is_already_imported/redirects_to_the_created_import_request.yml +40 -592
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +37 -589
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/redirects_to_the_created_import_request.yml +41 -593
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +39 -591
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/redirects_to_the_created_import_request.yml +39 -591
- data/spec/cassette_library/ResourceImportFile/should_import_in_background.yml +40 -425
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/ISBN_import/with_record_not_found/should_record_an_error_message.yml +39 -75
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_has_only_isbn/should_be_imported.yml +39 -705
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_shift_jis/should_be_imported.yml +39 -424
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_be_imported.yml +37 -422
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_be_searchable_right_after_the_import.yml +41 -426
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_send_message_when_import_is_completed.yml +39 -424
- data/spec/controllers/agent_merge_lists_controller_spec.rb +9 -9
- data/spec/controllers/agent_merges_controller_spec.rb +13 -13
- data/spec/controllers/agent_relationship_types_controller_spec.rb +12 -12
- data/spec/controllers/agent_relationships_controller_spec.rb +12 -12
- data/spec/controllers/agent_types_controller_spec.rb +1 -1
- data/spec/controllers/agents_controller_spec.rb +6 -6
- data/spec/controllers/carrier_types_controller_spec.rb +1 -1
- data/spec/controllers/content_types_controller_spec.rb +3 -3
- data/spec/controllers/countries_controller_spec.rb +9 -9
- data/spec/controllers/create_types_controller_spec.rb +1 -1
- data/spec/controllers/creates_controller_spec.rb +11 -11
- data/spec/controllers/donates_controller_spec.rb +11 -11
- data/spec/controllers/form_of_works_controller_spec.rb +1 -1
- data/spec/controllers/frequencies_controller_spec.rb +3 -3
- data/spec/controllers/identifier_types_controller_spec.rb +1 -1
- data/spec/controllers/import_requests_controller_spec.rb +5 -5
- data/spec/controllers/items_controller_spec.rb +15 -15
- data/spec/controllers/languages_controller_spec.rb +6 -6
- data/spec/controllers/licenses_controller_spec.rb +1 -1
- data/spec/controllers/manifestation_relationship_types_controller_spec.rb +12 -12
- data/spec/controllers/manifestation_relationships_controller_spec.rb +12 -12
- data/spec/controllers/manifestations_controller_spec.rb +29 -29
- data/spec/controllers/medium_of_performances_controller_spec.rb +1 -1
- data/spec/controllers/owns_controller_spec.rb +12 -12
- data/spec/controllers/produce_types_controller_spec.rb +1 -1
- data/spec/controllers/produces_controller_spec.rb +10 -10
- data/spec/controllers/realize_types_controller_spec.rb +1 -1
- data/spec/controllers/realizes_controller_spec.rb +11 -11
- data/spec/controllers/series_statement_merge_lists_controller_spec.rb +12 -12
- data/spec/controllers/series_statement_merges_controller_spec.rb +12 -12
- data/spec/controllers/series_statements_controller_spec.rb +11 -11
- data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +5 -0
- data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +5 -0
- data/spec/dummy/db/schema.rb +7 -3
- data/spec/factories/agent.rb +2 -2
- data/spec/factories/agent_merge.rb +3 -3
- data/spec/factories/agent_merge_list.rb +1 -1
- data/spec/factories/basket.rb +2 -2
- data/spec/factories/carrier_type.rb +1 -1
- data/spec/factories/checkout.rb +1 -1
- data/spec/factories/classification.rb +2 -2
- data/spec/factories/classification_type.rb +1 -1
- data/spec/factories/content_type.rb +1 -1
- data/spec/factories/country.rb +1 -1
- data/spec/factories/create.rb +3 -3
- data/spec/factories/create_types.rb +1 -1
- data/spec/factories/donate.rb +3 -3
- data/spec/factories/form_of_work.rb +1 -1
- data/spec/factories/frequency.rb +1 -1
- data/spec/factories/identifier.rb +2 -2
- data/spec/factories/identifier_type.rb +1 -1
- data/spec/factories/import_request.rb +1 -1
- data/spec/factories/item.rb +2 -2
- data/spec/factories/language.rb +1 -1
- data/spec/factories/library.rb +2 -2
- data/spec/factories/license.rb +1 -1
- data/spec/factories/manifestation.rb +2 -2
- data/spec/factories/manifestation_relationship.rb +3 -3
- data/spec/factories/manifestation_relationship_type.rb +1 -1
- data/spec/factories/medium_of_performance.rb +1 -1
- data/spec/factories/own.rb +3 -3
- data/spec/factories/patron_relationship.rb +3 -3
- data/spec/factories/patron_relationship_type.rb +1 -1
- data/spec/factories/patron_type.rb +1 -1
- data/spec/factories/produce.rb +3 -3
- data/spec/factories/produce_types.rb +1 -1
- data/spec/factories/profile.rb +2 -2
- data/spec/factories/realize.rb +3 -3
- data/spec/factories/realize_types.rb +1 -1
- data/spec/factories/reserve.rb +5 -5
- data/spec/factories/role.rb +1 -1
- data/spec/factories/series_has_manifestation.rb +3 -3
- data/spec/factories/series_statement.rb +2 -2
- data/spec/factories/series_statement_merge.rb +3 -3
- data/spec/factories/series_statement_merge_list.rb +1 -1
- data/spec/factories/series_statement_relationship.rb +3 -3
- data/spec/factories/shelf.rb +2 -2
- data/spec/factories/subject.rb +3 -3
- data/spec/factories/subject_heading_type.rb +1 -1
- data/spec/factories/subject_heading_type_has_subject.rb +3 -3
- data/spec/factories/subject_type.rb +1 -1
- data/spec/factories/user.rb +1 -1
- data/spec/fixtures/items.yml +1 -1
- data/spec/fixtures/library_groups.yml +1 -1
- data/spec/models/agent_spec.rb +4 -4
- data/spec/models/create_type_spec.rb +1 -1
- data/spec/models/item_spec.rb +1 -1
- data/spec/models/manifestation_spec.rb +30 -6
- data/spec/models/produce_type_spec.rb +1 -1
- data/spec/models/realize_type_spec.rb +1 -1
- data/spec/models/resource_export_file_spec.rb +7 -7
- data/spec/models/resource_import_file_spec.rb +19 -0
- data/spec/models/series_statement_spec.rb +1 -1
- data/spec/policies/manifestation_policy_spec.rb +5 -5
- data/spec/rails_helper.rb +3 -3
- data/spec/support/controller_macros.rb +3 -3
- data/spec/views/items/index.html.erb_spec.rb +2 -2
- data/spec/views/manifestations/index.html.erb_spec.rb +1 -1
- data/spec/views/manifestations/index.rdf.builder_spec.rb +1 -1
- data/spec/views/manifestations/index.txt.erb_spec.rb +2 -2
- data/spec/views/manifestations/show.html.erb_spec.rb +5 -5
- data/spec/views/manifestations/show.txt.erb_spec.rb +1 -1
- data/spec/views/series_statement_merges/show.html.erb_spec.rb +1 -1
- metadata +23 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2f12a2708c3326ac6d4ef0bbc4a62a8c0d656c8
|
4
|
+
data.tar.gz: 9d6e7a191c6ce4bab308b751a2183e960b015efe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce432c54b88f2411c4b39edf21dd724f23757fca0b2cb8ebe96aa28fb121a7fb7f06ce47f3b256f663d40da9bae8ce40232c852efa61f2759b03ff77c14fa562
|
7
|
+
data.tar.gz: 2c5750574eb3df90f4bd4a881f69563ea2a633ef996e6d0d96518a401888593cd1d246bf69e41eab19afb6970bfd335cfbf606ab31bd28d46c52f7471c98a833
|
@@ -31,7 +31,7 @@ class PictureFilesController < ApplicationController
|
|
31
31
|
size = 'medium'
|
32
32
|
end
|
33
33
|
|
34
|
-
if @picture_file.picture.
|
34
|
+
if @picture_file.picture.exists?
|
35
35
|
if ENV['ENJU_STORAGE'] == 's3'
|
36
36
|
file = Faraday.get(@picture_file.picture.expiring_url).body.force_encoding('UTF-8')
|
37
37
|
else
|
data/app/models/item.rb
CHANGED
data/app/models/manifestation.rb
CHANGED
@@ -539,12 +539,18 @@ class Manifestation < ActiveRecord::Base
|
|
539
539
|
manifestation_updated_at
|
540
540
|
manifestation_identifier
|
541
541
|
access_address
|
542
|
+
description
|
542
543
|
note
|
543
544
|
extent
|
544
545
|
dimensions
|
545
546
|
carrier_type
|
546
547
|
edition
|
547
548
|
edition_string
|
549
|
+
volume_number
|
550
|
+
volume_number_string
|
551
|
+
issue_number
|
552
|
+
issue_number_string
|
553
|
+
serial_number
|
548
554
|
)
|
549
555
|
|
550
556
|
header += IdentifierType.order(:position).pluck(:name)
|
@@ -557,6 +563,7 @@ class Manifestation < ActiveRecord::Base
|
|
557
563
|
item_id
|
558
564
|
item_identifier
|
559
565
|
call_number
|
566
|
+
item_note
|
560
567
|
)
|
561
568
|
case role.to_sym
|
562
569
|
when :Administrator, :Librarian
|
@@ -615,12 +622,18 @@ class Manifestation < ActiveRecord::Base
|
|
615
622
|
item_lines << updated_at
|
616
623
|
item_lines << manifestation_identifier
|
617
624
|
item_lines << access_address
|
618
|
-
item_lines <<
|
625
|
+
item_lines << description.try(:gsub, /\r?\n/, '\n')
|
626
|
+
item_lines << note.try(:gsub, /\r?\n/, '\n')
|
619
627
|
item_lines << extent
|
620
628
|
item_lines << dimensions
|
621
629
|
item_lines << carrier_type.name
|
622
630
|
item_lines << edition
|
623
631
|
item_lines << edition_string
|
632
|
+
item_lines << volume_number
|
633
|
+
item_lines << volume_number_string
|
634
|
+
item_lines << issue_number
|
635
|
+
item_lines << issue_number_string
|
636
|
+
item_lines << serial_number
|
624
637
|
|
625
638
|
IdentifierType.order(:position).pluck(:name).each do |identifier_type|
|
626
639
|
if identifier_contents(identifier_type.to_sym).first
|
@@ -649,6 +662,7 @@ class Manifestation < ActiveRecord::Base
|
|
649
662
|
item_lines << i.id
|
650
663
|
item_lines << i.item_identifier
|
651
664
|
item_lines << i.call_number
|
665
|
+
item_lines << i.note.try(:gsub, /\r?\n/, '\n')
|
652
666
|
case options[:role].to_sym
|
653
667
|
when :Administrator, :Librarian
|
654
668
|
item_lines << i.price
|
@@ -695,12 +709,18 @@ class Manifestation < ActiveRecord::Base
|
|
695
709
|
line << updated_at
|
696
710
|
line << manifestation_identifier
|
697
711
|
line << access_address
|
698
|
-
line <<
|
712
|
+
line << description.try(:gsub, /\r?\n/, '\n')
|
713
|
+
line << note.try(:gsub, /\r?\n/, '\n')
|
699
714
|
line << extent
|
700
715
|
line << dimensions
|
701
716
|
line << carrier_type.name
|
702
717
|
line << edition
|
703
718
|
line << edition_string
|
719
|
+
line << volume_number
|
720
|
+
line << volume_number_string
|
721
|
+
line << issue_number
|
722
|
+
line << issue_number_string
|
723
|
+
line << serial_number
|
704
724
|
|
705
725
|
IdentifierType.order(:position).pluck(:name).each do |identifier_type|
|
706
726
|
if identifier_contents(identifier_type.to_sym).first
|
@@ -338,7 +338,7 @@ class ResourceImportFile < ActiveRecord::Base
|
|
338
338
|
end
|
339
339
|
|
340
340
|
item.price = row['item_price'] if row['item_price'].present?
|
341
|
-
item.note = row['item_note'] if row['item_note'].present?
|
341
|
+
item.note = row['item_note'].try(:gsub, /\\n/, "\n") if row['item_note'].present?
|
342
342
|
item.url = row['item_url'] if row['item_url'].present?
|
343
343
|
|
344
344
|
if row['include_supplements']
|
@@ -522,7 +522,7 @@ class ResourceImportFile < ActiveRecord::Base
|
|
522
522
|
binding_call_number: row['binding_call_number'],
|
523
523
|
binded_at: binded_at,
|
524
524
|
url: row['item_url'],
|
525
|
-
note: row['item_note']
|
525
|
+
note: row['item_note'].try(:gsub, /\\n/, "\n")
|
526
526
|
)
|
527
527
|
manifestation.items << item
|
528
528
|
if defined?(EnjuCirculation)
|
@@ -641,9 +641,9 @@ class ResourceImportFile < ActiveRecord::Base
|
|
641
641
|
:depth => row['depth'],
|
642
642
|
:height => row['height'],
|
643
643
|
:price => row['manifestation_price'],
|
644
|
-
:description => row['description'],
|
644
|
+
:description => row['description'].try(:gsub, /\\n/, "\n"),
|
645
645
|
#:description_transcription => row['description_transcription'],
|
646
|
-
:note => row['note'],
|
646
|
+
:note => row['note'].try(:gsub, /\\n/, "\n"),
|
647
647
|
:statement_of_responsibility => row['statement_of_responsibility'],
|
648
648
|
:access_address => row['access_address'],
|
649
649
|
:manifestation_identifier => row['manifestation_identifier'],
|
data/lib/enju_biblio/version.rb
CHANGED