geoblacklight_admin 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -7
  3. data/app/controllers/admin/advanced_search_controller.rb +6 -0
  4. data/app/controllers/admin/assets_controller.rb +7 -28
  5. data/app/controllers/admin/bookmarks_controller.rb +3 -3
  6. data/app/controllers/admin/bulk_actions_controller.rb +1 -1
  7. data/app/controllers/admin/document_assets_controller.rb +2 -81
  8. data/app/controllers/admin/documents_controller.rb +2 -2
  9. data/app/controllers/admin/elements_controller.rb +2 -0
  10. data/app/controllers/admin/form_elements_controller.rb +2 -0
  11. data/app/controllers/admin/ids_controller.rb +6 -0
  12. data/app/controllers/admin/imports_controller.rb +2 -2
  13. data/app/helpers/bulk_actions_helper.rb +1 -1
  14. data/app/jobs/bulk_action_revert_document_job.rb +4 -12
  15. data/app/jobs/bulk_action_run_document_job.rb +2 -10
  16. data/app/jobs/import_document_job.rb +1 -4
  17. data/app/jobs/import_run_job.rb +1 -1
  18. data/app/models/admin/bookmark.rb +1 -1
  19. data/app/models/bulk_actions/change_publication_state.rb +0 -25
  20. data/app/models/bulk_actions/delete_thumbnails.rb +6 -0
  21. data/app/models/bulk_actions/draft_document.rb +6 -0
  22. data/app/models/bulk_actions/harvest_thumbnails.rb +6 -0
  23. data/app/models/bulk_actions/publish_document.rb +6 -0
  24. data/app/models/bulk_actions/unpublish_document.rb +6 -0
  25. data/app/models/document.rb +1 -1
  26. data/app/models/import/csv_duplicates_validator.rb +2 -0
  27. data/app/models/import/csv_header_validator.rb +3 -1
  28. data/app/models/import_btaa_aardvark.rb +2 -2
  29. data/app/models/import_gblv1.rb +2 -2
  30. data/app/services/geoblacklight_admin/image_service/iiif_manifest.rb +39 -43
  31. data/app/services/geoblacklight_admin/image_service/tms.rb +0 -4
  32. data/app/views/admin/bookmarks/index.html.erb +19 -14
  33. data/app/views/admin/mappings/index.html.erb +1 -1
  34. data/app/views/admin/notifications/_notification.html.haml +29 -28
  35. data/lib/generators/geoblacklight_admin/config_generator.rb +5 -0
  36. data/lib/generators/geoblacklight_admin/templates/btaa_sample_records.csv +5 -0
  37. data/lib/geoblacklight_admin/rake_task.rb +2 -0
  38. data/lib/geoblacklight_admin/version.rb +1 -1
  39. metadata +64 -17
  40. data/app/helpers/import_documents_helper.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f4725f14826124fd7393a3b7cbb37baa28b606d15cc1381186a122ef2f0a199
4
- data.tar.gz: e7ba31886ae77990e504f108c8e5f9004853ee2f86266b5203490ca022dfc7ca
3
+ metadata.gz: 3c69db073de82cb4873945d0ae70de901c08b517852e98f4ad5ee44812eb70b0
4
+ data.tar.gz: ae8eeeada318da7edac96eae733f67d5e93dccabc4dcc309cf4fb1b58f22f84d
5
5
  SHA512:
