enju_biblio 0.1.0.pre52 → 0.1.0.pre53
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/agent_import_files_controller.rb +6 -0
- data/app/controllers/agent_import_results_controller.rb +1 -1
- data/app/controllers/manifestations_controller.rb +8 -0
- data/app/controllers/resource_export_files_controller.rb +100 -0
- data/app/controllers/resource_import_files_controller.rb +6 -0
- data/app/controllers/resource_import_results_controller.rb +2 -2
- data/app/models/agent.rb +0 -2
- data/app/models/agent_import_file.rb +38 -52
- data/app/models/agent_import_file_state_machine.rb +19 -0
- data/app/models/agent_import_file_transition.rb +20 -0
- data/app/models/enju_biblio/ability.rb +14 -12
- data/app/models/import_request.rb +21 -17
- data/app/models/import_request_state_machine.rb +9 -0
- data/app/models/import_request_transition.rb +20 -0
- data/app/models/item.rb +0 -2
- data/app/models/manifestation.rb +63 -2
- data/app/models/resource_export_file.rb +59 -0
- data/app/models/resource_export_file_state_machine.rb +15 -0
- data/app/models/resource_export_file_transition.rb +20 -0
- data/app/models/resource_import_file.rb +42 -57
- data/app/models/resource_import_file_state_machine.rb +19 -0
- data/app/models/resource_import_file_transition.rb +20 -0
- data/app/views/agent_import_files/edit.html.erb +2 -2
- data/app/views/agent_import_files/index.html.erb +4 -4
- data/app/views/agent_import_files/new.html.erb +16 -3
- data/app/views/agent_import_files/show.html.erb +13 -3
- data/app/views/agent_import_results/index.html.erb +6 -6
- data/app/views/agent_import_results/{index.csv.erb → index.tsv.erb} +0 -0
- data/app/views/agent_import_results/show.html.erb +2 -2
- data/app/views/agent_relationship_types/edit.html.erb +2 -2
- data/app/views/agent_relationship_types/index.html.erb +2 -2
- data/app/views/agent_relationship_types/new.html.erb +2 -2
- data/app/views/agent_relationship_types/show.html.erb +2 -2
- data/app/views/agent_relationships/edit.html.erb +2 -2
- data/app/views/agent_relationships/index.html.erb +2 -2
- data/app/views/agent_relationships/new.html.erb +2 -2
- data/app/views/agent_relationships/show.html.erb +2 -2
- data/app/views/agent_types/edit.html.erb +2 -2
- data/app/views/agent_types/index.html.erb +2 -2
- data/app/views/agent_types/new.html.erb +2 -2
- data/app/views/agent_types/show.html.erb +2 -2
- data/app/views/agents/_index.html.erb +2 -2
- data/app/views/agents/_index_agent.html.erb +2 -2
- data/app/views/agents/_index_expression.html.erb +2 -2
- data/app/views/agents/_index_manifestation.html.erb +2 -2
- data/app/views/agents/_index_work.html.erb +2 -2
- data/app/views/agents/edit.html.erb +2 -2
- data/app/views/agents/new.html.erb +2 -2
- data/app/views/agents/show.html.erb +2 -2
- data/app/views/carrier_types/edit.html.erb +2 -2
- data/app/views/carrier_types/index.html.erb +2 -2
- data/app/views/carrier_types/new.html.erb +2 -2
- data/app/views/carrier_types/show.html.erb +2 -2
- data/app/views/content_types/edit.html.erb +2 -2
- data/app/views/content_types/index.html.erb +2 -2
- data/app/views/content_types/new.html.erb +2 -2
- data/app/views/content_types/show.html.erb +2 -2
- data/app/views/countries/edit.html.erb +2 -2
- data/app/views/countries/index.html.erb +2 -2
- data/app/views/countries/new.html.erb +2 -2
- data/app/views/countries/show.html.erb +2 -2
- data/app/views/create_types/edit.html.erb +2 -2
- data/app/views/create_types/index.html.erb +2 -2
- data/app/views/create_types/new.html.erb +2 -2
- data/app/views/create_types/show.html.erb +2 -2
- data/app/views/creates/_index.html.erb +2 -2
- data/app/views/creates/_index_agent.html.erb +2 -2
- data/app/views/creates/_index_work.html.erb +2 -2
- data/app/views/creates/edit.html.erb +2 -2
- data/app/views/creates/new.html.erb +2 -2
- data/app/views/creates/show.html.erb +2 -2
- data/app/views/donates/edit.html.erb +2 -2
- data/app/views/donates/index.html.erb +2 -2
- data/app/views/donates/new.html.erb +2 -2
- data/app/views/donates/show.html.erb +2 -2
- data/app/views/exemplifies/edit.html.erb +2 -2
- data/app/views/exemplifies/index.html.erb +2 -2
- data/app/views/exemplifies/new.html.erb +2 -2
- data/app/views/exemplifies/show.html.erb +2 -2
- data/app/views/extents/edit.html.erb +2 -2
- data/app/views/extents/index.html.erb +2 -2
- data/app/views/extents/new.html.erb +2 -2
- data/app/views/extents/show.html.erb +2 -2
- data/app/views/form_of_works/edit.html.erb +2 -2
- data/app/views/form_of_works/index.html.erb +2 -2
- data/app/views/form_of_works/new.html.erb +2 -2
- data/app/views/form_of_works/show.html.erb +2 -2
- data/app/views/frequencies/edit.html.erb +2 -2
- data/app/views/frequencies/index.html.erb +2 -2
- data/app/views/frequencies/new.html.erb +2 -2
- data/app/views/frequencies/show.html.erb +2 -2
- data/app/views/identifier_types/edit.html.erb +2 -2
- data/app/views/identifier_types/index.html.erb +2 -2
- data/app/views/identifier_types/new.html.erb +2 -2
- data/app/views/identifier_types/show.html.erb +2 -2
- data/app/views/import_requests/edit.html.erb +2 -2
- data/app/views/import_requests/index.html.erb +9 -7
- data/app/views/import_requests/new.html.erb +2 -2
- data/app/views/import_requests/show.html.erb +3 -3
- data/app/views/items/_form.html.erb +1 -1
- data/app/views/items/edit.html.erb +2 -2
- data/app/views/items/index.html.erb +2 -2
- data/app/views/items/new.html.erb +2 -2
- data/app/views/items/show.html.erb +2 -2
- data/app/views/languages/edit.html.erb +2 -2
- data/app/views/languages/index.html.erb +2 -2
- data/app/views/languages/new.html.erb +2 -2
- data/app/views/languages/show.html.erb +2 -2
- data/app/views/licenses/edit.html.erb +2 -2
- data/app/views/licenses/index.html.erb +2 -2
- data/app/views/licenses/new.html.erb +2 -2
- data/app/views/licenses/show.html.erb +2 -2
- data/app/views/manifestation_relationship_types/edit.html.erb +2 -2
- data/app/views/manifestation_relationship_types/index.html.erb +2 -2
- data/app/views/manifestation_relationship_types/new.html.erb +2 -2
- data/app/views/manifestation_relationship_types/show.html.erb +2 -2
- data/app/views/manifestation_relationships/edit.html.erb +2 -2
- data/app/views/manifestation_relationships/index.html.erb +2 -2
- data/app/views/manifestation_relationships/new.html.erb +2 -2
- data/app/views/manifestation_relationships/show.html.erb +2 -2
- data/app/views/manifestations/_pickup.html.erb +1 -1
- data/app/views/manifestations/_show_detail_librarian.html.erb +1 -1
- data/app/views/manifestations/_show_detail_user.html.erb +2 -2
- data/app/views/manifestations/_show_holding.html.erb +6 -1
- data/app/views/manifestations/_title.html.erb +1 -1
- data/app/views/manifestations/_title.mobile.erb +1 -1
- data/app/views/manifestations/edit.html.erb +2 -2
- data/app/views/manifestations/index.html.erb +2 -2
- data/app/views/manifestations/index.sru.builder +1 -1
- data/app/views/manifestations/new.html.erb +2 -2
- data/app/views/manifestations/show.html.erb +3 -3
- data/app/views/manifestations/show.mobile.erb +1 -1
- data/app/views/medium_of_performances/edit.html.erb +2 -2
- data/app/views/medium_of_performances/index.html.erb +2 -2
- data/app/views/medium_of_performances/new.html.erb +2 -2
- data/app/views/medium_of_performances/show.html.erb +2 -2
- data/app/views/notifier/manifestation_info.en.text.erb +1 -1
- data/app/views/notifier/manifestation_info.ja.text.erb +1 -1
- data/app/views/owns/edit.html.erb +2 -2
- data/app/views/owns/index.html.erb +2 -2
- data/app/views/owns/new.html.erb +2 -2
- data/app/views/owns/show.html.erb +2 -2
- data/app/views/picture_files/_index.html.erb +2 -2
- data/app/views/picture_files/_index_agent.html.erb +2 -2
- data/app/views/picture_files/_index_event.html.erb +2 -2
- data/app/views/picture_files/_index_manifestation.html.erb +2 -2
- data/app/views/picture_files/_index_shelf.html.erb +2 -2
- data/app/views/picture_files/edit.html.erb +2 -2
- data/app/views/picture_files/new.html.erb +2 -2
- data/app/views/picture_files/show.html.erb +2 -2
- data/app/views/produce_types/edit.html.erb +2 -2
- data/app/views/produce_types/index.html.erb +2 -2
- data/app/views/produce_types/new.html.erb +2 -2
- data/app/views/produce_types/show.html.erb +2 -2
- 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/produces/edit.html.erb +2 -2
- data/app/views/produces/new.html.erb +2 -2
- data/app/views/produces/show.html.erb +2 -2
- data/app/views/realize_types/edit.html.erb +2 -2
- data/app/views/realize_types/index.html.erb +2 -2
- data/app/views/realize_types/new.html.erb +2 -2
- data/app/views/realize_types/show.html.erb +2 -2
- 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/realizes/edit.html.erb +2 -2
- data/app/views/realizes/new.html.erb +2 -2
- data/app/views/realizes/show.html.erb +2 -2
- data/app/views/resource_export_files/_form.html.erb +22 -0
- data/app/views/resource_export_files/edit.html.erb +6 -0
- data/app/views/resource_export_files/index.html.erb +44 -0
- data/app/views/resource_export_files/new.html.erb +16 -0
- data/app/views/resource_export_files/show.html.erb +31 -0
- data/app/views/resource_import_files/edit.html.erb +2 -2
- data/app/views/resource_import_files/index.html.erb +4 -4
- data/app/views/resource_import_files/new.html.erb +16 -3
- data/app/views/resource_import_files/show.html.erb +13 -3
- data/app/views/resource_import_results/index.html.erb +6 -6
- data/app/views/resource_import_results/{index.csv.erb → index.tsv.erb} +0 -0
- data/app/views/resource_import_results/show.html.erb +2 -2
- data/app/views/series_statements/_index.html.erb +2 -2
- data/app/views/series_statements/_index_manifestation.html.erb +2 -2
- data/app/views/series_statements/_index_series_statement_merge_list.html.erb +2 -2
- data/app/views/series_statements/edit.html.erb +2 -2
- data/app/views/series_statements/new.html.erb +2 -2
- data/app/views/series_statements/show.html.erb +2 -2
- data/app/workers/agent_import_file_queue.rb +7 -0
- data/app/workers/resource_export_file_queue.rb +7 -0
- data/app/workers/resource_import_file_queue.rb +7 -0
- data/config/locales/translation_en.yml +12 -1
- data/config/locales/translation_ja.yml +12 -0
- data/config/routes.rb +3 -1
- data/db/migrate/001_create_agents.rb +0 -1
- data/db/migrate/005_create_manifestations.rb +0 -1
- data/db/migrate/006_create_items.rb +0 -1
- data/db/migrate/20081028083142_create_agent_import_files.rb +0 -2
- data/db/migrate/20081028083208_create_resource_import_files.rb +0 -2
- data/db/migrate/20100129142347_create_import_requests.rb +0 -1
- data/db/migrate/20140519170214_create_resource_import_file_transitions.rb +14 -0
- data/db/migrate/20140519171220_create_import_request_transitions.rb +14 -0
- data/db/migrate/20140524020735_create_agent_import_file_transitions.rb +14 -0
- data/db/migrate/20140614065404_create_resource_export_files.rb +11 -0
- data/db/migrate/20140614141500_create_resource_export_file_transitions.rb +14 -0
- data/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +5 -0
- data/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +5 -0
- data/lib/enju_biblio/engine.rb +1 -0
- data/lib/enju_biblio/version.rb +1 -1
- data/lib/generators/enju_biblio/setup/templates/config/schedule.rb +1 -1
- data/spec/controllers/manifestations_controller_spec.rb +4 -4
- data/spec/controllers/resource_export_files_controller_spec.rb +292 -0
- data/spec/dummy/app/models/ability.rb +1 -0
- data/spec/dummy/config/initializers/statesman.rb +3 -0
- data/spec/dummy/db/migrate/154_create_messages.rb +0 -1
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +0 -2
- data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +0 -2
- data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +0 -1
- data/spec/dummy/db/migrate/20081212151614_create_bookmark_stats.rb +0 -3
- data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +0 -1
- data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +0 -1
- data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +0 -1
- data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +0 -4
- data/spec/dummy/db/schema.rb +63 -31
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample1.tsv +19 -19
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140705-26819-14hii8j.txt +147 -0
- data/spec/dummy/solr/default/data/index/segments.gen +0 -0
- data/spec/dummy/solr/default/data/index/segments_1 +0 -0
- data/spec/dummy/solr/test/data/index/segments.gen +0 -0
- data/spec/dummy/solr/test/data/index/segments_6y +0 -0
- data/spec/dummy/solr/test/data/tlog/{tlog.0000000000000016453 → tlog.0000000000000000243} +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000244 +0 -0
- data/spec/dummy/solr/test/data/tlog/{tlog.0000000000000016455 → tlog.0000000000000000245} +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000246 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000247 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000248 +0 -0
- data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
- data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
- data/spec/factories/create_types.rb +13 -0
- data/spec/factories/produce_types.rb +13 -0
- data/spec/factories/realize_types.rb +13 -0
- data/spec/fixtures/agent_import_files.yml +1 -5
- data/spec/fixtures/agents.yml +0 -2
- data/spec/fixtures/import_requests.yml +0 -4
- data/spec/fixtures/items.yml +0 -2
- data/spec/fixtures/manifestation_checkout_stats.yml +0 -2
- data/spec/fixtures/manifestation_reserve_stats.yml +0 -2
- data/spec/fixtures/manifestations.yml +0 -2
- data/spec/fixtures/message_requests.yml +0 -2
- data/spec/fixtures/messages.yml +0 -4
- data/spec/fixtures/resource_export_files.yml +26 -0
- data/spec/fixtures/resource_import_files.yml +1 -4
- data/spec/fixtures/user_checkout_stats.yml +0 -2
- data/spec/fixtures/user_reserve_stats.yml +0 -2
- data/spec/models/agent_import_file_spec.rb +14 -8
- data/spec/models/agent_spec.rb +4 -6
- data/spec/models/import_request_spec.rb +0 -2
- data/spec/models/item_spec.rb +7 -8
- data/spec/models/manifestation_spec.rb +8 -10
- data/spec/models/resource_export_file_spec.rb +28 -0
- data/spec/models/resource_import_file_spec.rb +15 -5
- data/spec/routing/manifestations_routing_spec.rb +1 -1
- data/spec/routing/resource_export_files_routing_spec.rb +35 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/support/resque.rb +32 -0
- data/spec/views/import_requests/edit.html.erb_spec.rb +19 -0
- data/spec/views/import_requests/index.html.erb_spec.rb +33 -0
- data/spec/views/import_requests/new.html.erb_spec.rb +21 -0
- data/spec/views/import_requests/show.html.erb_spec.rb +22 -0
- data/spec/views/resource_export_files/edit.html.erb_spec.rb +16 -0
- data/spec/views/resource_export_files/index.html.erb_spec.rb +17 -0
- data/spec/views/resource_export_files/new.html.erb_spec.rb +16 -0
- data/spec/views/resource_export_files/show.html.erb_spec.rb +13 -0
- metadata +139 -157
- data/app/views/manifestations/_series_form.html.erb +0 -127
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/solr/default/data/index/_da.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_da.fdx +0 -0
- data/spec/dummy/solr/default/data/index/_da.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_da.nvd +0 -0
- data/spec/dummy/solr/default/data/index/_da.nvm +0 -0
- data/spec/dummy/solr/default/data/index/_da.si +0 -0
- data/spec/dummy/solr/default/data/index/_da_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_da_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_da_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_da_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/segments_ip +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000668 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000669 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000670 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000671 +0 -0
- data/spec/dummy/solr/test/data/index/segments_cp8 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000016454 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000016456 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000016457 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000016458 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/01c388ec88c5fa6d00409d725549a506 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0440b81b0aae840cf287a686585a8cec +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0c8f59d97121b79a2e2a0d009d6da9c3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1572dfd6f1e555f4be1aa60ddc3cb0c0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/19a44bc29c5173edea456f9416243854 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2d65b40e585725207fd52ce4cf5134f4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3fc2b4de95dbb94dfe82ccfc97265cc4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4aa18096a209e515f5f1df487622cdf4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4db7c7b5ea13aacccd89ea32460e2de0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/55de678ed3c84c51b3a4b4cf473da823 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/64ee480e95febf6b404c1264755ea42e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7de140ed6f303b9d00d8d703cced3349 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/80348afae86df384b25e1e3bff21b13e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/814bc1bed3effa0bb4588eb8b75ab92a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8488002e0e6035b7d00c3800c2c0e27e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/86dfe8a3e156aeb6ebcd456b2251fab7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/89c9228bae34e0ff18fd8fe7f6eb5847 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a2474b74df12470fb37c668b85b562c6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a2ee8688f63b884277632a234086f7df +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a3cea75f1356ef55329e78f86b4c72b1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/aa2e1ada35daa496bb08e85fcb817536 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b0e11c6d89683eaa7256a44a164a2a12 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bf17ca8affe2a1febca7f2a4e37cd77b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c36b7431da1ae91722b1c4091e4ba084 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c40786442706ae0cc6c793c6ee2500d3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e58908ad0ccad6546faf9bcab669b0cd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e8f801eeda49cba4a03cfd9e2a4562ae +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/eef93e7d091d8118419fb96adf80387b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fb91323d4585f2e27d281cdb4193beb1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ff64e9ded481959dfa8c78718e59e607 +0 -0
@@ -1,11 +1,11 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.editing', :model => t('activerecord.models.series_statement')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
<div id="submenu" class="ui-corner-all">
|
8
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
9
9
|
<ul>
|
10
10
|
<li><%= link_to t('page.show'), @series_statement %></li>
|
11
11
|
<li><%= link_to t('page.back'), series_statements_path %></li>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.new', :model => t('activerecord.models.series_statement')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
<div id="submenu" class="ui-corner-all">
|
8
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
9
9
|
<ul>
|
10
10
|
<li><%= link_to t('page.back'), series_statements_path %></li>
|
11
11
|
</ul>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.showing', :model => t('activerecord.models.series_statement')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
</div>
|
32
32
|
</div>
|
33
33
|
|
34
|
-
<div id="submenu" class="ui-corner-all">
|
34
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
35
35
|
<ul>
|
36
36
|
<% if can? :update, @series_statement %>
|
37
37
|
<li><%= link_to t('page.edit'), edit_series_statement_path(@series_statement) %></li>
|
@@ -148,6 +148,7 @@ en:
|
|
148
148
|
state: State
|
149
149
|
edit_mode: Edit mode
|
150
150
|
error_message: Error message
|
151
|
+
user_encoding: Encoding
|
151
152
|
language:
|
152
153
|
name: Name
|
153
154
|
native_name: Native name
|
@@ -168,6 +169,7 @@ en:
|
|
168
169
|
state: State
|
169
170
|
edit_mode: Edit mode
|
170
171
|
error_message: Error message
|
172
|
+
user_encoding: Encoding
|
171
173
|
series_statement:
|
172
174
|
original_title: Title
|
173
175
|
numbering: Numbering
|
@@ -295,7 +297,7 @@ en:
|
|
295
297
|
name: Name
|
296
298
|
display_name: Display name
|
297
299
|
note: Note
|
298
|
-
|
300
|
+
identifier_type:
|
299
301
|
name: Name
|
300
302
|
display_name: Display name
|
301
303
|
note: Note
|
@@ -303,6 +305,10 @@ en:
|
|
303
305
|
body: Body
|
304
306
|
manifestation_id: Manifestation
|
305
307
|
primary: Primary
|
308
|
+
resource_export_file:
|
309
|
+
resource_export_file_name: Filename
|
310
|
+
resource_export_file_size: Size
|
311
|
+
state: State
|
306
312
|
|
307
313
|
resource_import_file:
|
308
314
|
update_relationship: Update relationship
|
@@ -316,3 +322,8 @@ en:
|
|
316
322
|
add: Add
|
317
323
|
remove: Remove
|
318
324
|
add_series_statement: Add another series statement
|
325
|
+
|
326
|
+
export:
|
327
|
+
export_completed: Export completed.
|
328
|
+
are_you_sure_to_export: It may take some time to complete. Are you sure to export?
|
329
|
+
export_task_created: Export task created.
|
@@ -37,6 +37,7 @@ ja:
|
|
37
37
|
donate: 寄贈
|
38
38
|
identifier: 識別子
|
39
39
|
identifier_type: 識別子の種類
|
40
|
+
resource_export_file: 書誌と所蔵のエクスポート
|
40
41
|
|
41
42
|
attributes:
|
42
43
|
manifestation:
|
@@ -148,6 +149,7 @@ ja:
|
|
148
149
|
state: 状態
|
149
150
|
edit_mode: 編集モード
|
150
151
|
error_message: エラーメッセージ
|
152
|
+
user_encoding: 文字コード
|
151
153
|
language:
|
152
154
|
name: 名前
|
153
155
|
native_name: ネイティブ名
|
@@ -168,6 +170,7 @@ ja:
|
|
168
170
|
state: 状態
|
169
171
|
edit_mode: 編集モード
|
170
172
|
error_message: エラーメッセージ
|
173
|
+
user_encoding: 文字コード
|
171
174
|
series_statement:
|
172
175
|
original_title: シリーズ名
|
173
176
|
numbering: シリーズ番号
|
@@ -303,6 +306,10 @@ ja:
|
|
303
306
|
body: 内容
|
304
307
|
manifestation_id: 体現形
|
305
308
|
primary: 主に使用
|
309
|
+
resource_export_file:
|
310
|
+
resource_export_file_name: ファイル名
|
311
|
+
resource_export_file_size: ファイルサイズ
|
312
|
+
state: 状態
|
306
313
|
|
307
314
|
resource_import_file:
|
308
315
|
update_relationship: 関連を更新
|
@@ -316,3 +323,8 @@ ja:
|
|
316
323
|
add: 追加
|
317
324
|
remove: 削除
|
318
325
|
add_series_statement: 別のシリーズ情報を追加する
|
326
|
+
|
327
|
+
export:
|
328
|
+
export_completed: エクスポートが完了しました。
|
329
|
+
are_you_sure_to_export: エクスポートに時間がかかることがあります。本当にエクスポートしますか?
|
330
|
+
export_task_created: エクスポートのタスクが設定されました。エクスポートが完了しましたらメッセージでお知らせします。現在の状態は「エクスポートの一覧」でも確認できます。
|
data/config/routes.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
+
resources :resource_export_files
|
3
|
+
|
2
4
|
resources :identifier_types
|
3
5
|
|
4
6
|
resources :manifestations do
|
@@ -96,6 +98,6 @@ Rails.application.routes.draw do
|
|
96
98
|
|
97
99
|
resources :picture_files
|
98
100
|
|
99
|
-
get '/isbn/:
|
101
|
+
get '/isbn/:isbn_id' => 'manifestations#index'
|
100
102
|
get '/page/advanced_search' => 'page#advanced_search'
|
101
103
|
end
|
@@ -29,7 +29,6 @@ class CreateManifestations < ActiveRecord::Migration
|
|
29
29
|
t.boolean :repository_content, :default => false, :null => false
|
30
30
|
t.integer :lock_version, :default => 0, :null => false
|
31
31
|
t.integer :required_role_id, :default => 1, :null => false
|
32
|
-
t.string :state
|
33
32
|
t.integer :required_score, :default => 0, :null => false
|
34
33
|
t.integer :frequency_id, :default => 1, :null => false
|
35
34
|
t.boolean :subscription_master, :default => false, :null => false
|
@@ -13,7 +13,6 @@ class CreateItems < ActiveRecord::Migration
|
|
13
13
|
t.integer :price
|
14
14
|
t.integer :lock_version, :default => 0, :null => false
|
15
15
|
t.integer :required_role_id, :default => 1, :null => false
|
16
|
-
t.string :state
|
17
16
|
t.integer :required_score, :default => 0, :null => false
|
18
17
|
end
|
19
18
|
#add_index :items, :manifestation_id
|
@@ -7,7 +7,6 @@ class CreateAgentImportFiles < ActiveRecord::Migration
|
|
7
7
|
t.integer :user_id
|
8
8
|
t.text :note
|
9
9
|
t.datetime :executed_at
|
10
|
-
t.string :state
|
11
10
|
t.string :agent_import_file_name
|
12
11
|
t.string :agent_import_content_type
|
13
12
|
t.integer :agent_import_file_size
|
@@ -17,6 +16,5 @@ class CreateAgentImportFiles < ActiveRecord::Migration
|
|
17
16
|
end
|
18
17
|
add_index :agent_import_files, :parent_id
|
19
18
|
add_index :agent_import_files, :user_id
|
20
|
-
add_index :agent_import_files, :state
|
21
19
|
end
|
22
20
|
end
|
@@ -7,7 +7,6 @@ class CreateResourceImportFiles < ActiveRecord::Migration
|
|
7
7
|
t.integer :user_id
|
8
8
|
t.text :note
|
9
9
|
t.datetime :executed_at
|
10
|
-
t.string :state
|
11
10
|
t.string :resource_import_file_name
|
12
11
|
t.string :resource_import_content_type
|
13
12
|
t.integer :resource_import_file_size
|
@@ -17,6 +16,5 @@ class CreateResourceImportFiles < ActiveRecord::Migration
|
|
17
16
|
end
|
18
17
|
add_index :resource_import_files, :parent_id
|
19
18
|
add_index :resource_import_files, :user_id
|
20
|
-
add_index :resource_import_files, :state
|
21
19
|
end
|
22
20
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateResourceImportFileTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :resource_import_file_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :resource_import_file_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :resource_import_file_transitions, :resource_import_file_id, name: "index_resource_import_file_transitions_on_file_id"
|
12
|
+
add_index :resource_import_file_transitions, [:sort_key, :resource_import_file_id], unique: true, name: "index_resource_import_file_transitions_on_sort_key_and_file_id"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateImportRequestTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :import_request_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :import_request_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :import_request_transitions, :import_request_id
|
12
|
+
add_index :import_request_transitions, [:sort_key, :import_request_id], unique: true, name: "index_import_request_transitions_on_sort_key_and_request_id"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateAgentImportFileTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :agent_import_file_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :agent_import_file_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :agent_import_file_transitions, :agent_import_file_id
|
12
|
+
add_index :agent_import_file_transitions, [:sort_key, :agent_import_file_id], unique: true, name: "index_agent_import_file_transitions_on_sort_key_and_file_id"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateResourceExportFileTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :resource_export_file_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :resource_export_file_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :resource_export_file_transitions, :resource_export_file_id, name: "index_resource_export_file_transitions_on_file_id"
|
12
|
+
add_index :resource_export_file_transitions, [:sort_key, :resource_export_file_id], unique: true, name: "index_resource_export_file_transitions_on_sort_key_and_file_id"
|
13
|
+
end
|
14
|
+
end
|
data/lib/enju_biblio/engine.rb
CHANGED
data/lib/enju_biblio/version.rb
CHANGED
@@ -133,14 +133,14 @@ describe ManifestationsController do
|
|
133
133
|
it "should get index with pub_date_from" do
|
134
134
|
get :index, :query => '2005', :pub_date_from => '2000'
|
135
135
|
response.should be_success
|
136
|
-
assigns(:manifestations).should
|
136
|
+
assigns(:manifestations).should be_truthy
|
137
137
|
assigns(:query).should eq '2005 date_of_publication_d:[1999-12-31T15:00:00Z TO *]'
|
138
138
|
end
|
139
139
|
|
140
140
|
it "should get index with pub_date_to" do
|
141
141
|
get :index, :query => '2005', :pub_date_to => '2000'
|
142
142
|
response.should be_success
|
143
|
-
assigns(:manifestations).should
|
143
|
+
assigns(:manifestations).should be_truthy
|
144
144
|
assigns(:query).should eq '2005 date_of_publication_d:[* TO 2000-12-31T14:59:59Z]'
|
145
145
|
end
|
146
146
|
|
@@ -383,7 +383,7 @@ describe ManifestationsController do
|
|
383
383
|
it "assigns a series_statement" do
|
384
384
|
post :create, :manifestation => @attrs.merge(:series_statements_attributes => {[0] => {:original_title => SeriesStatement.find(1).original_title}})
|
385
385
|
assigns(:manifestation).reload
|
386
|
-
assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:one).original_title).should
|
386
|
+
assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:one).original_title).should be_truthy
|
387
387
|
end
|
388
388
|
|
389
389
|
it "redirects to the created manifestation" do
|
@@ -507,7 +507,7 @@ describe ManifestationsController do
|
|
507
507
|
it "assigns a series_statement" do
|
508
508
|
put :update, :id => @manifestation.id, :manifestation => @attrs.merge(:series_statements_attributes => {[0] => {:original_title => series_statements(:two).original_title, "_destroy"=>"false"}})
|
509
509
|
assigns(:manifestation).reload
|
510
|
-
assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:two).original_title).should
|
510
|
+
assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:two).original_title).should be_truthy
|
511
511
|
end
|
512
512
|
|
513
513
|
it "assigns the requested manifestation as @manifestation" do
|
@@ -0,0 +1,292 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ResourceExportFilesController do
|
4
|
+
fixtures :all
|
5
|
+
|
6
|
+
describe "GET index" do
|
7
|
+
describe "When logged in as Administrator" do
|
8
|
+
login_admin
|
9
|
+
|
10
|
+
it "assigns all resource_export_files as @resource_export_files" do
|
11
|
+
get :index
|
12
|
+
assigns(:resource_export_files).should eq(ResourceExportFile.order('id DESC').page(1))
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "When logged in as Librarian" do
|
17
|
+
login_librarian
|
18
|
+
|
19
|
+
it "assigns all resource_export_files as @resource_export_files" do
|
20
|
+
get :index
|
21
|
+
assigns(:resource_export_files).should eq(ResourceExportFile.order('id DESC').page(1))
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "When logged in as User" do
|
26
|
+
login_user
|
27
|
+
|
28
|
+
it "assigns empty as @resource_export_files" do
|
29
|
+
get :index
|
30
|
+
assigns(:resource_export_files).should be_empty
|
31
|
+
response.should be_forbidden
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "When not logged in" do
|
36
|
+
it "assigns empty as @resource_export_files" do
|
37
|
+
get :index
|
38
|
+
assigns(:resource_export_files).should be_empty
|
39
|
+
response.should redirect_to(new_user_session_url)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe "GET show" do
|
45
|
+
describe "When logged in as Administrator" do
|
46
|
+
login_admin
|
47
|
+
|
48
|
+
it "assigns the requested resource_export_file as @resource_export_file" do
|
49
|
+
get :show, :id => resource_export_files(:resource_export_file_00003).id
|
50
|
+
assigns(:resource_export_file).should eq(resource_export_files(:resource_export_file_00003))
|
51
|
+
response.should be_success
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "When logged in as Librarian" do
|
56
|
+
login_librarian
|
57
|
+
|
58
|
+
it "assigns the requested resource_export_file as @resource_export_file" do
|
59
|
+
get :show, :id => resource_export_files(:resource_export_file_00003).id
|
60
|
+
assigns(:resource_export_file).should eq(resource_export_files(:resource_export_file_00003))
|
61
|
+
response.should be_success
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe "When logged in as User" do
|
66
|
+
login_user
|
67
|
+
|
68
|
+
it "assigns the requested resource_export_file as @resource_export_file" do
|
69
|
+
get :show, :id => resource_export_files(:resource_export_file_00003).id
|
70
|
+
assigns(:resource_export_file).should eq(resource_export_files(:resource_export_file_00003))
|
71
|
+
response.should be_forbidden
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
describe "When not logged in" do
|
76
|
+
it "assigns the requested resource_export_file as @resource_export_file" do
|
77
|
+
get :show, :id => resource_export_files(:resource_export_file_00003).id
|
78
|
+
assigns(:resource_export_file).should eq(resource_export_files(:resource_export_file_00003))
|
79
|
+
response.should redirect_to(new_user_session_url)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
describe "GET new" do
|
85
|
+
describe "When logged in as Administrator" do
|
86
|
+
login_admin
|
87
|
+
|
88
|
+
it "assigns the requested resource_export_file as @resource_export_file" do
|
89
|
+
get :new
|
90
|
+
assigns(:resource_export_file).should be_valid
|
91
|
+
response.should be_success
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
describe "When logged in as Librarian" do
|
96
|
+
login_librarian
|
97
|
+
|
98
|
+
it "should not assign the requested resource_export_file as @resource_export_file" do
|
99
|
+
get :new
|
100
|
+
assigns(:resource_export_file).should be_valid
|
101
|
+
response.should be_success
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe "When logged in as User" do
|
106
|
+
login_user
|
107
|
+
|
108
|
+
it "should not assign the requested resource_export_file as @resource_export_file" do
|
109
|
+
get :new
|
110
|
+
assigns(:resource_export_file).should_not be_valid
|
111
|
+
response.should be_forbidden
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
describe "When not logged in" do
|
116
|
+
it "should not assign the requested resource_export_file as @resource_export_file" do
|
117
|
+
get :new
|
118
|
+
assigns(:resource_export_file).should_not be_valid
|
119
|
+
response.should redirect_to(new_user_session_url)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
describe "POST create" do
|
125
|
+
describe "When logged in as Librarian" do
|
126
|
+
before(:each) do
|
127
|
+
@user = FactoryGirl.create(:librarian)
|
128
|
+
sign_in @user
|
129
|
+
end
|
130
|
+
|
131
|
+
it "should create agent_export_file" do
|
132
|
+
post :create, :resource_export_file => { }
|
133
|
+
assigns(:resource_export_file).should be_valid
|
134
|
+
assigns(:resource_export_file).user.username.should eq @user.username
|
135
|
+
response.should redirect_to resource_export_file_url(assigns(:resource_export_file))
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
describe "When logged in as User" do
|
140
|
+
before(:each) do
|
141
|
+
@user = FactoryGirl.create(:user)
|
142
|
+
sign_in @user
|
143
|
+
end
|
144
|
+
|
145
|
+
it "should be forbidden" do
|
146
|
+
post :create, :resource_export_file => { }
|
147
|
+
assigns(:resource_export_file).user.should be_nil
|
148
|
+
response.should be_forbidden
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
describe "When not logged in" do
|
153
|
+
it "should be redirected to new session url" do
|
154
|
+
post :create, :resource_export_file => { }
|
155
|
+
assigns(:resource_export_file).user.should be_nil
|
156
|
+
response.should redirect_to new_user_session_url
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
describe "GET edit" do
|
162
|
+
describe "When logged in as Administrator" do
|
163
|
+
login_admin
|
164
|
+
|
165
|
+
it "assigns the requested resource_export_file as @resource_export_file" do
|
166
|
+
resource_export_file = resource_export_files(:resource_export_file_00001)
|
167
|
+
get :edit, :id => resource_export_file.id
|
168
|
+
assigns(:resource_export_file).should eq(resource_export_file)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
describe "When logged in as Librarian" do
|
173
|
+
login_librarian
|
174
|
+
|
175
|
+
it "assigns the requested resource_export_file as @resource_export_file" do
|
176
|
+
resource_export_file = resource_export_files(:resource_export_file_00001)
|
177
|
+
get :edit, :id => resource_export_file.id
|
178
|
+
assigns(:resource_export_file).should eq(resource_export_file)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
describe "When logged in as User" do
|
183
|
+
login_user
|
184
|
+
|
185
|
+
it "assigns the requested resource_export_file as @resource_export_file" do
|
186
|
+
resource_export_file = resource_export_files(:resource_export_file_00001)
|
187
|
+
get :edit, :id => resource_export_file.id
|
188
|
+
response.should be_forbidden
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
describe "When not logged in" do
|
193
|
+
it "should not assign the requested resource_export_file as @resource_export_file" do
|
194
|
+
resource_export_file = resource_export_files(:resource_export_file_00001)
|
195
|
+
get :edit, :id => resource_export_file.id
|
196
|
+
response.should redirect_to(new_user_session_url)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
describe "PUT update" do
|
202
|
+
describe "When logged in as Administrator" do
|
203
|
+
login_admin
|
204
|
+
|
205
|
+
it "should update resource_export_file" do
|
206
|
+
put :update, :id => resource_export_files(:resource_export_file_00003).id, :resource_export_file => { }
|
207
|
+
response.should redirect_to resource_export_file_url(assigns(:resource_export_file))
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
describe "When logged in as Librarian" do
|
212
|
+
login_librarian
|
213
|
+
|
214
|
+
it "should update resource_export_file" do
|
215
|
+
put :update, :id => resource_export_files(:resource_export_file_00003).id, :resource_export_file => { }
|
216
|
+
response.should redirect_to resource_export_file_url(assigns(:resource_export_file))
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
describe "When logged in as User" do
|
221
|
+
login_user
|
222
|
+
|
223
|
+
it "should not update resource_export_file" do
|
224
|
+
put :update, :id => resource_export_files(:resource_export_file_00003).id, :resource_export_file => { }
|
225
|
+
response.should be_forbidden
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
describe "When not logged in" do
|
230
|
+
it "should not update resource_export_file" do
|
231
|
+
put :update, :id => resource_export_files(:resource_export_file_00003).id, :resource_export_file => { }
|
232
|
+
response.should redirect_to new_user_session_url
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
describe "DELETE destroy" do
|
238
|
+
before(:each) do
|
239
|
+
@resource_export_file = resource_export_files(:resource_export_file_00001)
|
240
|
+
end
|
241
|
+
|
242
|
+
describe "When logged in as Administrator" do
|
243
|
+
login_admin
|
244
|
+
|
245
|
+
it "destroys the requested resource_export_file" do
|
246
|
+
delete :destroy, :id => @resource_export_file.id
|
247
|
+
end
|
248
|
+
|
249
|
+
it "redirects to the resource_export_files list" do
|
250
|
+
delete :destroy, :id => @resource_export_file.id
|
251
|
+
response.should redirect_to(resource_export_files_url)
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
describe "When logged in as Librarian" do
|
256
|
+
login_librarian
|
257
|
+
|
258
|
+
it "destroys the requested resource_export_file" do
|
259
|
+
delete :destroy, :id => @resource_export_file.id
|
260
|
+
end
|
261
|
+
|
262
|
+
it "redirects to the resource_export_files list" do
|
263
|
+
delete :destroy, :id => @resource_export_file.id
|
264
|
+
response.should redirect_to(resource_export_files_url)
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
describe "When logged in as User" do
|
269
|
+
login_user
|
270
|
+
|
271
|
+
it "destroys the requested resource_export_file" do
|
272
|
+
delete :destroy, :id => @resource_export_file.id
|
273
|
+
end
|
274
|
+
|
275
|
+
it "should be forbidden" do
|
276
|
+
delete :destroy, :id => @resource_export_file.id
|
277
|
+
response.should be_forbidden
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
describe "When not logged in" do
|
282
|
+
it "destroys the requested resource_export_file" do
|
283
|
+
delete :destroy, :id => @resource_export_file.id
|
284
|
+
end
|
285
|
+
|
286
|
+
it "should be forbidden" do
|
287
|
+
delete :destroy, :id => @resource_export_file.id
|
288
|
+
response.should redirect_to(new_user_session_url)
|
289
|
+
end
|
290
|
+
end
|
291
|
+
end
|
292
|
+
end
|