blacklight-marc 7.2.0 → 8.1.0

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: 4c370b1c69a4ed2a7c2e77de6dbdeedbf6314fa1334ae1c3f88f216bd7dad23a
4
- data.tar.gz: cf92a4865a958b67d9f9eec4f352e5cc666f5b1c052661d2e1d0899ce1e45419
3
+ metadata.gz: 23e9d46508c9e92c90ad0f589728440809b003db1ada7744b35961d393a7b17d
4
+ data.tar.gz: a7760905d39e8540bf22a6adb5ce6883de27c02796569f2469b1c3008d52e89a
5
5
  SHA512:
6
- metadata.gz: 54ddf02511c8fa185842d66f0f1f30a9ae988485fc0108e7f099fc6b4a8b4be83b56f96c6757949d7b3c95b9e1444fb08c219e68c3c5d2c1a81c560d092848e8
7
- data.tar.gz: f1d1c86c9635a4519c898763d7a6fc80a05088a3060c4dd41dae28d2b7b763806cd3f577094d9d69f4760a9dbbf26944ac47bf92ef6181c144e96711d8acff1c
6
+ metadata.gz: c80948cb35c420f12a658f36084856113d5e240843fc78534b45f678985000b19b3d16830d2660edbfebd9a7fdb6ea9cc31089fe5d2885c7d47628b5dea7ffab
7
+ data.tar.gz: f5909facef040f97f73d2071876e2c93a1cdb2cdbae2da9985b4e074780eb0fda021fdc902e7fcb8617387861c37d59d8340de5fc0fc562bfdf9715ce0b49260
@@ -2,24 +2,36 @@ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master ]
5
+ branches: [ main ]
6
6
  pull_request:
7
- branches: [ master ]
7
+ branches: [ main ]
8
8
 
9
9
  jobs:
10
10
  test:
11
11
  runs-on: ubuntu-latest
12
+ continue-on-error: ${{ matrix.experimental }}
12
13
  strategy:
13
14
  matrix:
14
- rails_version: [6.1.4.7, 7.0.2.3]
15
15
  ruby: [2.7, '3.0']
16
+ rails_version: ['6.1.7', '7.0.4']
17
+ blacklight_version: ['~> 7.0']
18
+ experimental: [false]
16
19
  include:
17
- - rails_version: 5.2.4.4
18
- ruby: 2.7
19
- - rails_version: 6.0.3.4
20
- ruby: 2.7
20
+ - ruby: '3.1'
21
+ rails_version: '7.0.4'
22
+ blacklight_version: '~> 7.0'
23
+ experimental: false
24
+ - ruby: '3.1'
25
+ rails_version: '7.0.4'
26
+ blacklight_version: '8.0.0.beta4'
27
+ experimental: false
28
+ - ruby: '3.1'
29
+ rails_version: '7.0.4'
30
+ blacklight_version: 'github'
31
+ experimental: true
21
32
  env:
22
33
  RAILS_VERSION: ${{ matrix.rails_version }}
34
+ BLACKLIGHT_VERSION: ${{ matrix.blacklight_version }}
23
35
  steps:
24
36
  - uses: actions/checkout@v2