6
- metadata.gz: ecc2b6ce1188088007009498183016919b3b99a471a7b2746d8ec1bac4a5c0cf0aa221c38da2997fd223be68fa5a1275b3470938376131f90e92953409e8a0c2
7
- data.tar.gz: 4a56d0949e659f6faf0595a56bed8e057ee2e194b651d0eb3957d0cff37419b441a799e620fe64af25a41a193fc1cbe715c25766b829a4404856260bf35ee1a1
6
+ metadata.gz: 2c21ed4eec52af1dcee587aa7b0e6894e121ccbd8f728198b6dd445c59c259f33fe90ea826b58007395e4770f2a0890ca4001935030e5f147739f68f648e6c72
7
+ data.tar.gz: 463306e5810b82d77f6059205993ed233d803dc83892b66f0cd5bacb245bb6269ba6c5c621825b28c3698de713b2c170243026383d7d0967c5b804bce13dca34
data/README.md CHANGED
@@ -8,9 +8,9 @@ GeoBlacklight Admin is a [GeoBlacklight](https://github.com/geoblacklight/geobla
8
8
 
9
9
  ## Requirements
10
10
 
11
- * Rails v7
11
+ * Rails v7 (not v8)
12
12
  * Blacklight v7 (not v8)
13
- * GeoBlacklight v4.4+ (Vite.js)
13
+ * GeoBlacklight v4 (not v5)
14
14
  * @geoblacklight/frontend v4 (NPM package)
15
15
  * Solr v8.4+
16
16
  * PostgreSQL (not MySQL-based DBs)
@@ -55,9 +55,13 @@ For Developer documentation see [doc/developer.md](./docs/development.md)
55
55
  ## License
56
56
  The gem is available as open source under the terms of the [Apache 2.0 License](https://opensource.org/license/apache-2-0).
57
57
 
58
-
59
- ## TODOs
58
+ ## TODOs / Roadmap
60
59
  * ~~Send GBLADMIN JavaScript pack to NPM like Blacklight~~
61
- * DRY up Engine routing
62
- * Remove legacy GEOMG / B1G everywhere...
63
- * Likely some more polish to be uncovered...
60
+ * ~~Improve test coverage~~
61
+ * Fix CI test runner
62
+ * Debug Rails 7.2 support
63
+ * Separate dct_references_s support into a separate model
64
+ * Import/Export dct_references_s outside of the main document model
65
+ * Migrate our GBL api controllers to just RSolr-based models
66
+ * DRY up Gem dependencies and Engine routing
67
+ * Remove any remaining GEOMG references
@@ -380,5 +380,11 @@ module Admin
380
380
  end
381
381
  end
382
382
  end
383
+
384
+ private
385
+
386
+ def advanced_search_params
387
+ params.permit(:advanced_search)
388
+ end
383
389
  end
384
390
  end
@@ -5,7 +5,7 @@ module Admin
5
5
  class AssetsController < Admin::AdminController
6
6
  before_action :set_asset, only: %i[show edit update destroy]
7
7
 
8
- # GET /assets or /assets.json
8
+ # GET /admin/asset_files
9
9
  def index
10
10
  scope = Asset
11
11
  search_query = params[:q].strip if params[:q].present?
@@ -32,34 +32,14 @@ module Admin
32
32
  def show
33
33
  end
34
34
 
35
- # GET /assets/new
36
- def new
37
- @asset = Asset.new
38
- end
39
-
40
35
  # GET /assets/1/edit
41
36
  def edit
42
37
  end
43
38
 
44
- # POST /assets or /assets.json
45
- def create
46
- @asset = Asset.new(asset_params)
47
-
48
- respond_to do |format|
49
- if @asset.save
50
- format.html { redirect_to admin_asset_url(@asset), notice: "Asset was successfully created." }
51
- format.json { render :show, status: :created, location: @asset }
52
- else
53
- format.html { render :new, status: :unprocessable_entity }
54
- format.json { render json: @asset.errors, status: :unprocessable_entity }
55
- end
56
- end
57
- end
58
-
59
39
  # PATCH/PUT /assets/1 or /assets/1.json
60
40
  def update
61
41
  respond_to do |format|
62
- if @asset.update(asset_params)
42
+ if @asset.update(asset_params.merge!(parent_id: parent_id_via_friendly_id(asset_params[:parent_id])))
63
43
  format.html { redirect_to admin_asset_url(@asset.id), notice: "Asset was successfully updated." }
64
44
  format.json { render :show, status: :ok, location: @asset }
65
45
  else
@@ -116,13 +96,12 @@ module Admin
116
96
  redirect_to admin_assets_url, notice: "Files attached successfully."
117
97
  end
118
98
 
119
- def sort
120
- Asset.sort_assets(params[:id_list])
121
- render body: nil
122
- end
123
-
124
99
  private
125
100
 
101
+ def parent_id_via_friendly_id(friendlier_id)
102
+ Document.find_by_friendlier_id(friendlier_id)&.id
103
+ end
104
+
126
105
  # Use callbacks to share common setup or constraints between actions.
127
106
  def set_asset
128
107
  @asset = Asset.find(params[:id])
@@ -130,7 +109,7 @@ module Admin
130
109
 
131
110
  # Only allow a list of trusted parameters through.
132
111
  def asset_params
133
- params.require(:asset)
112
+ params.require(:asset).permit(:parent_id)
134
113
  end
135
114
 
136
115
  def date_check?(val)
@@ -25,10 +25,10 @@ module Admin
25
25
 
26
26
  respond_to do |format|
27
27
  if @bookmark.save
28
- format.html { redirect_to @bookmark, notice: "Bookmark was successfully created." }
28
+ format.html { redirect_to admin_bookmarks_url, notice: "Bookmark was successfully created." }
29
29
  format.js
30
30
  else
31
- format.html { render :new }
31
+ format.html { render :index, status: :unprocessable_entity }
32
32
  format.json { render json: @bookmark.errors, status: :unprocessable_entity }
33
33
  end
34
34
  end
@@ -40,7 +40,7 @@ module Admin
40
40
  Admin::Bookmark.destroy_by(user: current_user, document: @document)
41
41
 
42
42
  respond_to do |format|
43
- format.html { redirect_to bookmarks_url, notice: "Bookmark was successfully destroyed." }
43
+ format.html { redirect_to admin_bookmarks_url, notice: "Bookmark was successfully destroyed." }
44
44
  format.js
45
45
  end
46
46
  end
@@ -93,7 +93,7 @@ module Admin
93
93
 
94
94
  # Only allow a list of trusted parameters through.
95
95
  def bulk_action_params
96
- params.fetch(:bulk_action, {})
96
+ params.require(:bulk_action).permit(:name, :scope, :request, :field_name, :field_value)
97
97
  end
98
98
  end
99
99
  end
@@ -37,11 +37,11 @@ module Admin
37
37
  # PATCH/PUT /works/1
38
38
  # PATCH/PUT /works/1.json
39
39
  def update
40
- @document_asset = DocumentAsset.find_by_friendlier_id!(params[:id])
40
+ @document_asset = Asset.find_by_friendlier_id!(params[:id])
41
41
 
42
42
  respond_to do |format|
43
43
  if @document_asset.update(document_asset_params)
44
- format.html { redirect_to admin_document_document_assets_path(@document, @document_asset.parent), notice: "Asset was successfully updated." }
44
+ format.html { redirect_to admin_document_document_assets_path(@document_asset.parent), notice: "Asset was successfully updated." }
45
45
  format.json { render :show, status: :ok, location: @document_asset }
46
46
  else
47
47
  format.html { render :edit }
@@ -63,16 +63,6 @@ module Admin
63
63
  end
64
64
  end
65
65
 
66
- def check_fixity
67
- @asset = Asset.find_by_friendlier_id!(params[:asset_id])
68
- SingleAssetCheckerJob.perform_later(@asset)
69
- redirect_to admin_asset_url(@asset), notice: "This file will be checked shortly."
70
- end
71
-
72
- def fixity_report
73
- @fixity_report = FixityReport.new
74
- end
75
-
76
66
  def display_attach_form
77
67
  @document = Document.find_by_friendlier_id!(params[:document_id])
78
68
  end
@@ -114,75 +104,6 @@ module Admin
114
104
  redirect_to admin_document_document_assets_path(@parent.friendlier_id, anchor: "nav-members")
115
105
  end
116
106
 
117
- def convert_to_child_work
118
- @asset = Asset.find_by_friendlier_id!(params[:id])
119
-
120
- parent = @asset.parent
121
-
122
- new_child = Work.new(title: @asset.title)
123
-
124
- # Asking for permission to create a new Work,
125
- # which is arguably the main thing going on in this method.
126
- # authorize! :create, Work as the first line of the method
127
- # would be better, but we currently aren't allowed to do that
128
- # see (https://github.com/chaps-io/access-granted/pull/56).
129
- authorize! :create, new_child
130
-
131
- new_child.parent = parent
132
- # collections
133
- new_child.contained_by = parent.contained_by
134
- new_child.position = @asset.position
135
- new_child.representative = @asset
136
- # we can copy _all_ the non-title metadata like this...
137
- new_child.json_attributes = parent.json_attributes
138
-
139
- @asset.parent = new_child
140
-
141
- Kithe::Model.transaction do
142
- new_child.save!
143
- @asset.save! # to get new parent
144
-
145
- if parent.representative_id == @asset.id
146
- parent.representative = new_child
147
- parent.save!
148
- end
149
- end
150
-
151
- redirect_to edit_admin_work_path(new_child), notice: "Asset promoted to child work #{new_child.title}"
152
- end
153
-
154
- # requires params[:active_encode_status_id]
155
- def refresh_active_encode_status
156
- status = ActiveEncodeStatus.find(params[:active_encode_status_id])
157
-
158
- RefreshActiveEncodeStatusJob.perform_later(status)
159
-
160
- redirect_to admin_asset_url(status.asset),
161
- notice: "Started refresh for ActiveEncode job #{status.active_encode_id}"
162
- end
163
-
164
- def work_is_oral_history?
165
- (@asset.parent.is_a? Work) && @asset.parent.genre && @asset.parent.genre.include?("Oral histories")
166
- end
167
- helper_method :work_is_oral_history?
168
-
169
- def asset_is_collection_thumbnail?
170
- @asset.parent.is_a? Collection
171
- end
172
- helper_method :asset_is_collection_thumbnail?
173
-
174
- def edit_path(asset)
175
- asset.parent.is_a? Collection ? edit_admin_collection_path(asset.parent) : edit_admin_asset_path(asset)
176
- end
177
- helper_method :edit_path
178
-
179
- def parent_path(asset)
180
- return nil if asset.parent.nil?
181
-
182
- asset.parent.is_a? Collection ? collection_path(asset.parent) : admin_work_path(asset.parent)
183
- end
184
- helper_method :parent_path
185
-
186
107
  private
187
108
 
188
109
  def asset_params
@@ -152,7 +152,7 @@ module Admin
152
152
  format.html { redirect_to edit_admin_document_path(@document), notice: "Document was successfully created." }
153
153
  format.json { render :show, status: :created, location: @document }
154
154
  else
155
- format.html { render :edit }
155
+ format.html { render :edit, status: :unprocessable_entity }
156
156
  format.json { render json: @document.errors, status: :unprocessable_entity }
157
157
  end
158
158
  end
@@ -166,7 +166,7 @@ module Admin
166
166
  format.html { redirect_to edit_admin_document_path(@document), notice: "Document was successfully updated." }
167
167
  format.json { render :show, status: :ok, location: @document }
168
168
  else
169
- format.html { render :edit }
169
+ format.html { render :edit, status: :unprocessable_entity }
170
170
  format.json { render json: @document.errors, status: :unprocessable_entity }
171
171
  end
172
172
  end
@@ -71,6 +71,8 @@ module Admin
71
71
  # Use callbacks to share common setup or constraints between actions.
72
72
  def set_element
73
73
  @element = Element.find(params[:id])
74
+ rescue ActiveRecord::RecordNotFound
75
+ redirect_to admin_elements_url, alert: "Element not found."
74
76
  end
75
77
 
76
78
  # Only allow a list of trusted parameters through.
@@ -71,6 +71,8 @@ module Admin
71
71
  # Use callbacks to share common setup or constraints between actions.
72
72
  def set_form_element
73
73
  @form_element = FormElement.find(params[:id])
74
+ rescue ActiveRecord::RecordNotFound
75
+ redirect_to admin_form_elements_url, alert: "Form element not found."
74
76
  end
75
77
 
76
78
  # Only allow a list of trusted parameters through.
@@ -397,5 +397,11 @@ module Admin
397
397
  end
398
398
  end
399
399
  end
400
+
401
+ private
402
+
403
+ def ids_params
404
+ params.permit(:id)
405
+ end
400
406
  end
401
407
  end
@@ -40,7 +40,7 @@ module Admin
40
40
  end
41
41
  format.json { render :show, status: :created, location: @import }
42
42
  else
43
- format.html { render :new }
43
+ format.html { render :new, status: :unprocessable_entity }
44
44
  format.json { render json: @import.errors, status: :unprocessable_entity }
45
45
  end
46
46
  end
@@ -54,7 +54,7 @@ module Admin
54
54
  format.html { redirect_to admin_import_path(@import), notice: "Import was successfully updated." }
55
55
  format.json { render :show, status: :ok, location: @import }
56
56
  else
57
- format.html { render :edit }
57
+ format.html { render :edit, status: :unprocessable_entity }
58
58
  format.json { render json: @import.errors, status: :unprocessable_entity }
59
59
  end
60
60
  end
@@ -3,7 +3,7 @@
3
3
  # BulkActionsHelper
4
4
  module BulkActionsHelper
5
5
  def bulk_actions_collection
6
- attrs = Geomg.field_mappings.collect { |key, _value| key }
6
+ attrs = GeoblacklightAdmin::Schema.instance.importable_fields.collect { |key, _value| key }
7
7
  attrs.prepend("Publication State")
8
8
  end
9
9
  end
@@ -21,18 +21,14 @@ class BulkActionRevertDocumentJob < ApplicationJob
21
21
  logger.debug("Revert PubStatus - #{document.friendlier_id}")
22
22
 
23
23
  versions = document.versions
24
- document = versions[doc.version].reify
24
+ document = versions[doc.current_version].reify
25
25
  document&.skip_callbacks = true
26
26
 
27
- if document&.save
28
- doc.state_machine.transition_to!(:success)
29
- else
30
- doc.state_machine.transition_to!(:failed)
31
- end
27
+ document.save
32
28
  end
33
29
 
34
30
  def revert_delete(doc)
35
- document = Document.new(id: doc.document_id)
31
+ document = Document.find_by!(friendlier_id: doc.friendlier_id)
36
32
 
37
33
  logger.debug("Revert Delete - #{document.id}")
38
34
 
@@ -40,10 +36,6 @@ class BulkActionRevertDocumentJob < ApplicationJob
40
36
  document = versions.last.reify
41
37
  document.skip_callbacks = true
42
38
 
43
- if document.save
44
- doc.state_machine.transition_to!(:success)
45
- else
46
- doc.state_machine.transition_to!(:failed)
47
- end
39
+ document.save
48
40
  end
49
41
  end
@@ -25,11 +25,7 @@ class BulkActionRunDocumentJob < ApplicationJob
25
25
 
26
26
  logger.debug("Update PubStatus - #{document.friendlier_id} => #{field_value}")
27
27
 
28
- if document.update!(publication_state: field_value.to_sym)
29
- doc.state_machine.transition_to!(:success)
30
- else
31
- doc.state_machine.transition_to!(:failed)
32
- end
28
+ document.update!(publication_state: field_value.to_sym)
33
29
  end
34
30
 
35
31
  def update_delete(doc, field_value)
@@ -37,10 +33,6 @@ class BulkActionRunDocumentJob < ApplicationJob
37
33
 
38
34
  logger.debug("Update Delete - #{document.friendlier_id} => #{field_value}")
39
35
 
40
- if document.destroy
41
- doc.state_machine.transition_to!(:success)
42
- else
43
- doc.state_machine.transition_to!(:failed)
44
- end
36
+ document.destroy
45
37
  end
46
38
  end
@@ -5,10 +5,7 @@ class ImportDocumentJob < ApplicationJob
5
5
  queue_as :priority
6
6
 
7
7
  def perform(import_document)
8
- # @TODO: Check for friendlier_id or raise error
9
- document = Document.where(
10
- friendlier_id: import_document.friendlier_id
11
- ).first_or_create
8
+ document = Document.find_or_create_by(friendlier_id: import_document.friendlier_id)
12
9
 
13
10
  # Set the geom
14
11
  document.set_geometry
@@ -5,7 +5,7 @@ class ImportRunJob < ApplicationJob
5
5
  queue_as :priority
6
6
 
7
7
  def perform(import)
8
- data = CSV.parse(import.csv_file.download.force_encoding("UTF-8"), headers: true)
8
+ data = CSV.parse(import.csv_file.download, headers: true)
9
9
 
10
10
  data.each do |doc|
11
11
  extract_hash = doc.to_h
@@ -8,7 +8,7 @@ module Admin
8
8
  validates :user_id, presence: true
9
9
 
10
10
  def document_id
11
- document_id
11
+ document.id
12
12
  end
13
13
 
14
14
  def document_type
@@ -3,29 +3,4 @@ module BulkActions
3
3
  class ChangePublicationState < BulkAction
4
4
  # Add specific methods and validations for ChangePublicationState here
5
5
  end
6
-
7
- # Subclass for PublishDocument
8
- class PublishDocument < BulkAction
9
- # Add specific methods and validations for PublishDocument here
10
- end
11
-
12
- # Subclass for UnpublishDocument
13
- class UnpublishDocument < BulkAction
14
- # Add specific methods and validations for UnpublishDocument here
15
- end
16
-
17
- # Subclass for DraftDocument
18
- class DraftDocument < BulkAction
19
- # Add specific methods and validations for DraftDocument here
20
- end
21
-
22
- # Subclass for HarvestThumbnails
23
- class HarvestThumbnails < BulkAction
24
- # Add specific methods and validations for HarvestThumbnails here
25
- end
26
-
27
- # Subclass for DeleteThumbnails
28
- class DeleteThumbnails < BulkAction
29
- # Add specific methods and validations for DeleteThumbnails here
30
- end
31
6
  end
@@ -0,0 +1,6 @@
1
+ module BulkActions
2
+ # Subclass for DeleteThumbnails
3
+ class DeleteThumbnails < BulkAction
4
+ # Add specific methods and validations for DeleteThumbnails here
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module BulkActions
2
+ # Subclass for DraftDocument
3
+ class DraftDocument < BulkAction
4
+ # Add specific methods and validations for DraftDocument here
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module BulkActions
2
+ # Subclass for HarvestThumbnails
3
+ class HarvestThumbnails < BulkAction
4
+ # Add specific methods and validations for HarvestThumbnails here
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module BulkActions
2
+ # Subclass for PublishDocument
3
+ class PublishDocument < ChangePublicationState
4
+ # Add specific methods and validations for PublishDocument here
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module BulkActions
2
+ # Subclass for UnpublishDocument
3
+ class UnpublishDocument < BulkAction
4
+ # Add specific methods and validations for UnpublishDocument here
5
+ end
6
+ end
@@ -257,7 +257,7 @@ class Document < Kithe::Work
257
257
 
258
258
  def local?
259
259
  local = send(Settings.FIELDS.PROVIDER) || ""
260
- local.casecmp(Settings.INSTITUTION_LOCAL_NAME)&.zero?
260
+ local.casecmp(Settings.INSTITUTION)&.zero?
261
261
  end
262
262
 
263
263
  def restricted?
@@ -32,6 +32,8 @@ class Import
32
32
  end
33
33
 
34
34
  duplicate_id
35
+ rescue ArgumentError, ActiveStorage::FileNotFoundError
36
+ false
35
37
  end
36
38
  end
37
39
  end
@@ -8,7 +8,7 @@ class Import
8
8
  class CsvHeaderValidator < ActiveModel::Validator
9
9
  def validate(record)
10
10
  valid_csv_header = true
11
- unless valid_csv_headers?(record.csv_file)
11
+ unless valid_csv_headers?(record&.csv_file)
12
12
  valid_csv_header = false
13
13
  record.errors.add(:csv_file,
14
14
  "Missing a required CSV header. Title, Resource Class, Access Rights, and ID are required.")
@@ -20,6 +20,8 @@ class Import
20
20
  def valid_csv_headers?(csv_file)
21
21
  headers = CSV.parse(csv_file.download)[0]
22
22
  (["Title", "Resource Class", "Access Rights", "ID"] - headers).empty?
23
+ rescue ArgumentError, ActiveStorage::FileNotFoundError
24
+ false
23
25
  end
24
26
  end
25
27
  end
@@ -5,7 +5,7 @@ class ImportBtaaAardvark < Import
5
5
  # validations, constants and methods
6
6
 
7
7
  def mapping_configuration
8
- Geomg.field_mappings_btaa_aardvark
8
+ GeoblacklightAdmin::Schema.instance.importable_fields
9
9
  end
10
10
 
11
11
  def klass_delimiter
@@ -98,7 +98,7 @@ class ImportBtaaAardvark < Import
98
98
  json_data.each do |key, value|
99
99
  reference = {
100
100
  value: value,
101
- category: Geomg.uri_2_category_references_mappings[key]
101
+ category: GeoblacklightAdmin::FieldMappingsBtaaAardvark.uri_2_category_references_mappings[key]
102
102
  }
103
103
  references << reference
104
104
  end
@@ -5,7 +5,7 @@ class ImportGblv1 < Import
5
5
  # validations, constants and methods
6
6
 
7
7
  def mapping_configuration
8
- Geomg.field_mappings_gblv1
8
+ GeoblacklightAdmin::Schema.instance.importable_fields
9
9
  end
10
10
 
11
11
  def klass_delimiter
@@ -81,7 +81,7 @@ class ImportGblv1 < Import
81
81
  json_data.each do |key, value|
82
82
  reference = {
83
83
  value: value,
84
- category: Geomg::FieldMappingsGblv1.uri_2_category_references_mappings[key]
84
+ category: GeoblacklightAdmin::FieldMappingsGblv1.uri_2_category_references_mappings[key]
85
85
  }
86
86
  references << reference
87
87
  end
@@ -54,57 +54,53 @@ module GeoblacklightAdmin
54
54
  # @param [Integer] thumbnail size
55
55
  # @return [String] iiif thumbnail url
56
56
  def self.image_url(document, _size)
57
- Rails.logger.debug("\n\nViewer Endpoint: #{document.viewer_endpoint}")
57
+ tempfile = Down.download(document.viewer_endpoint)
58
+ manifest_json = JSON.parse(tempfile.read)
58
59
 
59
- begin
60
- tempfile = Down.download(document.viewer_endpoint)
61
- manifest_json = JSON.parse(tempfile.read)
62
-
63
- # Sequences - Return the first image if it exists
64
- # - best case option
65
- if manifest_json.dig("sequences", 0, "canvases", 0, "images", 0, "resource", "@id")
66
- Rails.logger.debug("\n Image: sequences \n")
67
- if manifest_json.dig("sequences", 0, "canvases", 0, "images", 0, "resource", "@id").include?("osu")
68
- Rails.logger.debug("\n Image: sequences - OSU variant \n")
69
- manifest_json.dig("sequences", 0, "canvases", 0, "images", 0, "resource", "service", "@id") + "/full/1000,/0/default.jpg"
70
- else
71
- manifest_json.dig("sequences", 0, "canvases", 0, "images", 0, "resource", "@id")
72
- end
73
-
74
- # Items - Return the first item image if it exists
75
- # - Northwestern
76
- elsif manifest_json.dig("items", 0, "items", 0, "items", 0, "body", "id")
77
- Rails.logger.debug("\n Image: items body id \n")
78
- manifest_json.dig("items", 0, "items", 0, "items", 0, "body", "id")
60
+ # Sequences - Return the first image if it exists
61
+ # - best case option
62
+ if manifest_json.dig("sequences", 0, "canvases", 0, "images", 0, "resource", "@id")
63
+ Rails.logger.debug("\n Image: sequences \n")
64
+ if manifest_json.dig("sequences", 0, "canvases", 0, "images", 0, "resource", "@id").include?("osu")
65
+ Rails.logger.debug("\n Image: sequences - OSU variant \n")
66
+ manifest_json.dig("sequences", 0, "canvases", 0, "images", 0, "resource", "service", "@id") + "/full/1000,/0/default.jpg"
67
+ else
68
+ manifest_json.dig("sequences", 0, "canvases", 0, "images", 0, "resource", "@id")
69
+ end
79
70
 
80
- # Items - Return the first item image if it exists
81
- # - strange option
82
- elsif manifest_json.dig("items", 0, "items", 0, "items", 0, "id")
83
- Rails.logger.debug("\n Image: items id \n")
84
- manifest_json.dig("items", 0, "items", 0, "items", 0, "id")
71
+ # Items - Return the first item image if it exists
72
+ # - Northwestern
73
+ elsif manifest_json.dig("items", 0, "items", 0, "items", 0, "body", "id")
74
+ Rails.logger.debug("\n Image: items body id \n")
75
+ manifest_json.dig("items", 0, "items", 0, "items", 0, "body", "id")
85
76
 
86
- # Thumbnail - Return the "thumbnail" if it exists
87
- # - varies in size depending on the provider
88
- # - worst case option really
89
- # - can be @id or id
90
- elsif manifest_json["thumbnail"]
91
- Rails.logger.debug("\n Image: thumbnail \n")
92
- if manifest_json.dig("thumbnail", "@id")
93
- manifest_json.dig("thumbnail", "@id")
94
- else
95
- manifest_json.dig("thumbnail", "id")
96
- manifest_json.dig("thumbnail", "id")
97
- end
77
+ # Items - Return the first item image if it exists
78
+ # - strange option
79
+ elsif manifest_json.dig("items", 0, "items", 0, "items", 0, "id")
80
+ Rails.logger.debug("\n Image: items id \n")
81
+ manifest_json.dig("items", 0, "items", 0, "items", 0, "id")
98
82
 
99
- # Fail - Gonna fail
83
+ # Thumbnail - Return the "thumbnail" if it exists
84
+ # - varies in size depending on the provider
85
+ # - worst case option really
86
+ # - can be @id or id
87
+ elsif manifest_json["thumbnail"]
88
+ Rails.logger.debug("\n Image: thumbnail \n")
89
+ if manifest_json.dig("thumbnail", "@id")
90
+ manifest_json.dig("thumbnail", "@id")
100
91
  else
101
- Rails.logger.debug("\n Image: failed \n")
102
- document.viewer_endpoint
92
+ manifest_json.dig("thumbnail", "id")
93
+ manifest_json.dig("thumbnail", "id")
103
94
  end
104
- rescue => e
105
- Rails.logger.debug("\n Rescued: #{e.inspect} \n")
95
+
96
+ # Fail - Gonna fail
97
+ else
98
+ Rails.logger.debug("\n Image: failed \n")
106
99
  document.viewer_endpoint
107
100
  end
101
+ rescue => e
102
+ Rails.logger.debug("\n Rescued: #{e.inspect} \n")
103
+ document.viewer_endpoint
108
104
  end
109
105
  end
110
106
  end
@@ -14,16 +14,12 @@ module GeoblacklightAdmin
14
14
  # @param [Integer] thumbnail size
15
15
  # @return [String] tms thumbnail url
16
16
  def self.image_url(document, size)
17
- puts "\nTMS IMAGE URL..."
18
- puts "document.viewer_endpoint: #{document.viewer_endpoint.inspect}"
19
-
20
17
  # Begins with:
21
18
  # https://cugir.library.cornell.edu/geoserver/gwc/service/tms/1.0.0/cugir%3Acugir007957@EPSG%3A3857@png/{z}/{x}/{y}.png
22
19
 
23
20
  # Works with:
24
21
  # https://cugir.library.cornell.edu/geoserver/wms/reflect?&FORMAT=image%2Fpng&TRANSPARENT=TRUE&LAYERS=cugir007957&WIDTH=1500&HEIGHT=1500
25
22
 
26
- puts "\nPARSE TMS URL..."
27
23
  # Parse the URL using Addressable::URI which handles more complex URIs
28
24
  parsed_url = Addressable::URI.parse(document.viewer_endpoint)
29
25
 
@@ -2,20 +2,25 @@
2
2
 
3
3
  <h1>Bookmarks (<%= current_user.bookmarks.where(document_type: 'Kithe::Model').size %>)</h1>
4
4
 
5
- <p>
6
- <%= render "admin/documents/result_toggle" %>
7
- <%= render "admin/documents/result_selected_options" %>
8
- <span class='float-right'>
9
- <%== pagy_bootstrap_nav(@pagy) %>
10
- </span>
11
- </p>
5
+ <%- if @pagy %>
12
6
 
13
- <hr/>
7
+ <p>
8
+ <%= render "admin/documents/result_toggle" %>
9
+ <%= render "admin/documents/result_selected_options" %>
10
+ <span class='float-right'>
11
+ <%== pagy_bootstrap_nav(@pagy) %>
12
+ </span>
13
+ </p>
14
14
 
15
- <%= render "admin/documents/result_selection_options" %>
15
+ <hr/>
16
16
 
17
- <ol id='results' class='list-unstyled' data-controller='results'>
18
- <% @bookmarks.each_with_index do |bookmark, index| %>
19
- <%= render 'admin/documents/document', document: Kithe::Model.find(bookmark.document_id), index: index %>
20
- <% end %>
21
- </ol>
17
+ <%= render "admin/documents/result_selection_options" %>
18
+
19
+ <ol id='results' class='list-unstyled' data-controller='results'>
20
+ <% @bookmarks.each_with_index do |bookmark, index| %>
21
+ <%= render 'admin/documents/document', document: Kithe::Model.find(bookmark.document_id), index: index %>
22
+ <% end %>
23
+ </ol>
24
+ <%- else %>
25
+ <p>No bookmarks found.</p>
26
+ <%- end %>
@@ -4,7 +4,7 @@
4
4
  <tbody>
5
5
  <%- if @import.mappings.size > 1 %>
6
6
  <%- @import.mappings.each do |mapping| %>
7
- <%= simple_form_for [@import, mapping], :url => import_mapping_path(@import, mapping) do |f| %>
7
+ <%= simple_form_for [@import, mapping], :url => admin_import_mapping_path(@import, mapping) do |f| %>
8
8
  <tr>
9
9
  <td><%= f.input :source_header, :input_html => {:readonly => true} %></td>
10
10
  <td><%= f.input :destination_field, collection: attribute_collection %></td>
@@ -1,31 +1,32 @@
1
1
  - # Split message "Download Type|Row Count|Button Label"
2
- - message = notification.to_notification.params[:message].split("|")
2
+ - message = notification&.to_notification&.params[:message]&.split("|")
3
3
 
4
- %tr
5
- %td
6
- = check_box_tag 'read', notification.read?, notification.read?,
7
- onchange: "this.setAttribute('data-params', this.name + '=' + this.checked*this.checked)",
8
- data: { remote: true, url: admin_notification_path(notification), method: :patch }
9
- %td
10
- %strong
11
- = message.length > 1 ? message[0] : "CSV"
12
- = t('dictionary.download')
13
- %td
14
- = message.length > 1 ? message[1] : message[0]
15
- %td
16
- - if notification.file.attached?
17
- = link_to rails_blob_path(notification.file.blob, disposition: "attachment"), { class: 'btn btn-primary btn-block' } do
18
- :plain
19
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cloud-download" viewBox="0 0 16 16">
20
- <path d="M4.406 1.342A5.53 5.53 0 0 1 8 0c2.69 0 4.923 2 5.166 4.579C14.758 4.804 16 6.137 16 7.773 16 9.569 14.502 11 12.687 11H10a.5.5 0 0 1 0-1h2.688C13.979 10 15 8.988 15 7.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 2.825 10.328 1 8 1a4.53 4.53 0 0 0-2.941 1.1c-.757.652-1.153 1.438-1.153 2.055v.448l-.445.049C2.064 4.805 1 5.952 1 7.318 1 8.785 2.23 10 3.781 10H6a.5.5 0 0 1 0 1H3.781C1.708 11 0 9.366 0 7.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383z"/>
21
- <path d="M7.646 15.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 14.293V5.5a.5.5 0 0 0-1 0v8.793l-2.146-2.147a.5.5 0 0 0-.708.708l3 3z"/>
22
- </svg>
23
- = message.length > 1 ? message[2] : "CSV"
24
- = "(#{number_to_human_size(notification.file.blob.byte_size)})"
25
- - else
26
- = 'N/A'
27
- %td
28
- %span.reldate{:data => {:asked_at => notification.created_at.to_json.gsub('"', '')}}
29
- = notification.created_at
4
+ - if message
5
+ %tr
6
+ %td
7
+ = check_box_tag 'read', notification.read?, notification.read?,
8
+ onchange: "this.setAttribute('data-params', this.name + '=' + this.checked*this.checked)",
9
+ data: { remote: true, url: admin_notification_path(notification), method: :patch }
10
+ %td
11
+ %strong
12
+ = message.length > 1 ? message[0] : "CSV"
13
+ = t('dictionary.download')
14
+ %td
15
+ = message.length > 1 ? message[1] : message[0]
16
+ %td
17
+ - if notification.file.attached?
18
+ = link_to rails_blob_path(notification.file.blob, disposition: "attachment"), { class: 'btn btn-primary btn-block' } do
19
+ :plain
20
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cloud-download" viewBox="0 0 16 16">
21
+ <path d="M4.406 1.342A5.53 5.53 0 0 1 8 0c2.69 0 4.923 2 5.166 4.579C14.758 4.804 16 6.137 16 7.773 16 9.569 14.502 11 12.687 11H10a.5.5 0 0 1 0-1h2.688C13.979 10 15 8.988 15 7.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 2.825 10.328 1 8 1a4.53 4.53 0 0 0-2.941 1.1c-.757.652-1.153 1.438-1.153 2.055v.448l-.445.049C2.064 4.805 1 5.952 1 7.318 1 8.785 2.23 10 3.781 10H6a.5.5 0 0 1 0 1H3.781C1.708 11 0 9.366 0 7.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383z"/>
22
+ <path d="M7.646 15.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 14.293V5.5a.5.5 0 0 0-1 0v8.793l-2.146-2.147a.5.5 0 0 0-.708.708l3 3z"/>
23
+ </svg>
24
+ = message.length > 1 ? message[2] : "CSV"
25
+ = "(#{number_to_human_size(notification.file.blob.byte_size)})"
26
+ - else
27
+ = 'N/A'
28
+ %td
29
+ %span.reldate{:data => {:asked_at => notification.created_at.to_json.gsub('"', '')}}
30
+ = notification.created_at
30
31
 
31
- %td= link_to 'Destroy', admin_notification_path(notification), method: :delete
32
+ %td= link_to 'Destroy', admin_notification_path(notification), method: :delete
@@ -381,6 +381,11 @@ module GeoblacklightAdmin
381
381
  copy_file "frontend/entrypoints/application.js", "app/javascript/entrypoints/application.js", force: true
382
382
  end
383
383
 
384
+ # Add test fixture files - Necessary for import background job tests
385
+ def add_test_fixture_files
386
+ copy_file "btaa_sample_records.csv", "test/fixtures/files/btaa_sample_records.csv", force: true
387
+ end
388
+
384
389
  # Run bundle with vite install
385
390
  def bundle_install
386
391
  Bundler.with_clean_env do
@@ -0,0 +1,5 @@
1
+ Title,Alternative Title,Description,Language,Creator,Creator ID,Publisher,Provider,Resource Class,Resource Type,Subject,Theme,Keyword,Temporal Coverage,Date Issued,Date Range,Spatial Coverage,Bounding Box,Geometry,GeoNames,Relation,Member Of,Is Part Of,Source,Version,Replaces,Is Replaced By,Format,File Size,WxS Identifier,Georeferenced,Documentation,Download,FeatureServer,FGDC,Harvard Download,HTML,IIIF,ImageServer,Information,ISO19139,Manifest,MapServer,MODS,oEmbed,Index Map,TileServer,WCS,WFS,WMS,Image,ID,Identifier,Code,Rights,Rights Holder,License,Access Rights,Accrual Method,Accrual Periodicity,Date Accessioned,Date Retired,Status,Publication State,Suppressed,Child Record,Mediator,Access,Created At,Updated At
2
+ Lake Superior,"","30 x 38 cm.|Scale approximately 1:1,800,000|General Map Collection",eng,Society for the Diffusion of Useful Knowledge (Great Britain),fst00519759,Baldwin & Cradock (London),University of Minnesota,Maps,"","","","Superior, Lake Maps|2022-creator-sprint",1832,1832,1832-1832,Canada-- Ontario--Lake Superior,"-92.5,46,-83.5,50.5","POLYGON((-92.5 50.5, -83.5 50.5, -83.5 46, -92.5 46, -92.5 50.5))","","",64bd8c4c-8e60-4956-b43d-bdc3f93db488,05d-01|p16022coll230,"","","","",JPEG,,,false,,,,,,,,,https://umedia.lib.umn.edu/item/p16022coll230:321,,https://cdm16022.contentdm.oclc.org/iiif/info/p16022coll230/321/manifest.json,,,,,,,,,https://cdm16022.contentdm.oclc.org/utils/getthumbnail/collection/p16022coll230/id/321,p16022coll230:321,UMN_ALMA:9954050630001701,05d-01,"Use of this item may be governed by US and international copyright laws. You may be able to use this item, but copyright and other considerations may apply. For possible additional information or guidance on your use, please contact the contributing organization.","","",Public,JSON API,,2017-12-22|2022-09-26,,Active,published,false,false,"",,2021-04-26 17:06:38 UTC,2023-02-07 18:33:22 UTC
3
+ Lake Superior: Minnesota,Lake Superior,"This dataset is based on NOAA's Great Lakes Medium Resolution Digital Shoreline. The Lake Superior Shoreline was extracted and converted to a polygon feature class. Water and islands are differentiated. This layer is a medium-quality, general use digital vector dataset originally compiled from NOAA Nautical Charts, created by the Strategic Environmental Assessments Division of NOAA's Office of Ocean Resources, Conservation and Assessment. Nominal mapping scale is 1:70,000.",eng,United States. National Oceanic and Atmospheric Administration,fst00529308,"",Minnesota Geospatial Commons,Datasets,Vector data,National government records,Inland waters,|2022-creator-sprint,2020,2014-12-20,2020-2020,Minnesota,"-92.146,46.547,-83.935,48.769","POLYGON((-92.146 48.769, -83.935 48.769, -83.935 46.547, -92.146 46.547, -92.146 48.769))",http://sws.geonames.org/5037779,"",ba5cc745-21c5-4ae9-954b-72dd8db6815a,05a-01,"","","","",Shapefile,,,false,,https://resources.gisdata.mn.gov/pub/gdrs/data/pub/us_mn_state_dnr/water_lake_superior_basin/shp_water_lake_superior_basin.zip,,,,https://resources.gisdata.mn.gov/pub/gdrs/data/pub/us_mn_state_dnr/water_lake_superior_basin/metadata/metadata.html,,,https://gisdata.mn.gov/dataset/water-lake-superior-basin,,,,,,,,,,,https://resources.gisdata.mn.gov/pub/gdrs/data/pub/us_mn_state_dnr/water_lake_superior_basin/metadata/preview.jpg,82784459-acde-42ed-b615-d8300577110e,https://gisdata.mn.gov/dataset/water-lake-superior-basin,05a-01,"","","",Public,CKAN,,2020-08-31,,Active,published,false,false,"",,2021-04-26 17:03:04 UTC,2023-02-03 22:27:36 UTC
4
+ General chart of Lake Superior,"","Relief shown by hachures and spot heights. Depths shown by bathymetric tints, soundings, and isolines.; ""Catalogue No. 9.""; ""Issued October 11, 1919.""; Includes text, magnetic variations chart, lists of United States and Canadian canals, and dry docks list.|69 x 124 Centimeters|Scale 1:500,000|General Map Collection",eng,U.S. Lake Survey,"","On sale at U.S. Lake Survey Office (Detroit, Michigan)",University of Minnesota,Maps,"","","","","",,"",United States|Lake Superior,"-92.25,46,-84.25,49","POLYGON((-92.25 49, -84.25 49, -84.25 46, -92.25 46, -92.25 49))","","",64bd8c4c-8e60-4956-b43d-bdc3f93db488,05d-01|p16022coll230,"","","","",JPEG,,,false,,,,,,,,,https://umedia.lib.umn.edu/item/p16022coll230:4115,,https://cdm16022.contentdm.oclc.org/iiif/info/p16022coll230/4115/manifest.json,,,,,,,,,https://cdm16022.contentdm.oclc.org/utils/getthumbnail/collection/p16022coll230/id/4115,p16022coll230:4115,UMN_ALMA:9976559407801701,05d-01,"Use of this item may be governed by US and international copyright laws. You may be able to use this item, but copyright and other considerations may apply. For possible additional information or guidance on your use, please contact the contributing organization.","","",Public,JSON API,,2022-04-18|2022-09-26,,Active,published,false,false,"",,2022-09-26 22:33:45 UTC,2023-02-07 18:35:42 UTC
5
+ Lake Superior and the northern part of Michigan,"","Relief shown by hachures.; Prime meridians: Greenwich and Washington.; ""Entered according to act of Congress in the year 1855 by J.H. Colton & Co. ...""; From Colton's atlas of the world. New York: J.H. Colton & Co., 1855?. No. 43.|29 x 42 centimeters|Scale approximately 1:1,625,000|General Map Collection",eng,J.H. Colton & Co.,fst01457236,J.H. Colton & Co (New York),University of Minnesota,Maps,"","","",|2022-creator-sprint,1855,1855,1855-1855,Michigan,"-92.25,45.0,-83.4167,49.1667","POLYGON((-92.25 49.1667, -83.4167 49.1667, -83.4167 45.0, -92.25 45.0, -92.25 49.1667))","","",64bd8c4c-8e60-4956-b43d-bdc3f93db488,05d-01|p16022coll230,"","","","",JPEG,,,false,,,,,,,,,https://umedia.lib.umn.edu/item/p16022coll230:1933,,https://cdm16022.contentdm.oclc.org/iiif/info/p16022coll230/1933/manifest.json,,,,,,,,,https://cdm16022.contentdm.oclc.org/utils/getthumbnail/collection/p16022coll230/id/1933,p16022coll230:1933,UMN_ALMA:9920722310001701,05d-01,"Use of this item may be governed by US and international copyright laws. You may be able to use this item, but copyright and other considerations may apply. For possible additional information or guidance on your use, please contact the contributing organization.","","",Public,JSON API,,2021-07-19|2022-09-26,,Active,published,false,false,"",,2021-09-21 07:03:39 UTC,2023-02-07 18:33:35 UTC
@@ -1,5 +1,7 @@
1
+ # :nocov:
1
2
  module GeoblacklightAdmin
2
3
  module RakeTask
3
4
  Dir[File.expand_path(File.join(File.dirname(__FILE__), "tasks/*.rake"))].each { |ext| load ext } if defined?(Rake)
4
5
  end
5
6
  end
7
+ # :nocov:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GeoblacklightAdmin
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoblacklight_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Larson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-09 00:00:00.000000000 Z
11
+ date: 2024-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_storage_validations
@@ -276,6 +276,20 @@ dependencies:
276
276
  - - "~>"
277
277
  - !ruby/object:Gem::Version
278
278
  version: '2.0'
279
+ - !ruby/object:Gem::Dependency
280
+ name: mutex_m
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - "~>"
284
+ - !ruby/object:Gem::Version
285
+ version: 0.2.0
286
+ type: :runtime
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - "~>"
291
+ - !ruby/object:Gem::Version
292
+ version: 0.2.0
279
293
  - !ruby/object:Gem::Dependency
280
294
  name: noticed
281
295
  requirement: !ruby/object:Gem::Requirement
@@ -355,7 +369,7 @@ dependencies:
355
369
  version: '7.0'
356
370
  - - "<"
357
371
  - !ruby/object:Gem::Version
358
- version: '8.0'
372
+ version: '7.2'
359
373
  type: :runtime
360
374
  prerelease: false
361
375
  version_requirements: !ruby/object:Gem::Requirement
@@ -365,7 +379,7 @@ dependencies:
365
379
  version: '7.0'
366
380
  - - "<"
367
381
  - !ruby/object:Gem::Version
368
- version: '8.0'
382
+ version: '7.2'
369
383
  - !ruby/object:Gem::Dependency
370
384
  name: ruby-progressbar
371
385
  requirement: !ruby/object:Gem::Requirement
@@ -398,16 +412,16 @@ dependencies:
398
412
  name: sprockets
399
413
  requirement: !ruby/object:Gem::Requirement
400
414
  requirements:
401
- - - "<"
415
+ - - "~>"
402
416
  - !ruby/object:Gem::Version
403
- version: '4'
417
+ version: '3.0'
404
418
  type: :runtime
405
419
  prerelease: false
406
420
  version_requirements: !ruby/object:Gem::Requirement
407
421
  requirements:
408
- - - "<"
422
+ - - "~>"
409
423
  - !ruby/object:Gem::Version
410
- version: '4'
424
+ version: '3.0'
411
425
  - !ruby/object:Gem::Dependency
412
426
  name: statesman
413
427
  requirement: !ruby/object:Gem::Requirement
@@ -604,6 +618,20 @@ dependencies:
604
618
  - - "~>"
605
619
  - !ruby/object:Gem::Version
606
620
  version: '1.6'
621
+ - !ruby/object:Gem::Dependency
622
+ name: rails-controller-testing
623
+ requirement: !ruby/object:Gem::Requirement
624
+ requirements:
625
+ - - "~>"
626
+ - !ruby/object:Gem::Version
627
+ version: '1.0'
628
+ type: :development
629
+ prerelease: false
630
+ version_requirements: !ruby/object:Gem::Requirement
631
+ requirements:
632
+ - - "~>"
633
+ - !ruby/object:Gem::Version
634
+ version: '1.0'
607
635
  - !ruby/object:Gem::Dependency
608
636
  name: rspec-rails
609
637
  requirement: !ruby/object:Gem::Requirement
@@ -622,16 +650,16 @@ dependencies:
622
650
  name: selenium-webdriver
623
651
  requirement: !ruby/object:Gem::Requirement
624
652
  requirements:
625
- - - ">="
653
+ - - "~>"
626
654
  - !ruby/object:Gem::Version
627
- version: '0'
655
+ version: '4.25'
628
656
  type: :development
629
657
  prerelease: false
630
658
  version_requirements: !ruby/object:Gem::Requirement
631
659
  requirements:
632
- - - ">="
660
+ - - "~>"
633
661
  - !ruby/object:Gem::Version
634
- version: '0'
662
+ version: '4.25'
635
663
  - !ruby/object:Gem::Dependency
636
664
  name: shoulda-context
637
665
  requirement: !ruby/object:Gem::Requirement
@@ -678,16 +706,16 @@ dependencies:
678
706
  name: sprockets
679
707
  requirement: !ruby/object:Gem::Requirement
680
708
  requirements:
681
- - - "<"
709
+ - - "~>"
682
710
  - !ruby/object:Gem::Version
683
- version: '4'
711
+ version: '3.0'
684
712
  type: :development
685
713
  prerelease: false
686
714
  version_requirements: !ruby/object:Gem::Requirement
687
715
  requirements:
688
- - - "<"
716
+ - - "~>"
689
717
  - !ruby/object:Gem::Version
690
- version: '4'
718
+ version: '3.0'
691
719
  - !ruby/object:Gem::Dependency
692
720
  name: standard
693
721
  requirement: !ruby/object:Gem::Requirement
@@ -730,6 +758,20 @@ dependencies:
730
758
  - - ">="
731
759
  - !ruby/object:Gem::Version
732
760
  version: '0'
761
+ - !ruby/object:Gem::Dependency
762
+ name: webmock
763
+ requirement: !ruby/object:Gem::Requirement
764
+ requirements:
765
+ - - "~>"
766
+ - !ruby/object:Gem::Version
767
+ version: '3.23'
768
+ type: :development
769
+ prerelease: false
770
+ version_requirements: !ruby/object:Gem::Requirement
771
+ requirements:
772
+ - - "~>"
773
+ - !ruby/object:Gem::Version
774
+ version: '3.23'
733
775
  description:
734
776
  email:
735
777
  - ewlarson@gmail.com
@@ -800,7 +842,6 @@ files:
800
842
  - app/helpers/document_helper.rb
801
843
  - app/helpers/form_input_helper.rb
802
844
  - app/helpers/geoblacklight_admin_helper.rb
803
- - app/helpers/import_documents_helper.rb
804
845
  - app/helpers/mappings_helper.rb
805
846
  - app/indexers/document_indexer.rb
806
847
  - app/javascript/controllers/results_controller.js
@@ -836,6 +877,11 @@ files:
836
877
  - app/models/bulk_action_state_machine.rb
837
878
  - app/models/bulk_action_transition.rb
838
879
  - app/models/bulk_actions/change_publication_state.rb
880
+ - app/models/bulk_actions/delete_thumbnails.rb
881
+ - app/models/bulk_actions/draft_document.rb
882
+ - app/models/bulk_actions/harvest_thumbnails.rb
883
+ - app/models/bulk_actions/publish_document.rb
884
+ - app/models/bulk_actions/unpublish_document.rb
839
885
  - app/models/concerns/geoblacklight_admin/publication_state_search_behavior.rb
840
886
  - app/models/document.rb
841
887
  - app/models/document/bbox_validator.rb
@@ -1064,6 +1110,7 @@ files:
1064
1110
  - lib/generators/geoblacklight_admin/templates/_user_util_links.html.erb
1065
1111
  - lib/generators/geoblacklight_admin/templates/api_controller.rb
1066
1112
  - lib/generators/geoblacklight_admin/templates/base.html.erb
1113
+ - lib/generators/geoblacklight_admin/templates/btaa_sample_records.csv
1067
1114
  - lib/generators/geoblacklight_admin/templates/config/database.yml
1068
1115
  - lib/generators/geoblacklight_admin/templates/config/geomg_aardvark_schema.json
1069
1116
  - lib/generators/geoblacklight_admin/templates/config/initializers/devise.rb
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # ImportDocumentsHelper
4
- module ImportDocumentsHelper
5
- end