quick_search-core 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +43 -55
- data/Rakefile +30 -4
- data/app/assets/javascripts/quick_search/event_tracking.js.erb +2 -8
- data/app/assets/stylesheets/{quick_search.css.scss.erb → quick_search.scss.erb} +0 -0
- data/app/assets/stylesheets/quick_search/{appstats.css.scss → appstats.scss} +0 -0
- data/app/assets/stylesheets/quick_search/{opensearch.css.scss → opensearch.scss} +0 -0
- data/app/assets/stylesheets/quick_search/{pages.css.scss → pages.scss} +0 -0
- data/app/assets/stylesheets/quick_search/{quick_search.css.scss → quick_search.scss} +1 -0
- data/app/assets/stylesheets/quick_search/{search.css.scss → search.scss} +0 -0
- data/app/controllers/concerns/quick_search/searcher_concern.rb +8 -1
- data/app/controllers/concerns/quick_search/searcher_config.rb +5 -2
- data/app/controllers/quick_search/appstats_controller.rb +2 -2
- data/app/controllers/quick_search/search_controller.rb +7 -7
- data/app/models/application_record.rb +3 -0
- data/app/models/event.rb +1 -1
- data/app/models/search.rb +1 -1
- data/app/searchers/quick_search/best_bets_searcher.rb +25 -7
- data/app/views/layouts/quick_search/_google_analytics.html.erb +0 -9
- data/lib/generators/quick_search/install_generator.rb +101 -0
- data/lib/generators/quick_search/templates/best_bets.yml +86 -0
- data/lib/generators/quick_search/templates/post_install.txt +3 -1
- data/lib/generators/quick_search/templates/quick_search_config.yml +25 -3
- data/lib/quick_search.rb +0 -2
- data/lib/quick_search/engine.rb +16 -1
- data/lib/quick_search/version.rb +1 -1
- data/lib/tasks/best_bets.rake +2 -0
- data/test/controllers/concerns/doi_trap_test.rb +3 -3
- data/test/controllers/concerns/on_campus_test.rb +4 -4
- data/test/controllers/concerns/query_parser_test.rb +6 -6
- data/test/controllers/{appstats_controller_test.rb → quick_search/appstats_controller_test.rb} +1 -1
- data/test/controllers/{opensearch_controller_test.rb → quick_search/opensearch_controller_test.rb} +6 -1
- data/test/controllers/{pages_controller_test.rb → quick_search/pages_controller_test.rb} +1 -1
- data/test/controllers/quick_search/search_controller_test.rb +15 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -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/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/{config → test/dummy/config}/application.rb +6 -8
- data/test/dummy/config/best_bets.yml +86 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +78 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/assets.rb +8 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/quick_search_config.yml +58 -0
- data/test/dummy/config/routes.rb +6 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/schema.rb +31 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/benchmark.log +241 -0
- data/test/dummy/log/test.log +4762 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/0_/0_w_ydOOEFQOoETxJa-IxKppQocaiDwM5V08djCPYso.cache +3 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/1n/1nStVaWIQEwAlksUpB1fInwq6v3TikPvuRaSwwCnCLQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/3m/3mWfBeEpm_bJvaPQZYvnnAVtE_2helOWh_Tv-cEflrk.cache +5 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/4s/4sg52OgD5l4qx4GnojCVxg2itqwqb-KRanEdmdMus3Y.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5U/5UPnsccuZFLk9OqbmFMvB55mbvGptApx9Z55HWjEN90.cache +3 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/9a/9acKNgyVD8_WK401tMy6Ce98g-LS4VpwFvGQdzCV9mI.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/B5/B5ptGSZGmgHvoK2UDCAtpMhWxJEKxKFhyL9ACeBfzQk.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ba/BaymviI8cwAJQMOIzWCf6Lt-PM2sNFTvY9hQKsfDNNw.cache +3 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Dd/DdFHg3C_voetfvKGKX7t8PGzZlkO45-huHNtaou5rxg.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/F0/F0oWBwLHpGFYNNtnGav-dJFH8rMDpNA5L8_aWm5Wq34.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Fp/FprCQeeZguht46WNSpA3Y3JHKehovFXrj63nDrvvwFE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/GJ/GJrfWiarIi0Dt6sdKVMfUF1cdZ6NbqZxXHhzNbFtpBw.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Gp/GpoziOxxB-hisco0rl7Nnsnw0UWud7R9Yge2Q3o1eN4.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Hr/Hr-kCuPY72nIKAdnsDTz9JqXd_z1WL6FSGMAq4HppZg.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/It/It5VkJv-53-LICLKZWWyp2WcbD86DGotAL0MY3hhfpg.cache +6 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/MA/MAY_nSUZSFcwPf9b-AWcqad4OIb_VKmHGs5E7PYdgvI.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/O6/O6dw148Xya7NYlsRFMEzJyvRcySM6iOL1jRUpdQo9B8.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/O8/O8akbUwAbmIKY-AhITimq-JDQ6IgsO3Hvq2v5etufFw.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/OD/ODHapE0li3WI1laVJoksoI5nmQd-8dDJXq_VxS4XefE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Oj/OjMkKTW7OkthjJAQHDID8GV30IZC9F0dJ1zGiFame9U.cache +4 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Os/OsQkEOfE0Pfy_sIdEIVWLojZnQm4mcrZpXg4suYrV70.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/SU/SUtZ_ltPqy9A9A-_zqNPhNPvjxCOnrdqXHSZv5S9mOk.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Tv/TvZgmm69VEMHUJQIBoij61oXMkgzp6whVo7l8mJ9qpw.cache +3 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/UA/UAOIipK_ejTAUFI6XxASoweyUiC3t64VfVzV-MfsFD8.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/YJ/YJZdK01T1KTS84Mb6p_2TasmJNZeGZc4FMtBPCKGr_M.cache +3 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ah/ahhhd3ysbQmVDNzq2L_rb4t6rqqdnqeY6ujztBoZDA8.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/dz/dzCaa80YgyvJINTgsyrVhKv9UQ1OC82GfAsA-IP96iQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/fI/fInu_Gja7ik39t207tqj4CtlL0akQRbjD2T7qEtd0zE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/gv/gvZKkbgiExbcQrT4eo0HB-j4JoDRAxdmDjKRxeEdK0Y.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/hj/hj_r-O1QjHJIPcZVnlB_FGPdIRAi9NkxpT2oXDRIsGE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/jj/jjdQCKZsewws2eRP7b2AVxRMvseOp8djjlDkB8UOtac.cache +3 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/o2/o2V1ahk8vFR6sXWNh5BB7w6MBj04zCyX-o1xFZONydE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/o6/o6ZQbq1aBFuVrE2xLbSbyZH2736sWM3Yj4ky9chT1bI.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/os/os0qWv3yDfep0e7vVSGTgfn_n3xc4C4QZgmMzLQn0Ks.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/pO/pO8hHVwybv1ZJBdPa2YC6bjqmk020OYFl85TYxtmrWQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/pj/pjJDYrBipDo6Tr9_-W4UDzfZZ4UPTy9YpXrBQFRXnlo.cache +3 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/pw/pwiIhcWPwTuy5Miz5zqOQGYFx-K3TbaCVQ6ls7EBkk0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/sR/sRU-UT8qK_38kkiFDXKBPogO1oOZuSvJFH-pgqPL_Ms.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/tE/tEO71oPPFXN_2c4p39nU0OiF9ARg13fjdQlnPqAx1KY.cache +4 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/tP/tPF6H9NRpGO3whu2y5_e_R_1EACKdCwu5437D83qJT0.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/tW/tWFRsAv4WWu2ch-x3AJZd3KOvBXG3MwH6Q6Xn-tFBtw.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/x6/x6W754ylumshr3wBUHHmcgyWs8UR3Od7FaI6tqvjKmk.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/yy/yyJ1P7RQciOiW8TgQiu1RMDdbWd4rqxd2BGU9HkY3L8.cache +0 -0
- data/test/integration/searching_test.rb +15 -27
- data/test/searcher/best_bets_test.rb +13 -18
- data/test/test_helper.rb +23 -10
- data/test/vcr_cassettes/searches/best_bets_acm.yml +31 -0
- data/test/vcr_cassettes/searches/harry_potter.yml +6901 -0
- data/test/vcr_cassettes/searches/hunt_library.yml +66736 -0
- data/test/vcr_cassettes/searches/printing.yml +191 -0
- data/test/vcr_cassettes/searches/speling.yml +1172 -0
- metadata +197 -71
- data/test/controllers/search_controller_test.rb +0 -15
- data/test/integration/catalog_search_test.rb +0 -8
- data/test/integration/google_analytics_test.rb +0 -23
- data/test/integration/smart_subjects_test.rb +0 -8
- data/test/integration/website_search_test.rb +0 -8
- data/test/searcher/catalog_test.rb +0 -35
- data/test/searcher/ematrix_database_test.rb +0 -27
- data/test/searcher/ematrix_journal_test.rb +0 -27
- data/test/searcher/faq_test.rb +0 -27
- data/test/searcher/smart_subjects_test.rb +0 -27
- data/test/searcher/summon_test.rb +0 -13
- data/test/searcher/website_test.rb +0 -34
@@ -2,24 +2,22 @@ require File.expand_path('../boot', __FILE__)
|
|
2
2
|
|
3
3
|
require 'rails/all'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
Bundler.require(:default, Rails.env)
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
require "quick_search"
|
8
7
|
|
9
|
-
module
|
10
|
-
class
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
11
10
|
# Settings in config/environments/* take precedence over those specified here.
|
12
11
|
# Application configuration should go into files in config/initializers
|
13
12
|
# -- all .rb files in that directory are automatically loaded.
|
14
13
|
|
15
14
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
16
15
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
17
|
-
config.time_zone = '
|
16
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
18
17
|
|
19
18
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
20
19
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
21
20
|
# config.i18n.default_locale = :de
|
22
|
-
config.middleware.use Rack::SslEnforcer, :only => /\/appstats\/?.*/, only_environments: ['production']
|
23
|
-
|
24
21
|
end
|
25
22
|
end
|
23
|
+
|
@@ -0,0 +1,86 @@
|
|
1
|
+
---
|
2
|
+
best_bets:
|
3
|
+
academicsearchpremier:
|
4
|
+
title: Academic Search Complete
|
5
|
+
url: http://search.ebscohost.com/login.aspx?authtype=ip,uid&profile=ehost&defaultdb=a9h
|
6
|
+
description: Search for full-text articles from a wide range of scholarly journals.
|
7
|
+
Formerly named Academic Search Premier.
|
8
|
+
keywords:
|
9
|
+
- academic search complete
|
10
|
+
- academic search complet
|
11
|
+
- academic search compleat
|
12
|
+
- academic search compleet
|
13
|
+
- academic search elite
|
14
|
+
- academic elite
|
15
|
+
- search elite
|
16
|
+
- academic search fulltext elite
|
17
|
+
- academic search premier
|
18
|
+
- academic premier
|
19
|
+
- academic premiere
|
20
|
+
- academic search premiere
|
21
|
+
- academic search premeir
|
22
|
+
- acedemic search premier
|
23
|
+
- academic search premire
|
24
|
+
- academic search primer
|
25
|
+
acm:
|
26
|
+
title: ACM Digital Library
|
27
|
+
url: http://www.acm.org/dl/
|
28
|
+
description: Provides access to ACM journals, magazines, and conference proceedings
|
29
|
+
keywords:
|
30
|
+
- acm
|
31
|
+
- acm digital library
|
32
|
+
- acm portal
|
33
|
+
- acm database
|
34
|
+
- acm digital
|
35
|
+
eric:
|
36
|
+
title: ERIC (Educational Resource Information Center)
|
37
|
+
url: http://search.ebscohost.com/login.aspx?authtype=ip,uid&profile=ehost&defaultdb=eric
|
38
|
+
description: Use ERIC to find journal articles in the field of education
|
39
|
+
keywords:
|
40
|
+
- eric database
|
41
|
+
- eric
|
42
|
+
- education
|
43
|
+
- educational resources information center
|
44
|
+
googlescholar:
|
45
|
+
title: Google Scholar
|
46
|
+
url: http://scholar.google.com
|
47
|
+
description: Use Google Scholar and get access to articles via our library
|
48
|
+
keywords:
|
49
|
+
- google scholar
|
50
|
+
- google search
|
51
|
+
- google com
|
52
|
+
- www google com
|
53
|
+
- googlescholar
|
54
|
+
- googlescholar
|
55
|
+
- google
|
56
|
+
lexisnexis:
|
57
|
+
title: LexisNexis Academic
|
58
|
+
url: http://www.lexisnexis.com/
|
59
|
+
description: Search for news, business, legal, medical, and congressional information
|
60
|
+
keywords:
|
61
|
+
- lexis
|
62
|
+
- nexis
|
63
|
+
- lexis nexis
|
64
|
+
- lexis nexus
|
65
|
+
- lexus nexis
|
66
|
+
- lexis-nexis
|
67
|
+
- lexisnexis
|
68
|
+
- lexus
|
69
|
+
- nexus
|
70
|
+
- lexus nexus
|
71
|
+
- lexus-nexus
|
72
|
+
- lexusnexus
|
73
|
+
- lexxis nexxis
|
74
|
+
- lexxus nexus
|
75
|
+
- lexxus nexxus
|
76
|
+
- academic universe
|
77
|
+
- lexis nexis academic
|
78
|
+
- lexisnexis academic
|
79
|
+
pubmed:
|
80
|
+
title: PubMed
|
81
|
+
url: http://www.ncbi.nlm.nih.gov/
|
82
|
+
description: Search citations from MEDLINE and other medical and life science
|
83
|
+
journals
|
84
|
+
keywords:
|
85
|
+
- pubmed
|
86
|
+
- pub med
|
@@ -0,0 +1,25 @@
|
|
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
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Rails.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
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
|
+
|
12
|
+
# Show full error reports and disable caching.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send.
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Raise an error on page load if there are pending migrations.
|
23
|
+
config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
28
|
+
config.assets.debug = true
|
29
|
+
|
30
|
+
# Adds additional error checking when serving assets at runtime.
|
31
|
+
# Checks for improperly declared sprockets dependencies.
|
32
|
+
# Raises helpful error messages.
|
33
|
+
config.assets.raise_runtime_errors = true
|
34
|
+
|
35
|
+
# Raises error for missing translations
|
36
|
+
# config.action_view.raise_on_missing_translations = true
|
37
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
Rails.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
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both threaded web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
+
# config.action_dispatch.rack_cache = true
|
21
|
+
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
+
config.serve_static_assets = false
|
24
|
+
|
25
|
+
# Compress JavaScripts and CSS.
|
26
|
+
config.assets.js_compressor = :uglifier
|
27
|
+
# config.assets.css_compressor = :sass
|
28
|
+
|
29
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
30
|
+
config.assets.compile = false
|
31
|
+
|
32
|
+
# Generate digests for assets URLs.
|
33
|
+
config.assets.digest = true
|
34
|
+
|
35
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
36
|
+
|
37
|
+
# Specifies the header that your server uses for sending files.
|
38
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
39
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
40
|
+
|
41
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
42
|
+
# config.force_ssl = true
|
43
|
+
|
44
|
+
# Set to :debug to see everything in the log.
|
45
|
+
config.log_level = :info
|
46
|
+
|
47
|
+
# Prepend all log lines with the following tags.
|
48
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
49
|
+
|
50
|
+
# Use a different logger for distributed setups.
|
51
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
52
|
+
|
53
|
+
# Use a different cache store in production.
|
54
|
+
# config.cache_store = :mem_cache_store
|
55
|
+
|
56
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
57
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
58
|
+
|
59
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
60
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
61
|
+
# config.action_mailer.raise_delivery_errors = false
|
62
|
+
|
63
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
64
|
+
# the I18n.default_locale when a translation cannot be found).
|
65
|
+
config.i18n.fallbacks = true
|
66
|
+
|
67
|
+
# Send deprecation notices to registered listeners.
|
68
|
+
config.active_support.deprecation = :notify
|
69
|
+
|
70
|
+
# Disable automatic flushing of the log to improve performance.
|
71
|
+
# config.autoflush_log = false
|
72
|
+
|
73
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
74
|
+
config.log_formatter = ::Logger::Formatter.new
|
75
|
+
|
76
|
+
# Do not dump schema after migrations.
|
77
|
+
config.active_record.dump_schema_after_migration = false
|
78
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
Rails.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
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_assets = true
|
17
|
+
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Print deprecation notices to the stderr.
|
35
|
+
config.active_support.deprecation = :stderr
|
36
|
+
|
37
|
+
# Raises error for missing translations
|
38
|
+
# config.action_view.raise_on_missing_translations = true
|
39
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = '1.0'
|
5
|
+
|
6
|
+
# Precompile additional assets.
|
7
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
8
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|
@@ -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,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -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] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,58 @@
|
|
1
|
+
defaults: &defaults
|
2
|
+
theme: 'quick_search_generic_theme'
|
3
|
+
searchers: [best_bets,arxiv,open_library,wikipedia,placeholder]
|
4
|
+
found_types: [arxiv,open_library,wikipedia,placeholder,placeholder,placeholder,placeholder]
|
5
|
+
per_page: 3
|
6
|
+
max_per_page: 50
|
7
|
+
http_timeout: 1.5
|
8
|
+
xhr_http_timeout: 15
|
9
|
+
# google_analytics_tracking_id: ""
|
10
|
+
user: "stats"
|
11
|
+
password: "stats"
|
12
|
+
|
13
|
+
on_campus:
|
14
|
+
- !ruby/regexp '/^192\.(1|168)\.\d*\.\d*$/'
|
15
|
+
|
16
|
+
|
17
|
+
common_searches: ["web of science", "google scholar", "refworks", "harvard business review", "pubmed", "ieee"]
|
18
|
+
|
19
|
+
common_website_searches: ["dissertations", "exhibits", "textbooks", "visit the libraries", "government information", "literature review", "printing"]
|
20
|
+
|
21
|
+
loaded_searches:
|
22
|
+
- name: "Google Scholar"
|
23
|
+
landing_page: "http://scholar.google.com/"
|
24
|
+
query: "https://scholar.google.com/scholar?hl=en&q="
|
25
|
+
- name: "WorldCat"
|
26
|
+
landing_page: "https://www.worldcat.org"
|
27
|
+
query: "https://www.worldcat.org/search?qt=worldcat_org_all&q="
|
28
|
+
- name: "Google"
|
29
|
+
landing_page: "https://www.google.com/"
|
30
|
+
query: "https://www.google.com/#q="
|
31
|
+
|
32
|
+
loaded_website_searches:
|
33
|
+
- name: "Books, Articles, Journals & More"
|
34
|
+
landing_page: "http://search.lib.ncsu.edu"
|
35
|
+
query: "http://search.lib.ncsu.edu/?q="
|
36
|
+
|
37
|
+
doi_loaded_link: "http://doi.org/"
|
38
|
+
|
39
|
+
best_bets:
|
40
|
+
solr_url: ""
|
41
|
+
|
42
|
+
development:
|
43
|
+
<<: *defaults
|
44
|
+
# realtime_url: http://path_to_websockets_server
|
45
|
+
|
46
|
+
test:
|
47
|
+
<<: *defaults
|
48
|
+
|
49
|
+
staging:
|
50
|
+
<<: *defaults
|
51
|
+
# realtime_url: http://path_to_websockets_server
|
52
|
+
# google_analytics_tracking_id: ""
|
53
|
+
|
54
|
+
|
55
|
+
production:
|
56
|
+
<<: *defaults
|
57
|
+
# realtime_url: http://path_to_websockets_server
|
58
|
+
# Add or override config options here
|