umlaut-primo 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/MIT-LICENSE +20 -0
- data/README.md +10 -0
- data/Rakefile +35 -0
- data/lib/umlaut_primo/primo_service.rb +522 -0
- data/lib/umlaut_primo/primo_source.rb +59 -0
- data/lib/umlaut_primo/version.rb +3 -0
- data/lib/umlaut_primo.rb +2 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/images/rails.png +0 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/umlaut_controller.rb +122 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +63 -0
- data/test/dummy/config/boot.rb +6 -0
- data/test/dummy/config/database.yml +61 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/primo.yml +55 -0
- data/test/dummy/config/routes.rb +60 -0
- data/test/dummy/config/umlaut_services.yml +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/migrate/20130306173028_umlaut_init.umlaut.rb +106 -0
- data/test/dummy/db/migrate/20130306173029_umlaut_add_service_response_index.umlaut.rb +10 -0
- data/test/dummy/db/schema.rb +118 -0
- data/test/dummy/db/seeds.rb +7 -0
- data/test/dummy/log/development.log +4 -0
- data/test/dummy/log/test.log +19611 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/robots.txt +5 -0
- data/test/dummy/script/rails +6 -0
- data/test/fixtures/referent_values.yml +96 -0
- data/test/fixtures/referents.yml +12 -0
- data/test/fixtures/requests.yml +20 -0
- data/test/fixtures/sfx_urls.yml +4 -0
- data/test/test_helper.rb +30 -0
- data/test/unit/primo_service_test.rb +228 -0
- data/test/unit/primo_source_test.rb +78 -0
- data/test/vcr_cassettes/australian_journal_of_international_affairs_by_id.yml +284 -0
- data/test/vcr_cassettes/musical_quarterly_by_issn.yml +263 -0
- data/test/vcr_cassettes/travels_with_my_by_id.yml +167 -0
- metadata +284 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,122 @@
|
|
1
|
+
require 'umlaut'
|
2
|
+
require 'umlaut_configurable'
|
3
|
+
|
4
|
+
# Superclass for all Umlaut controllers, to hold default behavior,
|
5
|
+
# also hold global configuration. It's a superclass rather than a module,
|
6
|
+
# so we can use Rails 3 hieararchical superclass view lookup too if we want,
|
7
|
+
# for general umlaut views. And also so local app can over-ride
|
8
|
+
# methods here once, and have it apply to all Umlaut controllers.
|
9
|
+
# But there's not much magic in here or anything, the
|
10
|
+
# common behavior is ordinary methods available to be called, mostly.
|
11
|
+
#
|
12
|
+
# This class is copied into the local app -- the default implementation
|
13
|
+
# does nothing but 'include Umlaut::ControllerBehavior'
|
14
|
+
#
|
15
|
+
# You will ordinarily set config here, and can also over-ride
|
16
|
+
# methods from Umlaut::ControllerBehavior if desired. Or add
|
17
|
+
# additional helpers to over-ride Umlaut helpers if needed.
|
18
|
+
class UmlautController < ApplicationController
|
19
|
+
include Umlaut::ControllerBehavior
|
20
|
+
|
21
|
+
# Some suggested configuration. More config keys
|
22
|
+
# are available, see UmlautConfigurable.set_default_configuration!
|
23
|
+
# implementation for list. Configuration actually uses
|
24
|
+
# a Confstruct object.
|
25
|
+
|
26
|
+
umlaut_config.configure do
|
27
|
+
# app_name 'Find It'
|
28
|
+
|
29
|
+
# URL to image to use for link resolver in some self-links,
|
30
|
+
# OR name of image asset in local app.
|
31
|
+
#link_img_url "http//something"
|
32
|
+
|
33
|
+
# string used in standard layout footer to identify your app.
|
34
|
+
# mark it html_safe if it includes html
|
35
|
+
# footer_credit "Find It service provided by <a href='http://www.university.edu/'>My University</a>".html_safe
|
36
|
+
|
37
|
+
|
38
|
+
# Sometimes Umlaut sends out email, what email addr should it be from?
|
39
|
+
# from_email_addr 'no_reply@umlaut.example.com'
|
40
|
+
|
41
|
+
# Local layout for UmlautController's, instead of
|
42
|
+
# built in 'umlaut' layout?
|
43
|
+
# layout "application"
|
44
|
+
|
45
|
+
# A help url used on error page and a few other places.
|
46
|
+
# help_url "http://www.library.jhu.edu/services/askalib/index.html"
|
47
|
+
|
48
|
+
# If OpenURL came from manual entry of title/ISSN, and no match is found in
|
49
|
+
# link resolver knowledge base, display a warning to the user of potential
|
50
|
+
# typo?
|
51
|
+
# entry_not_in_kb_warning true
|
52
|
+
|
53
|
+
# rfr_ids used for umlaut generated pages.
|
54
|
+
# rfr_ids do
|
55
|
+
# opensearch "info:sid/umlaut.code4lib.org:opensearch"
|
56
|
+
# citation "info:sid/umlaut.code4lib.org:citation"
|
57
|
+
# azlist 'info:sid/umlaut.code4lib.org:azlist'
|
58
|
+
# end
|
59
|
+
|
60
|
+
# Referent filters. Sort of like SFX source parsers.
|
61
|
+
# hash, key is regexp to match a sid, value is filter object
|
62
|
+
# (see lib/referent_filters )
|
63
|
+
# add_referent_filters!( :match => /.*/, :filter => DissertationCatch.new )
|
64
|
+
|
65
|
+
# Turn off permalink-generation? If you don't want it at all, or
|
66
|
+
# don't want it temporarily because you are pointing at a database
|
67
|
+
# that won't last.
|
68
|
+
# create_permalinks false
|
69
|
+
|
70
|
+
# How many seconds between updates of the background updater for background
|
71
|
+
# services?
|
72
|
+
# poll_wait_seconds 4
|
73
|
+
|
74
|
+
# Configuration for the 'search' functions -- A-Z lookup
|
75
|
+
# and citation entry.
|
76
|
+
search do
|
77
|
+
# Is your SFX database connection, defined in database.yml under
|
78
|
+
# sfx_db and used for A-Z searches, Sfx4 or do you want to use Sfx4Solr?
|
79
|
+
# Other SearchMethods in addition to SFX direct db may be provided later.
|
80
|
+
#az_search_method SearchMethods::Sfx4
|
81
|
+
#az_search_method SearchMethods::Sfx4Solr::Local
|
82
|
+
|
83
|
+
# When talking directly to the SFX A-Z list database, you may
|
84
|
+
# need to set this, if you have multiple A-Z profiles configured
|
85
|
+
# and don't want to use the 'default.
|
86
|
+
# sfx_az_profile "default"
|
87
|
+
|
88
|
+
# can set to "_blank" etc.
|
89
|
+
# result_link_target nil
|
90
|
+
end
|
91
|
+
|
92
|
+
# config only relevant to SFX use
|
93
|
+
sfx do
|
94
|
+
# base sfx url to use for search actions, error condition backup,
|
95
|
+
# and some other purposes. For search actions (A-Z), direct database
|
96
|
+
# connection to your SFX db also needs to be defined in database.yml
|
97
|
+
# sfx_base_url 'http://sfx.library.jhu.edu:8000/jhu_sfx?'
|
98
|
+
#
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
# Umlaut tries to figure out from the SFX knowledge base
|
103
|
+
# which hosts are "SFX controlled", to avoid duplicating SFX
|
104
|
+
# urls with urls from catalog. But sometimes it misses some, or
|
105
|
+
# alternate hostnames for some. Regexps matching against
|
106
|
+
# urls can be included here. Eg,
|
107
|
+
# additional_sfx_controlled_urls [
|
108
|
+
# %r{^http://([^\.]\.)*pubmedcentral\.com}
|
109
|
+
# ]
|
110
|
+
# additional_sfx_controlled_urls []
|
111
|
+
|
112
|
+
|
113
|
+
end
|
114
|
+
|
115
|
+
# Advanced topic, you can declaratively configure
|
116
|
+
# what sections of the resolve page are output where
|
117
|
+
# and how using resolve_sections and add_resolve_sections!
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
if defined?(Bundler)
|
6
|
+
# If you precompile assets before deploying to production, use this line
|
7
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
8
|
+
# If you want your assets lazily compiled in production, use this line
|
9
|
+
# Bundler.require(:default, :assets, Rails.env)
|
10
|
+
end
|
11
|
+
|
12
|
+
require "umlaut"
|
13
|
+
module Dummy
|
14
|
+
class Application < Rails::Application
|
15
|
+
# Settings in config/environments/* take precedence over those specified here.
|
16
|
+
# Application configuration should go into files in config/initializers
|
17
|
+
# -- all .rb files in that directory are automatically loaded.
|
18
|
+
|
19
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
20
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
21
|
+
|
22
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
23
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
24
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
25
|
+
|
26
|
+
# Activate observers that should always be running.
|
27
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
28
|
+
|
29
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
30
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
31
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
32
|
+
|
33
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
34
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
35
|
+
# config.i18n.default_locale = :de
|
36
|
+
|
37
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
38
|
+
config.encoding = "utf-8"
|
39
|
+
|
40
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
41
|
+
config.filter_parameters += [:password]
|
42
|
+
|
43
|
+
# Enable escaping HTML in JSON.
|
44
|
+
config.active_support.escape_html_entities_in_json = true
|
45
|
+
|
46
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
47
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
48
|
+
# like if you have constraints or database-specific column types
|
49
|
+
# config.active_record.schema_format = :sql
|
50
|
+
|
51
|
+
# Enforce whitelist mode for mass assignment.
|
52
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
53
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
54
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
55
|
+
config.active_record.whitelist_attributes = true
|
56
|
+
|
57
|
+
# Enable the asset pipeline
|
58
|
+
config.assets.enabled = true
|
59
|
+
|
60
|
+
# Version of your assets, change this if you want to expire all your assets
|
61
|
+
config.assets.version = '1.0'
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#
|
7
|
+
# UMLAUT: mysql db with mysql2 adapter strongly recommended for Umlaut, in both
|
8
|
+
# production and development. sqlite3 has unclear semantics under threaded
|
9
|
+
# concurrency which umlaut uses, and in many cases simply does not work.
|
10
|
+
#
|
11
|
+
# A higher pool size than ordinary is recommended because of umlaut's
|
12
|
+
# use of concurrency. Perhaps as large as the number of services
|
13
|
+
# you have configured to run in the same wave, plus another few.
|
14
|
+
#
|
15
|
+
# development:
|
16
|
+
# adapter: mysql2
|
17
|
+
# host:
|
18
|
+
# username:
|
19
|
+
# password:
|
20
|
+
# database:
|
21
|
+
# pool: 15
|
22
|
+
|
23
|
+
# Warning: The database defined as "test" will be erased and
|
24
|
+
# re-generated from your development database when you run "rake".
|
25
|
+
# Do not set this db to the same as development or production.
|
26
|
+
test:
|
27
|
+
adapter: mysql2
|
28
|
+
database: umlaut3_test
|
29
|
+
pool: 5
|
30
|
+
username: root
|
31
|
+
encoding: utf8
|
32
|
+
|
33
|
+
#
|
34
|
+
# UMLAUT: for the 'search' functions (A-Z title lookup) to work, you need
|
35
|
+
# a direct database connection to the SFX database, under 'sfx_db' key.
|
36
|
+
# You should manually set up a new read-only MySQL account in the SFX db
|
37
|
+
# for this purpose, rather than use one of the full-access existing SFX
|
38
|
+
# mysql accounts.
|
39
|
+
#
|
40
|
+
#sfx_db:
|
41
|
+
# adapter: mysql2
|
42
|
+
# host: my_sfx_host.u.edu
|
43
|
+
# port: 3310 # 3310 is defualt SFX embedded mysql port
|
44
|
+
# database: sfxlcl41 # or other sfx instance db
|
45
|
+
# username:
|
46
|
+
# password:
|
47
|
+
# pool: 5
|
48
|
+
# encoding: utf8
|
49
|
+
#
|
50
|
+
# UMLAUT: for Sfx4Solr functionality. If you're not using SFX 4 indexed in
|
51
|
+
# Solr via Sunspot, feel free to ignore this.
|
52
|
+
#sfx4_global:
|
53
|
+
# adapter: mysql2
|
54
|
+
# host: my_sfx_host.u.edu
|
55
|
+
# port: 3310 # 3310 is defualt SFX embedded mysql port
|
56
|
+
# database: sfxglb41 # or other sfx global db
|
57
|
+
# username:
|
58
|
+
# password:
|
59
|
+
# pool: 5
|
60
|
+
# encoding: utf8
|
61
|
+
#
|
@@ -0,0 +1,41 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
#
|
8
|
+
# UMLAUT: Umlaut's use of threading is not compatible with class
|
9
|
+
# reloading, even in development. Umlaut requires true here.
|
10
|
+
# Rails 3.2 _might_ let you get away with false when it comes out.
|
11
|
+
config.cache_classes = true
|
12
|
+
|
13
|
+
# Log error messages when you accidentally call methods on nil.
|
14
|
+
config.whiny_nils = true
|
15
|
+
|
16
|
+
# Show full error reports and disable caching
|
17
|
+
config.consider_all_requests_local = true
|
18
|
+
config.action_controller.perform_caching = false
|
19
|
+
|
20
|
+
# Don't care if the mailer can't send
|
21
|
+
config.action_mailer.raise_delivery_errors = false
|
22
|
+
|
23
|
+
# Print deprecation notices to the Rails logger
|
24
|
+
config.active_support.deprecation = :log
|
25
|
+
|
26
|
+
# Only use best-standards-support built into browsers
|
27
|
+
config.action_dispatch.best_standards_support = :builtin
|
28
|
+
|
29
|
+
# Raise exception on mass assignment protection for Active Record models
|
30
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
31
|
+
|
32
|
+
# Log the query plan for queries taking more than this (works
|
33
|
+
# with SQLite, MySQL, and PostgreSQL)
|
34
|
+
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
35
|
+
|
36
|
+
# Do not compress assets
|
37
|
+
config.assets.compress = false
|
38
|
+
|
39
|
+
# Expands the lines which load the assets
|
40
|
+
config.assets.debug = true
|
41
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_assets = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
16
|
+
|
17
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
+
config.assets.compile = false
|
19
|
+
|
20
|
+
# Generate digests for assets URLs
|
21
|
+
config.assets.digest = true
|
22
|
+
|
23
|
+
# Defaults to nil and saved in location specified by config.assets.prefix
|
24
|
+
# config.assets.manifest = YOUR_PATH
|
25
|
+
|
26
|
+
# Specifies the header that your server uses for sending files
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
32
|
+
|
33
|
+
# See everything in the log (default is :info)
|
34
|
+
# config.log_level = :debug
|
35
|
+
|
36
|
+
# Prepend all log lines with the following tags
|
37
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
38
|
+
|
39
|
+
# Use a different logger for distributed setups
|
40
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
41
|
+
|
42
|
+
# Use a different cache store in production
|
43
|
+
# config.cache_store = :mem_cache_store
|
44
|
+
|
45
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
46
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
47
|
+
|
48
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
49
|
+
# config.assets.precompile += %w( search.js )
|
50
|
+
|
51
|
+
# Disable delivery errors, bad email addresses will be ignored
|
52
|
+
# config.action_mailer.raise_delivery_errors = false
|
53
|
+
|
54
|
+
# Enable threaded mode
|
55
|
+
# config.threadsafe!
|
56
|
+
|
57
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
58
|
+
# the I18n.default_locale when a translation can not be found)
|
59
|
+
config.i18n.fallbacks = true
|
60
|
+
|
61
|
+
# Send deprecation notices to registered listeners
|
62
|
+
config.active_support.deprecation = :notify
|
63
|
+
|
64
|
+
# Log the query plan for queries taking more than this (works
|
65
|
+
# with SQLite, MySQL, and PostgreSQL)
|
66
|
+
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
67
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
22
|
+
config.action_dispatch.show_exceptions = false
|
23
|
+
|
24
|
+
# Disable request forgery protection in test environment
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
26
|
+
|
27
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
+
# The :test delivery method accumulates sent emails in the
|
29
|
+
# ActionMailer::Base.deliveries array.
|
30
|
+
config.action_mailer.delivery_method = :test
|
31
|
+
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
33
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
+
|
35
|
+
# Print deprecation notices to the stderr
|
36
|
+
config.active_support.deprecation = :stderr
|
37
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = '45793c0413714fdd81d03873934d1a4c4a13863e172089ed2ed4b4179815ec3b27489980e27f62fb76c5e4e8500f48cccbf57be3e2e4c5acf2fa217adfaa4b1b'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
libraries:
|
2
|
+
"BAFC": "NYU Bobst Avery Fisher Center"
|
3
|
+
"BARCH": "NYU Bobst University Archives"
|
4
|
+
"BCHIL": "NYU Bobst Children's Literature"
|
5
|
+
"BFALE": "NYU Bobst Fales"
|
6
|
+
"BHS": "Brooklyn Historical Society"
|
7
|
+
"BLCC": "NYU Bobst Library"
|
8
|
+
"BOBST": "NYU Bobst"
|
9
|
+
"BREF": "NYU Bobst Reference"
|
10
|
+
"BREF6": "NYU Bobst 6th Floor Reference"
|
11
|
+
"BTAM": "NYU Bobst Tamiment/Wagner Archives"
|
12
|
+
"BWEB": "NYU Restricted Internet"
|
13
|
+
"CARCH": "Cooper Union Archives"
|
14
|
+
"CCLOS": "Cooper Union Closed Stacks"
|
15
|
+
"CGEN": "Cooper Union General"
|
16
|
+
"CMEZZ": "Cooper Union Mezzanine"
|
17
|
+
"CMICRO": "Cooper Union Microform"
|
18
|
+
"COUR": "NYU Courant"
|
19
|
+
"CPER": "Cooper Union Periodicals"
|
20
|
+
"CREF": "Cooper Union Reference"
|
21
|
+
"CRES": "Cooper Union Reserves"
|
22
|
+
"CU": "Cooper Union"
|
23
|
+
"CWEB": "Cooper Union Restricted Internet Resources"
|
24
|
+
"IFA": "NYU Inst Fine Arts"
|
25
|
+
"IFAC": "NYU Inst Fine Arts Conservation"
|
26
|
+
"ISAW": "NYU Inst Study Ancient World"
|
27
|
+
"KEV": "NYU Kevorkian"
|
28
|
+
"LAPI": "NYU La Pietra (Italy)"
|
29
|
+
"NABUD": "NYU Abu Dhabi Library (UAE)"
|
30
|
+
"NOFFS": "NYU Offsite Storage"
|
31
|
+
"NSFO": "New School Fogelman Library"
|
32
|
+
"NSGI": "New School Gimbel Library"
|
33
|
+
"NSKE": "New School Kellen Archives Library"
|
34
|
+
"NSOS": "New School Offsite Storage"
|
35
|
+
"NSSC": "New School Scherman Library"
|
36
|
+
"NYHS": "New-York Historical Society"
|
37
|
+
"NYHSBR": "NYHS Broadsides"
|
38
|
+
"NYHSLAN": "NYHS Landauer"
|
39
|
+
"NYHSM": "New-York Historical Society"
|
40
|
+
"NYHSMAPS": "NYHS Maps"
|
41
|
+
"NYHSMSS": "NYHS Mss Collection"
|
42
|
+
"NYHSPAM": "NYHS Pamphlets"
|
43
|
+
"NYHSPR": "NYHS Print Room"
|
44
|
+
"NYHSREF": "NYHS Reference"
|
45
|
+
"NYSID": "New York School of Interior Design"
|
46
|
+
"REI": "NYU Real Estate"
|
47
|
+
"TWEB": "New School Restricted Internet"
|
48
|
+
"WEB": "Unrestricted Internet Access"
|
49
|
+
availability_statuses:
|
50
|
+
check_holdings: Check Availability
|
51
|
+
sources:
|
52
|
+
aleph:
|
53
|
+
base_url: "http://aleph.library.edu"
|
54
|
+
rest_url: "http://aleph.library.edu:1891/rest-dlf"
|
55
|
+
class_name: Aleph
|
@@ -0,0 +1,60 @@
|
|
1
|
+
Dummy::Application.routes.draw do
|
2
|
+
Umlaut::Routes.new(self).draw
|
3
|
+
|
4
|
+
# The priority is based upon order of creation:
|
5
|
+
# first created -> highest priority.
|
6
|
+
|
7
|
+
# Sample of regular route:
|
8
|
+
# match 'products/:id' => 'catalog#view'
|
9
|
+
# Keep in mind you can assign values other than :controller and :action
|
10
|
+
|
11
|
+
# Sample of named route:
|
12
|
+
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
13
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
14
|
+
|
15
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
16
|
+
# resources :products
|
17
|
+
|
18
|
+
# Sample resource route with options:
|
19
|
+
# resources :products do
|
20
|
+
# member do
|
21
|
+
# get 'short'
|
22
|
+
# post 'toggle'
|
23
|
+
# end
|
24
|
+
#
|
25
|
+
# collection do
|
26
|
+
# get 'sold'
|
27
|
+
# end
|
28
|
+
# end
|
29
|
+
|
30
|
+
# Sample resource route with sub-resources:
|
31
|
+
# resources :products do
|
32
|
+
# resources :comments, :sales
|
33
|
+
# resource :seller
|
34
|
+
# end
|
35
|
+
|
36
|
+
# Sample resource route with more complex sub-resources
|
37
|
+
# resources :products do
|
38
|
+
# resources :comments
|
39
|
+
# resources :sales do
|
40
|
+
# get 'recent', :on => :collection
|
41
|
+
# end
|
42
|
+
# end
|
43
|
+
|
44
|
+
# Sample resource route within a namespace:
|
45
|
+
# namespace :admin do
|
46
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
47
|
+
# # (app/controllers/admin/products_controller.rb)
|
48
|
+
# resources :products
|
49
|
+
# end
|
50
|
+
|
51
|
+
# You can have the root of your site routed with "root"
|
52
|
+
# just remember to delete public/index.html.
|
53
|
+
# root :to => 'welcome#index'
|
54
|
+
|
55
|
+
# See how all your routes lay out with "rake routes"
|
56
|
+
|
57
|
+
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
58
|
+
# Note: This route will make all actions in every controller accessible via GET requests.
|
59
|
+
# match ':controller(/:action(/:id))(.:format)'
|
60
|
+
end
|