enju_biblio 0.1.3 → 0.2.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +3 -3
- data/app/controllers/agent_import_files_controller.rb +13 -3
- data/app/controllers/agent_import_results_controller.rb +12 -1
- data/app/controllers/agent_merge_lists_controller.rb +11 -1
- data/app/controllers/agent_merges_controller.rb +12 -2
- data/app/controllers/agent_relationship_types_controller.rb +13 -2
- data/app/controllers/agent_relationships_controller.rb +13 -4
- data/app/controllers/agent_types_controller.rb +13 -2
- data/app/controllers/agents_controller.rb +18 -12
- data/app/controllers/carrier_types_controller.rb +12 -2
- data/app/controllers/concerns/enju_biblio/controller.rb +99 -0
- data/app/controllers/content_types_controller.rb +12 -1
- data/app/controllers/countries_controller.rb +12 -1
- data/app/controllers/create_types_controller.rb +13 -2
- data/app/controllers/creates_controller.rb +13 -4
- data/app/controllers/donates_controller.rb +11 -1
- data/app/controllers/form_of_works_controller.rb +13 -2
- data/app/controllers/frequencies_controller.rb +13 -2
- data/app/controllers/identifier_types_controller.rb +13 -2
- data/app/controllers/import_requests_controller.rb +19 -9
- data/app/controllers/items_controller.rb +25 -13
- data/app/controllers/languages_controller.rb +12 -1
- data/app/controllers/licenses_controller.rb +13 -2
- data/app/controllers/manifestation_relationship_types_controller.rb +12 -1
- data/app/controllers/manifestation_relationships_controller.rb +13 -4
- data/app/controllers/manifestations_controller.rb +58 -30
- data/app/controllers/medium_of_performances_controller.rb +13 -2
- data/app/controllers/owns_controller.rb +12 -3
- data/app/controllers/picture_files_controller.rb +13 -3
- data/app/controllers/produce_types_controller.rb +13 -2
- data/app/controllers/produces_controller.rb +13 -4
- data/app/controllers/realize_types_controller.rb +13 -2
- data/app/controllers/realizes_controller.rb +13 -4
- data/app/controllers/resource_export_files_controller.rb +13 -3
- data/app/controllers/resource_import_files_controller.rb +14 -4
- data/app/controllers/resource_import_results_controller.rb +12 -1
- data/app/controllers/series_statement_merge_lists_controller.rb +11 -1
- data/app/controllers/series_statement_merges_controller.rb +12 -2
- data/app/controllers/series_statements_controller.rb +13 -5
- data/app/helpers/manifestations_helper.rb +8 -8
- data/app/jobs/agent_import_file_job.rb +7 -0
- data/app/jobs/resource_export_file_job.rb +7 -0
- data/app/jobs/resource_import_file_job.rb +7 -0
- data/app/models/agent.rb +23 -1
- data/app/models/agent_import_file.rb +0 -1
- data/app/models/carrier_type.rb +0 -1
- data/app/models/identifier.rb +1 -1
- data/app/models/item.rb +2 -9
- data/app/models/manifestation.rb +180 -75
- data/app/models/picture_file.rb +1 -1
- data/app/models/resource_export_file.rb +5 -3
- data/app/models/resource_import_file.rb +34 -50
- data/app/models/series_statement.rb +8 -1
- data/app/policies/agent_import_file_policy.rb +21 -0
- data/app/policies/agent_import_result_policy.rb +21 -0
- data/app/policies/agent_merge_list_policy.rb +25 -0
- data/app/policies/agent_merge_policy.rb +25 -0
- data/app/policies/agent_policy.rb +30 -0
- data/app/policies/agent_relationship_policy.rb +21 -0
- data/app/policies/agent_relationship_type_policy.rb +21 -0
- data/app/policies/agent_type_policy.rb +23 -0
- data/app/policies/carrier_type_policy.rb +23 -0
- data/app/policies/content_type_policy.rb +23 -0
- data/app/policies/country_policy.rb +21 -0
- data/app/policies/create_policy.rb +21 -0
- data/app/policies/create_type_policy.rb +21 -0
- data/app/policies/donate_policy.rb +21 -0
- data/app/policies/form_of_work_policy.rb +21 -0
- data/app/policies/frequency_policy.rb +23 -0
- data/app/policies/identifier_type_policy.rb +23 -0
- data/app/policies/import_request_policy.rb +21 -0
- data/app/policies/item_policy.rb +27 -0
- data/app/policies/language_policy.rb +21 -0
- data/app/policies/license_policy.rb +21 -0
- data/app/policies/manifestation_policy.rb +67 -0
- data/app/policies/manifestation_relationship_policy.rb +21 -0
- data/app/policies/manifestation_relationship_type_policy.rb +21 -0
- data/app/policies/medium_of_performance_policy.rb +21 -0
- data/app/policies/own_policy.rb +21 -0
- data/app/policies/picture_file_policy.rb +32 -0
- data/app/policies/produce_policy.rb +21 -0
- data/app/policies/produce_type_policy.rb +21 -0
- data/app/policies/realize_policy.rb +21 -0
- data/app/policies/realize_type_policy.rb +21 -0
- data/app/policies/resource_export_file_policy.rb +21 -0
- data/app/policies/resource_import_file_policy.rb +21 -0
- data/app/policies/resource_import_result_policy.rb +21 -0
- data/app/policies/series_statement_merge_list_policy.rb +25 -0
- data/app/policies/series_statement_merge_policy.rb +25 -0
- data/app/policies/series_statement_policy.rb +25 -0
- data/app/views/agent_relationship_types/index.html.erb +4 -4
- data/app/views/agent_types/index.html.erb +4 -4
- data/app/views/agent_types/show.html.erb +1 -1
- data/app/views/agents/_agent.html.erb +2 -2
- data/app/views/agents/_index.html.erb +1 -1
- data/app/views/agents/_index_agent.html.erb +4 -4
- data/app/views/agents/_index_agent_merge_list.html.erb +2 -2
- data/app/views/agents/_index_expression.html.erb +3 -3
- data/app/views/agents/_index_manifestation.html.erb +3 -3
- data/app/views/agents/_index_work.html.erb +3 -3
- data/app/views/agents/edit.html.erb +1 -1
- data/app/views/agents/{index.mobile.erb → index.html+phone.erb} +0 -0
- data/app/views/agents/index.json.jbuilder +5 -0
- data/app/views/agents/index.rss.builder +2 -2
- data/app/views/agents/{show.mobile.erb → show.html+phone.erb} +0 -0
- data/app/views/agents/show.html.erb +3 -3
- data/app/views/carrier_types/_form.html.erb +1 -1
- data/app/views/carrier_types/index.html.erb +4 -4
- data/app/views/carrier_types/show.html.erb +1 -1
- data/app/views/content_types/index.html.erb +4 -4
- data/app/views/content_types/show.html.erb +1 -1
- data/app/views/countries/index.html.erb +3 -3
- data/app/views/countries/show.html.erb +1 -1
- data/app/views/create_types/index.html.erb +4 -4
- data/app/views/creates/_index.html.erb +2 -2
- data/app/views/creates/_index_agent.html.erb +3 -3
- data/app/views/creates/_index_work.html.erb +2 -2
- data/app/views/donates/index.html.erb +2 -2
- data/app/views/form_of_works/index.html.erb +4 -4
- data/app/views/form_of_works/show.html.erb +1 -1
- data/app/views/frequencies/index.html.erb +4 -4
- data/app/views/frequencies/show.html.erb +1 -1
- data/app/views/identifier_types/index.html.erb +4 -4
- data/app/views/identifier_types/show.html.erb +1 -1
- data/app/views/import_requests/index.html.erb +1 -1
- data/app/views/items/{_shelf_picture.mobile.erb → _shelf_picture.html+phone.erb} +0 -0
- data/app/views/items/edit.html.erb +2 -2
- data/app/views/items/{index.mobile.erb → index.html+phone.erb} +1 -1
- data/app/views/items/index.html.erb +2 -2
- data/app/views/items/new.html.erb +1 -5
- data/app/views/items/{show.mobile.erb → show.html+phone.erb} +0 -0
- data/app/views/items/show.html.erb +10 -6
- data/app/views/languages/index.html.erb +3 -3
- data/app/views/languages/show.html.erb +1 -1
- data/app/views/layouts/{agents.mobile.erb → agents.html+phone.erb} +1 -1
- data/app/views/layouts/agents.html.erb +2 -2
- data/app/views/layouts/{manifestations.mobile.erb → manifestations.html+phone.erb} +1 -1
- data/app/views/layouts/manifestations.html.erb +2 -2
- data/app/views/licenses/index.html.erb +4 -4
- data/app/views/manifestation_relationship_types/index.html.erb +4 -4
- data/app/views/manifestations/_attachment_file.html.erb +1 -1
- data/app/views/manifestations/_carrier_type_facet.html.erb +1 -1
- data/app/views/manifestations/_classification_facet.html.erb +2 -2
- data/app/views/manifestations/_contributor_fields.html.erb +4 -0
- data/app/views/manifestations/_creator_fields.html.erb +5 -0
- data/app/views/manifestations/_edit_detail.html.erb +1 -1
- data/app/views/manifestations/_export_list.html.erb +3 -3
- data/app/views/manifestations/_form.html.erb +25 -30
- data/app/views/manifestations/_holding.html.erb +6 -8
- data/app/views/manifestations/_identifier_fields.html.erb +5 -0
- data/app/views/manifestations/_index_form_contributor.html.erb +2 -2
- data/app/views/manifestations/_index_form_creator.html.erb +2 -2
- data/app/views/manifestations/_index_form_item.html.erb +2 -2
- data/app/views/manifestations/_index_form_manifestation.html.erb +2 -2
- data/app/views/manifestations/_index_form_parent.html.erb +1 -1
- data/app/views/manifestations/_index_form_publisher.html.erb +2 -2
- data/app/views/manifestations/_index_form_series_statement.html.erb +2 -2
- data/app/views/manifestations/_language_facet.html.erb +1 -1
- data/app/views/manifestations/_library_facet.html.erb +1 -1
- data/app/views/manifestations/_manifestation.html.erb +6 -2
- data/app/views/manifestations/_manifestation.txt.erb +1 -1
- data/app/views/manifestations/_paginate_id_store.html.erb +8 -6
- data/app/views/manifestations/_pub_year_facet.html.erb +1 -1
- data/app/views/manifestations/_publisher_fields.html.erb +4 -0
- data/app/views/manifestations/_reservable_facet.html.erb +2 -2
- data/app/views/manifestations/_series_statement_fields.html.erb +13 -0
- data/app/views/manifestations/_show.rdf.builder +3 -87
- data/app/views/manifestations/{_show_creators.mobile.erb → _show_creators.html+phone.erb} +0 -0
- data/app/views/manifestations/_show_creators.html.erb +0 -1
- data/app/views/manifestations/_show_detail_librarian.html.erb +20 -22
- data/app/views/manifestations/_show_detail_user.html.erb +13 -15
- data/app/views/manifestations/{_show_holding.mobile.erb → _show_holding.html+phone.erb} +0 -0
- data/app/views/manifestations/_show_holding.html.erb +1 -1
- data/app/views/manifestations/{_show_index.mobile.erb → _show_index.html+phone.erb} +0 -0
- data/app/views/manifestations/_submenu_parent.html.erb +3 -3
- data/app/views/manifestations/{_title.mobile.erb → _title.html+phone.erb} +0 -0
- data/app/views/manifestations/edit.html.erb +2 -6
- data/app/views/manifestations/{index.mobile.erb → index.html+phone.erb} +0 -0
- data/app/views/manifestations/index.html.erb +40 -24
- data/app/views/manifestations/index.rdf.builder +5 -3
- data/app/views/manifestations/index.rss.builder +2 -2
- data/app/views/manifestations/index.txt.erb +1 -2
- data/app/views/manifestations/{show.mobile.erb → show.html+phone.erb} +1 -1
- data/app/views/manifestations/show.html.erb +1 -1
- data/app/views/manifestations/show.txt.erb +1 -2
- data/app/views/medium_of_performances/index.html.erb +4 -4
- data/app/views/owns/index.html.erb +2 -2
- data/app/views/picture_files/_index.html.erb +3 -3
- data/app/views/picture_files/_index_agent.html.erb +4 -4
- data/app/views/picture_files/_index_manifestation.html.erb +4 -4
- data/app/views/picture_files/{_link.mobile.erb → _link.html+phone.erb} +0 -0
- data/app/views/picture_files/{show.mobile.erb → show.html+phone.erb} +0 -0
- data/app/views/produce_types/index.html.erb +4 -4
- data/app/views/produces/_index.html.erb +2 -2
- data/app/views/produces/_index_agent.html.erb +2 -2
- data/app/views/produces/_index_manifestation.html.erb +2 -2
- data/app/views/realize_types/index.html.erb +4 -4
- data/app/views/realizes/_index.html.erb +2 -2
- data/app/views/realizes/_index_agent.html.erb +2 -2
- data/app/views/realizes/_index_expression.html.erb +2 -2
- data/app/views/series_statement_merges/show.html.erb +0 -2
- data/app/views/series_statements/_index.html.erb +4 -4
- data/app/views/series_statements/_index_series_statement_merge_list.html.erb +2 -2
- data/app/views/series_statements/show.html.erb +1 -1
- data/config/locales/translation_en.yml +13 -0
- data/config/locales/translation_ja.yml +13 -0
- data/config/routes.rb +3 -43
- data/lib/enju_biblio/engine.rb +0 -1
- data/lib/enju_biblio/version.rb +1 -1
- data/lib/enju_biblio.rb +0 -107
- data/lib/tasks/enju_biblio_tasks.rake +1 -1
- data/spec/cassette_library/ImportRequest/import/should_import_bibliographic_record.yml +43 -43
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_isbn_which_is_already_imported/redirects_to_the_created_import_request.yml +45 -45
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +50 -50
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/redirects_to_the_created_import_request.yml +44 -44
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +48 -48
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/redirects_to_the_created_import_request.yml +41 -41
- data/spec/cassette_library/ResourceImportFile/should_import_in_background.yml +50 -50
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/ISBN_import/with_record_not_found/should_record_an_error_message.yml +49 -49
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_has_only_isbn/should_be_imported.yml +45 -45
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_shift_jis/should_be_imported.yml +50 -50
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_be_imported.yml +48 -48
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_be_searchable_right_after_the_import.yml +512 -0
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_send_message_when_import_is_completed.yml +42 -42
- data/spec/controllers/agent_import_files_controller_spec.rb +5 -5
- data/spec/controllers/agent_import_results_controller_spec.rb +3 -3
- data/spec/controllers/agent_merge_lists_controller_spec.rb +9 -9
- data/spec/controllers/agent_merges_controller_spec.rb +9 -9
- data/spec/controllers/agent_relationship_types_controller_spec.rb +14 -14
- data/spec/controllers/agent_relationships_controller_spec.rb +9 -9
- data/spec/controllers/agent_types_controller_spec.rb +2 -2
- data/spec/controllers/agents_controller_spec.rb +8 -8
- data/spec/controllers/carrier_types_controller_spec.rb +1 -1
- data/spec/controllers/content_types_controller_spec.rb +1 -1
- data/spec/controllers/countries_controller_spec.rb +10 -10
- data/spec/controllers/create_types_controller_spec.rb +2 -2
- data/spec/controllers/creates_controller_spec.rb +7 -7
- data/spec/controllers/donates_controller_spec.rb +9 -9
- data/spec/controllers/form_of_works_controller_spec.rb +2 -2
- data/spec/controllers/frequencies_controller_spec.rb +2 -2
- data/spec/controllers/identifier_types_controller_spec.rb +2 -2
- data/spec/controllers/import_requests_controller_spec.rb +9 -9
- data/spec/controllers/items_controller_spec.rb +13 -7
- data/spec/controllers/languages_controller_spec.rb +8 -8
- data/spec/controllers/licenses_controller_spec.rb +2 -2
- data/spec/controllers/manifestation_relationship_types_controller_spec.rb +10 -10
- data/spec/controllers/manifestation_relationships_controller_spec.rb +9 -9
- data/spec/controllers/manifestations_controller_spec.rb +86 -12
- data/spec/controllers/medium_of_performances_controller_spec.rb +2 -2
- data/spec/controllers/owns_controller_spec.rb +7 -7
- data/spec/controllers/picture_files_controller_spec.rb +9 -9
- data/spec/controllers/produce_types_controller_spec.rb +2 -2
- data/spec/controllers/produces_controller_spec.rb +7 -7
- data/spec/controllers/realize_types_controller_spec.rb +2 -2
- data/spec/controllers/realizes_controller_spec.rb +7 -7
- data/spec/controllers/resource_export_files_controller_spec.rb +9 -15
- data/spec/controllers/resource_import_files_controller_spec.rb +7 -7
- data/spec/controllers/resource_import_results_controller_spec.rb +3 -3
- data/spec/controllers/series_statement_merge_lists_controller_spec.rb +9 -9
- data/spec/controllers/series_statement_merges_controller_spec.rb +9 -9
- data/spec/controllers/series_statements_controller_spec.rb +7 -7
- data/spec/dummy/app/assets/javascripts/application.js +0 -2
- data/spec/dummy/app/controllers/application_controller.rb +10 -6
- data/spec/dummy/app/models/user.rb +4 -4
- data/spec/dummy/config/application.rb +13 -41
- data/spec/dummy/config/environments/development.rb +22 -18
- data/spec/dummy/config/environments/production.rb +46 -34
- data/spec/dummy/config/environments/test.rb +19 -14
- data/spec/dummy/config/initializers/assets.rb +1 -1
- data/spec/dummy/config/initializers/enju_leaf.rb +8 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +13 -0
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +13 -0
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +9 -0
- data/spec/dummy/db/schema.rb +27 -2
- data/spec/factories/classification_type.rb +5 -0
- data/spec/factories/reserve.rb +12 -0
- data/spec/factories/role.rb +9 -0
- data/spec/factories/subject.rb +7 -0
- data/spec/factories/subject_heading_type.rb +5 -0
- data/spec/factories/subject_heading_type_has_subject.rb +6 -0
- data/spec/factories/subject_type.rb +5 -0
- data/spec/fixtures/checked_items.yml +4 -4
- data/spec/fixtures/checkouts.yml +12 -12
- data/spec/fixtures/classification_types.yml +1 -1
- data/spec/fixtures/classifications.yml +1 -0
- data/spec/fixtures/manifestations.yml +4 -4
- data/spec/fixtures/reserves.yml +16 -16
- data/spec/fixtures/subjects.yml +79 -0
- data/spec/models/agent_import_file_spec.rb +1 -1
- data/spec/models/manifestation_spec.rb +27 -13
- data/spec/models/resource_export_file_spec.rb +15 -2
- data/spec/models/resource_import_file_spec.rb +29 -9
- data/spec/models/series_statement_merge_list_spec.rb +1 -1
- data/spec/policies/manifestation_policy_spec.rb +24 -0
- data/spec/rails_helper.rb +82 -0
- data/spec/spec_helper.rb +81 -56
- data/spec/support/devise.rb +2 -2
- data/spec/support/vcr.rb +8 -0
- data/spec/views/agent_types/index.html.erb_spec.rb +2 -1
- data/spec/views/agent_types/show.html.erb_spec.rb +1 -0
- data/spec/views/create_types/index.html.erb_spec.rb +2 -1
- data/spec/views/creates/edit.html.erb_spec.rb +0 -3
- data/spec/views/creates/index.html.erb_spec.rb +2 -4
- data/spec/views/creates/new.html.erb_spec.rb +0 -3
- data/spec/views/creates/show.html.erb_spec.rb +0 -3
- data/spec/views/import_requests/index.html.erb_spec.rb +3 -2
- data/spec/views/manifestations/index.html.erb_spec.rb +25 -0
- data/spec/views/manifestations/index.rdf.builder_spec.rb +23 -0
- data/spec/views/manifestations/index.txt.erb_spec.rb +17 -0
- data/spec/views/manifestations/show.html.erb_spec.rb +2 -3
- data/spec/views/manifestations/show.txt.erb_spec.rb +16 -0
- data/spec/views/owns/edit.html.erb_spec.rb +0 -3
- data/spec/views/owns/index.html.erb_spec.rb +2 -4
- data/spec/views/owns/new.html.erb_spec.rb +0 -3
- data/spec/views/owns/show.html.erb_spec.rb +0 -3
- data/spec/views/produce_types/index.html.erb_spec.rb +2 -1
- data/spec/views/produces/edit.html.erb_spec.rb +0 -3
- data/spec/views/produces/index.html.erb_spec.rb +2 -4
- data/spec/views/produces/new.html.erb_spec.rb +0 -3
- data/spec/views/produces/show.html.erb_spec.rb +0 -3
- data/spec/views/realize_types/index.html.erb_spec.rb +2 -1
- data/spec/views/realizes/edit.html.erb_spec.rb +0 -3
- data/spec/views/realizes/index.html.erb_spec.rb +2 -4
- data/spec/views/realizes/new.html.erb_spec.rb +0 -3
- data/spec/views/realizes/show.html.erb_spec.rb +0 -3
- data/spec/views/resource_import_files/index.html.erb_spec.rb +0 -3
- data/spec/views/resource_import_files/{show.html.erb_spec.erb → show.html.erb_spec.rb} +0 -3
- data/spec/views/resource_import_results/index.html.erb_spec.rb +0 -3
- data/spec/views/resource_import_results/{show.html.erb_spec.erb → show.html.erb_spec.rb} +1 -4
- data/spec/views/series_statement_merge_lists/index.html.erb_spec.rb +1 -1
- data/spec/views/series_statement_merges/edit.html.erb_spec.rb +0 -3
- data/spec/views/series_statement_merges/index.html.erb_spec.rb +0 -3
- data/spec/views/series_statement_merges/new.html.erb_spec.rb +0 -3
- data/spec/views/series_statement_merges/show.html.erb_spec.rb +0 -3
- metadata +170 -131
- data/app/models/enju_biblio/ability.rb +0 -238
- data/app/workers/agent_import_file_queue.rb +0 -7
- data/app/workers/resource_export_file_queue.rb +0 -7
- data/app/workers/resource_import_file_queue.rb +0 -7
- data/spec/dummy/config/application.yml +0 -42
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
require 'sunspot/rails/spec_helper'
|
3
3
|
|
4
4
|
describe SeriesStatementMergeListsController do
|
@@ -28,14 +28,14 @@ describe SeriesStatementMergeListsController do
|
|
28
28
|
|
29
29
|
it "assigns empty as @series_statement_merge_lists" do
|
30
30
|
get :index
|
31
|
-
assigns(:series_statement_merge_lists).should
|
31
|
+
assigns(:series_statement_merge_lists).should be_nil
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
describe "When not logged in" do
|
36
36
|
it "assigns empty as @series_statement_merge_lists" do
|
37
37
|
get :index
|
38
|
-
assigns(:series_statement_merge_lists).should
|
38
|
+
assigns(:series_statement_merge_lists).should be_nil
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -104,7 +104,7 @@ describe SeriesStatementMergeListsController do
|
|
104
104
|
|
105
105
|
it "should not assign the requested series_statement_merge_list as @series_statement_merge_list" do
|
106
106
|
get :new
|
107
|
-
assigns(:series_statement_merge_list).
|
107
|
+
assigns(:series_statement_merge_list).should be_nil
|
108
108
|
response.should be_forbidden
|
109
109
|
end
|
110
110
|
end
|
@@ -112,7 +112,7 @@ describe SeriesStatementMergeListsController do
|
|
112
112
|
describe "When not logged in" do
|
113
113
|
it "should not assign the requested series_statement_merge_list as @series_statement_merge_list" do
|
114
114
|
get :new
|
115
|
-
assigns(:series_statement_merge_list).
|
115
|
+
assigns(:series_statement_merge_list).should be_nil
|
116
116
|
response.should redirect_to(new_user_session_url)
|
117
117
|
end
|
118
118
|
end
|
@@ -226,7 +226,7 @@ describe SeriesStatementMergeListsController do
|
|
226
226
|
describe "with valid params" do
|
227
227
|
it "assigns a newly created series_statement_merge_list as @series_statement_merge_list" do
|
228
228
|
post :create, :series_statement_merge_list => @attrs
|
229
|
-
assigns(:series_statement_merge_list).should
|
229
|
+
assigns(:series_statement_merge_list).should be_nil
|
230
230
|
end
|
231
231
|
|
232
232
|
it "should be forbidden" do
|
@@ -238,7 +238,7 @@ describe SeriesStatementMergeListsController do
|
|
238
238
|
describe "with invalid params" do
|
239
239
|
it "assigns a newly created but unsaved series_statement_merge_list as @series_statement_merge_list" do
|
240
240
|
post :create, :series_statement_merge_list => @invalid_attrs
|
241
|
-
assigns(:series_statement_merge_list).
|
241
|
+
assigns(:series_statement_merge_list).should be_nil
|
242
242
|
end
|
243
243
|
|
244
244
|
it "should be forbidden" do
|
@@ -252,7 +252,7 @@ describe SeriesStatementMergeListsController do
|
|
252
252
|
describe "with valid params" do
|
253
253
|
it "assigns a newly created series_statement_merge_list as @series_statement_merge_list" do
|
254
254
|
post :create, :series_statement_merge_list => @attrs
|
255
|
-
assigns(:series_statement_merge_list).should
|
255
|
+
assigns(:series_statement_merge_list).should be_nil
|
256
256
|
end
|
257
257
|
|
258
258
|
it "should be forbidden" do
|
@@ -264,7 +264,7 @@ describe SeriesStatementMergeListsController do
|
|
264
264
|
describe "with invalid params" do
|
265
265
|
it "assigns a newly created but unsaved series_statement_merge_list as @series_statement_merge_list" do
|
266
266
|
post :create, :series_statement_merge_list => @invalid_attrs
|
267
|
-
assigns(:series_statement_merge_list).
|
267
|
+
assigns(:series_statement_merge_list).should be_nil
|
268
268
|
end
|
269
269
|
|
270
270
|
it "should be forbidden" do
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe SeriesStatementMergesController do
|
4
4
|
fixtures :all
|
@@ -27,7 +27,7 @@ describe SeriesStatementMergesController do
|
|
27
27
|
|
28
28
|
it "should be forbidden" do
|
29
29
|
get :index
|
30
|
-
assigns(:series_statement_merges).should
|
30
|
+
assigns(:series_statement_merges).should be_nil
|
31
31
|
response.should be_forbidden
|
32
32
|
end
|
33
33
|
end
|
@@ -35,7 +35,7 @@ describe SeriesStatementMergesController do
|
|
35
35
|
describe "When not logged in" do
|
36
36
|
it "should be forbidden" do
|
37
37
|
get :index
|
38
|
-
assigns(:series_statement_merges).should
|
38
|
+
assigns(:series_statement_merges).should be_nil
|
39
39
|
response.should redirect_to(new_user_session_url)
|
40
40
|
end
|
41
41
|
end
|
@@ -107,7 +107,7 @@ describe SeriesStatementMergesController do
|
|
107
107
|
|
108
108
|
it "should not assign the requested series_statement_merge as @series_statement_merge" do
|
109
109
|
get :new
|
110
|
-
assigns(:series_statement_merge).
|
110
|
+
assigns(:series_statement_merge).should be_nil
|
111
111
|
response.should be_forbidden
|
112
112
|
end
|
113
113
|
end
|
@@ -115,7 +115,7 @@ describe SeriesStatementMergesController do
|
|
115
115
|
describe "When not logged in" do
|
116
116
|
it "should not assign the requested series_statement_merge as @series_statement_merge" do
|
117
117
|
get :new
|
118
|
-
assigns(:series_statement_merge).
|
118
|
+
assigns(:series_statement_merge).should be_nil
|
119
119
|
response.should redirect_to(new_user_session_url)
|
120
120
|
end
|
121
121
|
end
|
@@ -229,7 +229,7 @@ describe SeriesStatementMergesController do
|
|
229
229
|
describe "with valid params" do
|
230
230
|
it "assigns a newly created series_statement_merge as @series_statement_merge" do
|
231
231
|
post :create, :series_statement_merge => @attrs
|
232
|
-
assigns(:series_statement_merge).should
|
232
|
+
assigns(:series_statement_merge).should be_nil
|
233
233
|
end
|
234
234
|
|
235
235
|
it "should be forbidden" do
|
@@ -241,7 +241,7 @@ describe SeriesStatementMergesController do
|
|
241
241
|
describe "with invalid params" do
|
242
242
|
it "assigns a newly created but unsaved series_statement_merge as @series_statement_merge" do
|
243
243
|
post :create, :series_statement_merge => @invalid_attrs
|
244
|
-
assigns(:series_statement_merge).
|
244
|
+
assigns(:series_statement_merge).should be_nil
|
245
245
|
end
|
246
246
|
|
247
247
|
it "should be forbidden" do
|
@@ -255,7 +255,7 @@ describe SeriesStatementMergesController do
|
|
255
255
|
describe "with valid params" do
|
256
256
|
it "assigns a newly created series_statement_merge as @series_statement_merge" do
|
257
257
|
post :create, :series_statement_merge => @attrs
|
258
|
-
assigns(:series_statement_merge).should
|
258
|
+
assigns(:series_statement_merge).should be_nil
|
259
259
|
end
|
260
260
|
|
261
261
|
it "should be forbidden" do
|
@@ -267,7 +267,7 @@ describe SeriesStatementMergesController do
|
|
267
267
|
describe "with invalid params" do
|
268
268
|
it "assigns a newly created but unsaved series_statement_merge as @series_statement_merge" do
|
269
269
|
post :create, :series_statement_merge => @invalid_attrs
|
270
|
-
assigns(:series_statement_merge).
|
270
|
+
assigns(:series_statement_merge).should be_nil
|
271
271
|
end
|
272
272
|
|
273
273
|
it "should be forbidden" do
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
|
3
3
|
describe SeriesStatementsController do
|
4
4
|
fixtures :users
|
@@ -115,7 +115,7 @@ describe SeriesStatementsController do
|
|
115
115
|
|
116
116
|
it "should not assign the requested series_statement as @series_statement" do
|
117
117
|
get :new
|
118
|
-
expect(assigns(:series_statement)).
|
118
|
+
expect(assigns(:series_statement)).to be_nil
|
119
119
|
expect(response).to be_forbidden
|
120
120
|
end
|
121
121
|
end
|
@@ -123,7 +123,7 @@ describe SeriesStatementsController do
|
|
123
123
|
describe "When not logged in" do
|
124
124
|
it "should not assign the requested series_statement as @series_statement" do
|
125
125
|
get :new
|
126
|
-
expect(assigns(:series_statement)).
|
126
|
+
expect(assigns(:series_statement)).to be_nil
|
127
127
|
expect(response).to redirect_to(new_user_session_url)
|
128
128
|
end
|
129
129
|
end
|
@@ -237,7 +237,7 @@ describe SeriesStatementsController do
|
|
237
237
|
describe "with valid params" do
|
238
238
|
it "assigns a newly created series_statement as @series_statement" do
|
239
239
|
post :create, :series_statement => @attrs
|
240
|
-
expect(assigns(:series_statement)).to
|
240
|
+
expect(assigns(:series_statement)).to be_nil
|
241
241
|
end
|
242
242
|
|
243
243
|
it "should be forbidden" do
|
@@ -249,7 +249,7 @@ describe SeriesStatementsController do
|
|
249
249
|
describe "with invalid params" do
|
250
250
|
it "assigns a newly created but unsaved series_statement as @series_statement" do
|
251
251
|
post :create, :series_statement => @invalid_attrs
|
252
|
-
expect(assigns(:series_statement)).
|
252
|
+
expect(assigns(:series_statement)).to be_nil
|
253
253
|
end
|
254
254
|
|
255
255
|
it "should be forbidden" do
|
@@ -263,7 +263,7 @@ describe SeriesStatementsController do
|
|
263
263
|
describe "with valid params" do
|
264
264
|
it "assigns a newly created series_statement as @series_statement" do
|
265
265
|
post :create, :series_statement => @attrs
|
266
|
-
expect(assigns(:series_statement)).to
|
266
|
+
expect(assigns(:series_statement)).to be_nil
|
267
267
|
end
|
268
268
|
|
269
269
|
it "should be forbidden" do
|
@@ -275,7 +275,7 @@ describe SeriesStatementsController do
|
|
275
275
|
describe "with invalid params" do
|
276
276
|
it "assigns a newly created but unsaved series_statement as @series_statement" do
|
277
277
|
post :create, :series_statement => @invalid_attrs
|
278
|
-
expect(assigns(:series_statement)).
|
278
|
+
expect(assigns(:series_statement)).to be_nil
|
279
279
|
end
|
280
280
|
|
281
281
|
it "should be forbidden" do
|
@@ -1,10 +1,14 @@
|
|
1
1
|
class ApplicationController < ActionController::Base
|
2
2
|
protect_from_forgery
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
include EnjuLeaf::Controller
|
5
|
+
include EnjuBiblio::Controller
|
6
|
+
include EnjuLibrary::Controller
|
7
|
+
include EnjuEvent::Controller
|
8
|
+
include EnjuSubject::Controller
|
9
|
+
include EnjuInventory::Controller
|
10
|
+
before_action :set_paper_trail_whodunnit
|
11
|
+
after_action :verify_authorized
|
12
|
+
|
13
|
+
include Pundit
|
10
14
|
end
|
@@ -6,8 +6,8 @@ class User < ActiveRecord::Base
|
|
6
6
|
|
7
7
|
# Setup accessible (or protected) attributes for your model
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
include EnjuLeaf::EnjuUser
|
10
|
+
include EnjuCirculation::EnjuUser
|
11
|
+
include EnjuMessage::EnjuUser
|
12
|
+
include EnjuBookmark::EnjuUser
|
13
13
|
end
|
@@ -3,7 +3,15 @@ require File.expand_path('../boot', __FILE__)
|
|
3
3
|
require 'rails/all'
|
4
4
|
|
5
5
|
Bundler.require(*Rails.groups)
|
6
|
-
require
|
6
|
+
require 'enju_biblio'
|
7
|
+
require 'enju_leaf'
|
8
|
+
require 'enju_inventory'
|
9
|
+
require 'enju_subject'
|
10
|
+
#require 'enju_circulation'
|
11
|
+
require 'enju_ndl'
|
12
|
+
require 'enju_bookmark'
|
13
|
+
require 'resque/server'
|
14
|
+
require 'resque_mailer'
|
7
15
|
|
8
16
|
module Dummy
|
9
17
|
class Application < Rails::Application
|
@@ -11,52 +19,16 @@ module Dummy
|
|
11
19
|
# Application configuration should go into files in config/initializers
|
12
20
|
# -- all .rb files in that directory are automatically loaded.
|
13
21
|
|
14
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
15
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
16
|
-
|
17
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
18
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
19
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
20
|
-
|
21
|
-
# Activate observers that should always be running.
|
22
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
23
|
-
|
24
22
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
25
23
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
26
|
-
config.time_zone = '
|
24
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
27
25
|
|
28
26
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
29
27
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
30
|
-
config.i18n.default_locale = :
|
31
|
-
|
32
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
33
|
-
config.encoding = "utf-8"
|
28
|
+
# config.i18n.default_locale = :de
|
34
29
|
|
35
|
-
#
|
36
|
-
config.
|
37
|
-
|
38
|
-
# Use SQL instead of Active Record's schema dumper when creating the database.
|
39
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
40
|
-
# like if you have constraints or database-specific column types
|
41
|
-
# config.active_record.schema_format = :sql
|
42
|
-
|
43
|
-
# Enforce whitelist mode for mass assignment.
|
44
|
-
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
45
|
-
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
46
|
-
# parameters by using an attr_accessible or attr_protected declaration.
|
47
|
-
#config.active_record.whitelist_attributes = true
|
48
|
-
|
49
|
-
# Enable the asset pipeline
|
50
|
-
config.assets.enabled = true
|
51
|
-
|
52
|
-
# Version of your assets, change this if you want to expire all your assets
|
53
|
-
config.assets.version = '1.0'
|
30
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
31
|
+
config.active_record.raise_in_transactional_callbacks = true
|
54
32
|
end
|
55
33
|
end
|
56
34
|
|
57
|
-
require 'enju_leaf'
|
58
|
-
require 'enju_inventory'
|
59
|
-
require 'enju_subject'
|
60
|
-
require 'enju_circulation'
|
61
|
-
require 'enju_ndl'
|
62
|
-
require 'enju_bookmark'
|
@@ -1,37 +1,41 @@
|
|
1
|
-
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# In the development environment your application's code is reloaded on
|
5
5
|
# every request. This slows down response time but is perfect for development
|
6
6
|
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
|
-
#
|
10
|
-
config.
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
11
|
|
12
|
-
# Show full error reports and disable caching
|
12
|
+
# Show full error reports and disable caching.
|
13
13
|
config.consider_all_requests_local = true
|
14
14
|
config.action_controller.perform_caching = false
|
15
15
|
|
16
|
-
# Don't care if the mailer can't send
|
16
|
+
# Don't care if the mailer can't send.
|
17
17
|
config.action_mailer.raise_delivery_errors = false
|
18
18
|
|
19
|
-
# Print deprecation notices to the Rails logger
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
20
|
config.active_support.deprecation = :log
|
21
21
|
|
22
|
-
#
|
23
|
-
config.
|
22
|
+
# Raise an error on page load if there are pending migrations.
|
23
|
+
config.active_record.migration_error = :page_load
|
24
24
|
|
25
|
-
#
|
26
|
-
|
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
|
27
29
|
|
28
|
-
#
|
29
|
-
#
|
30
|
-
config.
|
30
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
31
|
+
# yet still be able to expire them through the digest params.
|
32
|
+
config.assets.digest = true
|
31
33
|
|
32
|
-
#
|
33
|
-
|
34
|
+
# Adds additional error checking when serving assets at runtime.
|
35
|
+
# Checks for improperly declared sprockets dependencies.
|
36
|
+
# Raises helpful error messages.
|
37
|
+
config.assets.raise_runtime_errors = true
|
34
38
|
|
35
|
-
#
|
36
|
-
config.
|
39
|
+
# Raises error for missing translations
|
40
|
+
# config.action_view.raise_on_missing_translations = true
|
37
41
|
end
|
@@ -1,67 +1,79 @@
|
|
1
|
-
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
|
-
# Code is not reloaded between requests
|
4
|
+
# Code is not reloaded between requests.
|
5
5
|
config.cache_classes = true
|
6
6
|
|
7
|
-
#
|
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.
|
8
14
|
config.consider_all_requests_local = false
|
9
15
|
config.action_controller.perform_caching = true
|
10
16
|
|
11
|
-
#
|
12
|
-
|
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
|
20
|
+
# NGINX, varnish or squid.
|
21
|
+
# config.action_dispatch.rack_cache = true
|
22
|
+
|
23
|
+
# Disable serving static files from the `/public` folder by default since
|
24
|
+
# Apache or NGINX already handles this.
|
25
|
+
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
13
26
|
|
14
|
-
# Compress JavaScripts and CSS
|
15
|
-
config.assets.
|
27
|
+
# Compress JavaScripts and CSS.
|
28
|
+
config.assets.js_compressor = :uglifier
|
29
|
+
# config.assets.css_compressor = :sass
|
16
30
|
|
17
|
-
#
|
31
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
18
32
|
config.assets.compile = false
|
19
33
|
|
20
|
-
#
|
34
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
35
|
+
# yet still be able to expire them through the digest params.
|
21
36
|
config.assets.digest = true
|
22
37
|
|
23
|
-
#
|
24
|
-
# config.assets.manifest = YOUR_PATH
|
38
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
25
39
|
|
26
|
-
# Specifies the header that your server uses for sending files
|
27
|
-
# config.action_dispatch.x_sendfile_header =
|
28
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for
|
40
|
+
# Specifies the header that your server uses for sending files.
|
41
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
42
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
29
43
|
|
30
44
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
45
|
# config.force_ssl = true
|
32
46
|
|
33
|
-
#
|
34
|
-
#
|
47
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
48
|
+
# when problems arise.
|
49
|
+
config.log_level = :debug
|
35
50
|
|
36
|
-
# Prepend all log lines with the following tags
|
51
|
+
# Prepend all log lines with the following tags.
|
37
52
|
# config.log_tags = [ :subdomain, :uuid ]
|
38
53
|
|
39
|
-
# Use a different logger for distributed setups
|
54
|
+
# Use a different logger for distributed setups.
|
40
55
|
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
41
56
|
|
42
|
-
# Use a different cache store in production
|
57
|
+
# Use a different cache store in production.
|
43
58
|
# config.cache_store = :mem_cache_store
|
44
59
|
|
45
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
46
|
-
# config.action_controller.asset_host =
|
47
|
-
|
48
|
-
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
49
|
-
# config.assets.precompile += %w( search.js )
|
60
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
61
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
50
62
|
|
51
|
-
#
|
63
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
64
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
52
65
|
# config.action_mailer.raise_delivery_errors = false
|
53
66
|
|
54
|
-
# Enable threaded mode
|
55
|
-
# config.threadsafe!
|
56
|
-
|
57
67
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
58
|
-
# the I18n.default_locale when a translation
|
68
|
+
# the I18n.default_locale when a translation cannot be found).
|
59
69
|
config.i18n.fallbacks = true
|
60
70
|
|
61
|
-
# Send deprecation notices to registered listeners
|
71
|
+
# Send deprecation notices to registered listeners.
|
62
72
|
config.active_support.deprecation = :notify
|
63
73
|
|
64
|
-
#
|
65
|
-
|
66
|
-
|
74
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
75
|
+
config.log_formatter = ::Logger::Formatter.new
|
76
|
+
|
77
|
+
# Do not dump schema after migrations.
|
78
|
+
config.active_record.dump_schema_after_migration = false
|
67
79
|
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# The test environment is used exclusively to run your application's
|
5
5
|
# test suite. You never need to work with it otherwise. Remember that
|
@@ -7,33 +7,38 @@ Dummy::Application.configure do
|
|
7
7
|
# and recreated between test runs. Don't rely on the data there!
|
8
8
|
config.cache_classes = true
|
9
9
|
|
10
|
-
#
|
11
|
-
|
12
|
-
|
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
|
13
14
|
|
14
|
-
#
|
15
|
-
config.
|
15
|
+
# Configure static file server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_files = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
16
18
|
|
17
|
-
# Show full error reports and disable caching
|
19
|
+
# Show full error reports and disable caching.
|
18
20
|
config.consider_all_requests_local = true
|
19
21
|
config.action_controller.perform_caching = false
|
20
22
|
|
21
|
-
# Raise exceptions instead of rendering exception templates
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
22
24
|
config.action_dispatch.show_exceptions = false
|
23
25
|
|
24
|
-
# Disable request forgery protection in test environment
|
25
|
-
config.action_controller.allow_forgery_protection
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
26
28
|
|
27
29
|
# Tell Action Mailer not to deliver emails to the real world.
|
28
30
|
# The :test delivery method accumulates sent emails in the
|
29
31
|
# ActionMailer::Base.deliveries array.
|
30
32
|
config.action_mailer.delivery_method = :test
|
31
33
|
|
32
|
-
#
|
33
|
-
|
34
|
+
# Randomize the order test cases are executed.
|
35
|
+
config.active_support.test_order = :random
|
34
36
|
|
35
|
-
# Print deprecation notices to the stderr
|
37
|
+
# Print deprecation notices to the stderr.
|
36
38
|
config.active_support.deprecation = :stderr
|
37
39
|
|
40
|
+
# Raises error for missing translations
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
42
|
+
|
38
43
|
config.action_mailer.default_url_options = {:host => 'localhost:3000'}
|
39
44
|
end
|
@@ -9,4 +9,4 @@ Rails.application.config.assets.version = '1.0'
|
|
9
9
|
# Precompile additional assets.
|
10
10
|
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
11
|
# Rails.application.config.assets.precompile += %w( search.js )
|
12
|
-
Rails.application.config.assets.precompile += %w( *.png icons/*.png )
|
12
|
+
Rails.application.config.assets.precompile += %w( *.png icons/*.png *.gif )
|
@@ -0,0 +1,8 @@
|
|
1
|
+
CarrierType.include(EnjuCirculation::EnjuCarrierType)
|
2
|
+
Manifestation.include(EnjuCirculation::EnjuManifestation)
|
3
|
+
Manifestation.include(EnjuSubject::EnjuManifestation)
|
4
|
+
Item.include(EnjuCirculation::EnjuItem)
|
5
|
+
Item.include(EnjuLibrary::EnjuItem)
|
6
|
+
Item.include(EnjuInventory::EnjuItem)
|
7
|
+
Profile.include(EnjuCirculation::EnjuProfile)
|
8
|
+
UserGroup.include(EnjuCirculation::EnjuUserGroup)
|
data/spec/dummy/config/routes.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
Dummy::Application.routes.draw do
|
2
2
|
devise_for :users
|
3
|
+
authenticate :user, lambda {|u| u.role.try(:name) == 'Administrator' } do
|
4
|
+
mount Resque::Server.new, at: "/resque", as: :resque
|
5
|
+
end
|
3
6
|
|
4
7
|
# The priority is based upon order of creation:
|
5
8
|
# first created -> highest priority.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateWithdraws < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :withdraws do |t|
|
4
|
+
t.integer :basket_id
|
5
|
+
t.integer :item_id
|
6
|
+
t.integer :librarian_id
|
7
|
+
|
8
|
+
t.timestamps null: false
|
9
|
+
end
|
10
|
+
add_index :withdraws, :basket_id
|
11
|
+
add_index :withdraws, :item_id
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddTranslationTableToLibraryGroup < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
LibraryGroup.create_translation_table!({
|
4
|
+
login_banner: :text
|
5
|
+
}, {
|
6
|
+
migrate_data: true
|
7
|
+
})
|
8
|
+
end
|
9
|
+
|
10
|
+
def down
|
11
|
+
LibraryGroup.drop_translation_table! migrate_data: true
|
12
|
+
end
|
13
|
+
end
|