bulkrax 3.3.1 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/jobs/bulkrax/importer_job.rb +2 -0
- data/app/models/bulkrax/csv_entry.rb +2 -10
- data/app/models/bulkrax/importer.rb +13 -10
- data/app/models/concerns/bulkrax/status_info.rb +1 -1
- data/lib/bulkrax/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b136a8742a7f9b953b4c3ef86d700540b931b6fbf22798d719e9aa693ea61fa9
|
4
|
+
data.tar.gz: e1cc32eda55a606285cf6e080340db608a8867f0bd4de8ab1361ca4a3d21adf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87e35f340faa583a9ae6ac156f95fa4958fcaf9d3ed09a9963a8dda39649a66307a8c494375a989e2103c2d1edef62343f5b69878eae2249d63cc4b8f65240a8
|
7
|
+
data.tar.gz: 21ddafc671eda822144b6b73abfb89892ffac954f0692952985299f40f7d0e1aba472077aac72a1f681da315ba35de795f43d95df323c2178576716d02eafc75
|
@@ -12,6 +12,8 @@ module Bulkrax
|
|
12
12
|
import(importer, only_updates_since_last_import)
|
13
13
|
update_current_run_counters(importer)
|
14
14
|
schedule(importer) if importer.schedulable?
|
15
|
+
rescue CSV::MalformedCSVError => e
|
16
|
+
importer.status_info(e)
|
15
17
|
end
|
16
18
|
|
17
19
|
def import(importer, only_updates_since_last_import)
|
@@ -114,9 +114,10 @@ module Bulkrax
|
|
114
114
|
def build_files_metadata
|
115
115
|
file_mapping = key_for_export('file')
|
116
116
|
file_sets = hyrax_record.file_set? ? Array.wrap(hyrax_record) : hyrax_record.file_sets
|
117
|
-
filenames = file_sets
|
117
|
+
filenames = map_file_sets(file_sets)
|
118
118
|
|
119
119
|
handle_join_on_export(file_mapping, filenames, mapping['file']&.[]('join')&.present?)
|
120
|
+
build_thumbnail_files if hyrax_record.work?
|
120
121
|
end
|
121
122
|
|
122
123
|
def build_relationship_metadata
|
@@ -219,15 +220,6 @@ module Bulkrax
|
|
219
220
|
end
|
220
221
|
end
|
221
222
|
|
222
|
-
def build_files
|
223
|
-
file_mapping = mapping['file']&.[]('from')&.first || 'file'
|
224
|
-
file_sets = hyrax_record.file_set? ? Array.wrap(hyrax_record) : hyrax_record.file_sets
|
225
|
-
|
226
|
-
filenames = map_file_sets(file_sets)
|
227
|
-
handle_join_on_export(file_mapping, filenames, mapping['file']&.[]('join')&.present?)
|
228
|
-
build_thumbnail_files if hyrax_record.work?
|
229
|
-
end
|
230
|
-
|
231
223
|
def build_thumbnail_files
|
232
224
|
return unless importerexporter.include_thumbnails
|
233
225
|
|
@@ -96,16 +96,19 @@ module Bulkrax
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def current_run
|
99
|
-
@current_run
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
99
|
+
return @current_run if @current_run.present?
|
100
|
+
|
101
|
+
@current_run = self.importer_runs.create!
|
102
|
+
return @current_run if file? && zip?
|
103
|
+
|
104
|
+
entry_counts = {
|
105
|
+
total_work_entries: self.limit || parser.works_total,
|
106
|
+
total_collection_entries: parser.collections_total,
|
107
|
+
total_file_set_entries: parser.file_sets_total
|
108
|
+
}
|
109
|
+
@current_run.update!(entry_counts)
|
110
|
+
|
111
|
+
@current_run
|
109
112
|
end
|
110
113
|
|
111
114
|
def last_run
|
data/lib/bulkrax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bulkrax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Kaufman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|