25
37
  - name: Set up Ruby ${{ matrix.ruby }}
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/projectblacklight/blacklight-marc.png?branch=master)](https://travis-ci.org/projectblacklight/blacklight-marc)
1
+ ![Build Status](https://github.com/projectblacklight/blacklight-marc/actions/workflows/ruby.yml/badge.svg?branch=main)
2
2
 
3
3
  # Blacklight::Marc
4
4
 
@@ -35,7 +35,7 @@ include Blacklight::Marc::Catalog
35
35
  and the following code is generated into SolrDocument:
36
36
 
37
37
  ```ruby
38
- use_extension( Blacklight::Solr::Document::Marc) do |document|
38
+ use_extension( Blacklight::Marc::DocumentExtension) do |document|
39
39
  document.key?( :marc_display )
40
40
  end
41
41
  ```
@@ -1,25 +1,14 @@
1
1
  /* border between items on marc view */
2
2
  $marc_item_separator: 1px solid $text-muted !default;
3
3
 
4
- #librarian_view
5
- {
6
- left:-17%;
7
- text-align:left;
8
- top:10%;
9
- width:700px;
10
- }
11
-
12
- #marc_view
13
- {
14
- text-align:left;
15
- /* https://meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/ */
16
- font-family: "Courier New", monospace, serif;
17
- font-size: 1em;
4
+ .marc_view {
5
+ font-family: $font-family-monospace;
18
6
 
19
- .field
20
- {
7
+ .field {
8
+ align-items: flex-start;
21
9
  border-bottom: $marc_item_separator;
22
- clear:both;
10
+ display: flex;
11
+ gap: 2em;
23
12
  }
24
13
 
25
14
  .ind1, .ind2
@@ -28,13 +17,7 @@ $marc_item_separator: 1px solid $text-muted !default;
28
17
  padding: 0 ($spacer / 2);
29
18
  }
30
19
 
31
- .subfields
32
- {
33
- padding-left:5em;
34
- }
35
-
36
- .tag_ind
37
- {
38
- float:left;
39
- }
20
+ .tag_ind {
21
+ flex-shrink: 0;
22
+ }
40
23
  }
@@ -9,13 +9,20 @@ module Blacklight::Marc
9
9
  end
10
10
 
11
11
  def librarian_view
12
- @response, deprecated_document = search_service.fetch params[:id]
13
- @document = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(deprecated_document, "The @document instance variable is deprecated and will be removed in Blacklight-marc 8.0")
12
+ if Blacklight::VERSION >= '8'
13
+ @document = search_service.fetch(params[:id])
14
+ @response = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(@document.response, "The @response instance variable is deprecated and will be removed in Blacklight-marc 8.0")
15
+
16
+ else
17
+ deprecated_response, @document = search_service.fetch(params[:id])
18
+ @response = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(deprecated_response, "The @response instance variable is deprecated and will be removed in Blacklight-marc 8.0")
19
+ end
20
+
14
21
  respond_to do |format|
15
22
  format.html do
16
23
  return render layout: false if request.xhr?
17
24
  # Otherwise draw the full page
18
- end
25
+ end
19
26
  end
20
27
  end
21
28
 
@@ -12,8 +12,8 @@ module BlacklightMarcHelper
12
12
  end
13
13
 
14
14
  # For exporting a single endnote document. (endnote_catalog_path is defined by blacklight-marc and it is used for multiple document export)
15
- def single_endnote_catalog_path opts = {}, *_
16
- solr_document_path(opts.merge(format: 'endnote'))
15
+ def single_endnote_catalog_path opts = {}, **kwargs
16
+ solr_document_path(opts['id'], **kwargs.merge(opts).merge(format: 'endnote').except('id'))
17
17
  end
18
18
 
19
19
 
@@ -39,4 +39,12 @@ module BlacklightMarcHelper
39
39
  end
40
40
  val
41
41
  end
42
+
43
+ # A URL to refworks export, with an embedded callback URL to this app.
44
+ # the callback URL is to bookmarks#export, which delivers a list of
45
+ # user's bookmarks in 'refworks marc txt' format -- we tell refworks
46
+ # to expect that format.
47
+ def bookmarks_export_url(format, params = {})
48
+ bookmarks_url(params.merge(format: format, encrypted_user_id: encrypt_user_id(current_or_guest_user.id)))
49
+ end
42
50
  end
@@ -299,6 +299,10 @@ module Blacklight::Marc::DocumentExport
299
299
  pub_info << clean_end_punctuation(marc["260"]["a"]).strip if marc["260"]["a"]
300
300
  pub_info << ": #{clean_end_punctuation(marc["260"]["b"]).strip}" if marc["260"]["b"]
301
301
  pub_info << ", #{setup_pub_date(marc)}" if marc["260"]["c"]
302
+ elsif marc["264"] and (marc["264"]["a"] or marc["264"]["b"])
303
+ pub_info << clean_end_punctuation(marc["264"]["a"]).strip if marc["264"]["a"]
304
+ pub_info << ": #{clean_end_punctuation(marc["264"]["b"]).strip}" if marc["264"]["b"]
305
+ pub_info << ", #{setup_pub_date(marc)}" if marc["264"]["c"]
302
306
  elsif marc["502"] and marc["502"]["a"] # MARC 502 is the Dissertation Note. This holds the correct pub info for these types of records.
303
307
  pub_info << marc["502"]["a"]
304
308
  elsif marc["502"] and (marc["502"]["b"] or marc["502"]["c"] or marc["502"]["d"]) #sometimes the dissertation note is encoded in pieces in the $b $c and $d sub fields instead of lumped into the $a
@@ -414,8 +418,8 @@ module Blacklight::Marc::DocumentExport
414
418
  text
415
419
  end
416
420
  def setup_pub_date(record)
417
- if !record.find{|f| f.tag == '260'}.nil?
418
- pub_date = record.find{|f| f.tag == '260'}
421
+ if !record.find{|f| ['260', '264'].include?(f.tag)}.nil?
422
+ pub_date = record.find{|f| ['260', '264'].include?(f.tag)}
419
423
  if pub_date.find{|s| s.code == 'c'}
420
424
  date_value = pub_date.find{|s| s.code == 'c'}.value.gsub(/[^0-9|n\.d\.]/, "")[0,4] unless pub_date.find{|s| s.code == 'c'}.value.gsub(/[^0-9|n\.d\.]/, "")[0,4].blank?
421
425
  end
@@ -425,7 +429,7 @@ module Blacklight::Marc::DocumentExport
425
429
  end
426
430
  def setup_pub_info(record)
427
431
  text = ''
428
- pub_info_field = record.find{|f| f.tag == '260'}
432
+ pub_info_field = get_publication_data(record)
429
433
  if !pub_info_field.nil?
430
434
  a_pub_info = pub_info_field.find{|s| s.code == 'a'}
431
435
  b_pub_info = pub_info_field.find{|s| s.code == 'b'}
@@ -551,6 +555,10 @@ module Blacklight::Marc::DocumentExport
551
555
  {:primary_authors => primary_authors, :translators => translators, :editors => editors, :compilers => compilers}
552
556
  end
553
557
 
558
+ def get_publication_data(record)
559
+ publication_data = record.find{|field| field.tag == '260'} || record.find{|field| field.tag == '264'}
560
+ end
561
+
554
562
  def abbreviate_name(name)
555
563
  name_parts = name.split(", ")
556
564
  first_name_parts = name_parts.last.split(" ")
@@ -1,32 +1,30 @@
1
- <div id="marc_view" class="modal-body">
2
- <% fields = document.to_marc.find_all{|f| ('000'..'999') === f.tag } %>
1
+ <div id="marc_view" class="marc_view">
3
2
  <div class="field"><%= t('blacklight.search.librarian_view.leader', :leader => document.to_marc.leader) %></div>
4
- <%- fields.each do |field| -%>
5
- <%- unless field.tag.to_s == "940" -%>
3
+ <%- document.to_marc.each do |field| -%>
6
4
  <div class="field">
7
- <div class="tag_ind">
8
- <span class="tag">
9
- <%= h(field.tag) %>
10
- </span>
11
5
  <%- if field.is_a?(MARC::ControlField) -%>
12
- <span class="control_field_values">
13
- <%= h(field.value) %>
14
- </span>
6
+ <div class="tag_ind">
7
+ <span class="tag"><%= field.tag %></span>
8
+ </div>
9
+ <span class="control_field_values">
10
+ <%= h(field.value) %>
11
+ </span>
15
12
  <%- else -%>
13
+ <div class="tag_ind">
14
+ <span class="tag"><%= field.tag %></span>
16
15
  <div class="ind1">
17
- <%= !field.indicator1.blank? ? field.indicator1 : "&nbsp;".html_safe -%>
16
+ <%= field.try(:indicator1).present? ? field.indicator1 : "&nbsp;".html_safe -%>
18
17
  </div>
19
18
  <div class="ind2">
20
- <%= !field.indicator2.blank? ? field.indicator2 : "&nbsp;".html_safe -%>
19
+ <%= field.try(:indicator2).present? ? field.indicator2 : "&nbsp;".html_safe -%>
21
20
  </div>
22
21
  </div>
23
22
  <div class="subfields">
24
23
  <%- field.each do |sub| -%>
25
- <span class="sub_code"><%= h(sub.code) %>|</span> <%= h(sub.value) %>
26
- <%- end -%>
27
- <%- end -%>
24
+ <span class="sub_code"><%= sub.code %>|</span> <%= sub.value %>
25
+ <%- end -%>
28
26
  </div>
27
+ <%- end -%>
29
28
  </div>
30
- <%- end-%>
31
29
  <%- end -%>
32
30
  </div>
@@ -1,13 +1,8 @@
1
-
2
- <div class="modal-header">
3
- <h1 class="modal-title"><%= t('blacklight.search.librarian_view.title') %></h1>
4
- <button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="Close">
5
- <span aria-hidden="true">×</span>
6
- </button>
7
- </div>
8
- <%- if @response.documents.first.respond_to?(:to_marc) -%>
9
- <%= render "marc_view", document: @response.documents.first %>
10
- <%- else %>
11
- <%= t('blacklight.search.librarian_view.empty') %>
12
- <%- end -%>
13
-
1
+ <%= render Blacklight::System::ModalComponent.new do |component| %>
2
+ <% component.with_title { t('blacklight.search.librarian_view.title') } %>
3
+ <%- if @document.respond_to?(:to_marc) -%>
4
+ <%= render "marc_view", document: @document %>
5
+ <%- else %>
6
+ <%= t('blacklight.search.librarian_view.empty') %>
7
+ <%- end -%>
8
+ <% end %>
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency 'blacklight', '~> 7.0'
21
+ spec.add_dependency 'blacklight', '>= 7.11', '< 9'
22
22
  spec.add_dependency "library_stdnums"
23
23
  spec.add_dependency "rails"
24
24
  spec.add_dependency "marc", ">= 0.4.3", "< 2.0" # Marc record parser.
@@ -1,5 +1,5 @@
1
1
  module Blacklight
2
2
  module Marc
3
- VERSION = '7.2.0'
3
+ VERSION = '8.1.0'
4
4
  end
5
5
  end
@@ -106,7 +106,7 @@ def compute_arguments
106
106
  File.join( plugin_site_path, "config-#{::Rails.env}.properties"),
107
107
  File.join( plugin_site_path, "config.properties"),
108
108
  ].each do |file_path|
109
- if File.exists?(file_path)
109
+ if File.exist?(file_path)
110
110
  arguments[:config_properties_path] = file_path
111
111
  break
112
112
  end
@@ -147,7 +147,7 @@ def locate_path(*subpath_fragments)
147
147
  local_root = File.expand_path File.join(File.dirname(__FILE__), '..', '..')
148
148
  subpath = subpath_fragments.join('/')
149
149
  base_match = [Rails.root, local_root].find do |base|
150
- File.exists? File.join(base, subpath)
150
+ File.exist? File.join(base, subpath)
151
151
  end
152
152
  File.join(base_match.to_s, subpath) if base_match
153
153
  end
@@ -17,6 +17,7 @@
17
17
  </updateHandler>
18
18
 
19
19
  <!-- solr lib dirs -->
20
+ <lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
20
21
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
21
22
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
22
23
 
@@ -9,5 +9,10 @@ describe "Record View" do
9
9
  link = find_link("Export to Refworks")
10
10
  expect(link['href']).to include CGI.escape(solr_document_path('2008305903', format: :refworks_marc_txt))
11
11
  end
12
+
13
+ it 'has an endnote link' do
14
+ visit solr_document_path('2008305903')
15
+ expect(page).to have_link "Export to EndNote", href: solr_document_path('2008305903', format: :endnote)
16
+ end
12
17
  end
13
18
  end
@@ -23,24 +23,12 @@ describe BlacklightMarcHelper do
23
23
  expect(helper.render_endnote_texts([one, two])).to eq "one\ntwo\n"
24
24
  end
25
25
  end
26
- require 'spec_helper'
27
26
 
28
- describe '#document_action_path' do
29
- before do
30
- allow(helper).to receive_messages(controller_name: 'catalog')
31
- end
32
-
33
- let(:document_action_config) { Blacklight::Configuration::ToolConfig.new(tool_config) }
34
- let(:document) { SolrDocument.new(id: '123') }
35
-
36
- subject { helper.document_action_path(document_action_config, id: document) }
37
-
38
- context "for endnote" do
39
- let(:tool_config) { { if: :render_refworks_action?, partial: "document_action",
40
- name: :endnote, key: :endnote, path: :single_endnote_catalog_path } }
41
-
42
- it { is_expected.to eq '/catalog/123.endnote' }
27
+ describe "#bookmarks_export_url" do
28
+ it "is the bookmark url with an encrypted user token" do
29
+ allow(helper).to receive_messages(encrypt_user_id: 'xyz', current_or_guest_user: double(id: 123))
30
+ url = helper.bookmarks_export_url(:html)
31
+ expect(url).to eq helper.bookmarks_url(format: :html, encrypted_user_id: 'xyz')
43
32
  end
44
33
  end
45
-
46
34
  end
@@ -0,0 +1,63 @@
1
+ require 'spec_helper'
2
+
3
+ class MockClass260
4
+ include Blacklight::Marc::DocumentExport
5
+
6
+ def to_marc
7
+ fields = [
8
+ { "100" => { "subfields" => [{ "a" => "Borja, Ronaldo I." }]}},
9
+ { "245" => { "ind1" => " ", "ind2" => " ", "subfields" => [{ "a" => "Plasticity : ", "b" => "modeling & computation /", "c" => "Ronaldo I. Borja." }] } },
10
+ { "260" => { "ind1" => " ", "ind2" => " ", "subfields" => [{ "a" => "Berlin :", "b" => "Springer,", "c" => "[2013]" }] } }
11
+ ]
12
+ MARC::Record.new_from_hash('fields' => fields)
13
+ end
14
+ end
15
+
16
+ class MockClass264
17
+ include Blacklight::Marc::DocumentExport
18
+
19
+ def to_marc
20
+ fields = [
21
+ { "100" => { "subfields" => [{ "a" => "Borja, Ronaldo I." }]}},
22
+ { "245" => { "ind1" => " ", "ind2" => " ", "subfields" => [{ "a" => "Plasticity : ", "b" => "modeling & computation /", "c" => "Ronaldo I. Borja." }] } },
23
+ { "264" => { "ind1" => " ", "ind2" => " ", "subfields" => [{ "a" => "Berlin :", "b" => "Springer,", "c" => "[2013]" }] } }
24
+ ]
25
+ MARC::Record.new_from_hash('fields' => fields)
26
+ end
27
+ end
28
+
29
+ RSpec.describe Blacklight::Marc::DocumentExport do
30
+ describe 'export citiations from 260 field' do
31
+ it 'exports citations in apa format' do
32
+ expect(MockClass260.new.export_as_apa_citation_txt).to include('(2013)')
33
+ expect(MockClass260.new.export_as_apa_citation_txt).to include('Berlin: Springer.')
34
+ end
35
+
36
+ it 'exports citations in mla format' do
37
+ expect(MockClass260.new.export_as_mla_citation_txt).to include('2013.')
38
+ expect(MockClass260.new.export_as_mla_citation_txt).to include('Berlin: Springer,')
39
+ end
40
+
41
+ it 'exports citations in Chicago format' do
42
+ expect(MockClass260.new.export_as_chicago_citation_txt).to include('2013.')
43
+ expect(MockClass260.new.export_as_chicago_citation_txt).to include('Berlin: Springer,')
44
+ end
45
+ end
46
+
47
+ describe 'export citations from 264 field' do
48
+ it 'exports citations in apa format' do
49
+ expect(MockClass264.new.export_as_apa_citation_txt).to include('(2013)')
50
+ expect(MockClass264.new.export_as_apa_citation_txt).to include('Berlin: Springer.')
51
+ end
52
+
53
+ it 'exports citations in mla format' do
54
+ expect(MockClass264.new.export_as_mla_citation_txt).to include('2013.')
55
+ expect(MockClass264.new.export_as_mla_citation_txt).to include('Berlin: Springer,')
56
+ end
57
+
58
+ it 'exports citations in Chicago format' do
59
+ expect(MockClass264.new.export_as_chicago_citation_txt).to include('2013.')
60
+ expect(MockClass264.new.export_as_chicago_citation_txt).to include('Berlin: Springer,')
61
+ end
62
+ end
63
+ end
@@ -1,7 +1,5 @@
1
1
  module ControllerLevelHelpers
2
2
  module ControllerViewHelpers
3
- include Blacklight::Facet
4
-
5
3
  def blacklight_config
6
4
  controller.blacklight_config
7
5
  end
@@ -18,4 +16,4 @@ module ControllerLevelHelpers
18
16
  def initialize_controller_helpers(helper)
19
17
  helper.extend ControllerViewHelpers
20
18
  end
21
- end
19
+ end
@@ -1 +1,7 @@
1
1
  gem "traject", '~>3.0'
2
+
3
+ if ENV['BLACKLIGHT_VERSION'] == 'github'
4
+ gem 'blacklight', github: 'projectblacklight/blacklight'
5
+ elsif ENV['BLACKLIGHT_VERSION'] && !ENV['BLACKLIGHT_VERSION'].empty?
6
+ gem 'blacklight', ENV['BLACKLIGHT_VERSION']
7
+ end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-marc
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.0
4
+ version: 8.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-10 00:00:00.000000000 Z
11
+ date: 2023-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blacklight
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '7.11'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '7.0'
22
+ version: '9'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '7.11'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '7.0'
32
+ version: '9'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: library_stdnums
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -227,6 +233,7 @@ files:
227
233
  - README.md
228
234
  - Rakefile
229
235
  - app/assets/stylesheets/blacklight_marc.scss
236
+ - app/controllers/concerns/blacklight/marc/catalog.rb
230
237
  - app/helpers/blacklight_marc_helper.rb
231
238
  - app/models/concerns/blacklight/marc/document_export.rb
232
239
  - app/models/concerns/blacklight/marc/document_extension.rb
@@ -247,7 +254,6 @@ files:
247
254
  - config/locales/blacklight_marc.pt-BR.yml
248
255
  - config/routes.rb
249
256
  - lib/blacklight/marc.rb
250
- - lib/blacklight/marc/catalog.rb
251
257
  - lib/blacklight/marc/engine.rb
252
258
  - lib/blacklight/marc/indexer.rb
253
259
  - lib/blacklight/marc/indexer/dewey.rb
@@ -294,6 +300,7 @@ files:
294
300
  - spec/lib/marc_export_spec.rb
295
301
  - spec/lib/tasks/solr_marc_task_spec.rb
296
302
  - spec/lib/traject_indexer_spec.rb
303
+ - spec/models/concerns/blacklight/marc/document_export_spec.rb
297
304
  - spec/routing/routes_spec.rb
298
305
  - spec/spec_helper.rb
299
306
  - spec/support/controller_level_helpers.rb
@@ -301,7 +308,6 @@ files:
301
308
  - spec/test_app_templates/lib/generators/test_app_generator.rb
302
309
  - spec/views/bookmarks/_endnote.html.erb_spec.rb
303
310
  - spec/views/bookmarks/_refworks.html.erb_spec.rb
304
- - spec/views/catalog/_document_action.html.erb_spec.rb
305
311
  - spec/views/catalog/index.atom.builder_spec.rb
306
312
  - test_support/config/translation_maps/test_dewey.properties
307
313
  - test_support/config/translation_maps/test_formats.properties
@@ -325,7 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
325
331
  - !ruby/object:Gem::Version
326
332
  version: '0'
327
333
  requirements: []
328
- rubygems_version: 3.2.32
334
+ rubygems_version: 3.3.3
329
335
  signing_key:
330
336
  specification_version: 4
331
337
  summary: MARC support for Blacklight
@@ -343,6 +349,7 @@ test_files:
343
349
  - spec/lib/marc_export_spec.rb
344
350
  - spec/lib/tasks/solr_marc_task_spec.rb
345
351
  - spec/lib/traject_indexer_spec.rb
352
+ - spec/models/concerns/blacklight/marc/document_export_spec.rb
346
353
  - spec/routing/routes_spec.rb
347
354
  - spec/spec_helper.rb
348
355
  - spec/support/controller_level_helpers.rb
@@ -350,5 +357,4 @@ test_files:
350
357
  - spec/test_app_templates/lib/generators/test_app_generator.rb
351
358
  - spec/views/bookmarks/_endnote.html.erb_spec.rb
352
359
  - spec/views/bookmarks/_refworks.html.erb_spec.rb
353
- - spec/views/catalog/_document_action.html.erb_spec.rb
354
360
  - spec/views/catalog/index.atom.builder_spec.rb
@@ -1,21 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'catalog/_document_action' do
4
- let(:document_action_config) { Blacklight::Configuration::ToolConfig.new(tool_config) }
5
- let(:document) { SolrDocument.new(id: '123') }
6
-
7
- before do
8
- allow(view).to receive_messages(controller_name: 'catalog')
9
- render 'catalog/document_action', document_action_config: document_action_config, document: document
10
- end
11
-
12
- context "for refworks" do
13
- let(:tool_config) { { if: :render_refworks_action?, partial: "document_action",
14
- name: :refworks, key: :refworks, modal: false } }
15
-
16
- it "should not be modal" do
17
- expect(rendered).to have_link('Export to Refworks')
18
- expect(rendered).not_to have_selector('a[data-ajax-modal]')
19
- end
20
- end
21
- end