blacklight 4.9.0 → 5.0.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.travis.yml +22 -12
- data/Gemfile +3 -40
- data/LICENSE +1 -2
- data/README.md +1 -2
- data/Rakefile +0 -4
- data/VERSION +1 -1
- data/app/assets/images/blacklight/logo.png +0 -0
- data/app/assets/javascripts/blacklight/ajax_modal.js +190 -0
- data/app/assets/javascripts/blacklight/blacklight.js +7 -17
- data/app/assets/javascripts/blacklight/checkbox_submit.js +1 -1
- data/app/assets/stylesheets/blacklight/{_blacklight_base.scss → _blacklight_base.css.scss} +0 -21
- data/app/assets/stylesheets/blacklight/_bookmark.css.scss +4 -0
- data/app/assets/stylesheets/blacklight/_catalog.css.scss +192 -0
- data/app/assets/stylesheets/blacklight/_facets.css.scss +141 -0
- data/app/assets/stylesheets/blacklight/{_group.scss → _group.css.scss} +1 -1
- data/app/assets/stylesheets/blacklight/_header.css.scss +44 -0
- data/app/assets/stylesheets/blacklight/_layout.css.scss +5 -0
- data/app/assets/stylesheets/blacklight/{_modal.scss → _modal.css.scss} +7 -7
- data/app/assets/stylesheets/blacklight/_search_history.css.scss +20 -0
- data/app/assets/stylesheets/blacklight/{blacklight.scss → blacklight.css.scss} +0 -0
- data/app/assets/stylesheets/blacklight/blacklight_defaults.css.scss +14 -0
- data/app/controllers/bookmarks_controller.rb +0 -4
- data/app/controllers/feedback_controller.rb +0 -4
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +45 -155
- data/app/helpers/blacklight/catalog_helper_behavior.rb +8 -41
- data/app/helpers/blacklight/facets_helper_behavior.rb +20 -43
- data/app/helpers/blacklight/hash_as_hidden_fields_helper_behavior.rb +2 -9
- data/app/helpers/blacklight/render_constraints_helper_behavior.rb +9 -14
- data/app/helpers/blacklight/search_history_constraints_helper_behavior.rb +6 -6
- data/app/views/_flash_msg.html.erb +9 -2
- data/app/views/_user_util_links.html.erb +29 -15
- data/app/views/bookmarks/_tools.html.erb +4 -7
- data/app/views/bookmarks/index.html.erb +3 -2
- data/app/views/catalog/_citation.html.erb +1 -1
- data/app/views/catalog/_constraints.html.erb +1 -1
- data/app/views/catalog/_constraints_element.html.erb +12 -8
- data/app/views/catalog/_did_you_mean.html.erb +2 -2
- data/app/views/catalog/_document_header.html.erb +3 -3
- data/app/views/catalog/_email_form.html.erb +10 -10
- data/app/views/catalog/_facet_layout.html.erb +11 -3
- data/app/views/catalog/_facet_limit.html.erb +7 -7
- data/app/views/catalog/_facet_pagination.html.erb +8 -7
- data/app/views/catalog/_facet_pivot.html.erb +3 -1
- data/app/views/catalog/_facets.html.erb +12 -9
- data/app/views/catalog/_paginate_compact.html.erb +1 -7
- data/app/views/catalog/_per_page_widget.html.erb +5 -8
- data/app/views/catalog/_previous_next_doc.html.erb +11 -9
- data/app/views/catalog/_refworks_form.html.erb +3 -4
- data/app/views/catalog/_results_pagination.html.erb +1 -1
- data/app/views/catalog/_search_form.html.erb +16 -14
- data/app/views/catalog/_show_sidebar.html.erb +7 -9
- data/app/views/catalog/_show_tools.html.erb +13 -7
- data/app/views/catalog/_sms_form.html.erb +8 -8
- data/app/views/catalog/_sort_and_per_page.html.erb +4 -6
- data/app/views/catalog/_sort_widget.html.erb +5 -6
- data/app/views/catalog/email.html.erb +1 -1
- data/app/views/catalog/facet.html.erb +2 -8
- data/app/views/catalog/index.html.erb +11 -6
- data/app/views/catalog/show.html.erb +5 -5
- data/app/views/catalog/sms.html.erb +1 -1
- data/app/views/catalog/sms_sent.html.erb +1 -1
- data/app/views/feedback/complete.html.erb +2 -2
- data/app/views/feedback/show.html.erb +1 -1
- data/app/views/kaminari/blacklight/_paginator.html.erb +1 -1
- data/app/views/kaminari/blacklight_compact/_paginator.html.erb +25 -5
- data/app/views/layouts/blacklight.html.erb +23 -23
- data/app/views/saved_searches/index.html.erb +2 -2
- data/app/views/search_history/index.html.erb +5 -7
- data/app/views/shared/_header_navbar.html.erb +23 -23
- data/blacklight.gemspec +10 -13
- data/config/locales/blacklight.en.yml +1 -12
- data/config/locales/blacklight.fr.yml +1 -12
- data/gemfiles/rails3.gemfile +21 -0
- data/gemfiles/rails4.gemfile +20 -0
- data/lib/blacklight.rb +0 -8
- data/lib/blacklight/base.rb +0 -2
- data/lib/blacklight/catalog.rb +6 -32
- data/lib/blacklight/catalog/search_context.rb +8 -48
- data/lib/blacklight/configurable.rb +2 -1
- data/lib/blacklight/configuration.rb +1 -2
- data/lib/blacklight/configuration/facet_field.rb +0 -2
- data/lib/blacklight/engine.rb +3 -3
- data/lib/blacklight/legacy_controller_methods.rb +1 -64
- data/lib/blacklight/rails/routes.rb +17 -0
- data/lib/blacklight/routes.rb +46 -40
- data/lib/blacklight/solr.rb +1 -0
- data/lib/blacklight/solr/document.rb +21 -42
- data/lib/blacklight/solr/facet_paginator.rb +30 -54
- data/lib/blacklight/solr/request.rb +45 -0
- data/lib/blacklight/solr_helper.rb +16 -53
- data/lib/blacklight/solr_response.rb +0 -6
- data/lib/blacklight/user.rb +2 -7
- data/lib/blacklight/utils.rb +1 -9
- data/lib/generators/blacklight/assets_generator.rb +0 -14
- data/lib/generators/blacklight/blacklight_generator.rb +17 -14
- data/lib/generators/blacklight/templates/blacklight.css.scss +3 -0
- data/lib/generators/blacklight/templates/catalog_controller.rb +4 -1
- data/lib/railties/blacklight.rake +3 -1
- data/solr/sample_solr_documents.yml +641 -0
- data/spec/controllers/application_controller_spec.rb +5 -21
- data/spec/controllers/bookmarks_controller_spec.rb +11 -11
- data/spec/controllers/catalog_controller_spec.rb +122 -119
- data/spec/controllers/search_history_controller_spec.rb +8 -8
- data/spec/features/alternate_controller_spec.rb +5 -5
- data/spec/features/facets_spec.rb +9 -0
- data/spec/features/record_view_spec.rb +1 -1
- data/spec/features/search_filters_spec.rb +97 -41
- data/spec/features/search_results_spec.rb +14 -17
- data/spec/features/search_sort_spec.rb +1 -1
- data/spec/helpers/blacklight_helper_spec.rb +170 -285
- data/spec/helpers/catalog_helper_spec.rb +57 -96
- data/spec/helpers/facets_helper_spec.rb +130 -152
- data/spec/helpers/hash_as_hidden_fields_spec.rb +9 -15
- data/spec/helpers/render_constraints_helper_spec.rb +5 -5
- data/spec/helpers/search_history_constraints_helper_spec.rb +21 -21
- data/spec/lib/blacklight/routes_spec.rb +25 -0
- data/spec/lib/blacklight/solr/request_spec.rb +37 -0
- data/spec/lib/blacklight/solr_response/group_response_spec.rb +2 -2
- data/spec/lib/blacklight_configurable_spec.rb +16 -16
- data/spec/lib/blacklight_configuration_spec.rb +132 -132
- data/spec/lib/blacklight_email_spec.rb +4 -4
- data/spec/lib/blacklight_sms_spec.rb +4 -4
- data/spec/lib/blacklight_solr_document_dublin_core_spec.rb +6 -6
- data/spec/lib/blacklight_solr_document_more_like_this_spec.rb +4 -4
- data/spec/lib/blacklight_solr_document_spec.rb +36 -36
- data/spec/lib/blacklight_solr_response_spec.rb +43 -48
- data/spec/lib/blacklight_spec.rb +6 -14
- data/spec/lib/blacklight_user_spec.rb +5 -9
- data/spec/lib/facet_paginator_spec.rb +59 -51
- data/spec/lib/search_fields_spec.rb +13 -13
- data/spec/lib/solr_helper_spec.rb +258 -304
- data/spec/lib/tasks/blacklight_task_spec.rb +1 -1
- data/spec/lib/utils_spec.rb +16 -46
- data/spec/models/bookmark_spec.rb +6 -7
- data/spec/models/record_mailer_spec.rb +16 -16
- data/spec/models/search_spec.rb +8 -8
- data/spec/models/solr_document_spec.rb +6 -77
- data/spec/routing/catalog_routing_spec.rb +16 -10
- data/spec/spec_helper.rb +7 -7
- data/spec/support/assert_difference.rb +2 -2
- data/spec/support/features.rb +0 -11
- data/spec/support/features/session_helpers.rb +3 -3
- data/spec/support/include_text.rb +2 -2
- data/spec/test_app_templates/Gemfile.extra +10 -2
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +12 -18
- data/spec/views/catalog/_constraints_element.html.erb_spec.rb +13 -13
- data/spec/views/catalog/_document.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_document_list.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_facets.html.erb_spec.rb +13 -14
- data/spec/views/catalog/_index_default.erb_spec.rb +21 -21
- data/spec/views/catalog/_search_header.erb_spec.rb +1 -1
- data/spec/views/catalog/_show_default.erb_spec.rb +21 -21
- data/spec/views/catalog/_show_sidebar.erb_spec.rb +7 -7
- data/spec/views/catalog/_thumbnail_default.erb_spec.rb +3 -3
- data/spec/views/catalog/index.atom.builder_spec.rb +29 -29
- data/spec/views/catalog/index.html.erb_spec.rb +6 -7
- data/tasks/blacklight.rake +8 -2
- metadata +84 -180
- data/app/assets/javascripts/blacklight/css_dropdowns.js +0 -10
- data/app/assets/javascripts/blacklight/facet_expand_contract.js +0 -41
- data/app/assets/javascripts/blacklight/lightbox_dialog.js +0 -70
- data/app/assets/javascripts/blacklight/select_submit.js +0 -27
- data/app/assets/javascripts/blacklight/zebra_stripe.js +0 -13
- data/app/assets/javascripts/improved-modal/bootstrap-modal.js +0 -355
- data/app/assets/javascripts/improved-modal/bootstrap-modalmanager.js +0 -370
- data/app/assets/stylesheets/blacklight/_bookmark.scss +0 -33
- data/app/assets/stylesheets/blacklight/_catalog.scss +0 -255
- data/app/assets/stylesheets/blacklight/_dropdown.scss +0 -57
- data/app/assets/stylesheets/blacklight/_facets.scss +0 -197
- data/app/assets/stylesheets/blacklight/_footer.scss +0 -0
- data/app/assets/stylesheets/blacklight/_header.scss +0 -53
- data/app/assets/stylesheets/blacklight/_layout.scss +0 -10
- data/app/assets/stylesheets/blacklight/_mixins.scss +0 -0
- data/app/assets/stylesheets/blacklight/_print.scss +0 -0
- data/app/assets/stylesheets/blacklight/_responsive.scss +0 -3
- data/app/assets/stylesheets/blacklight/_search_history.scss +0 -42
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +0 -49
- data/app/assets/stylesheets/blacklight/responsive_partials/_catalog.scss +0 -5
- data/app/assets/stylesheets/blacklight/responsive_partials/_facets.scss +0 -37
- data/app/assets/stylesheets/blacklight/responsive_partials/_header.scss +0 -30
- data/app/assets/stylesheets/improved-modal/bootstrap-modal.css +0 -217
- data/app/helpers/blacklight/html_head_helper_behavior.rb +0 -118
- data/app/helpers/html_head_helper.rb +0 -3
- data/app/views/catalog/_bookmark_form.html.erb +0 -7
- data/app/views/catalog/_marc_view.html.erb +0 -32
- data/app/views/catalog/librarian_view.html.erb +0 -10
- data/config/routes.rb +0 -17
- data/doc/Atom-Responses.md +0 -90
- data/doc/Blacklight-3.0-Release-Notes-And-Upgrade-Guide.md +0 -107
- data/doc/Blacklight-3.2-Release-Notes-and-Upgrade-Guide.md +0 -191
- data/doc/Blacklight-3.3-release-notes-and-upgrade-guide.md +0 -37
- data/doc/Blacklight-3.4-release-notes-and-upgrade-guide.md +0 -27
- data/doc/Blacklight-3.5-release-notes-and-upgrade-guide.md +0 -44
- data/doc/Blacklight-3.6-release-notes-and-upgrade-guide.md +0 -25
- data/doc/Blacklight-3.7-release-notes-and-upgrade-guide.md +0 -80
- data/doc/Blacklight-3.8-release-notes-and-upgrade-guide.md +0 -11
- data/doc/Blacklight-4.0-release-notes-and-upgrade-guide.md +0 -135
- data/doc/Blacklight-4.1-release-notes-and-upgrade-guide.md +0 -17
- data/doc/Blacklight-4.2-release-notes-and-upgrade-guide.md +0 -25
- data/doc/Blacklight-4.3-release-notes-and-upgrade-guide.md +0 -21
- data/doc/Blacklight-4.4-release-notes-and-upgrade-guide.md +0 -41
- data/doc/Blacklight-Add-ons.md +0 -28
- data/doc/Blacklight-configuration.md +0 -411
- data/doc/Blacklight-on-Heroku.md +0 -135
- data/doc/Code4Lib-2014.md +0 -48
- data/doc/Community-principles.md +0 -44
- data/doc/Configuring-and-Customizing-Blacklight.md +0 -271
- data/doc/Configuring-rails-routes.md +0 -13
- data/doc/Contributing-to-Blacklight.md +0 -25
- data/doc/Examples.md +0 -94
- data/doc/Extending-or-Modifying-Blacklight-Search-Behavior.md +0 -141
- data/doc/FAQs.md +0 -1
- data/doc/Home.md +0 -80
- data/doc/How-to-release-a-version.md +0 -29
- data/doc/Indexing-your-data-into-solr.md +0 -32
- data/doc/Integration-with-Rails-Footnotes.md +0 -20
- data/doc/Internationalization.md +0 -32
- data/doc/JSON-API.md +0 -17
- data/doc/Pagination.md +0 -51
- data/doc/Providing-your-own-view-templates.md +0 -109
- data/doc/Quickstart.md +0 -115
- data/doc/README_SOLR.md +0 -245
- data/doc/Release-Notes-And-Upgrade-Guides.md +0 -20
- data/doc/Roadmap.md +0 -43
- data/doc/Sunspot-for-indexing.md +0 -46
- data/doc/Theming.md +0 -64
- data/doc/User-Authentication.md +0 -60
- data/doc/testing.md +0 -57
- data/lib/SolrMarc.jar +0 -0
- data/lib/blacklight/mash.rb +0 -19
- data/lib/blacklight/solr/document/marc.rb +0 -71
- data/lib/blacklight/solr/document/marc_export.rb +0 -590
- data/lib/generators/blacklight/marc_generator.rb +0 -66
- data/lib/generators/blacklight/templates/blacklight.scss +0 -4
- data/lib/generators/blacklight/templates/config/SolrMarc/config-test.properties +0 -37
- data/lib/generators/blacklight/templates/config/SolrMarc/config.properties +0 -37
- data/lib/generators/blacklight/templates/config/SolrMarc/index.properties +0 -97
- data/lib/generators/blacklight/templates/config/SolrMarc/index_scripts/dewey.bsh +0 -47
- data/lib/generators/blacklight/templates/config/SolrMarc/index_scripts/format.bsh +0 -126
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/README_MAPS +0 -1
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/callnumber_map.properties +0 -407
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/composition_era_map.properties +0 -56
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/country_map.properties +0 -379
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/format_map.properties +0 -50
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/instrument_map.properties +0 -101
- data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/language_map.properties +0 -490
- data/lib/railties/solr_marc.rake +0 -162
- data/spec/data/test_data.utf8.mrc +0 -1
- data/spec/features/librarian_view_spec.rb +0 -13
- data/spec/helpers/html_head_helper_spec.rb +0 -164
- data/spec/lib/blacklight_solr_document_marc_spec.rb +0 -89
- data/spec/lib/marc_export_spec.rb +0 -746
- data/spec/lib/tasks/solr_marc_task_spec.rb +0 -60
- data/spec/requests/alternate_controller_spec.rb +0 -16
- data/spec/routing/routes_spec.rb +0 -20
- data/spec/views/catalog/_constraints.html.erb_spec.rb +0 -33
- data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +0 -49
- data/test_support/data/test_data.utf8.mrc +0 -1
data/lib/railties/solr_marc.rake
DELETED
@@ -1,162 +0,0 @@
|
|
1
|
-
# -*- coding: UTF-8 -*-
|
2
|
-
# Rake tasks for the SolrMarc Java indexer.
|
3
|
-
# Marc Record defaults to indexing lc_records.utf8.mrc
|
4
|
-
# config.properties defaults to config/demo_config.properties (in the plugin, not the rails app)
|
5
|
-
|
6
|
-
|
7
|
-
require 'fileutils'
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
namespace :solr do
|
12
|
-
namespace :marc do
|
13
|
-
|
14
|
-
|
15
|
-
desc "Index the supplied test data into Solr"
|
16
|
-
task :index_test_data do
|
17
|
-
# for now we are assuming test data is located in BL source checkout.
|
18
|
-
ENV['MARC_FILE'] = File.expand_path("./test_support/data/test_data.utf8.mrc", Blacklight.root )
|
19
|
-
|
20
|
-
# solr_path and solr_war_path will be picked up from
|
21
|
-
# jetty_path in solr.yml by main work task.
|
22
|
-
|
23
|
-
Rake::Task[ "solr:marc:index:work" ].invoke
|
24
|
-
end
|
25
|
-
|
26
|
-
desc "Index marc data using SolrMarc. Available environment variables: MARC_RECORDS_PATH, CONFIG_PATH, SOLR_MARC_MEM_ARGS"
|
27
|
-
task :index => "index:work"
|
28
|
-
|
29
|
-
namespace :index do
|
30
|
-
|
31
|
-
task :work do
|
32
|
-
solrmarc_arguments = compute_arguments
|
33
|
-
|
34
|
-
# If no marc records given, display :info task
|
35
|
-
if (ENV["NOOP"] || (!solrmarc_arguments["MARC_FILE"]))
|
36
|
-
Rake::Task[ "solr:marc:index:info" ].execute
|
37
|
-
else
|
38
|
-
commandStr = solrmarc_command_line( solrmarc_arguments )
|
39
|
-
puts commandStr
|
40
|
-
puts
|
41
|
-
`#{commandStr}`
|
42
|
-
end
|
43
|
-
|
44
|
-
end # work
|
45
|
-
|
46
|
-
desc "Shows more info about the solr:marc:index task."
|
47
|
-
task :info do
|
48
|
-
solrmarc_arguments = compute_arguments
|
49
|
-
puts <<-EOS
|
50
|
-
Solr to write to is taken from current environment in config/solr.yml,
|
51
|
-
key :replicate_master_url is supported, taking precedence over :url
|
52
|
-
for where to write to.
|
53
|
-
|
54
|
-
Possible environment variables, with settings as invoked. You can set these
|
55
|
-
variables on the command line, eg:
|
56
|
-
rake solr:marc:index MARC_FILE=/some/file.mrc
|
57
|
-
|
58
|
-
MARC_FILE: #{solrmarc_arguments["MARC_FILE"] || "[marc records path needed]"}
|
59
|
-
|
60
|
-
CONFIG_PATH: #{solrmarc_arguments[:config_properties_path]}
|
61
|
-
Defaults to RAILS_ROOT/config/SolrMarc/config(-RAILS_ENV).properties
|
62
|
-
or else RAILS_ROOT/vendor/plugins/blacklight/SolrMarc/config ...
|
63
|
-
|
64
|
-
Note that SolrMarc search path includes directory of config_path,
|
65
|
-
so translation_maps and index_scripts dirs will be found there.
|
66
|
-
|
67
|
-
SOLRMARC_JAR_PATH: #{solrmarc_arguments[:solrmarc_jar_path]}
|
68
|
-
|
69
|
-
SOLRMARC_MEM_ARGS: #{solrmarc_arguments[:solrmarc_mem_arg]}
|
70
|
-
|
71
|
-
SolrMarc command that will be run:
|
72
|
-
|
73
|
-
#{solrmarc_command_line(solrmarc_arguments)}
|
74
|
-
EOS
|
75
|
-
end
|
76
|
-
end # index
|
77
|
-
end # :marc
|
78
|
-
end # :solr
|
79
|
-
|
80
|
-
# Computes arguments to Solr, returns hash
|
81
|
-
# Calculate default args based on location of rake file itself,
|
82
|
-
# which we assume to be in the plugin, or in the Rails executing
|
83
|
-
# this rake task, at RAILS_ROOT.
|
84
|
-
def compute_arguments
|
85
|
-
|
86
|
-
arguments = {}
|
87
|
-
|
88
|
-
arguments["MARC_FILE"] = ENV["MARC_FILE"]
|
89
|
-
|
90
|
-
|
91
|
-
arguments[:config_properties_path] = ENV['CONFIG_PATH']
|
92
|
-
|
93
|
-
|
94
|
-
# Find config in local app or plugin, possibly based on our RAILS_ENV (::Rails.env)
|
95
|
-
unless arguments[:config_properties_path]
|
96
|
-
app_site_path = File.expand_path(File.join(Rails.root, "config", "SolrMarc"))
|
97
|
-
plugin_site_path = File.expand_path(File.join(Rails.root, "vendor", "plugins", "blacklight", "config", "SolrMarc"))
|
98
|
-
|
99
|
-
[ File.join(app_site_path, "config-#{::Rails.env}.properties" ),
|
100
|
-
File.join( app_site_path, "config.properties"),
|
101
|
-
File.join( plugin_site_path, "config-#{::Rails.env}.properties"),
|
102
|
-
File.join( plugin_site_path, "config.properties"),
|
103
|
-
].each do |file_path|
|
104
|
-
if File.exists?(file_path)
|
105
|
-
arguments[:config_properties_path] = file_path
|
106
|
-
break
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
#java mem arg is from env, or default
|
112
|
-
|
113
|
-
arguments[:solrmarc_mem_arg] = ENV['SOLRMARC_MEM_ARGS'] || '-Xmx512m'
|
114
|
-
|
115
|
-
# SolrMarc is embedded in the plugin, or could be a custom
|
116
|
-
# one in local app.
|
117
|
-
arguments[:solrmarc_jar_path] = ENV['SOLRMARC_JAR_PATH'] || locate_path("lib", "SolrMarc.jar")
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
# solrmarc.solr.war.path and solr.path, for now pull out of ENV
|
122
|
-
# if present. In progress. jrochkind 25 Apr 2011.
|
123
|
-
arguments[:solr_war_path] = ENV["SOLR_WAR_PATH"] if ENV["SOLR_WAR_PATH"]
|
124
|
-
arguments[:solr_path] = ENV['SOLR_PATH'] if ENV['SOLR_PATH']
|
125
|
-
|
126
|
-
# Solr URL, find from solr.yml, app or plugin
|
127
|
-
# use :replicate_master_url for current env if present, otherwise :url
|
128
|
-
# for current env.
|
129
|
-
# Also take jetty_path from there if present.
|
130
|
-
if c = Blacklight.solr_config
|
131
|
-
arguments[:solr_url] = c[:url]
|
132
|
-
if c[:jetty_path]
|
133
|
-
arguments[:solr_path] ||= File.expand_path(File.join(c[:jetty_path], "solr"), Rails.root)
|
134
|
-
arguments[:solr_war_path] ||= File.expand_path(File.join(c[:jetty_path], "webapps", "solr.war"), Rails.root)
|
135
|
-
end
|
136
|
-
end
|
137
|
-
|
138
|
-
return arguments
|
139
|
-
end
|
140
|
-
|
141
|
-
def solrmarc_command_line(arguments)
|
142
|
-
cmd = "java #{arguments[:solrmarc_mem_arg]} "
|
143
|
-
cmd += " -Dsolr.hosturl=#{arguments[:solr_url]} " unless arguments[:solr_url].blank?
|
144
|
-
|
145
|
-
cmd += " -Dsolrmarc.solr.war.path=#{arguments[:solr_war_path]}" unless arguments[:solr_war_path].blank?
|
146
|
-
cmd += " -Dsolr.path=#{arguments[:solr_path]}" unless arguments[:solr_path].blank?
|
147
|
-
|
148
|
-
cmd += " -jar #{arguments[:solrmarc_jar_path]} #{arguments[:config_properties_path]} #{arguments["MARC_FILE"]}"
|
149
|
-
return cmd
|
150
|
-
end
|
151
|
-
|
152
|
-
|
153
|
-
def locate_path(*subpath_fragments)
|
154
|
-
local_root = File.expand_path File.join(File.dirname(__FILE__), '..', '..')
|
155
|
-
subpath = subpath_fragments.join('/')
|
156
|
-
base_match = [Rails.root, local_root].find do |base|
|
157
|
-
File.exists? File.join(base, subpath)
|
158
|
-
end
|
159
|
-
File.join(base_match.to_s, subpath) if base_match
|
160
|
-
end
|
161
|
-
|
162
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
00799cam a2200241 a 4500001001300000003000400013005001700017008004100034010001700075025002500092040001800117041001300135042001000148050002600158100003000184245009200214260003900306300002100345546001300366520010400379700003700483700003700520 00282214 DLC20090120022042.0000417s1998 pk 000 0 urdo a 00282214 aP-U-00282214; 05; 06 aDLCcDLCdDLC1 aurdhsnd alcode00aPK2788.9.A9bF55 19981 aAyaz, Shaikh,d1923-1997.10aFikr-i Ayāz /cmurattibīn, Āṣif Farruk̲h̲ī, Shāh Muḥammad Pīrzādah. aKarācī :bDāniyāl,c[1998] a375 p. ;c23 cm. aIn Urdu. aSelected poems and articles from the works of renowned Sindhi poet; chiefly translated from Sindhi.1 aFarruk̲h̲ī, Āṣif,d1959-1 aPīrzādah, Shāh Muḥammad.00778cam a22002417a 4500001001300000003000400013005001700017008004100034010001700075025002100092040001800113041001300131042001000144050002500154100003000179245008500209260005000294300002100344546001300365500002800378520008900406504004100495 00282371 DLC20090120021204.0000509s1986 pk 000 0 urdo a 00282371 aP-U-00282371; 08 aDLCcDLCdDLC1 aurdhsnd alcode00aMLCME 2002/02660 (D)1 aAyaz, Shaikh,d1923-1997.10aSāhivāl jail kī ḍāʼirī /cShaik̲h̲ Ayāz; tarjumah, Kiran Singh. aKarācī :bMaktabah-yi Dāniyāl,c1986. a232 p. ;c23 cm. aIn Urdu. aTranslated from Sindhi. aAuthor's memoirs during his imprisonment in Sahiwal District jail during late 1960s. aIncludes bibliographical references.01988cam a2200421 a 4500001001300000003000400013005001700017008004100034010001700075020001500092035002600107040002700133042002100160043001200181050002700193066001100220100004400231245019600275246007800471250002400549260004700573300002100620440003400641504005100675600005700726610006900783600007000852651004100922700002800963880005100991880022301042880003301265880007601298880004601374880005101420880005101471880004401522 00313831 DLC20090121100001.0010611s2000 ir b 001 0dper d a 00313831 a9645625963 a(CStRLIN)DCLN01-B3014 aMHcMHdCStRLINdDLC-R alccopycatalcode aa-ir---00aDS318.84.N87bN87 2000 c(3c(41 6880-01aNūrī, ʻAbd Allāh,d1949-106880-02aNaqdī barā-yi tamām-i fuṣūl :bguft va gū-yi Akbar Ganjī bā ʻAbd Allāh Nūrī : bih payvast-i matn-i istīz̤āḥ-i ʻAbd Allāh Nūrī dar Majlis-i panjum.15aCritique for all seasons :bAkbar Ganji's conversation with Abdullah Nuri 6880-03aChāp-i 1. 6880-04aTihrān :bṬarḥ-i Naw,c2000. a245 p. ;c22 cm. 06880-05aFarhang-i ʻumūmī aIncludes bibliographical references and index.106880-06aNūrī, ʻAbd Allāh,d1949-vInterviews.10aIran.bVizārat-i KishvarxOfficials and employeesvInterviews.106880-07aNūrī, ʻAbd Allāh,d1949-vTrials, litigation, etc. 0aIranxPolitics and governmenty1997-1 6880-08aGanjī, Akbar.1 6100-01/(3/raنورى، عبد الله.106245-02/(3/raنقدى براى تمام فصول :bگفت و گوى اکبر گنجى با عبد الله نورى : به پيوست متن استيضاح عبد الله نورى در مجلس پنجم. 6250-03/(4/raچاپ 1. 6260-04/(3/raتهران :bطرح نو،c2000. 06440-05/(3/raفرهنگ عمومى146600-06/(3/raنورى، عبد الله.146600-07/(3/raنورى، عبد الله.1 6700-08/(3/raگنجى، اكبر.00956dam a22002655a 4500001001300000003000400013005001700017008004100034010001700075035002600092040002200118066000700140100003600147245006700183260006200250300002100312600005100333650003400384650003100418650002900449880003300478880007100511880005500582880005300637 00314247 DLC20090126095911.0000214s1997 ja 000 0 jpn a 00314247 a(CStRLIN)DCLP00-B1931 aDLC-RcDLC-RdDLC c$11 6880-01aYoshida, Hajime,d1934-106880-02aKubo Sakae "Kazanbaichi" o yomu /cYoshida Hajime cho. 6880-03aTōkyō :bHōsei Daigaku Shuppankyoku,c1997. a480 p. ;c19 cm.106880-04aKubo, Sakae,d1901-1958.tKazanbaichi. 0aJapanese dramay20th century. 0aPolitical plays, Japanese. 0aTheaterzJapanxHistory.1 6100-01/$1a吉田一,d1934-106245-02/$1a久保栄 「火山灰地」 を読む /c吉田一著. 6260-03/$1a東京 :b法政大学出版局,c1997.146600-04/$1a久保栄,d1901-1958.t火山灰地.00987cam a22002531 4500001001300000003000400013005001700017008004100034010001700075035002000092040002500112043001200137050001700149100006300166245004100229260004300270300002700313500011300340504010800453505004500561651002500606710004900631710005300680 43037890 DLC20090126171234.0810731m19419999ru b b 000 0 ruso a 43037890 a(OCoLC)28783996 aDLCcICUdOCoLCdDLC ae-ur-kz00aDK861.K3bV51 aVi︠a︡tkin, M. P.q(Mikhail Porfirʹevich),d1895-1967.10aOcherki po istorii Kazakhskoĭ SSR. a[Moskva],bOgiz, Gospolitizdat,c1941- av.bfold. map.c20 cm. aAt head of title: Akademii︠a︡ nauk SSSR. Institut istorii i Kazakhstanskiĭ filial. M. Vi︠a︡tkin. a"Obzor literatury i istochnikov": v. 1, p. 5-[19]. "Bibliograficheskiĭ ukazatelʹ": v. 1, p. 356-364.2 at. 1. S drevneĭshikh vremen po 1870 g. 0aKazakhstanxHistory.2 aInstitut istorii (Akademii︠a︡ nauk SSSR)2 aAkademii︠a︡ nauk Kazakhskoĭ SSR, Alma Ata.00955cam a22002411 4500001001300000003000400013005001700017008004100034010001700075035002000092040002100112042001200133043001200145050001600157110001800173240012800191245021900319260004900538300001900587490005000606700002400656710003300680 53029833 DLC20090126171326.0860911s1952 ru f000 0 rus a 53029833 a(OCoLC)14207259 aDLCcCUdCUdDLC apremarc aa-kn---00aKPC13b19521 aKorea (North)10aLaws, etc. (Konstitut︠s︡ii︠a︡ i osnovnye zakonodatelʹnye akty Koreĭskoĭ Narodno-Demokraticheskoĭ Respubliki)10aKonstitut︠s︡ii︠a︡ i osnovnye zakonodatelʹnye akty Koreĭskoĭ Narodno-Demokraticheskoĭ Respubliki.cPerevod s koreĭskogo I︠U︡.N. Mazura i Khan Dyk Pona. Pod red. i s vstup. statʹeĭ G. Tavrova. aMoskva,bIzd-vo inostrannoĭ lit-ry,c1952. a396 p.c21 cm.0 aZakonodatelʹstvo stran narodnoĭ demokratii1 aMazur, I︠U︡. N.1 aKorea (North)tConstitution.01062cam a2200301 a 4500001001300000003000400013005001700017008004100034010001700075035002700092040005400119043001200173050002500185066000700210130005000217245006600267260004200333300002100375490003500396651005700431651002200488700003100510880004800541880005800589880004300647880003600690880003400726 77826928 DLC20090122103906.0070816s1976 ko 000 0ckor a 77826928 a(CStRLIN)DCLP07-B11425 aDLCc*BZV*dMH-HYdOCoLCdCUdCStRLINdDLC-RdDLC aa-kr---00aDS912.38b.K982 1976 c$10 6880-01aKoryŏsa.pYŏlchŏn.kSelections.106880-02aKoryŏ inmul yŏlchŏn /cYi Min-su pʻyŏnyŏk. 6880-03aSŏul :bSŏmundang,c1976. a255 p. ;c19 cm.0 6880-04aSŏmun munʼgo ;v237 0aKoreaxHistoryyKoryŏ period, 935-1392vBiography. 0aKoreavBiography.1 6880-05aYi, Min-su,d1916-0 6130-01/$1a高麗史.p列傅.kSelections.106245-02/$1a高麗 人物 列傅 /c李 民樹 編譯. 6260-03/$1a서울 :b瑞文堂,c1976.0 6490-04/$1a瑞文 文庫 ;v2371 6700-05/$1a李 民樹,d1916-00813cam a2200217 i 4500001001300000003000400013005001700017008004100034010001700075040001800092050001900110100003600129245006700165260013400232300002800366490004700394500006100441500001200502600002800514600005300542 78908283 DLC20090121104206.0790619s1976 ii 000 0 sano a 78908283 aDLCcDLCdDLC00aPK3799.P29bY32 aParikshit Sharma, Ogeti,d1930-10aYaśodharā-mahākāvyam /cOgeṭi Parīkṣitśarmā. aPuṇyapattanam :bŚāradā-Gaurava-Grantha-Mālā ;aHaidrābāda :bprāptisthalam O. Acyutarāmaśāstrī,c1976. a24, 128, 2 p. ;c22 cm.0 aŚāradā-gaurava-grantha-mālā ; 37 aIn Sanskrit; introductory matter in English or Sanskrit. aA poem.00aGautama BuddhavPoetry.00aYaśodharāc(Wife of Gautama Buddha)vPoetry.00729cam a2200229 i 4500001001300000003000400013005001700017008004100034010001700075020001200092040001800104043001200122050002400134100004800158245008500206260008100291300002400372500001300396500002900409650002100438650004000459 79930185 DLC20090123080110.0791203r19781950pk 000 0 urdo a 79930185 cRs10.00 aDLCcDLCdDLC aa-pk---00aHQ1745.5b.I83 19781 aIṣlāḥī, Amīn Aḥsan,d1904-1997.10aPākistānī ʻaurat dorāhe par /ctālīf Amīn Aḥsan Iṣlāḥī. aLāhaur :bMaktabah-yi Markazī Anjuman-i K̲h̲uddāmulqurʼān,c1978. a8, 174 p. ;c22 cm. aIn Urdu. aFirst published in 1950. 0aWomenzPakistan. 0aWomenzPakistanxSocial conditions.01012cam a22002657a 4500001001300000003000400013005001700017007001400034007001400048008004100062010001700103025001700120040001800137050002800155100004300183245007100226260007600297300002500373500001000398500003700408500009700445504005100542500003500593533011800628 85910001 DLC20090121023106.0heuamb---bacaheubmb---baaa860321r19851946dcu bb s001 0 sano a 85910001 aLC San A 616 aDLCcDLCdDLC00aMicrofiche 90/61328 (P)0 aNārāyaṇapaṇḍita,d17th cent.10aĀśleṣāśataka of Nārāyaṇa Paṇḍitah[microform]. aTrivandrum :bUniversity MSS. Library, University of Travancore,c1946. axii, 24 p. ;c24 cm. aPoem. aIn Sanskrit; introd. in English. a"Reprint from the Journal of the Travancore University Oriental Manuscripts Library, no. 7." aIncludes bibliographical references and index. aMaster microform held by: DLC. aMicrofiche.bWashington, D.C. :cLibrary of Congress Photoduplication Service,d1985.e1 microfiche ; 11 x 15 cm.01258cam a2200301 a 4500001001300000003000400013005001700017008004100034010001700075020001500092035002600107040001700133041001300150050002000163066000700183100003300190240002800223245015400251260004300405300002900448500004100477650003100518650003300549740002000582880005400602880022300656880007700879 86207417 DLC20090123161900.0930810s1984 is a 000 0 heb a 86207417 a9650101373 a(CStRLIN)DCLH93-B1897 aDLC-RcDLC-R1 ahebheng00aG535b.F54 1984 c(21 6880-01aFinkel, Chaim Jacob.10aJewish pirates.lHebrew106880-02aShodede-yam Yehudiyim :bsipurim mafliʼim ha-mevusasim ʻal ʻuvdot hisṭoriyot /cḤayim Yaʻaḳov Finḳel ; me-Anglit, Ofirah Rahaṭ. 6880-03aYerushalayim :bDevir,cc1984. a283 p. :bill. ;c22 cm. aTitle on t.p. verso: Jewish pirates. 0aJewish piratesvAnecdotes. 0aJewish criminalsvAnecdotes.0 aJewish pirates.1 6100-01/(2/raפינקל, חיים יעקב.106245-02/(2/raשודדי־ים יהודיים :bספורים מפליאים המבוססים על עובדות היסטוריות /cחיים יעקב פינקל ; מאנגלית, אופירה רהט. 6260-03/(2/raירושלים :bדביר,cc1984.01657cam a2200337 a 4500001001300000003000400013005001700017008004100034010001700075035002600092040002800118042001400146043002100160050002000181066001100201100004900212245015200261246010000413246005600513260007400569300005100643504003500694650004700729650004300776650003900819880005300858880014800911880010201059880005901161880009901220 87931798 DLC20090121115059.0060428m19869999ir ah b 000 0 per d a 87931798 a(CStRLIN)DCLN06-B3656 aNjPcNjPdUkLSOAdDLC-R alccopycat aa------af------00aBP44b.M88 1986 c(3c(41 6880-01aMuvaḥḥid Abṭaḥī, Ḥujjat.106880-02aĀshnāʼī bā ḥawzahʹhā-yi ʻilmīyah-ʼi Shīʻah dar ṭūl-i tārīkh /cbih qalam-i Ḥujjat Muvaḥḥid Abṭaḥī.3 6880-03aĀshnāyī bā ḥawzahʹhā-yi ʻilmīyah-ʼi Shīʻah dar ṭūl-i tārīkh306880-04aḤawzahʹhā-yi ʻilmīyah-ʼi Shīʻah 6880-05aIṣfahān :bḤawzah-i ʻIlmīyah,c1365- [1986- ] av. <1> :bill. (some col.), facsims. ;c25 cm. aBibliography: v. 1, p.451-455. 0aReligious institutionszIslamic countries. 0aShiitesxEducationzIslamic countries. 0aIslamic universities and colleges.1 6100-01/(3/raموحد ابطحى، خجة.106245-02/(3/raاشنائى با حوزههاى علميۀ شيعه در طول تاريخ /cبقلم حجة موحد ابطحى.3 6246-03/(3/raاشنايى با حوزههاى علميۀ شيعه در طول تاريخ306246-04/(3/raحوزه هاى علميۀ شيعه 6260-05/(3/raاصفهان :bحوزۀ علميه،c1365- [1986- ].00610cam a22001817a 4500001001300000003000400013005001700017008004100034010001700075040001300092050002200105100004100127245010300168246006300271260003800334300002000372653003600392 90142413 DLC20090126150928.0900409s1975 gs 000 0 geo a 90142413 aDLCcDLC00aMLCSN 96/3906 (H)1 aLomtʻatʻiże, Čola,d1879-1915.10aMrecvelobis mušakis cʻxovrebis cesi :btʻeoriul-metʻoduri narkvevi /cČola Lomtʻatʻiże.1 iTitle in colophon:aObraz zhizni rabotnika promyshlennosti aTʻbilisi :bMecʻniereba,c1975. a65 p. ;c22 cm. aIndustrial workers;alife style01106cam a2200325 a 4500001001300000003000400013005001700017008004100034010001700075020001800092035002700110040001700137043001200154050002100166066000700187110001800194240001500212245009600227250002300323260006600346300001900412650002300431700004000454700002900494880009300523880002500616880007000641880003800711880003100749 92117465 DLC20090126171556.0920805s1990 ko l 000 0 kor a 92117465 cW300000 (set) a(CStRLIN)DCLP92-B14190 aDLC-RcDLC-R aa-kn---00aKPC13b.K67 1990 c$11 aKorea (North)10aLaws, etc.106880-01aPukhan pŏmnyŏngjip /cchʻaegim pʻyŏnjip Chŏng Kyŏng-mo, Chʻoe Tal-gon. 6880-02aChaepʻan. 6880-03aSŏul Tʻŭkpyŏlsi :bTaeryuk Yŏnʼguso,c1990. a5 v. ;c27 cm. 0aLawzKorea (North)1 6880-04aChŏng, Kyŏng-mo,d1937-1 6880-05aChʻoe, Tal-gon.106245-01/$1a北韓 法令集 /c責任 編輯 鄭 慶謨, 崔 逹坤. 6250-02/$1a再版. 6260-03/$1a서울 持別市 :b大陸 研究所,c1990.1 6700-04/$1a鄭 慶謨,d1937-1 6700-05/$1a崔 逹坤.03361cam a2200493 a 4500001001300000003000400013005001700017008004100034010001700075035002600092040002900118050002800147066000700175100004800182240002800230245032000258250011500578260014900693300002300842500006800865500013400933500012101067500005601188500014601244600005901390650001601449650003601465700005601501700006701557740002901624740004801653740002801701880006101729880004301790880038601833880012902219880019502348880006602543880004702609880006902656880004402725880006202769880003602831 92828023 DLC20090122150744.0921008m19929999is 000 0 heb a 92828023 a(CStRLIN)DCLH92-B2385 aDLC-RcDLC-RdDLC-RdDLC00aBM520.88.A53bI88 1992b c(20 6880-01aIsrael Meir,cha-Kohen,d1838-1933.106880-02aMishnah berurah106880-03aSefer Mishnah berurah :bṿe-hu perush yafeh u-menupeh ʻal Shulḥan ʻarukh Oraḥ ḥayim asher ḥiber Yosef Ḳaro ... ʻim ḥidushe dinim she-hishmiṭ ha-gaʼon ... ṿe-himtsiʼam ... Mosheh Iserlish /ckol eleh ḥibarti [z.o. asafti ṿe-ʻarakhti] Yiśraʼel Meʼir b.R. Aryeh Zeʼev ha-Kohen. 6880-04aHotsaʼah ḥadashah, menuḳedet u-mefuseḳet uve-fiʻnuaḥ rashe-tevot uve-hagahah meduḳdeḳet. 6880-05a[Jerusalem? :bḥ. mo. l. ],c752-<[768]> [1992-<2007 or 2008>]e(Yerushalayim :fNidpas ʻa. y. Makhon le-hotsaʼat sefarim ʻA. L.B.) av. <1-5> ;c29 cm. aTitle on cover <v. 2-3, 5>: Sefer Mishnah berurah ha-menuḳad. aVol. 4- has ed. statement: Mahadura meyuḥedet ʻim hagahot ṿe-heʻarot "Ish matsliaḥ" la-Sefaradim ṿa-ʻadot ha-Mizraḥ. aVol. 4- published: Bene Beraḳ : "Mekhon ha-Rav Matsliaḥ" she-ʻa. y. Mosdot Yeshivat "Kise Raḥamim" Sefaradit. aIncludes text of Shulḥan ʻarukh, Oraḥ ḥayim. aIncludes Beʼer ha-Golah by Mosheh Ravḳash, Baʼer heṭev by Judah ben Simon Ashkenazi, Shaʻare teshuvah by Ḥayim Mordekhai Margaliyot.10aKaro, Joseph ben Ephraim,d1488-1575.tOraḥ ḥayim. 0aJewish law. 0aJudaismxCustoms and practices.1 6880-06aIsserles, Moses ben Israel,dca. 1525-1572.126880-07aKaro, Joseph ben Ephraim,d1488-1575.tOraḥ ḥayim.026880-08aMishnah berurah.026880-09aSefer Mishnah berurah ha-menuḳad.026880-10aIsh matsliaḥ.0 6100-01/(2/raישראל מאיר,cהכהן.106240-02/(2/raמשנה ברורה106245-03/(2/raספר משנה ברורה :bוהוא פירוש יפה ומנפה על שלחן ערוך ארח חיים אשר חבר יוסף קארו ... עם חידושי דינים שהשמיט הגאון ... והמציאם משה איסרליש /cכל אלה חיברתי [ז״א אספתי וערכתי] ישראל מאיר בר׳ אריה זאב הכהן. 6250-04/(2/raהוצאה חדשה, מנקדת ומפסקת ובפענוח ראשי־תבות ובהגהה מדקדקת. 6260-05/(2/ra[Jerusalem? :bחמו״ל,c752-<[768]> [1992-<2007 or 2008>]e(ירושלים :fנדפס ע״י מכון להוצאת ספרים ע.ל.ב.)046630-00/(2/raשלחן ערוך.pארח חיים.1 6700-06/(2/raאיסרליש, משה.126700-07/(2/raקארו, יוסף.tאורח חיים.026740-08/(2/raמשנה ברורה.026740-09/(2/raספר משנה ברורה המנקד.026740-10/(2/raאיש מצליח.01149cam a2200301 a 4500001001300000003000400013005001700017008004100034010001700075020001000092035002600102040004000128042001400168043001200182050002400194066000700218100003400225245012500259250002400384260007300408300002100481650004500502651003800547880003600585880013500621880002300756880006800779 94120425 DLC20090123075708.0940328s1990 ko 000 0 kor d a 94120425 cW3800 a(CStRLIN)DCLP94-B5791 aCLASIAcCLASIAdDLCdCStRLINdDLC-R alccopycat aa-ko---00aHQ1765.5b.K46 1990 c$11 6880-01aKim, Hong-sin,d1947-106880-02aAjikto kŭrŏk chŏrŏk sasimnikka :bkangnam yŏin kwa sin pʻalbulchʻul : Kim Hong-sin setʻae rŭpʻo. 6880-03aChʻopʻan. 6880-04aSŏul :bYŏwŏn Chʻulpʻanʼguk,c1990g(1992 printing) a289 p. ;c22 cm. 0aWomenzKorea (South)xSocial conditions. 0aSeoul (Korea)xSocial conditions.1 6100-01/$1a김 홍신,d1947-106245-02/$1a아직도 그럭 저럭 사십니까 :b강남 여인 과 신 팔불출 : 金 洪信 세태 르포. 6250-03/$1a초판. 6260-04/$1a서울 :b女苑 出版局,c1990g(1992 printing)01484cam a2200349 a 4500001001300000003000400013005001700017008004100034010001700075035002500092040001700117042001000134043001200144050002200156066001100178100004500189245014500234250002400379260006600403300002100469440004800490504006300538651003500601650002900636650003100665651002400696880004900720880016400769880003300933880009900966880006901065 96933325 DLC20090121112252.0040115s1994 ir b 001 0 per a 96933325 a(CStRLIN)DCLN04-B274 aDLC-RcDLC-R alcode aa-ir---00aDS274b.R327 1994 c(3c(41 6880-01aRajāyī, Farhang,d1952 or 3-106880-02aMaʻrakah-ʼi jahānʹbīnīʹhā :bdar khiradvarzī-i siyāsī va huvīyat-i mā Īrānīyān /cFarhang Rajāʼī. 6880-03aChāp-i 1. 6880-04aTihrān :bIḥyā-yi Kitāb,c1373 [1994 or 1995] a323 p. ;c22 cm. 06880-05aSipihr-i farhang va jāmiʻah ;v1 aIncludes bibliographical references (p.287-320) and index. 0aIranxPolitics and government. 0aPolitical sciencezIran. 0aIraniansxEthnic identity. 0aIranxCivilization.1 6100-01/(4/raرجايى، فرهنگ .106245-02/(3/raمعركۀ جهانبينىها :bدر خردورزى سياسى و هويت ما ايرانيان /cفرهنگ رجائى. 6250-03/(4/raچاپ 1. 6260-04/(3/raتهران :bاحياء كتاب،c1373 [1994 or 1995]. 06440-05/(3/raسپهر فرهنگ و جامعه ؛v101588cam a2200313 a 4500001001300000003000400013005001700017008004100034010001700075025002600092037007000118040001800188041001400206042001000220050002600230100005300256245033300309260007200642300002400714546005800738520015800796500002200954600003300976700008501009700007501094700006101169700002201230700002201252 2001417245DLC20090121030347.0011001m20009999ii 001 0 sano a 2001417245 aI-San-2001-417245; 11 bLibrary of Congress -- New Delhi Overseas OfficecRs200.00 (v. 1) aDLCcDLCdDLC0 asanengkan alcode00aPK3798.N313bS87 20000 aNārāyaṇa Paṇḍitācārya,d13th cent.10aSumadhvavijayaḥ /cNārāyaṇapaṇḍitācāryaviracitaḥ ; Nārāyaṇapaṇḍitācāryaviracitabhāvaprakāśikā, Viśvapatitīrthaviracitapadārthadīpikodbodhikā, Chalārīśeṣācāryaviracitamandopakāriṇī iti vyākhyānatrayasametaḥ ; edited by A.B. Shyamachar and S.R. Pandurangi. aBangalore :bDvaita Vedanta Studies and Research Foundation,c2000- av. <1 > ;c25 cm. aIn Sanskrit; prefatory matter in English and Kannada. aVerse work on Madhva, 13th cent. Vaishnava religious leader and exponent of dualistic philosophy; includes autocommentary and two classical commentaries. aIncludes indexes.00aMadhva,d13th cent.vPoetry.02aNārāyaṇa Paṇḍitācārya,d17th cent.tBhāvaprakāśikā.f2000.02aViśvapatitīrtha,d16th cent.tPadārthadīpikodbodhikā.f2000.02aChalāriśeṣācārya.tMandopakāriṇī.f2000.1 aShyamachar, A. B.1 aPandurangi, S. R.01197cam a22003014a 4500001001300000003000400013005001700017008004100034010001700075035002600092040002200118042001000140050002100150066000700171100006600178245012000244260004600364300002100410650003200431650005300463650002200516650004300538650002700581650002200608880007900630880013500709880005100844 2003546302DLC20090123173626.0030922s2003 mu 000 0 ara a 2003546302 a(CStRLIN)DCLN03-B4961 aDLC-RcDLC-RdDLC alcode00aU21.2b.W85 2003 c(31 6880-01aWuld Mawlāy al-Zayn, Sayyid Muḥammad wuld Sayyid.136880-02aal-Ḥarb fī al-alfīyah al-thālithah /cbi-qalam Sayyid Muḥammad wuld Sayyid wuld Mawlāy al-Zayn. 6880-03aNuwākshūṭ :b[s.n.],c2003. a128 p. ;c20 cm. 0aWarxHistoryy21st century. 0aMilitary art and sciencexHistoryy21st century. 0aWarxForecasting. 0aMilitary art and sciencexForecasting. 0aWarfare, Conventional. 0aMilitary weapons.1 6100-01/(3/raولد مولاي الزين، سيد محمد ولد سيد.126245-02/(3/raالحرب في الألفية الثالثة /cبقلم سيد محمد ولد سيد ولد مولاي الزين. 6260-03/(3/raنواكشوط :b[s.n.]،c2003.00875cam a22002534a 4500001001300000003000400013005001700017008004100034010001700075025002700092037006300119040001800182042001000200043001200210050002800222100003600250245012300286260002800409300002900437546001600466520006600482651003200548651004100580 2004310986DLC20090123105515.0040812s2004 cc a 000 0 tibo a 2004310986 aCh-Tib-2004-310986; 16 bLibrary of Congress -- New Delhi Overseas OfficecRs154.00 aDLCcDLCdDLC alcode aa-cc-ti00aDS797.82.B663bB75 20040 aBstan-ʼdzin-mkhas-grub,d1967-10aBon-brgyaʼi lo rgyus lugs gñis gsal baʼi me loṅ źes bya ba bźugs so /cBstan-ʼdzin-mkhas-grub kyis brtsams. a[Lha-sa :bs.n.,c2004] a149 p. :bill. ;c21 cm. aIn Tibetan. aHistorical account of Bon-brgya in Tibet during 7th-9th cent. 0aBon-brgya (China)xHistory. 0aBon-brgya (China)xKings and rulers.01127nam a2200277 a 4500001001300000003000400013005001700017008004100034010001700075035002600092040002500118042002100143050002300164066000700187100005600194245008800250250002800338260010100366300002000467650002500487650002500512880006500537880010100602880003300703880011300736 2005461726DLC20090126155550.0070712s2006 ua 000 0 ara d a 2005461726 a(CStRLIN)DCLN07-B4171 aEMUcEMUdCUYdDLC-R alccopycatalcode00aBP161.3b.A27 2006 c(31 6880-01aAbū al-Khayr, ʻAlī ʻAbd al-Ḥamīd.106880-02aThuqūb fī ʻaql al-ummah :bmin jald al-dhāt ilá ṣidq al-sharḥ. 6880-03aal-Ṭabʻah 1. 6880-04aal-Maʻādī, al-Qāhirah :bMarkaz Yāfā lil-Dirāsāt wa-al-Abḥāth,c2006. a85 p. ;c24 cm. 0aIslamy20th century. 0aIslamy21st century.1 6100-01/(3/raأبو الخير، علي عبد الحميد.106245-02/(3/raثقوب في عقل الأمة :bمن جلد الذات إلى صدق الشرح. 6250-03/(3/raالطبعة 1. 6260-04/(3/raالمعادي، القاهرة :bمركز يافا للدراسات والأبحاث،c2006.03730cam a22006257a 4500001001300000003000400013005001700017008004100034010001700075035002700092040001700119043001200136050002400148066000700172245004700179260002800226300003800254505107400292650002301366650002901389650003101418650003301449650003201482650003101514651002701545651007901572650005001651740010501701740003301806740003401839740003601873740003101909740003101940740004101971740004202012740004102054740004202095740002902137740006602166740007602232880006102308880010502369880003802474880004202512880004302554880004002597880004002637880004702677880005302724880004702777880005702824880004402881880007902925880010003004 2005553155DLC20090121104139.0051007m19659999is | l 000 0 heb a 2005553155 a(CStRLIN)DCLH05-B11400 aDLC-RcDLC-R aa-is---00aHG8695.2b.B57 1962 c(2006880-01a[Bituaḥ u-viṭaḥon sotsyali]. a[Israel ,c1962-<2001>] aitems 1-<13> of <13> ;c22-25 cm.1 a[1] Megamot be-mesheḳ ha-biṭuaḥ ṿeha-piḳuaḥ ʻal ʻisḳe biṭuaḥ bi-shenat 1965. 1966. 52 leaves ; 25 cm. -- [2] Biṭuaḥ ziḳnah : meʻudkan le-Yuli 2001. 24 p. ; 22 cm. -- [3] Biṭuaḥ sheʼirim : meʻudkan le-Yuli 2001. 2001. 24 p. ; 22 cm. -- [4] Gimlah le-yeled nekheh : meʻudkan le-Yuni 2001. 2001. 16 p. 22 cm. -- [5] Biṭuaḥ imahut : meʻudkan le-Yuli 2002. 24 p. ; 22 cm. -- [6] Biṭuaḥ siʻud : meʻudkan le-Februʼar 2001. 2001. 12 p. ; 22 cm. -- [7] Medaʻ le-ʻoved ʻatsmaʼi : meʻudkan le-Februʼar 2000. 2000. 18 p. ; 22 cm. -- [8] Biṭuaḥ nifgeʻe teʻunot. 1999. 1 folded leaflet ; 22 cm. -- [9] ha-Ḳeren le-nifgeʻe ṭeror -- [10] Teluyim be-nifgeʻe ʻavodah : meʻudkan le-Februʼar 2001. 2001. 24 p. ; 22 cm. -- [11] Sherut miluʼim : meʻudkan le-Yuli 2002. 2002. 16 p. ; 22 cm. -- [12] Ḳitsbah le-sherutim meyuhadim le-nekhim ḳashim : meʻudkan le-Detsember 2002. 2002. 16 p. ; 22 cm. -- [13] Mumḥim benleʼumiyim ʻal medukat ha-biṭaḥon ha-sotsyali / Yitsḥaḳ Ḳanev. 1962. 10 p. ; 24 cm. 0aInsurancezIsrael. 0aSocial securityzIsrael. 0aFamily allowanceszIsrael. 0aMaternity insurancezIsrael. 0aAccident insurancezIsrael. 0aOld agexEconomic aspects. 0aIsraelxSocial policy. 0aIsraelxArmed ForcesxReservesxPay, allowances, etc.xLaw and legislation 0aSocial securityxLaw and legislationzIsrael.026880-02aMegamot be-mesheḳ ha-biṭuaḥ ṿeha-piḳuaḥ ʻal ʻisḳe biṭuaḥ bi-shenat 1965.026880-03aBiṭuaḥ ziḳnah.026880-04aBiṭuaḥ sheʼirim.026880-05aGimlah le-yeled nekheh.026880-06aBiṭuaḥ imahut.026880-07aBiṭuaḥ siʻud.026880-08aMedaʻ le-ʻoved ʻatsmaʼi.026880-09aBiṭuaḥ nifgeʻe teʻunot.026880-10aḲeren le-nifgeʻe ṭeror.026880-11aTeluyim be-nifgeʻe ʻavodah.026880-12aSherut miluʼim.026880-13aḲitsbah le-sherutim meyuḥadim le-nekhim ḳashim.026880-14aMumḥim benleʼumiyim ʻal medukat ha-biṭaḥon ha-sotsyali.006245-01/(2/ra[ביטוח וביטחון סוציאלי].026740-02/(2/raמגמות במשק הביטוח והפיקוח על עסקי ביטוח בשנת 1965.026740-03/(2/raביטוח זקנה.026740-04/(2/raביטוח שאירים.026740-05/(2/raגמלה לילד נכה.026740-06/(2/raביטוח אמהות.026740-07/(2/raביטוח סיעוד.026740-08/(2/raמדע לעובד עצמאי.026740-09/(2/raביטוח נפגעי תעונות.026740-10/(2/raקרן לנפגעי טרור.026740-11/(2/raתלויים בניפגעי תעונה.026740-12/(2/raשירות מילואים.026740-13/(2/raקצבה לשירותים מיוחדים לנכים קשים.026740-14/(2/raמומחים בינלאומיים על מדוכת הביטחון הסוציאלי.01490cam a2200361 a 4500001001300000003000400013005001700017008004100034010001700075020003100092020002800123035002400151035002100175040004400196043001200240050002200252082002500274100002900299245010600328250003400434260003600468300003500504504005400539600002800593650005400621650006000675650005600735650005400791700002800845856008300873856009100956856008101047 2007020969DLC20090126093447.0070522s2008 nyua b 000 0beng a 2007020969 a9780743297790 (alk. paper) a0743297792 (alk. paper) a(OCoLC)ocn137335139 a(OCoLC)137335139 aDLCcDLCdBAKERdBTCTAdYDXCPdC#PdDLC an-us-nj00aE99.D2bH437 200800a974.004/97345aB2221 aHearth, Amy Hill,d1958-10a"Strong Medicine speaks" :ba Native American elder has her say : an oral history /cAmy Hill Hearth. a1st Atria Books hardcover ed. aNew York :bAtria Books,c2008. axvii, 267 p. :bill. ;c23 cm. aIncludes bibliographical references (p. 261-266).00aStrong Medicine,d1922- 0aDelaware womenzNew JerseyzBridgetonvBiography. 0aIndian women shamanszNew JerseyzBridgetonvBiography. 0aDelaware IndianszNew JerseyzBridgetonvBiography. 0aDelaware IndianszNew JerseyzBridgetonxHistory.0 aStrong Medicine,d1922-413Table of contents onlyuhttp://www.loc.gov/catdir/toc/ecip0719/2007020969.html423Publisher descriptionuhttp://www.loc.gov/catdir/enhancements/fy0808/2007020969-d.html413Sample textuhttp://www.loc.gov/catdir/enhancements/fy0808/2007020969-s.html01099cam a22002534a 4500001001300000003000400013005001700017008004100034010001700075025003300092037006300125040001300188042001000201050002500211100004200236245023400278250001800512260009000530300003600620546001600656520008700672650005100759710003500810 2008305903DLC20090122162012.0080602s2008 ii a 000 0 tibo a 2008305903 aI-Tib-2008-305903; 01; 05-01 bLibrary of Congress -- New Delhi Overseas OfficecRs400.00 aDLCcDLC alcode00aBQ7684.4b.D564 20080 aDkon-mchog-rgya-mtsho,cRa-se,d1968-10aDris lan don gcig ma :bdam paʼi chos dgoṅs pa gcig paʼi dri ba legs bśad bsu baʼi pho ñaʼi dris lan Dgoṅs-gcig smra baʼi mdzes rgyan źes bya ba bźugs so /cDwags-po Spyan-sṅa-ba Dkon-mchog-rgya-mtshos brtsams. aPar theṅ 2. a[ʼPhags-yul Dhe-ra-dhun :bSroṅ-btsan dpe mdzod khaṅ nas grems spel byas,c2008] a208 p. :b1 col. ill. ;c24 cm. aIn Tibetan. aOn the Dgoṅs-gcig teaching of Drikung Kagyudpa sect in questions/answers format. 0aʼBri-guṅ-pa (Sect)xDoctrinesvMiscellanea.2 aSroṅ-btsan dpe mdzod khaṅ.01582cam a2200325 a 4500001001300000003000400013005001700017008004100034010001700075020001500092025002700107037006300134040001300197041001800210042001000228043001200238050002600250100006700276240013100343245022900474260006400703300002700767546005000794504005500844600006100899650005300960700002101013700018101034710004101215 2008308175DLC20090123091532.0080718s2002 ii b 000 0 eng a 2008308175 a8186470336 aI-E-2008-308175; 59-13 bLibrary of Congress -- New Delhi Overseas OfficecRs185.00 aDLCcDLC1 aengatibhtib alcode aa-ii---00aBQ5593.P3bN3313 20020 aṄag-dbaṅ-blo-bzaṅ-rgya-mtsho,cDalai Lama V,d1617-1682.10aRje btsun bla ma ma hā gu ru Padma-ʼbyuṅ-gnas la gsol ba ʼdebs pa byin rlabs bdud rtsiʼi char rgyun.lEnglish & Tibetan10aPluvial nectar of blessings :ba supplication to the noble Lama Mahaguru Padmasambhava /cby His Holiness Ngag-dbang-blo-bzang-rgya-mtsho, the fifth Dalai Lama ; translated from the Tibetan with commentary by Dennis Cordell. aDharamsala :bLibrary of Tibetan Works and Archives,c2002. aviii, 101 p. ;c22 cm. aEnglish and Tibetanb(Tibetan also in roman). aIncludes bibliographical references (p. [97]-101).00aPadma Sambhava,dca. 717-ca. 762vPrayers and devotions. 0aPriests, BuddhistzIndiavPrayers and devotions.1 aCordell, Dennis.02aṄag-dbaṅ-blo-bzaṅ-rgya-mtsho,cDalai Lama V,d1617-1682tRje btsun bla ma ma hā gu ru Padma-ʼbyuṅ-gnas la gsol ba ʼdebs pa byin rlabs bdud rtsiʼi char rgyun.f20022 aLibrary of Tibetan Works & Archives.01221cam a22002534a 4500001001300000003000400013005001700017008004100034010001700075025002600092037006300118040001300181042001000194050002200204100005300226245017300279250001900452260012500471300002800596546001600624520023500640650003900875710005300914 2008308201DLC20090122162646.0080721s2008 ii 000 0 tibo a 2008308201 aI-Tib-2008-308201; 27 bLibrary of Congress -- New Delhi Overseas OfficecRs150.00 aDLCcDLC alcode00aBQ4036b.B78 20080 aBstan-ʼdzin-rgya-mtsho,cDalai Lama XIV,d1935-00aBod kyi naṅ chos ṅo sprod sñiṅ bsdus :bgoṅ sa skyabs mgon chen po mchog nas deṅ dus Bod rigs na gźon rnams la naṅ chos ṅo sprod bstsal ba bźugs so. aPar theṅs 2. aDharamsala, H.P. :bSku-bcar Rnam-par-rgyal-ba Phan-bde-legs-bśad-gliṅ Grwa-tshaṅ gi Śes-yon Lhan-tshogs,c2008. a4, iv, 254 p. ;c23 cm. aIn Tibetan. aSeries of lectures delivered by His Holiness the Dali Lama to younger generation of Tibetan studying in different colleges and universities in India and students from schools in Dharamsala on the introduction of Buddhist teaching. 0aBuddhismxEssence, genius, nature.2 aRnam-rgyal Grwa-tshaṅ.bŚes-yon Lhan-tshogs.01111cam a2200289 a 4500001001300000003000400013005001700017008004100034010001700075025002600092037006300118040001300181042001000194043001200204050002200216100003900238245015100277246006100428250001200489260008800501300004200589546001600631520005000647504005400697651004100751710002900792 2008308202DLC20090121092141.0080721s2005 ii b b 000 0 tibo a 2008308202 aI-Tib-2008-308202; 16 bLibrary of Congress -- New Delhi Overseas OfficecRs150.00 aDLCcDLC alcode aa-cc-ti00aDS785b.T475 20050 aThub-bstan-yar-ʼphel,cRnam-grwa.10aBod gaṅs can gyi rgyal rabs mdor bsdus dris lan brgya pa rab gsal śel gyi me loṅ źes bya ba bźugs so /cRnam-grwa Thub-bstan-yar-ʼphel.18aRgyal rabs dris lan brgya pa rab gsal śel gyi me loṅ a1st ed. aDharamsala, H.P. :bSku-bcar Rnam-rgyal Grwa-tshaṅ nas ʼgrems spel źus,c2005. aa-e, iv, ii, 407 p. :bmaps ;c23 cm. aIn Tibetan. aHistory of Tibet in questions/answers format. aIncludes bibliographical references (p. 406-407). 0aTibet (China)xHistoryvMiscellanea.2 aRnam-rgyal Grwa-tshaṅ.01127cam a22002895a 4500001001300000003000400013005001700017008004100034010001700075025002600092037005300118040001300171042001000184043002100194245001500215250001200230260013400242300002600376546001600402500005100418520017200469650003900641650003200680650004900712650002700761710004900788 2008308478DLC20090123131001.0080728s2007 ii 000 0 tibo a 2008308478 aI-Tib-2008-308478; 23 bLibrary of Congress -- New Delhi Overseas Office aDLCcDLC alcode aa-cc-tiaa-ii---00aŚes yon. a1st ed. aDharamsala, Distt. Kangra, H.P. :bSkabs bźi paʼi ʼbriṅ rim dge ʼos slob thon pa thun moṅ gis ʼgrems spel źus,c2007. axii, 419 p. ;c22 cm. aIn Tibetan. aCopyright: College for Higher Tibetan Studies. aContributed articles reflecting new educational policy for development of Tibetan education system in exile Tibetan community and Tibetan language teaching method etc. 0aEducation and statezChinazTibet. 0aTibetansxEducationzIndia. 0aTibetan languagexStudy and teachingzIndia. 0aTeachingxMethodology.2 aSa-rā Bod kyi mtho rim slob gñer khaṅ.01230nam a22003494a 4500001001300000003000400013005001700017008004100034010003100075020001800106020001500124035002300139040003200162042001400194043001200208050002400220066000700244100003600251245006700287250002000354260006200374300002100436600005100457650005700508650005400565650002900619880003300648880006900681880002300750880005500773880005200828 2008543486DLC20090126101044.0081217s1997 ja 000 0 jpn d a 2008543486z 2000314247 a9784588460050 a4588460056 a(OCoLC)ocm40868083 aUIUcUIUdTRCLSdOCLCGdDLC alccopycat aa-ja---00aPL832.U25bZ96 1997 c$11 6880-01aYoshida, Hajime,d1934-106880-02aKubo Sakae 'Kazanbaichi' o yomu /cYoshida Hajime cho. 6880-03aShohan. 6880-04aTōkyō :bHōsei Daigaku Shuppankyoku,c1997. a480 p. ;c19 cm.106880-05aKubo, Sakae,d1901-1958.tKazanbaichi. 0aJapanese dramay20th centuryxHistory and criticism. 0aPolitical plays, JapanesexHistory and criticism. 0aTheaterzJapanxHistory.1 6100-01/$1a吉田一,d1934-106245-02/$1a久保栄「火山灰地」を読む /c吉田一著. 6250-03/$1a初版. 6260-04/$1a東京 :b法政大学出版局,c1997.106600-05/$1a久保栄,d1901-1958.tKazanbaichi.01213nam a22003614a 4500001001300000003000400013005001700017008004100034010001700075020001800092020001500110035002400125040002300149042001400172043001200186050002400198066000700222100002600229245004800255250002100303260008900324300002400413490004100437651002800478651003100506651005000537651005400587880002600641880004500667880002300712880007600735880004000811 2009373513DLC20090121153231.0090114s2008 ch 000 0 chi d a 2009373513 a9789573908678 a9573908670 a(OCoLC)ocn268619391 aHUAcHUAdHKPdDLC alccopycat aa-cc-hk00aHC59.15b.L533 2008 c$11 6880-01aLin, Xingzhi.106880-02aCi an zhou bian /cLin Xingzhi zhu. 6880-03aChu ban. 6880-04aTaibei Xian Banqiao Shi :bYuan jing chu ban shi ye you xian gong si,c2008. a5, 300 p. ;c21 cm.0 6880-05aLin Xingzhi zuo pin ji ;v51 0aEconomic historyy1990- 0aWorld politicsy2005-2015. 0aHong Kong (China)xEconomic conditionsy1997- 0aHong Kong (China)xPolitics and governmenty1997-1 6100-01/$1a林行止.106245-02/$1a次按驟變 /c林行止著. 6250-03/$1a初版. 6260-04/$1a臺北縣板橋市 :b遠景出版事業有限公司,c2008.0 6490-05/$1a林行止作品集 ;v51
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe "Librarian view" do
|
4
|
-
it "should show marc fields" do
|
5
|
-
visit catalog_path('2009373513')
|
6
|
-
click_link "Librarian View"
|
7
|
-
expect(page).to have_content "Librarian View"
|
8
|
-
expect(page).to have_content "LEADER 01213nam a22003614a 4500"
|
9
|
-
expect(page).to have_content "100"
|
10
|
-
expect(page).to have_content "Lin, Xingzhi."
|
11
|
-
expect(page).to have_content "6|"
|
12
|
-
end
|
13
|
-
end
|
@@ -1,164 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
describe HtmlHeadHelper do
|
3
|
-
around(:each) do |example|
|
4
|
-
tmp_value = Capybara.ignore_hidden_elements
|
5
|
-
Capybara.ignore_hidden_elements = false
|
6
|
-
example.run
|
7
|
-
Capybara.ignore_hidden_elements = tmp_value
|
8
|
-
end
|
9
|
-
|
10
|
-
describe "render_js_includes" do
|
11
|
-
helper do
|
12
|
-
def javascript_includes
|
13
|
-
[
|
14
|
-
["some_js.js", {:plugin => :blacklight}],
|
15
|
-
["other_js"]
|
16
|
-
]
|
17
|
-
end
|
18
|
-
end
|
19
|
-
it "should include script tags specified in controller#javascript_includes" do
|
20
|
-
|
21
|
-
html = Deprecation.silence(Blacklight::HtmlHeadHelperBehavior) do
|
22
|
-
helper.render_js_includes
|
23
|
-
end
|
24
|
-
|
25
|
-
if Rails::VERSION::MAJOR == 4
|
26
|
-
expect(html).to have_selector("script[src='/javascripts/some_js.js']")
|
27
|
-
expect(html).to have_selector("script[src='/javascripts/other_js.js']")
|
28
|
-
elsif use_asset_pipeline?
|
29
|
-
# only for rails 3 with asset pipeline enabled
|
30
|
-
expect(html).to have_selector("script[src='/assets/some_js.js'][type='text/javascript']")
|
31
|
-
expect(html).to have_selector("script[src='/assets/other_js.js'][type='text/javascript']")
|
32
|
-
else
|
33
|
-
# rails 3 with asset pipeline disabled
|
34
|
-
expect(html).to have_selector("script[src='/javascripts/some_js.js'][type='text/javascript']")
|
35
|
-
expect(html).to have_selector("script[src='/javascripts/other_js.js'][type='text/javascript']")
|
36
|
-
end
|
37
|
-
|
38
|
-
expect(html.html_safe?).to eq(true)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
describe "render_stylesheet_links" do
|
43
|
-
helper do
|
44
|
-
def stylesheet_links
|
45
|
-
[
|
46
|
-
["my_stylesheet", {:plugin => :blacklight}],
|
47
|
-
["other_stylesheet"]
|
48
|
-
]
|
49
|
-
end
|
50
|
-
end
|
51
|
-
it "should render stylesheets specified in controller #stylesheet_links" do
|
52
|
-
|
53
|
-
html = Deprecation.silence(Blacklight::HtmlHeadHelperBehavior) do
|
54
|
-
helper.render_stylesheet_includes
|
55
|
-
end
|
56
|
-
|
57
|
-
if Rails::VERSION::MAJOR == 4
|
58
|
-
expect(html).to have_selector("link[href='/stylesheets/my_stylesheet.css'][rel='stylesheet']")
|
59
|
-
expect(html).to have_selector("link[href='/stylesheets/other_stylesheet.css'][rel='stylesheet']")
|
60
|
-
elsif use_asset_pipeline?
|
61
|
-
expect(html).to have_selector("link[href='/assets/my_stylesheet.css'][rel='stylesheet'][type='text/css']")
|
62
|
-
expect(html).to have_selector("link[href='/assets/other_stylesheet.css'][rel='stylesheet'][type='text/css']")
|
63
|
-
else
|
64
|
-
expect(html).to have_selector("link[href='/stylesheets/my_stylesheet.css'][rel='stylesheet'][type='text/css']")
|
65
|
-
expect(html).to have_selector("link[href='/stylesheets/other_stylesheet.css'][rel='stylesheet'][type='text/css']")
|
66
|
-
end
|
67
|
-
|
68
|
-
expect(html.html_safe?).to eq(true)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
describe "render_extra_head_content" do
|
73
|
-
helper do
|
74
|
-
def extra_head_content
|
75
|
-
['<link rel="a">', '<link rel="b">']
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
it "should include content specified in controller#extra_head_content" do
|
80
|
-
|
81
|
-
html = Deprecation.silence(Blacklight::HtmlHeadHelperBehavior) do
|
82
|
-
helper.render_extra_head_content
|
83
|
-
end
|
84
|
-
|
85
|
-
expect(html).to have_selector("link[rel=a]")
|
86
|
-
expect(html).to have_selector("link[rel=b]")
|
87
|
-
|
88
|
-
expect(html.html_safe?).to eq(true)
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
describe "render_head_content" do
|
93
|
-
describe "with no methods defined" do
|
94
|
-
it "should return empty string without complaint" do
|
95
|
-
Deprecation.silence(Blacklight::HtmlHeadHelperBehavior) do
|
96
|
-
expect {helper.render_head_content}.not_to raise_error
|
97
|
-
expect(helper.render_head_content).to be_blank
|
98
|
-
expect(helper.render_head_content.html_safe?).to eq(true)
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
describe "with methods defined" do
|
103
|
-
helper do
|
104
|
-
def javascript_includes
|
105
|
-
[["my_js"]]
|
106
|
-
end
|
107
|
-
def stylesheet_links
|
108
|
-
[["my_css"]]
|
109
|
-
end
|
110
|
-
def extra_head_content
|
111
|
-
[
|
112
|
-
"<madeup_tag></madeup_tag>",
|
113
|
-
'<link rel="rel" type="type" href="href">'
|
114
|
-
]
|
115
|
-
end
|
116
|
-
end
|
117
|
-
before(:each) do
|
118
|
-
expect(helper).to receive(:content_for).with(:head).and_return("<meta keywords=\"foo bar\"/>".html_safe)
|
119
|
-
|
120
|
-
@output = Deprecation.silence(Blacklight::HtmlHeadHelperBehavior) do
|
121
|
-
helper.render_head_content
|
122
|
-
end
|
123
|
-
end
|
124
|
-
it "should include extra_head_content" do
|
125
|
-
expect(@output).to have_selector("madeup_tag")
|
126
|
-
expect(@output).to have_selector("link[rel=rel][type=type][href=href]")
|
127
|
-
end
|
128
|
-
it "should include render_javascript_includes" do
|
129
|
-
if Rails::VERSION::MAJOR == 4
|
130
|
-
expect(@output).to have_selector("script[src='/javascripts/my_js.js']")
|
131
|
-
else
|
132
|
-
expect(@output).to have_selector("script[src='/assets/my_js.js'][type='text/javascript']")
|
133
|
-
end
|
134
|
-
end
|
135
|
-
it "should include render_stylesheet_links" do
|
136
|
-
if Rails::VERSION::MAJOR == 4
|
137
|
-
expect(@output).to have_selector("link[href='/stylesheets/my_css.css']")
|
138
|
-
else
|
139
|
-
expect(@output).to have_selector("link[href='/assets/my_css.css'][type='text/css']")
|
140
|
-
end
|
141
|
-
end
|
142
|
-
it "should include content_for :head" do
|
143
|
-
expect(@output).to have_selector("meta[keywords]")
|
144
|
-
end
|
145
|
-
|
146
|
-
it "should include all head content" do
|
147
|
-
expect(helper).to receive(:render_extra_head_content).and_return("".html_safe)
|
148
|
-
expect(helper).to receive(:render_js_includes).and_return("".html_safe)
|
149
|
-
expect(helper).to receive(:render_stylesheet_includes).and_return("".html_safe)
|
150
|
-
expect(helper).to receive(:content_for).with(:head).and_return("".html_safe)
|
151
|
-
|
152
|
-
Deprecation.silence(Blacklight::HtmlHeadHelperBehavior) do
|
153
|
-
expect(helper.render_head_content).to be_html_safe
|
154
|
-
end
|
155
|
-
end
|
156
|
-
end
|
157
|
-
end
|
158
|
-
|
159
|
-
private
|
160
|
-
def use_asset_pipeline?
|
161
|
-
Rails::VERSION::MAJOR == 4 || ((Rails::VERSION::MAJOR == 3 and Rails::VERSION::MINOR >= 1) and Rails.application.config.assets.enabled)
|
162
|
-
end
|
163
|
-
|
164
|
-
end
|
@@ -1,89 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
3
|
-
|
4
|
-
|
5
|
-
describe "Blacklight::Solr::Document::Marc" do
|
6
|
-
before(:all) do
|
7
|
-
@mock_class = Class.new do
|
8
|
-
include Blacklight::Solr::Document
|
9
|
-
end
|
10
|
-
@mock_class.use_extension( Blacklight::Solr::Document::Marc )
|
11
|
-
@mock_class.extension_parameters[:marc_source_field] = :marc
|
12
|
-
end
|
13
|
-
|
14
|
-
describe "marc binary mode" do
|
15
|
-
before(:each) do
|
16
|
-
@mock_class.extension_parameters[:marc_format_type] = :marc21
|
17
|
-
end
|
18
|
-
it "should read and parse a marc binary file" do
|
19
|
-
document = @mock_class.new(:marc => sample_marc_binary )
|
20
|
-
expect(document.to_marc).to eq(marc_from_string(:binary => sample_marc_binary ))
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe "marcxml mode" do
|
25
|
-
before(:each) do
|
26
|
-
@mock_class.extension_parameters[:marc_format_type] = :marcxml
|
27
|
-
end
|
28
|
-
it "should read and parse a marc xml file" do
|
29
|
-
document = @mock_class.new(:marc => sample_marc_xml)
|
30
|
-
expect(document.to_marc).to eq(marc_from_string(:xml => sample_marc_xml))
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
it "should register all its export formats" do
|
35
|
-
document = @mock_class.new
|
36
|
-
expect(Set.new(document.export_formats.keys)).to be_superset(Set.new([:marc, :marcxml, :openurl_ctx_kev, :refworks_marc_txt, :endnote, :xml]))
|
37
|
-
end
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
def sample_marc_xml
|
42
|
-
"<record>
|
43
|
-
<leader>01182pam a22003014a 4500</leader>
|
44
|
-
<controlfield tag=\"001\">a4802615</controlfield>
|
45
|
-
<controlfield tag=\"003\">SIRSI</controlfield>
|
46
|
-
<controlfield tag=\"008\">020828s2003 enkaf b 001 0 eng </controlfield>
|
47
|
-
|
48
|
-
<datafield tag=\"245\" ind1=\"0\" ind2=\"0\">
|
49
|
-
<subfield code=\"a\">Apples :</subfield>
|
50
|
-
<subfield code=\"b\">botany, production, and uses /</subfield>
|
51
|
-
<subfield code=\"c\">edited by D.C. Ferree and I.J. Warrington.</subfield>
|
52
|
-
</datafield>
|
53
|
-
|
54
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
55
|
-
<subfield code=\"a\">Oxon, U.K. ;</subfield>
|
56
|
-
<subfield code=\"a\">Cambridge, MA :</subfield>
|
57
|
-
<subfield code=\"b\">CABI Pub.,</subfield>
|
58
|
-
<subfield code=\"c\">c2003.</subfield>
|
59
|
-
</datafield>
|
60
|
-
|
61
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
62
|
-
<subfield code=\"a\">Ferree, David C.</subfield>
|
63
|
-
<subfield code=\"q\">(David Curtis),</subfield>
|
64
|
-
<subfield code=\"d\">1943-</subfield>
|
65
|
-
</datafield>
|
66
|
-
|
67
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
68
|
-
<subfield code=\"a\">Warrington, I. J.</subfield>
|
69
|
-
<subfield code=\"q\">(Ian J.)</subfield>
|
70
|
-
</datafield>
|
71
|
-
</record>"
|
72
|
-
end
|
73
|
-
|
74
|
-
|
75
|
-
def sample_marc_binary
|
76
|
-
"00386pam a22001094a 4500001000900000003000600009008004100015245008900056260005400145700004500199700003200244\036a4802615\036SIRSI\036020828s2003 enkaf b 001 0 eng \03600\037aApples :\037bbotany, production, and uses /\037cedited by D.C. Ferree and I.J. Warrington.\036 \037aOxon, U.K. ;\037aCambridge, MA :\037bCABI Pub.,\037cc2003.\0361 \037aFerree, David C.\037q(David Curtis),\037d1943-\0361 \037aWarrington, I. J.\037q(Ian J.)\036\035"
|
77
|
-
end
|
78
|
-
def marc_from_string(args = {})
|
79
|
-
if args[:binary]
|
80
|
-
reader = MARC::Reader.new(StringIO.new(args[:binary]))
|
81
|
-
reader.each {|rec| return rec }
|
82
|
-
elsif args[:xml]
|
83
|
-
reader = MARC::XMLReader.new(StringIO.new(args[:xml]))
|
84
|
-
reader.each {|rec| return rec }
|
85
|
-
end
|
86
|
-
return nil
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
@@ -1,746 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
4
|
-
require 'rubygems'
|
5
|
-
require 'marc'
|
6
|
-
|
7
|
-
def marc_from_xml(string)
|
8
|
-
reader = MARC::XMLReader.new(StringIO.new(string))
|
9
|
-
reader.each {|rec| return rec }
|
10
|
-
end
|
11
|
-
|
12
|
-
|
13
|
-
def standard_citation
|
14
|
-
"<record>
|
15
|
-
<leader>01182pam a22003014a 4500</leader>
|
16
|
-
<controlfield tag=\"001\">a4802615</controlfield>
|
17
|
-
<controlfield tag=\"003\">SIRSI</controlfield>
|
18
|
-
<controlfield tag=\"008\">020828s2003 enkaf b 001 0 eng </controlfield>
|
19
|
-
|
20
|
-
<datafield tag=\"110\" ind1=\"1\" ind2=\" \">
|
21
|
-
<subfield code=\"a\">Bobs</subfield>
|
22
|
-
<subfield code=\"b\">Your Uncle</subfield>
|
23
|
-
</datafield>
|
24
|
-
|
25
|
-
<datafield tag=\"245\" ind1=\"0\" ind2=\"0\">
|
26
|
-
<subfield code=\"a\">Apples :</subfield>
|
27
|
-
<subfield code=\"b\">botany, production, and uses /</subfield>
|
28
|
-
<subfield code=\"c\">edited by D.C. Ferree and I.J. Warrington.</subfield>
|
29
|
-
</datafield>
|
30
|
-
|
31
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
32
|
-
<subfield code=\"a\">Oxon, U.K. ;</subfield>
|
33
|
-
<subfield code=\"a\">Cambridge, MA :</subfield>
|
34
|
-
<subfield code=\"b\">CABI Pub.,</subfield>
|
35
|
-
<subfield code=\"c\">c2003.</subfield>
|
36
|
-
</datafield>
|
37
|
-
|
38
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
39
|
-
<subfield code=\"a\">Ferree, David C.</subfield>
|
40
|
-
<subfield code=\"q\">(David Curtis),</subfield>
|
41
|
-
<subfield code=\"d\">1943-</subfield>
|
42
|
-
</datafield>
|
43
|
-
|
44
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
45
|
-
<subfield code=\"a\">Warrington, I. J.</subfield>
|
46
|
-
<subfield code=\"q\">(Ian J.)</subfield>
|
47
|
-
</datafield>
|
48
|
-
</record>"
|
49
|
-
end
|
50
|
-
|
51
|
-
def music_record
|
52
|
-
"<record>
|
53
|
-
<leader>01828cjm a2200409 a 4500</leader>
|
54
|
-
<controlfield tag=\"001\">a4768316</controlfield>
|
55
|
-
<controlfield tag=\"003\">SIRSI</controlfield>
|
56
|
-
<controlfield tag=\"007\">sd fungnnmmned</controlfield>
|
57
|
-
<controlfield tag=\"008\">020117p20011990xxuzz h d</controlfield>
|
58
|
-
|
59
|
-
<datafield tag=\"245\" ind1=\"0\" ind2=\"0\">
|
60
|
-
<subfield code=\"a\">Music for horn</subfield>
|
61
|
-
<subfield code=\"h\">[sound recording] /</subfield>
|
62
|
-
<subfield code=\"c\">Brahms, Beethoven, von Krufft.</subfield>
|
63
|
-
</datafield>
|
64
|
-
|
65
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
66
|
-
<subfield code=\"a\">[United States] :</subfield>
|
67
|
-
<subfield code=\"b\">Harmonia Mundi USA,</subfield>
|
68
|
-
<subfield code=\"c\">p2001.</subfield>
|
69
|
-
</datafield>
|
70
|
-
|
71
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
72
|
-
<subfield code=\"a\">Greer, Lowell.</subfield>
|
73
|
-
</datafield>
|
74
|
-
|
75
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
76
|
-
<subfield code=\"a\">Lubin, Steven.</subfield>
|
77
|
-
</datafield>
|
78
|
-
|
79
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
80
|
-
<subfield code=\"a\">Chase, Stephanie,</subfield>
|
81
|
-
<subfield code=\"d\">1957-</subfield>
|
82
|
-
</datafield>
|
83
|
-
|
84
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\"2\">
|
85
|
-
<subfield code=\"a\">Brahms, Johannes,</subfield>
|
86
|
-
<subfield code=\"d\">1833-1897.</subfield>
|
87
|
-
<subfield code=\"t\">Trios,</subfield>
|
88
|
-
<subfield code=\"m\">piano, violin, horn,</subfield>
|
89
|
-
<subfield code=\"n\">op. 40,</subfield>
|
90
|
-
<subfield code=\"r\">E? major.</subfield>
|
91
|
-
</datafield>
|
92
|
-
|
93
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\"2\">
|
94
|
-
<subfield code=\"a\">Beethoven, Ludwig van,</subfield>
|
95
|
-
<subfield code=\"d\">1770-1827.</subfield>
|
96
|
-
<subfield code=\"t\">Sonatas,</subfield>
|
97
|
-
<subfield code=\"m\">horn, piano,</subfield>
|
98
|
-
<subfield code=\"n\">op. 17,</subfield>
|
99
|
-
<subfield code=\"r\">F major.</subfield>
|
100
|
-
</datafield>
|
101
|
-
|
102
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\"2\">
|
103
|
-
<subfield code=\"a\">Krufft, Nikolaus von,</subfield>
|
104
|
-
<subfield code=\"d\">1779-1818.</subfield>
|
105
|
-
<subfield code=\"t\">Sonata,</subfield>
|
106
|
-
<subfield code=\"m\">horn, piano,</subfield>
|
107
|
-
<subfield code=\"r\">F major.</subfield>
|
108
|
-
</datafield>
|
109
|
-
</record>"
|
110
|
-
end
|
111
|
-
|
112
|
-
def utf8_decomposed_record_xml
|
113
|
-
"<record>
|
114
|
-
<leader>01341nam 2200301 a 450 </leader>
|
115
|
-
<controlfield tag=\"005\">19971120234400.0</controlfield>
|
116
|
-
<controlfield tag=\"008\">890316s1988 caua b 101 0 eng </controlfield>
|
117
|
-
<datafield tag=\"245\" ind1=\"0\" ind2=\"0\">
|
118
|
-
<subfield code=\"a\">Sharīʻat and ambiguity in South Asian Islam /</subfield>
|
119
|
-
<subfield code=\"c\">edited by Katherine P. Ewing.</subfield>
|
120
|
-
</datafield>
|
121
|
-
</record>"
|
122
|
-
end
|
123
|
-
|
124
|
-
# 1:100,1:700,245a,0:245b,
|
125
|
-
def record1_xml
|
126
|
-
"<record>
|
127
|
-
<leader>01021cam a2200277 a 4500</leader>
|
128
|
-
<controlfield tag=\"001\">a1711966</controlfield>
|
129
|
-
<controlfield tag=\"003\">SIRSI</controlfield>
|
130
|
-
<controlfield tag=\"008\">890421s1988 enka 001 0 eng d</controlfield>
|
131
|
-
|
132
|
-
<datafield tag=\"100\" ind1=\"1\" ind2=\" \">
|
133
|
-
<subfield code=\"a\">Janetzky, Kurt.</subfield>
|
134
|
-
</datafield>
|
135
|
-
|
136
|
-
<datafield tag=\"245\" ind1=\"1\" ind2=\"4\">
|
137
|
-
<subfield code=\"a\">The horn /</subfield>
|
138
|
-
<subfield code=\"c\">Kurt Janetzky and Bernhard Bruchle ; translated from the German by James Chater.</subfield>
|
139
|
-
</datafield>
|
140
|
-
|
141
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
142
|
-
<subfield code=\"a\">London :</subfield>
|
143
|
-
<subfield code=\"b\">Batsford,</subfield>
|
144
|
-
<subfield code=\"c\">1988.</subfield>
|
145
|
-
</datafield>
|
146
|
-
|
147
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
148
|
-
<subfield code=\"a\">Brüchle, Bernhard.</subfield>
|
149
|
-
</datafield>
|
150
|
-
</record>"
|
151
|
-
end
|
152
|
-
|
153
|
-
# 0:100,0:700,245a,0:245b
|
154
|
-
def record2_xml
|
155
|
-
"<record>
|
156
|
-
<leader>00903nam a2200253 4500</leader>
|
157
|
-
<controlfield tag=\"001\">a543347</controlfield>
|
158
|
-
<controlfield tag=\"003\">SIRSI</controlfield>
|
159
|
-
<controlfield tag=\"008\">730111s1971 ohu b 000 0 eng </controlfield>
|
160
|
-
|
161
|
-
<datafield tag=\"245\" ind1=\"0\" ind2=\"0\">
|
162
|
-
<subfield code=\"a\">Final report to the Honorable John J. Gilligan, Governor.</subfield>
|
163
|
-
</datafield>
|
164
|
-
|
165
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
166
|
-
<subfield code=\"a\">[Columbus,</subfield>
|
167
|
-
<subfield code=\"b\">Printed by the State of Ohio, Dept. of Urban Affairs,</subfield>
|
168
|
-
<subfield code=\"c\">1971]</subfield>
|
169
|
-
</datafield>
|
170
|
-
</record>"
|
171
|
-
end
|
172
|
-
|
173
|
-
def year_range_xml
|
174
|
-
"<record>
|
175
|
-
<leader>01021cam a2200277 a 4500</leader>
|
176
|
-
<controlfield tag=\"001\">a1711966</controlfield>
|
177
|
-
<controlfield tag=\"003\">SIRSI</controlfield>
|
178
|
-
<controlfield tag=\"008\">890421s1988 enka 001 0 eng d</controlfield>
|
179
|
-
|
180
|
-
<datafield tag=\"100\" ind1=\"1\" ind2=\" \">
|
181
|
-
<subfield code=\"a\">Schmoe, Joe</subfield>
|
182
|
-
</datafield>
|
183
|
-
|
184
|
-
<datafield tag=\"245\" ind1=\"1\" ind2=\"4\">
|
185
|
-
<subfield code=\"a\">Main title /</subfield>
|
186
|
-
<subfield code=\"c\">Subtitle</subfield>
|
187
|
-
</datafield>
|
188
|
-
|
189
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
190
|
-
<subfield code=\"a\">London :</subfield>
|
191
|
-
<subfield code=\"b\">Batsford,</subfield>
|
192
|
-
<subfield code=\"c\">1988-2000</subfield>
|
193
|
-
</datafield>
|
194
|
-
|
195
|
-
</record>"
|
196
|
-
end
|
197
|
-
|
198
|
-
def no_date_xml
|
199
|
-
"<record>
|
200
|
-
<leader>01021cam a2200277 a 4500</leader>
|
201
|
-
<controlfield tag=\"001\">a1711966</controlfield>
|
202
|
-
<controlfield tag=\"003\">SIRSI</controlfield>
|
203
|
-
<controlfield tag=\"008\">890421s1988 enka 001 0 eng d</controlfield>
|
204
|
-
|
205
|
-
<datafield tag=\"100\" ind1=\"1\" ind2=\" \">
|
206
|
-
<subfield code=\"a\">Schmoe, Joe</subfield>
|
207
|
-
</datafield>
|
208
|
-
|
209
|
-
<datafield tag=\"245\" ind1=\"1\" ind2=\"4\">
|
210
|
-
<subfield code=\"a\">Main title /</subfield>
|
211
|
-
<subfield code=\"c\">Subtitle</subfield>
|
212
|
-
</datafield>
|
213
|
-
|
214
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
215
|
-
<subfield code=\"a\">London :</subfield>
|
216
|
-
<subfield code=\"b\">Batsford,</subfield>
|
217
|
-
<subfield code=\"c\">n.d.</subfield>
|
218
|
-
</datafield>
|
219
|
-
|
220
|
-
</record>"
|
221
|
-
end
|
222
|
-
|
223
|
-
def section_title_xml
|
224
|
-
"<record>
|
225
|
-
<leader>01021cam a2200277 a 4500</leader>
|
226
|
-
<controlfield tag=\"001\">a1711966</controlfield>
|
227
|
-
<controlfield tag=\"003\">SIRSI</controlfield>
|
228
|
-
<controlfield tag=\"008\">890421s1988 enka 001 0 eng d</controlfield>
|
229
|
-
|
230
|
-
<datafield tag=\"100\" ind1=\"1\" ind2=\" \">
|
231
|
-
<subfield code=\"a\">Schmoe, Joe</subfield>
|
232
|
-
</datafield>
|
233
|
-
|
234
|
-
<datafield tag=\"245\" ind1=\"1\" ind2=\"4\">
|
235
|
-
<subfield code=\"a\">Main title /</subfield>
|
236
|
-
<subfield code=\"b\">Subtitle</subfield>
|
237
|
-
<subfield code=\"n\">Number of part.</subfield>
|
238
|
-
<subfield code=\"p\">Name of part.</subfield>
|
239
|
-
</datafield>
|
240
|
-
|
241
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
242
|
-
<subfield code=\"a\">London :</subfield>
|
243
|
-
<subfield code=\"b\">Batsford,</subfield>
|
244
|
-
<subfield code=\"c\">2001</subfield>
|
245
|
-
</datafield>
|
246
|
-
|
247
|
-
</record>"
|
248
|
-
end
|
249
|
-
|
250
|
-
def dissertation_note_xml
|
251
|
-
"<record>
|
252
|
-
<leader>00903nam a2200253 4500</leader>
|
253
|
-
<controlfield tag=\"008\">730111s1971 ohu b 000 0 eng </controlfield>
|
254
|
-
|
255
|
-
<datafield tag=\"245\" ind1=\"0\" ind2=\"0\">
|
256
|
-
<subfield code=\"a\">Thesis on some subject.</subfield>
|
257
|
-
</datafield>
|
258
|
-
|
259
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
260
|
-
<subfield code=\"c\">2009</subfield>
|
261
|
-
</datafield>
|
262
|
-
|
263
|
-
<datafield tag=\"502\" ind1=\"0\" ind2=\"0\">
|
264
|
-
<subfield code=\"a\">Phd Thesis -- Goodenough College, 2009</subfield>
|
265
|
-
</datafield>
|
266
|
-
</record>"
|
267
|
-
end
|
268
|
-
|
269
|
-
def special_contributor_with_author_xml
|
270
|
-
"<record>
|
271
|
-
<leader>00903nam a2200253 4500</leader>
|
272
|
-
<controlfield tag=\"008\">730111s1971 ohu b 000 0 eng </controlfield>
|
273
|
-
|
274
|
-
<datafield tag=\"100\" ind1=\"0\" ind2=\"0\">
|
275
|
-
<subfield code=\"a\">Doe, John</subfield>
|
276
|
-
</datafield>
|
277
|
-
|
278
|
-
<datafield tag=\"245\" ind1=\"0\" ind2=\"0\">
|
279
|
-
<subfield code=\"a\">Title of item.</subfield>
|
280
|
-
</datafield>
|
281
|
-
|
282
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
283
|
-
<subfield code=\"a\">Publisher</subfield>
|
284
|
-
<subfield code=\"b\">Place</subfield>
|
285
|
-
<subfield code=\"c\">2009</subfield>
|
286
|
-
</datafield>
|
287
|
-
|
288
|
-
<datafield tag=\"700\" ind1=\" \" ind2=\" \">
|
289
|
-
<subfield code=\"a\">Schmoe, Joe</subfield>
|
290
|
-
<subfield code=\"e\">trl.</subfield>
|
291
|
-
</datafield>
|
292
|
-
|
293
|
-
<datafield tag=\"700\" ind1=\" \" ind2=\" \">
|
294
|
-
<subfield code=\"a\">Schmoe, Bill</subfield>
|
295
|
-
<subfield code=\"4\">edt</subfield>
|
296
|
-
</datafield>
|
297
|
-
|
298
|
-
<datafield tag=\"700\" ind1=\" \" ind2=\" \">
|
299
|
-
<subfield code=\"a\">Schmoe, Susie</subfield>
|
300
|
-
<subfield code=\"e\">com.</subfield>
|
301
|
-
</datafield>
|
302
|
-
|
303
|
-
</record>"
|
304
|
-
end
|
305
|
-
|
306
|
-
def three_authors_xml
|
307
|
-
"<record>
|
308
|
-
<leader>00903nam a2200253 4500</leader>
|
309
|
-
<controlfield tag=\"008\">730111s1971 ohu b 000 0 eng </controlfield>
|
310
|
-
|
311
|
-
<datafield tag=\"100\" ind1=\"0\" ind2=\"0\">
|
312
|
-
<subfield code=\"a\">Doe, John</subfield>
|
313
|
-
</datafield>
|
314
|
-
|
315
|
-
<datafield tag=\"245\" ind1=\"0\" ind2=\"0\">
|
316
|
-
<subfield code=\"a\">Title of item.</subfield>
|
317
|
-
</datafield>
|
318
|
-
|
319
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
320
|
-
<subfield code=\"a\">Publisher</subfield>
|
321
|
-
<subfield code=\"b\">Place</subfield>
|
322
|
-
<subfield code=\"c\">2009</subfield>
|
323
|
-
</datafield>
|
324
|
-
|
325
|
-
<datafield tag=\"700\" ind1=\" \" ind2=\" \">
|
326
|
-
<subfield code=\"a\">Schmoe, Joe</subfield>
|
327
|
-
</datafield>
|
328
|
-
|
329
|
-
<datafield tag=\"700\" ind1=\" \" ind2=\" \">
|
330
|
-
<subfield code=\"a\">Schmoe, Bill</subfield>
|
331
|
-
</datafield>
|
332
|
-
|
333
|
-
</record>"
|
334
|
-
end
|
335
|
-
|
336
|
-
def special_contributor_no_author_xml
|
337
|
-
"<record>
|
338
|
-
<leader>00903nam a2200253 4500</leader>
|
339
|
-
<controlfield tag=\"008\">730111s1971 ohu b 000 0 eng </controlfield>
|
340
|
-
|
341
|
-
<datafield tag=\"245\" ind1=\"0\" ind2=\"0\">
|
342
|
-
<subfield code=\"a\">Title of item.</subfield>
|
343
|
-
</datafield>
|
344
|
-
|
345
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
346
|
-
<subfield code=\"a\">Publisher</subfield>
|
347
|
-
<subfield code=\"b\">Place</subfield>
|
348
|
-
<subfield code=\"c\">2009</subfield>
|
349
|
-
</datafield>
|
350
|
-
|
351
|
-
<datafield tag=\"700\" ind1=\" \" ind2=\" \">
|
352
|
-
<subfield code=\"a\">Schmoe, Joe</subfield>
|
353
|
-
<subfield code=\"e\">trl.</subfield>
|
354
|
-
</datafield>
|
355
|
-
|
356
|
-
<datafield tag=\"700\" ind1=\" \" ind2=\" \">
|
357
|
-
<subfield code=\"a\">Schmoe, Bill</subfield>
|
358
|
-
<subfield code=\"4\">edt</subfield>
|
359
|
-
</datafield>
|
360
|
-
|
361
|
-
<datafield tag=\"700\" ind1=\" \" ind2=\" \">
|
362
|
-
<subfield code=\"a\">Schmoe, Susie</subfield>
|
363
|
-
<subfield code=\"e\">com.</subfield>
|
364
|
-
</datafield>
|
365
|
-
|
366
|
-
</record>"
|
367
|
-
end
|
368
|
-
|
369
|
-
# 4+:athors
|
370
|
-
def record3_xml
|
371
|
-
"<record>
|
372
|
-
<leader>01828cjm a2200409 a 4500</leader>
|
373
|
-
<controlfield tag=\"001\">a4768316</controlfield>
|
374
|
-
<controlfield tag=\"003\">SIRSI</controlfield>
|
375
|
-
<controlfield tag=\"007\">sd fungnnmmned</controlfield>
|
376
|
-
<controlfield tag=\"008\">020117p20011990xxuzz h d</controlfield>
|
377
|
-
|
378
|
-
<datafield tag=\"245\" ind1=\"0\" ind2=\"0\">
|
379
|
-
<subfield code=\"a\">Music for horn</subfield>
|
380
|
-
<subfield code=\"h\">[sound recording] /</subfield>
|
381
|
-
<subfield code=\"c\">Brahms, Beethoven, von Krufft.</subfield>
|
382
|
-
</datafield>
|
383
|
-
|
384
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
385
|
-
<subfield code=\"a\">[United States] :</subfield>
|
386
|
-
<subfield code=\"b\">Harmonia Mundi USA,</subfield>
|
387
|
-
<subfield code=\"c\">p2001.</subfield>
|
388
|
-
</datafield>
|
389
|
-
|
390
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
391
|
-
<subfield code=\"a\">Greer, Lowell.</subfield>
|
392
|
-
</datafield>
|
393
|
-
|
394
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
395
|
-
<subfield code=\"a\">Lubin, Steven.</subfield>
|
396
|
-
</datafield>
|
397
|
-
|
398
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
399
|
-
<subfield code=\"a\">Chase, Stephanie,</subfield>
|
400
|
-
<subfield code=\"d\">1957-</subfield>
|
401
|
-
</datafield>
|
402
|
-
|
403
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\"2\">
|
404
|
-
<subfield code=\"a\">Brahms, Johannes,</subfield>
|
405
|
-
<subfield code=\"d\">1833-1897.</subfield>
|
406
|
-
<subfield code=\"t\">Trios,</subfield>
|
407
|
-
<subfield code=\"m\">piano, violin, horn,</subfield>
|
408
|
-
<subfield code=\"n\">op. 40,</subfield>
|
409
|
-
<subfield code=\"r\">E? major.</subfield>
|
410
|
-
</datafield>
|
411
|
-
|
412
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\"2\">
|
413
|
-
<subfield code=\"a\">Beethoven, Ludwig van,</subfield>
|
414
|
-
<subfield code=\"d\">1770-1827.</subfield>
|
415
|
-
<subfield code=\"t\">Sonatas,</subfield>
|
416
|
-
<subfield code=\"m\">horn, piano,</subfield>
|
417
|
-
<subfield code=\"n\">op. 17,</subfield>
|
418
|
-
<subfield code=\"r\">F major.</subfield>
|
419
|
-
</datafield>
|
420
|
-
|
421
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\"2\">
|
422
|
-
<subfield code=\"a\">Krufft, Nikolaus von,</subfield>
|
423
|
-
<subfield code=\"d\">1779-1818.</subfield>
|
424
|
-
<subfield code=\"t\">Sonata,</subfield>
|
425
|
-
<subfield code=\"m\">horn, piano,</subfield>
|
426
|
-
<subfield code=\"r\">F major.</subfield>
|
427
|
-
</datafield>
|
428
|
-
|
429
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\"2\">
|
430
|
-
<subfield code=\"a\">Doe, John</subfield>
|
431
|
-
</datafield>
|
432
|
-
|
433
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\"2\">
|
434
|
-
<subfield code=\"a\">Doe, Jane</subfield>
|
435
|
-
</datafield>
|
436
|
-
|
437
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\"2\">
|
438
|
-
<subfield code=\"a\">Smith, John</subfield>
|
439
|
-
</datafield>
|
440
|
-
|
441
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\"2\">
|
442
|
-
<subfield code=\"a\">Smith, Jane</subfield>
|
443
|
-
</datafield>
|
444
|
-
|
445
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\"2\">
|
446
|
-
<subfield code=\"a\">Smith, James</subfield>
|
447
|
-
</datafield>
|
448
|
-
</record>"
|
449
|
-
end
|
450
|
-
|
451
|
-
# No elements that can be put into a citation
|
452
|
-
def no_good_data_xml
|
453
|
-
"<record>
|
454
|
-
<leader>01828cjm a2200409 a 4500</leader>
|
455
|
-
<controlfield tag=\"001\">a4768316</controlfield>
|
456
|
-
<controlfield tag=\"003\">SIRSI</controlfield>
|
457
|
-
<controlfield tag=\"007\">sd fungnnmmned</controlfield>
|
458
|
-
<controlfield tag=\"008\">020117p20011990xxuzz h d</controlfield>
|
459
|
-
|
460
|
-
<datafield tag=\"024\" ind1=\"1\" ind2=\" \">
|
461
|
-
<subfield code=\"a\">713746703721</subfield>
|
462
|
-
</datafield>
|
463
|
-
|
464
|
-
<datafield tag=\"028\" ind1=\"0\" ind2=\"0\">
|
465
|
-
<subfield code=\"a\">HCX 3957037</subfield>
|
466
|
-
<subfield code=\"b\">Harmonia Mundi USA</subfield>
|
467
|
-
</datafield>
|
468
|
-
|
469
|
-
<datafield tag=\"033\" ind1=\"2\" ind2=\"0\">
|
470
|
-
<subfield code=\"a\">19901203</subfield>
|
471
|
-
<subfield code=\"a\">19901206</subfield>
|
472
|
-
</datafield>
|
473
|
-
|
474
|
-
<datafield tag=\"035\" ind1=\" \" ind2=\" \">
|
475
|
-
<subfield code=\"a\">(OCoLC-M)48807235</subfield>
|
476
|
-
</datafield>
|
477
|
-
|
478
|
-
<datafield tag=\"040\" ind1=\" \" ind2=\" \">
|
479
|
-
<subfield code=\"a\">WC4</subfield>
|
480
|
-
<subfield code=\"c\">WC4</subfield>
|
481
|
-
<subfield code=\"d\">CSt</subfield>
|
482
|
-
</datafield>
|
483
|
-
|
484
|
-
<datafield tag=\"041\" ind1=\"0\" ind2=\" \">
|
485
|
-
<subfield code=\"g\">engfre</subfield>
|
486
|
-
</datafield>
|
487
|
-
</record>"
|
488
|
-
end
|
489
|
-
|
490
|
-
# Bad author name
|
491
|
-
def bad_author_xml
|
492
|
-
"<record>
|
493
|
-
<leader>01021cam a2200277 a 4500</leader>
|
494
|
-
<controlfield tag=\"001\">a1711966</controlfield>
|
495
|
-
<controlfield tag=\"003\">SIRSI</controlfield>
|
496
|
-
<controlfield tag=\"008\">890421s1988 enka 001 0 eng d</controlfield>
|
497
|
-
|
498
|
-
<datafield tag=\"100\" ind1=\"1\" ind2=\" \">
|
499
|
-
<subfield code=\"a\"></subfield>
|
500
|
-
</datafield>
|
501
|
-
|
502
|
-
<datafield tag=\"245\" ind1=\"1\" ind2=\"4\">
|
503
|
-
<subfield code=\"a\">The horn /</subfield>
|
504
|
-
<subfield code=\"c\">Kurt Janetzky and Bernhard Bruchle ; translated from the German by James Chater.</subfield>
|
505
|
-
</datafield>
|
506
|
-
|
507
|
-
<datafield tag=\"260\" ind1=\" \" ind2=\" \">
|
508
|
-
<subfield code=\"a\">London :</subfield>
|
509
|
-
<subfield code=\"b\">Batsford,</subfield>
|
510
|
-
<subfield code=\"c\">1988.</subfield>
|
511
|
-
</datafield>
|
512
|
-
|
513
|
-
<datafield tag=\"700\" ind1=\"1\" ind2=\" \">
|
514
|
-
<subfield code=\"a\">Brüchle, Bernhard.</subfield>
|
515
|
-
</datafield>
|
516
|
-
</record>"
|
517
|
-
end
|
518
|
-
|
519
|
-
describe Blacklight::Solr::Document::MarcExport do
|
520
|
-
|
521
|
-
before(:all) do
|
522
|
-
dclass = Class.new do
|
523
|
-
include Blacklight::Solr::Document::MarcExport
|
524
|
-
attr_accessor :to_marc
|
525
|
-
def initialize(marc_xml_str)
|
526
|
-
self.to_marc = marc_from_xml(marc_xml_str)
|
527
|
-
end
|
528
|
-
end
|
529
|
-
|
530
|
-
@typical_record = dclass.new( standard_citation )
|
531
|
-
@music_record = dclass.new( music_record )
|
532
|
-
@dissertation_record = dclass.new( dissertation_note_xml )
|
533
|
-
@record_without_245b = dclass.new( record1_xml )
|
534
|
-
@three_authors_record = dclass.new( three_authors_xml )
|
535
|
-
@record_without_authors = dclass.new( record2_xml )
|
536
|
-
@record_with_10plus_authors = dclass.new( record3_xml )
|
537
|
-
@year_range_record = dclass.new( year_range_xml )
|
538
|
-
@no_date_record = dclass.new( no_date_xml )
|
539
|
-
@section_title_record = dclass.new( section_title_xml )
|
540
|
-
@special_contributor_record = dclass.new( special_contributor_with_author_xml )
|
541
|
-
@record_without_citable_data = dclass.new( no_good_data_xml )
|
542
|
-
@record_with_bad_author = dclass.new( bad_author_xml )
|
543
|
-
@special_contributor_no_auth_record = dclass.new( special_contributor_no_author_xml )
|
544
|
-
@record_utf8_decomposed = dclass.new( utf8_decomposed_record_xml )
|
545
|
-
|
546
|
-
end
|
547
|
-
|
548
|
-
describe "export_as_chicago_citation_txt" do
|
549
|
-
it "should handle a typical record correclty" do
|
550
|
-
expect(@typical_record.export_as_chicago_citation_txt).to eq("Ferree, David C., and I. J Warrington. <i>Apples: Botany, Production, and Uses.</i> Oxon, U.K.: CABI Pub., 2003.")
|
551
|
-
end
|
552
|
-
it "should format a record w/o authors correctly" do
|
553
|
-
expect(@record_without_authors.export_as_chicago_citation_txt).to eq("<i>Final Report to the Honorable John J. Gilligan, Governor.</i> [Columbus: Printed by the State of Ohio, Dept. of Urban Affairs, 1971.")
|
554
|
-
end
|
555
|
-
it "should format a citation without a 245b field correctly" do
|
556
|
-
expect(@record_without_245b.export_as_chicago_citation_txt).to eq("Janetzky, Kurt., and Bernhard Brüchle. <i>The Horn.</i> London: Batsford, 1988.")
|
557
|
-
end
|
558
|
-
it "should format a citation with 4+ authors correctly" do
|
559
|
-
chicago_text = @record_with_10plus_authors.export_as_chicago_citation_txt
|
560
|
-
expect(chicago_text).to eq("Greer, Lowell., Steven Lubin, Stephanie Chase, Johannes Brahms, Ludwig van Beethoven, Nikolaus von Krufft, John Doe, et al. <i>Music for Horn.</i> [United States]: Harmonia Mundi USA, 2001.")
|
561
|
-
expect(chicago_text).to match(/John Doe, et al\./)
|
562
|
-
expect(chicago_text).not_to match(/Jane Doe/)
|
563
|
-
end
|
564
|
-
it "should handle dissertation data correctly" do
|
565
|
-
expect(@dissertation_record.export_as_chicago_citation_txt).to eq("<i>Thesis On Some Subject.</i> Phd Thesis -- Goodenough College, 2009.")
|
566
|
-
end
|
567
|
-
it "should handle 3 authors correctly" do
|
568
|
-
expect(@three_authors_record.export_as_chicago_citation_txt).to match(/^Doe, John, Joe Schmoe, and Bill Schmoe\./)
|
569
|
-
end
|
570
|
-
it "should handle editors, translators, and compilers correctly" do
|
571
|
-
expect(@special_contributor_record.export_as_chicago_citation_txt).to eq("Doe, John <i>Title of Item.</i> Translated by Joe Schmoe. Edited by Bill Schmoe. Compiled by Susie Schmoe. Publisher: Place, 2009.")
|
572
|
-
end
|
573
|
-
it "should handle editors, translators, and compilers correctly when there is no author present" do
|
574
|
-
expect(@special_contributor_no_auth_record.export_as_chicago_citation_txt).to eq("Schmoe, Joe trans., Bill Schmoe ed., and Susie Schmoe comp. <i>Title of Item.</i> Publisher: Place, 2009.")
|
575
|
-
end
|
576
|
-
it "should handle year ranges properly" do
|
577
|
-
expect(@year_range_record.export_as_chicago_citation_txt).not_to match(/2000/)
|
578
|
-
end
|
579
|
-
it "should handle n.d. in the 260$c properly" do
|
580
|
-
expect(@no_date_record.export_as_chicago_citation_txt).to match(/n\.d\.$/)
|
581
|
-
end
|
582
|
-
it "should handle section title appropriately" do
|
583
|
-
expect(@section_title_record.export_as_chicago_citation_txt).to eq("Schmoe, Joe <i>Main Title: Subtitle\.<\/i> Number of Part, <i>Name of Part\.<\/i> London: Batsford, 2001.")
|
584
|
-
end
|
585
|
-
it "should not fail if there is no citation data" do
|
586
|
-
expect(@record_without_citable_data.export_as_chicago_citation_txt).to eq("")
|
587
|
-
end
|
588
|
-
end
|
589
|
-
|
590
|
-
describe "export_as_apa_citation_txt" do
|
591
|
-
it "should format a standard citation correctly" do
|
592
|
-
expect(@typical_record.export_as_apa_citation_txt).to eq("Ferree, D. C, & Warrington, I. J. (2003). <i>Apples : botany, production, and uses.</i> Oxon, U.K.: CABI Pub.")
|
593
|
-
end
|
594
|
-
|
595
|
-
it "should format a citation without a 245b field correctly" do
|
596
|
-
expect(@record_without_245b.export_as_apa_citation_txt).to eq("Janetzky, K., & Brüchle, B. (1988). <i>The horn.</i> London: Batsford.")
|
597
|
-
end
|
598
|
-
|
599
|
-
it "should format a citation without any authors correctly" do
|
600
|
-
expect(@record_without_authors.export_as_apa_citation_txt).to eq("(1971). <i>Final report to the Honorable John J. Gilligan, Governor.</i> [Columbus: Printed by the State of Ohio, Dept. of Urban Affairs.")
|
601
|
-
end
|
602
|
-
|
603
|
-
it "should not fail if there is no citation data" do
|
604
|
-
expect(@record_without_citable_data.export_as_apa_citation_txt).to eq("")
|
605
|
-
end
|
606
|
-
|
607
|
-
it "should not bomb with a null pointer if there if author data is empty" do
|
608
|
-
expect(@record_with_bad_author.export_as_apa_citation_txt).to eq("Brüchle, B. (1988). <i>The horn.</i> London: Batsford.")
|
609
|
-
end
|
610
|
-
|
611
|
-
end
|
612
|
-
|
613
|
-
describe "export_as_mla_citation_txt" do
|
614
|
-
it "should format a standard citation correctly" do
|
615
|
-
expect(@typical_record.export_as_mla_citation_txt).to eq("Ferree, David C, and I. J Warrington. <i>Apples : Botany, Production, and Uses.</i> Oxon, U.K.: CABI Pub., 2003.")
|
616
|
-
end
|
617
|
-
|
618
|
-
it "should format a citation without a 245b field correctly" do
|
619
|
-
expect(@record_without_245b.export_as_mla_citation_txt).to eq("Janetzky, Kurt, and Bernhard Brüchle. <i>The Horn.</i> London: Batsford, 1988.")
|
620
|
-
end
|
621
|
-
|
622
|
-
it "should format a citation without any authors correctly" do
|
623
|
-
expect(@record_without_authors.export_as_mla_citation_txt).to eq("<i>Final Report to the Honorable John J. Gilligan, Governor.</i> [Columbus: Printed by the State of Ohio, Dept. of Urban Affairs, 1971.")
|
624
|
-
end
|
625
|
-
|
626
|
-
it "should format a citation with 4+ authors correctly" do
|
627
|
-
expect(@record_with_10plus_authors.export_as_mla_citation_txt).to eq("Greer, Lowell, et al. <i>Music for Horn.</i> [United States]: Harmonia Mundi USA, 2001.")
|
628
|
-
end
|
629
|
-
|
630
|
-
it "should not fail if there is no citation data" do
|
631
|
-
expect(@record_without_citable_data.export_as_mla_citation_txt).to eq("")
|
632
|
-
end
|
633
|
-
end
|
634
|
-
|
635
|
-
describe "export_as_openurl_ctx_kev" do
|
636
|
-
it "should create the appropriate context object for books" do
|
637
|
-
record = @typical_record.export_as_openurl_ctx_kev('Book')
|
638
|
-
expect(record).to match(/.*mtx%3Abook.*rft.genre=book.*rft.btitle=Apples\+%3A\+botany%2C\+production%2C\+and\+uses.*rft.aucorp=Bobs\+Your\+Uncle.*rft.date=c2003.*rft.place=Oxon%2C\+U.K.*rft.pub=CABI\+Pub.*rft.isbn=/) and
|
639
|
-
expect(record).not_to match(/.*rft.genre=article.*rft.issn=.*/)
|
640
|
-
end
|
641
|
-
it "should create the appropriate context object for journals" do
|
642
|
-
record = @typical_record.export_as_openurl_ctx_kev('Journal')
|
643
|
-
record_journal_other = @typical_record.export_as_openurl_ctx_kev('Journal/Magazine')
|
644
|
-
expect(record).to match(/.*mtx%3Ajournal.*rft.genre=article.*rft.title=Apples\+%3A\+botany%2C\+production%2C\+and\+uses.*rft.atitle=Apples\+%3A\+botany%2C\+production%2C\+and\+uses.*rft.aucorp=Bobs\+Your\+Uncle.*rft.date=c2003.*rft.issn=/) and
|
645
|
-
expect(record_journal_other).to eq(record) and
|
646
|
-
expect(record).not_to match(/.*rft.genre=book.*rft.isbn=.*/)
|
647
|
-
end
|
648
|
-
it "should create the appropriate context object for other content" do
|
649
|
-
record = @typical_record.export_as_openurl_ctx_kev('NotARealFormat')
|
650
|
-
expect(record).to match(/.*mtx%3Adc.*rft.title=Apples\+%3A\+botany%2C\+production%2C\+and\+uses.*rft.creator=.*rft.aucorp=Bobs\+Your\+Uncle.*rft.date=c2003.*rft.place=Oxon%2C\+U.K.*rft.pub=CABI\+Pub.*rft.format=notarealformat/) and
|
651
|
-
expect(record).not_to match(/.*rft.isbn=.*/) and
|
652
|
-
expect(record).not_to match(/.*rft.issn=.*/)
|
653
|
-
end
|
654
|
-
end
|
655
|
-
|
656
|
-
describe "export_as_marc binary" do
|
657
|
-
it "should export_as_marc" do
|
658
|
-
expect(@typical_record.export_as_marc).to eq(@typical_record.to_marc.to_marc)
|
659
|
-
end
|
660
|
-
end
|
661
|
-
|
662
|
-
describe "export_as_marcxml" do
|
663
|
-
it "should export_as_marcxml" do
|
664
|
-
expect(marc_from_xml(@typical_record.export_as_marcxml)).to eq(marc_from_xml(@typical_record.to_marc.to_xml.to_s))
|
665
|
-
end
|
666
|
-
end
|
667
|
-
|
668
|
-
describe "export_as_xml" do
|
669
|
-
it "should export marcxml as xml" do
|
670
|
-
expect(marc_from_xml(@typical_record.export_as_xml)).to eq(marc_from_xml(@typical_record.export_as_marcxml))
|
671
|
-
end
|
672
|
-
end
|
673
|
-
|
674
|
-
describe "export_as_refworks_marc_txt" do
|
675
|
-
it "should export correctly" do
|
676
|
-
expect(@music_record.export_as_refworks_marc_txt).to eq("LEADER 01828cjm a2200409 a 4500001 a4768316\n003 SIRSI\n007 sd fungnnmmned\n008 020117p20011990xxuzz h d\n245 00 Music for horn |h[sound recording] / |cBrahms, Beethoven, von Krufft.\n260 [United States] : |bHarmonia Mundi USA, |cp2001.\n700 1 Greer, Lowell.\n700 1 Lubin, Steven.\n700 1 Chase, Stephanie, |d1957-\n700 12 Brahms, Johannes, |d1833-1897. |tTrios, |mpiano, violin, horn, |nop. 40, |rE? major.\n700 12 Beethoven, Ludwig van, |d1770-1827. |tSonatas, |mhorn, piano, |nop. 17, |rF major.\n700 12 Krufft, Nikolaus von, |d1779-1818. |tSonata, |mhorn, piano, |rF major.\n")
|
677
|
-
end
|
678
|
-
describe "for UTF-8 record" do
|
679
|
-
it "should export in Unicode normalized C form" do
|
680
|
-
@utf8_exported = @record_utf8_decomposed.export_as_refworks_marc_txt
|
681
|
-
|
682
|
-
if defined? Unicode
|
683
|
-
expect(@utf8_exported).not_to include("\314\204\312\273") # decomposed
|
684
|
-
expect(@utf8_exported).to include("\304\253\312\273") # C-form normalized
|
685
|
-
end
|
686
|
-
end
|
687
|
-
end
|
688
|
-
end
|
689
|
-
|
690
|
-
describe "export_as_endnote" do
|
691
|
-
it "should export_correctly" do
|
692
|
-
endnote_file = @music_record.export_as_endnote
|
693
|
-
# We have to parse it a bit to check it.
|
694
|
-
endnote_entries = Hash.new {|hash, key| hash[key] = Set.new }
|
695
|
-
endnote_file.each_line do |line|
|
696
|
-
line =~ /\%(..?) (.*)$/
|
697
|
-
endnote_entries[$1] << $2
|
698
|
-
end
|
699
|
-
|
700
|
-
expect(endnote_entries["0"]).to eq(Set.new(["Generic"])) # I have no idea WHY this is correct, it is definitely not legal, but taking from earlier test for render_endnote in applicationhelper, the previous version of this. jrochkind.
|
701
|
-
expect(endnote_entries["D"]).to eq(Set.new(["p2001. "]))
|
702
|
-
expect(endnote_entries["C"]).to eq(Set.new(["[United States] : "]))
|
703
|
-
expect(endnote_entries["E"]).to eq(Set.new(["Greer, Lowell. ", "Lubin, Steven. ", "Chase, Stephanie, ", "Brahms, Johannes, ", "Beethoven, Ludwig van, ", "Krufft, Nikolaus von, "]))
|
704
|
-
expect(endnote_entries["I"]).to eq(Set.new(["Harmonia Mundi USA, "]))
|
705
|
-
expect(endnote_entries["T"]).to eq(Set.new(["Music for horn "]))
|
706
|
-
|
707
|
-
#nothing extra
|
708
|
-
expect(Set.new(endnote_entries.keys)).to eq(Set.new(["0", "C", "D", "E", "I", "T"]))
|
709
|
-
end
|
710
|
-
end
|
711
|
-
|
712
|
-
describe "Citation title transformation" do
|
713
|
-
before(:each) do
|
714
|
-
class CitationTitleTest
|
715
|
-
include Blacklight::Solr::Document::MarcExport
|
716
|
-
def transform_title(text)
|
717
|
-
citation_title(text)
|
718
|
-
end
|
719
|
-
end
|
720
|
-
@citation_title = CitationTitleTest.new
|
721
|
-
end
|
722
|
-
it "should tranform a normal title properlly" do
|
723
|
-
expect(@citation_title.transform_title("This is just a test")).to eq("This Is Just a Test")
|
724
|
-
end
|
725
|
-
it "should not attempt to capatilize words in all-caps (e.g. acronyms)" do
|
726
|
-
expect(@citation_title.transform_title("IBM PC applications")).to eq("IBM PC Applications")
|
727
|
-
end
|
728
|
-
it "should capitalize a preposition if it is the first word in a title" do
|
729
|
-
expect(@citation_title.transform_title("of mice and men")).to eq("Of Mice and Men")
|
730
|
-
end
|
731
|
-
it "should handle hyphenated words properly" do
|
732
|
-
expect(@citation_title.transform_title("Testing hyphenated-words and how they get capitalized")).to eq("Testing Hyphenated-Words and How They Get Capitalized")
|
733
|
-
end
|
734
|
-
it "should handle normal prepositions properly" do
|
735
|
-
expect(@citation_title.transform_title("A little learning is a dangerous thing")).to eq("A Little Learning Is a Dangerous Thing")
|
736
|
-
expect(@citation_title.transform_title("Four theories concerning the Gospel according to Matthew")).to eq("Four Theories Concerning the Gospel According to Matthew")
|
737
|
-
expect(@citation_title.transform_title("Tired but happy")).to eq("Tired but Happy")
|
738
|
-
expect(@citation_title.transform_title("Mnemonics that work are better than rules that do not")).to eq("Mnemonics That Work Are Better Than Rules That Do Not")
|
739
|
-
expect(@citation_title.transform_title("This is just a test")).to eq("This Is Just a Test")
|
740
|
-
expect(@citation_title.transform_title("the mind of the Renaissance")).to eq("The Mind of the Renaissance")
|
741
|
-
expect(@citation_title.transform_title("Are you considering psychoanalysis?")).to eq("Are You Considering Psychoanalysis?")
|
742
|
-
expect(@citation_title.transform_title("Not without laughter")).to eq("Not without Laughter")
|
743
|
-
end
|
744
|
-
end
|
745
|
-
|
746
|
-
end
|