geoblacklight_admin 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e701df1f71ca1e5d28c813e78766a943a924447099f92f0cc3320323d1c6410e
4
- data.tar.gz: a8f8d5ab9f85cc4cf8acfbd73ea8629eddf58b2094a80316ed4754ce4bf7b801
3
+ metadata.gz: 5514d1f3dfc7ba946eb58f955e9c3cfc76b073aeafcc86d0f62e3807bf013aba
4
+ data.tar.gz: 34c448fd3cb662cabf2f3f6cfd2f82b3b5166f681d7e4c0c3ef542ecad575893
5
5
  SHA512:
6
- metadata.gz: 0023c0bf31f458a92c7792338ad222621bab2e9538725a83cb6375e82b023ad25e1a46ff4b753812705c9799c494a60d39548c2ce9a54b88040158a72a04847b
7
- data.tar.gz: 4f7e2697731df82e9606d27f135d79b99cb6e490078b82a8726be160aa0c09a6bff852fa800822d8ebfa32a928617f864521194cd382196cda3c6f2630d837d8
6
+ metadata.gz: 2dcfb661be04c25e22a1941471c06b1dabcf6ee14744fe2faf815172e32b2a00b06639a808fb35f5bb05fef8ef8b0ddde038c8a786b45d38f5aff3aa856c648a
7
+ data.tar.gz: 38a23540721636da43ee97a2068f10ed127a85b380ecb6d84f1c1ee0045848295b100d781f48762b0204d738530cccdfbd3578ef1927ff87bbe8f6c55349c61a
@@ -82,7 +82,7 @@ module Admin
82
82
 
83
83
  respond_to do |format|
84
84
  if DocumentDownload.destroy_all(params.dig(:document_download, :downloads, :file))
85
- format.html { redirect_to admin_document_downloads_path, notice: "Download Links were created destroyed." }
85
+ format.html { redirect_to admin_document_downloads_path, notice: "Download Links were destroyed." }
86
86
  else
87
87
  format.html { redirect_to admin_document_downloads_path, notice: "Download Links could not be destroyed." }
88
88
  end
@@ -15,8 +15,9 @@ class DocumentAccess < ApplicationRecord
15
15
  ::CSV.foreach(file.path, headers: true) do |row|
16
16
  logger.debug("CSV Row: #{row.to_hash}")
17
17
  document_access = DocumentAccess.find_or_initialize_by(friendlier_id: row[0], institution_code: row[1])
18
- document_access.update(row.to_hash)
18
+ document_access.update!(row.to_hash)
19
19
  end
20
+ true
20
21
  end
21
22
 
22
23
  def self.destroy_all(file)
@@ -25,6 +26,7 @@ class DocumentAccess < ApplicationRecord
25
26
  logger.debug("CSV Row: #{row.to_hash}")
26
27
  DocumentAccess.destroy_by(id: row[0], friendlier_id: row[1])
27
28
  end
29
+ true
28
30
  end
29
31
 
30
32
  def to_csv
@@ -15,8 +15,9 @@ class DocumentDownload < ApplicationRecord
15
15
  ::CSV.foreach(file.path, headers: true) do |row|
16
16
  logger.debug("CSV Row: #{row.to_hash}")
17
17
  document_download = DocumentDownload.find_or_initialize_by(friendlier_id: row[0], label: row[1], value: row[2])
18
- document_download.update(row.to_hash)
18
+ document_download.update!(row.to_hash)
19
19
  end
20
+ true
20
21
  end
21
22
 
22
23
  def self.destroy_all(file)
@@ -25,6 +26,7 @@ class DocumentDownload < ApplicationRecord
25
26
  logger.debug("CSV Row: #{row.to_hash}")
26
27
  DocumentDownload.destroy_by(id: row[0], friendlier_id: row[1])
27
28
  end
29
+ true
28
30
  end
29
31
 
30
32
  def to_csv
@@ -314,12 +314,12 @@ module GeoblacklightAdmin
314
314
  end
315
315
 
316
316
  def add_kithe_bulk_loading_service
317
- inject_into_file "app/controllers/catalog_controller.rb", after: 'require "blacklight/catalog"' do
318
- "\nrequire 'kithe/blacklight_tools/bulk_loading_search_service'"
317
+ prepend_to_file "app/controllers/catalog_controller.rb" do
318
+ "require 'kithe/blacklight_tools/bulk_loading_search_service'\n\n"
319
319
  end
320
320
 
321
321
  inject_into_file "app/controllers/catalog_controller.rb", after: "include Blacklight::Catalog" do
322
- "\nself.search_service_class = Kithe::BlacklightTools::BulkLoadingSearchService"
322
+ "\n self.search_service_class = Kithe::BlacklightTools::BulkLoadingSearchService"
323
323
  end
324
324
  end
325
325
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GeoblacklightAdmin
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.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.4.0
4
+ version: 0.4.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: 2023-12-08 00:00:00.000000000 Z
11
+ date: 2024-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_storage_validations
@@ -554,14 +554,14 @@ dependencies:
554
554
  requirements:
555
555
  - - "~>"
556
556
  - !ruby/object:Gem::Version
557
- version: '6.1'
557
+ version: '7.0'
558
558
  type: :development
559
559
  prerelease: false
560
560
  version_requirements: !ruby/object:Gem::Requirement
561
561
  requirements:
562
562
  - - "~>"
563
563
  - !ruby/object:Gem::Version
564
- version: '6.1'
564
+ version: '7.0'
565
565
  - !ruby/object:Gem::Dependency
566
566
  name: minitest-reporters
567
567
  requirement: !ruby/object:Gem::Requirement