enju_loc 0.1.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +38 -0
- data/app/assets/javascripts/loc_search.js +2 -0
- data/app/assets/stylesheets/loc_search.css +4 -0
- data/app/controllers/loc_search_controller.rb +49 -0
- data/app/helpers/loc_search_helper.rb +18 -0
- data/app/models/loc_search.rb +97 -0
- data/app/views/loc_search/index.html.erb +49 -0
- data/config/locales/en.yml +13 -0
- data/config/locales/ja.yml +11 -0
- data/config/routes.rb +3 -0
- data/lib/enju_loc.rb +21 -0
- data/lib/enju_loc/engine.rb +7 -0
- data/lib/enju_loc/loc_search.rb +537 -0
- data/lib/enju_loc/version.rb +3 -0
- data/lib/tasks/enju_loc_tasks.rake +4 -0
- data/spec/cassette_library/LocSearch/_ModsRecord/should_parse_MODS_metadata.yml +111 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_create_a_valid_manifestation.yml +113 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_create_lcsh_subjects_only.yml +66 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_create_multiple_series_statements.yml +69 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_distinguish_title_information_with_subject.yml +67 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_a_manifestation_that_has_invalid_classification.yml +81 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_another_serial.yml +85 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_audio_book.yml +91 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_e-resource.yml +73 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_note_fields.yml +72 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_publication_year.yml +78 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_serial.yml +70 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_video_publication.yml +204 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_parse_title_information_properly.yml +80 -0
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_support_name_and_title_subjects.yml +77 -0
- data/spec/cassette_library/LocSearch/_search/should_return_a_search_result.yml +353 -0
- data/spec/cassette_library/LocSearchController/GET_index/should_get_index.yml +353 -0
- data/spec/cassette_library/LocSearchController/GET_index/should_get_index_with_page_parameter.yml +415 -0
- data/spec/cassette_library/LocSearchController/POST_create/should_create_a_bibliographic_record_if_lccn_is_set.yml +140 -0
- data/spec/cassette_library/LocSearchController/POST_create/should_not_create_a_bibliographic_record_if_lccn_is_not_set.yml +38 -0
- data/spec/controllers/loc_search_controller_spec.rb +44 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/setting.rb +4 -0
- data/spec/dummy/app/models/user.rb +8 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +47 -0
- data/spec/dummy/config/application.yml +38 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +30 -0
- data/spec/dummy/config/environments/production.rb +60 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/devise.rb +207 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/001_create_agents.rb +50 -0
- data/spec/dummy/db/migrate/002_devise_create_users.rb +46 -0
- data/spec/dummy/db/migrate/005_create_manifestations.rb +44 -0
- data/spec/dummy/db/migrate/006_create_items.rb +21 -0
- data/spec/dummy/db/migrate/012_create_owns.rb +12 -0
- data/spec/dummy/db/migrate/015_create_creates.rb +12 -0
- data/spec/dummy/db/migrate/029_create_subjects.rb +27 -0
- data/spec/dummy/db/migrate/041_create_roles.rb +13 -0
- data/spec/dummy/db/migrate/047_create_produces.rb +12 -0
- data/spec/dummy/db/migrate/059_create_libraries.rb +28 -0
- data/spec/dummy/db/migrate/069_create_shelves.rb +15 -0
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +11 -0
- data/spec/dummy/db/migrate/077_create_user_groups.rb +12 -0
- data/spec/dummy/db/migrate/080_create_library_groups.rb +17 -0
- data/spec/dummy/db/migrate/112_create_frequencies.rb +12 -0
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +12 -0
- data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
- data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
- data/spec/dummy/db/migrate/125_create_donates.rb +12 -0
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
- data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
- data/spec/dummy/db/migrate/142_create_classifications.rb +19 -0
- data/spec/dummy/db/migrate/144_create_classification_types.rb +16 -0
- data/spec/dummy/db/migrate/145_create_subject_heading_types.rb +16 -0
- data/spec/dummy/db/migrate/146_create_subject_types.rb +16 -0
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +13 -0
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +13 -0
- data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +12 -0
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +28 -0
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +23 -0
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +15 -0
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +20 -0
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +20 -0
- data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +15 -0
- data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +15 -0
- data/spec/dummy/db/migrate/20090719201843_create_extents.rb +12 -0
- data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +12 -0
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +12 -0
- data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +12 -0
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +12 -0
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
- data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +13 -0
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +14 -0
- data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +13 -0
- data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
- data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +10 -0
- data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -0
- data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +12 -0
- data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +13 -0
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
- data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +11 -0
- data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +15 -0
- data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +11 -0
- data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
- data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +9 -0
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +11 -0
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +11 -0
- data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
- data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +9 -0
- data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
- data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +9 -0
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
- data/spec/dummy/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb +11 -0
- data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +13 -0
- data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +10 -0
- data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +9 -0
- data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
- data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
- data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
- data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
- data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +6 -0
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +6 -0
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
- data/spec/dummy/db/migrate/20120406020752_add_url_to_subject.rb +5 -0
- data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
- data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +6 -0
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -0
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +16 -0
- data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
- data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
- data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
- data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
- data/spec/dummy/db/migrate/20130504133816_add_manifestation_id_to_subject.rb +6 -0
- data/spec/dummy/db/migrate/20130504143515_add_manifestation_id_to_classification.rb +6 -0
- data/spec/dummy/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb +5 -0
- data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +12 -0
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +15 -0
- data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +18 -0
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +11 -0
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +20 -0
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
- data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +6 -0
- data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +5 -0
- data/spec/dummy/db/schema.rb +1008 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +2139 -0
- data/spec/dummy/log/test.log +21513 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/fixtures/agent_types.yml +35 -0
- data/spec/fixtures/carrier_types.yml +51 -0
- data/spec/fixtures/classification_types.yml +13 -0
- data/spec/fixtures/content_types.yml +19 -0
- data/spec/fixtures/countries.yml +2059 -0
- data/spec/fixtures/frequencies.yml +76 -0
- data/spec/fixtures/identifier_types.yml +36 -0
- data/spec/fixtures/languages.yml +1901 -0
- data/spec/fixtures/roles.yml +35 -0
- data/spec/fixtures/subject_heading_types.yml +39 -0
- data/spec/fixtures/subject_types.yml +42 -0
- data/spec/fixtures/user_has_roles.yml +41 -0
- data/spec/fixtures/users.yml +51 -0
- data/spec/models/loc_search_spec.rb +195 -0
- data/spec/rails_helper.rb +43 -0
- data/spec/spec_helper.rb +47 -0
- data/spec/support/controller_macros.rb +25 -0
- data/spec/support/devise.rb +4 -0
- metadata +615 -0
@@ -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,30 @@
|
|
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
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
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
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
|
25
|
+
# Do not compress assets
|
26
|
+
config.assets.compress = false
|
27
|
+
|
28
|
+
# Expands the lines which load the assets
|
29
|
+
config.assets.debug = true
|
30
|
+
end
|
@@ -0,0 +1,60 @@
|
|
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 Rails.root.join("public/assets")
|
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
|
+
# Use a different logger for distributed setups
|
37
|
+
# config.logger = SyslogLogger.new
|
38
|
+
|
39
|
+
# Use a different cache store in production
|
40
|
+
# config.cache_store = :mem_cache_store
|
41
|
+
|
42
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
43
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
44
|
+
|
45
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
46
|
+
# config.assets.precompile += %w( search.js )
|
47
|
+
|
48
|
+
# Disable delivery errors, bad email addresses will be ignored
|
49
|
+
# config.action_mailer.raise_delivery_errors = false
|
50
|
+
|
51
|
+
# Enable threaded mode
|
52
|
+
# config.threadsafe!
|
53
|
+
|
54
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
55
|
+
# the I18n.default_locale when a translation can not be found)
|
56
|
+
config.i18n.fallbacks = true
|
57
|
+
|
58
|
+
# Send deprecation notices to registered listeners
|
59
|
+
config.active_support.deprecation = :notify
|
60
|
+
end
|
@@ -0,0 +1,39 @@
|
|
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
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
33
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
34
|
+
# like if you have constraints or database-specific column types
|
35
|
+
# config.active_record.schema_format = :sql
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
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,207 @@
|
|
1
|
+
# Use this hook to configure devise mailer, warden hooks and so forth.
|
2
|
+
# Many of these configuration options can be set straight in your model.
|
3
|
+
Devise.setup do |config|
|
4
|
+
config.secret_key = 'f70ff6a2bf7ee321b9f37f017b61fdab9fc92482f8930c90ab69c5b7aaed979b232155d0c58046040bd03e6b7628d6e9b19df3ce58c32559be16bf65886f8862'
|
5
|
+
|
6
|
+
# ==> Mailer Configuration
|
7
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
8
|
+
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
9
|
+
config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
|
10
|
+
|
11
|
+
# Configure the class responsible to send e-mails.
|
12
|
+
# config.mailer = "Devise::Mailer"
|
13
|
+
|
14
|
+
# ==> ORM configuration
|
15
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
16
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
17
|
+
# available as additional gems.
|
18
|
+
require 'devise/orm/active_record'
|
19
|
+
|
20
|
+
# ==> Configuration for any authentication mechanism
|
21
|
+
# Configure which keys are used when authenticating a user. The default is
|
22
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
23
|
+
# authenticating a user, both parameters are required. Remember that those
|
24
|
+
# parameters are used only when authenticating and not when retrieving from
|
25
|
+
# session. If you need permissions, you should implement that in a before filter.
|
26
|
+
# You can also supply a hash where the value is a boolean determining whether
|
27
|
+
# or not authentication should be aborted when the value is not present.
|
28
|
+
# config.authentication_keys = [ :email ]
|
29
|
+
|
30
|
+
# Configure parameters from the request object used for authentication. Each entry
|
31
|
+
# given should be a request method and it will automatically be passed to the
|
32
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
33
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
34
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
35
|
+
# config.request_keys = []
|
36
|
+
|
37
|
+
# Configure which authentication keys should be case-insensitive.
|
38
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
39
|
+
# to authenticate or find a user. Default is :email.
|
40
|
+
config.case_insensitive_keys = [ :email ]
|
41
|
+
|
42
|
+
# Configure which authentication keys should have whitespace stripped.
|
43
|
+
# These keys will have whitespace before and after removed upon creating or
|
44
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
45
|
+
config.strip_whitespace_keys = [ :email ]
|
46
|
+
|
47
|
+
# Tell if authentication through request.params is enabled. True by default.
|
48
|
+
# config.params_authenticatable = true
|
49
|
+
|
50
|
+
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
51
|
+
# config.http_authenticatable = false
|
52
|
+
|
53
|
+
# If http headers should be returned for AJAX requests. True by default.
|
54
|
+
# config.http_authenticatable_on_xhr = true
|
55
|
+
|
56
|
+
# The realm used in Http Basic Authentication. "Application" by default.
|
57
|
+
# config.http_authentication_realm = "Application"
|
58
|
+
|
59
|
+
# It will change confirmation, password recovery and other workflows
|
60
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
61
|
+
# Does not affect registerable.
|
62
|
+
# config.paranoid = true
|
63
|
+
|
64
|
+
# ==> Configuration for :database_authenticatable
|
65
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
66
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
67
|
+
#
|
68
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
69
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
70
|
+
# a value less than 10 in other environments.
|
71
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
72
|
+
|
73
|
+
# Setup a pepper to generate the encrypted password.
|
74
|
+
# config.pepper = "3125870d8e124367f0d9acbd3ea99f180abc4deede5a2c7b449169713dc3cb6a1ef7518e823bcd208650c4d4da3a6894e07da1c527ba411820d6571c445c8c71"
|
75
|
+
|
76
|
+
# ==> Configuration for :confirmable
|
77
|
+
# A period that the user is allowed to access the website even without
|
78
|
+
# confirming his account. For instance, if set to 2.days, the user will be
|
79
|
+
# able to access the website for two days without confirming his account,
|
80
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
81
|
+
# the user cannot access the website without confirming his account.
|
82
|
+
# config.confirm_within = 2.days
|
83
|
+
|
84
|
+
# Defines which key will be used when confirming an account
|
85
|
+
# config.confirmation_keys = [ :email ]
|
86
|
+
|
87
|
+
# ==> Configuration for :rememberable
|
88
|
+
# The time the user will be remembered without asking for credentials again.
|
89
|
+
# config.remember_for = 2.weeks
|
90
|
+
|
91
|
+
# If true, a valid remember token can be re-used between multiple browsers.
|
92
|
+
# config.remember_across_browsers = true
|
93
|
+
|
94
|
+
# If true, extends the user's remember period when remembered via cookie.
|
95
|
+
# config.extend_remember_period = false
|
96
|
+
|
97
|
+
# Options to be passed to the created cookie. For instance, you can set
|
98
|
+
# :secure => true in order to force SSL only cookies.
|
99
|
+
# config.cookie_options = {}
|
100
|
+
|
101
|
+
# ==> Configuration for :validatable
|
102
|
+
# Range for password length. Default is 6..128.
|
103
|
+
# config.password_length = 6..128
|
104
|
+
|
105
|
+
# Email regex used to validate email formats. It simply asserts that
|
106
|
+
# an one (and only one) @ exists in the given string. This is mainly
|
107
|
+
# to give user feedback and not to assert the e-mail validity.
|
108
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
109
|
+
|
110
|
+
# ==> Configuration for :timeoutable
|
111
|
+
# The time you want to timeout the user session without activity. After this
|
112
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
113
|
+
# config.timeout_in = 30.minutes
|
114
|
+
|
115
|
+
# ==> Configuration for :lockable
|
116
|
+
# Defines which strategy will be used to lock an account.
|
117
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
118
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
119
|
+
# config.lock_strategy = :failed_attempts
|
120
|
+
|
121
|
+
# Defines which key will be used when locking and unlocking an account
|
122
|
+
# config.unlock_keys = [ :email ]
|
123
|
+
|
124
|
+
# Defines which strategy will be used to unlock an account.
|
125
|
+
# :email = Sends an unlock link to the user email
|
126
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
127
|
+
# :both = Enables both strategies
|
128
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
129
|
+
# config.unlock_strategy = :both
|
130
|
+
|
131
|
+
# Number of authentication tries before locking an account if lock_strategy
|
132
|
+
# is failed attempts.
|
133
|
+
# config.maximum_attempts = 20
|
134
|
+
|
135
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
136
|
+
# config.unlock_in = 1.hour
|
137
|
+
|
138
|
+
# ==> Configuration for :recoverable
|
139
|
+
#
|
140
|
+
# Defines which key will be used when recovering the password for an account
|
141
|
+
# config.reset_password_keys = [ :email ]
|
142
|
+
|
143
|
+
# Time interval you can reset your password with a reset password key.
|
144
|
+
# Don't put a too small interval or your users won't have the time to
|
145
|
+
# change their passwords.
|
146
|
+
config.reset_password_within = 2.hours
|
147
|
+
|
148
|
+
# ==> Configuration for :encryptable
|
149
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
150
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
151
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
152
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
153
|
+
# REST_AUTH_SITE_KEY to pepper)
|
154
|
+
# config.encryptor = :sha512
|
155
|
+
|
156
|
+
# ==> Configuration for :token_authenticatable
|
157
|
+
# Defines name of the authentication token params key
|
158
|
+
# config.token_authentication_key = :auth_token
|
159
|
+
|
160
|
+
# If true, authentication through token does not store user in session and needs
|
161
|
+
# to be supplied on each request. Useful if you are using the token as API token.
|
162
|
+
# config.stateless_token = false
|
163
|
+
|
164
|
+
# ==> Scopes configuration
|
165
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
166
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
167
|
+
# are using only default views.
|
168
|
+
# config.scoped_views = false
|
169
|
+
|
170
|
+
# Configure the default scope given to Warden. By default it's the first
|
171
|
+
# devise role declared in your routes (usually :user).
|
172
|
+
# config.default_scope = :user
|
173
|
+
|
174
|
+
# Configure sign_out behavior.
|
175
|
+
# Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
|
176
|
+
# The default is true, which means any logout action will sign out all active scopes.
|
177
|
+
# config.sign_out_all_scopes = true
|
178
|
+
|
179
|
+
# ==> Navigation configuration
|
180
|
+
# Lists the formats that should be treated as navigational. Formats like
|
181
|
+
# :html, should redirect to the sign in page when the user does not have
|
182
|
+
# access, but formats like :xml or :json, should return 401.
|
183
|
+
#
|
184
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
185
|
+
# should add them to the navigational formats lists.
|
186
|
+
#
|
187
|
+
# The :"*/*" and "*/*" formats below is required to match Internet
|
188
|
+
# Explorer requests.
|
189
|
+
# config.navigational_formats = [:"*/*", "*/*", :html]
|
190
|
+
|
191
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
192
|
+
config.sign_out_via = :delete
|
193
|
+
|
194
|
+
# ==> OmniAuth
|
195
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
196
|
+
# up on your models and hooks.
|
197
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
198
|
+
|
199
|
+
# ==> Warden configuration
|
200
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
201
|
+
# change the failure app, you can configure them inside the config.warden block.
|
202
|
+
#
|
203
|
+
# config.warden do |manager|
|
204
|
+
# manager.intercept_401 = false
|
205
|
+
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
206
|
+
# end
|
207
|
+
end
|
@@ -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"
|