qa 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +15 -0
- data/README.md +174 -0
- data/Rakefile +10 -0
- data/app/assets/javascripts/qa/application.js +13 -0
- data/app/assets/stylesheets/qa/application.css +13 -0
- data/app/controllers/qa/application_controller.rb +4 -0
- data/app/controllers/qa/terms_controller.rb +76 -0
- data/app/helpers/qa/application_helper.rb +2 -0
- data/app/models/qa/mesh_tree.rb +37 -0
- data/app/models/qa/subject_mesh_term.rb +45 -0
- data/app/views/layouts/qa/application.html.erb +14 -0
- data/config/authorities.yml +1 -0
- data/config/authorities/states.yml +101 -0
- data/config/initializers/authorities.rb +1 -0
- data/config/oclcts-authorities.yml +24 -0
- data/config/routes.rb +7 -0
- data/db/migrate/20130917200611_create_qa_subject_mesh_terms.rb +11 -0
- data/db/migrate/20130917201026_create_qa_mesh_tree.rb +10 -0
- data/db/migrate/20130918141523_add_term_lower_to_qa_subject_mesh_terms.rb +7 -0
- data/lib/qa.rb +9 -0
- data/lib/qa/authorities.rb +12 -0
- data/lib/qa/authorities/base.rb +50 -0
- data/lib/qa/authorities/lcsh.rb +46 -0
- data/lib/qa/authorities/loc.rb +200 -0
- data/lib/qa/authorities/local.rb +69 -0
- data/lib/qa/authorities/mesh.rb +20 -0
- data/lib/qa/authorities/mesh_tools.rb +6 -0
- data/lib/qa/authorities/mesh_tools/mesh_data_parser.rb +65 -0
- data/lib/qa/authorities/mesh_tools/mesh_importer.rb +41 -0
- data/lib/qa/authorities/oclcts.rb +63 -0
- data/lib/qa/authorities/tgnlang.rb +40 -0
- data/lib/qa/data/TGN_LANGUAGES.xml +7435 -0
- data/lib/qa/engine.rb +5 -0
- data/lib/qa/version.rb +3 -0
- data/lib/tasks/qa_tasks.rake +4 -0
- data/spec/controllers/terms_controller_spec.rb +70 -0
- data/spec/fixtures/authorities/authority_A.yml +10 -0
- data/spec/fixtures/authorities/authority_B.yml +7 -0
- data/spec/fixtures/authorities/authority_C.yml +4 -0
- data/spec/fixtures/lcsh-response.txt +1 -0
- data/spec/fixtures/loc-response.txt +147 -0
- data/spec/fixtures/mesh.txt +334 -0
- data/spec/fixtures/oclcts-response-mesh-1.txt +28 -0
- data/spec/fixtures/oclcts-response-mesh-2.txt +253 -0
- data/spec/fixtures/oclcts-response-mesh-3.txt +28 -0
- data/spec/internal/Gemfile +48 -0
- data/spec/internal/Gemfile.lock +156 -0
- data/spec/internal/README.rdoc +28 -0
- data/spec/internal/Rakefile +6 -0
- data/spec/internal/app/assets/javascripts/application.js +16 -0
- data/spec/internal/app/assets/stylesheets/application.css +13 -0
- data/spec/internal/app/controllers/application_controller.rb +5 -0
- data/spec/internal/app/helpers/application_helper.rb +2 -0
- data/spec/internal/app/views/layouts/application.html.erb +14 -0
- data/spec/internal/bin/bundle +3 -0
- data/spec/internal/bin/rails +4 -0
- data/spec/internal/bin/rake +4 -0
- data/spec/internal/config.ru +4 -0
- data/spec/internal/config/application.rb +23 -0
- data/spec/internal/config/boot.rb +4 -0
- data/spec/internal/config/database.yml +25 -0
- data/spec/internal/config/environment.rb +5 -0
- data/spec/internal/config/environments/development.rb +29 -0
- data/spec/internal/config/environments/production.rb +80 -0
- data/spec/internal/config/environments/test.rb +36 -0
- data/spec/internal/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/internal/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/internal/config/initializers/inflections.rb +16 -0
- data/spec/internal/config/initializers/mime_types.rb +5 -0
- data/spec/internal/config/initializers/secret_token.rb +12 -0
- data/spec/internal/config/initializers/session_store.rb +3 -0
- data/spec/internal/config/initializers/wrap_parameters.rb +14 -0
- data/spec/internal/config/locales/en.yml +23 -0
- data/spec/internal/config/oclcts-authorities.yml +24 -0
- data/spec/internal/config/routes.rb +60 -0
- data/spec/internal/db/development.sqlite3 +0 -0
- data/spec/internal/db/migrate/20130930151844_create_qa_subject_mesh_terms.qa.rb +12 -0
- data/spec/internal/db/migrate/20130930151845_create_qa_mesh_tree.qa.rb +11 -0
- data/spec/internal/db/migrate/20130930151846_add_term_lower_to_qa_subject_mesh_terms.qa.rb +8 -0
- data/spec/internal/db/schema.rb +34 -0
- data/spec/internal/db/seeds.rb +7 -0
- data/spec/internal/db/test.sqlite3 +0 -0
- data/spec/internal/lib/generators/test_app_generator.rb +20 -0
- data/spec/internal/log/development.log +193 -0
- data/spec/internal/public/404.html +58 -0
- data/spec/internal/public/422.html +58 -0
- data/spec/internal/public/500.html +57 -0
- data/spec/internal/public/favicon.ico +0 -0
- data/spec/internal/public/robots.txt +5 -0
- data/spec/internal/test/test_helper.rb +15 -0
- data/spec/lib/authorities_lcsh_spec.rb +61 -0
- data/spec/lib/authorities_loc_spec.rb +35 -0
- data/spec/lib/authorities_local_spec.rb +89 -0
- data/spec/lib/authorities_mesh_spec.rb +38 -0
- data/spec/lib/authorities_oclcts_spec.rb +49 -0
- data/spec/lib/authorities_tgnlang_spec.rb +22 -0
- data/spec/lib/mesh_data_parser_spec.rb +125 -0
- data/spec/models/subject_mesh_term_spec.rb +49 -0
- data/spec/spec_helper.rb +60 -0
- data/spec/support/lib/generators/test_app_generator.rb +20 -0
- metadata +396 -0
@@ -0,0 +1,60 @@
|
|
1
|
+
Internal::Application.routes.draw do
|
2
|
+
|
3
|
+
mount Qa::Engine => '/qa'
|
4
|
+
|
5
|
+
|
6
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
7
|
+
# See how all your routes lay out with "rake routes".
|
8
|
+
|
9
|
+
# You can have the root of your site routed with "root"
|
10
|
+
# root 'welcome#index'
|
11
|
+
|
12
|
+
# Example of regular route:
|
13
|
+
# get 'products/:id' => 'catalog#view'
|
14
|
+
|
15
|
+
# Example of named route that can be invoked with purchase_url(id: product.id)
|
16
|
+
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
17
|
+
|
18
|
+
# Example resource route (maps HTTP verbs to controller actions automatically):
|
19
|
+
# resources :products
|
20
|
+
|
21
|
+
# Example resource route with options:
|
22
|
+
# resources :products do
|
23
|
+
# member do
|
24
|
+
# get 'short'
|
25
|
+
# post 'toggle'
|
26
|
+
# end
|
27
|
+
#
|
28
|
+
# collection do
|
29
|
+
# get 'sold'
|
30
|
+
# end
|
31
|
+
# end
|
32
|
+
|
33
|
+
# Example resource route with sub-resources:
|
34
|
+
# resources :products do
|
35
|
+
# resources :comments, :sales
|
36
|
+
# resource :seller
|
37
|
+
# end
|
38
|
+
|
39
|
+
# Example resource route with more complex sub-resources:
|
40
|
+
# resources :products do
|
41
|
+
# resources :comments
|
42
|
+
# resources :sales do
|
43
|
+
# get 'recent', on: :collection
|
44
|
+
# end
|
45
|
+
# end
|
46
|
+
|
47
|
+
# Example resource route with concerns:
|
48
|
+
# concern :toggleable do
|
49
|
+
# post 'toggle'
|
50
|
+
# end
|
51
|
+
# resources :posts, concerns: :toggleable
|
52
|
+
# resources :photos, concerns: :toggleable
|
53
|
+
|
54
|
+
# Example resource route within a namespace:
|
55
|
+
# namespace :admin do
|
56
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
57
|
+
# # (app/controllers/admin/products_controller.rb)
|
58
|
+
# resources :products
|
59
|
+
# end
|
60
|
+
end
|
Binary file
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This migration comes from qa (originally 20130917200611)
|
2
|
+
class CreateQaSubjectMeshTerms < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :qa_subject_mesh_terms do |t|
|
5
|
+
t.string :term_id
|
6
|
+
t.string :term
|
7
|
+
t.text :synonyms
|
8
|
+
end
|
9
|
+
add_index :qa_subject_mesh_terms, :term_id
|
10
|
+
add_index :qa_subject_mesh_terms, :term
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# This migration comes from qa (originally 20130917201026)
|
2
|
+
class CreateQaMeshTree < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :qa_mesh_trees do |t|
|
5
|
+
t.string :term_id
|
6
|
+
t.string :tree_number
|
7
|
+
end
|
8
|
+
add_index :qa_mesh_trees, :term_id
|
9
|
+
add_index :qa_mesh_trees, :tree_number
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# This migration comes from qa (originally 20130918141523)
|
2
|
+
class AddTermLowerToQaSubjectMeshTerms < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column :qa_subject_mesh_terms, :term_lower, :string
|
5
|
+
add_index :qa_subject_mesh_terms, :term_lower
|
6
|
+
remove_index :qa_subject_mesh_terms, :term
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20130930151846) do
|
15
|
+
|
16
|
+
create_table "qa_mesh_trees", force: true do |t|
|
17
|
+
t.string "term_id"
|
18
|
+
t.string "tree_number"
|
19
|
+
end
|
20
|
+
|
21
|
+
add_index "qa_mesh_trees", ["term_id"], name: "index_qa_mesh_trees_on_term_id"
|
22
|
+
add_index "qa_mesh_trees", ["tree_number"], name: "index_qa_mesh_trees_on_tree_number"
|
23
|
+
|
24
|
+
create_table "qa_subject_mesh_terms", force: true do |t|
|
25
|
+
t.string "term_id"
|
26
|
+
t.string "term"
|
27
|
+
t.text "synonyms"
|
28
|
+
t.string "term_lower"
|
29
|
+
end
|
30
|
+
|
31
|
+
add_index "qa_subject_mesh_terms", ["term_id"], name: "index_qa_subject_mesh_terms_on_term_id"
|
32
|
+
add_index "qa_subject_mesh_terms", ["term_lower"], name: "index_qa_subject_mesh_terms_on_term_lower"
|
33
|
+
|
34
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
+
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
+
#
|
4
|
+
# Examples:
|
5
|
+
#
|
6
|
+
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
7
|
+
# Mayor.create(name: 'Emanuel', city: cities.first)
|
Binary file
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
class TestAppGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path("../../../../support", __FILE__)
|
5
|
+
|
6
|
+
def inject_routes
|
7
|
+
insert_into_file "config/routes.rb", :after => ".draw do" do
|
8
|
+
%{
|
9
|
+
|
10
|
+
mount Qa::Engine => '/qa'
|
11
|
+
|
12
|
+
}
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def copy_configs
|
17
|
+
copy_file "../../config/oclcts-authorities.yml", "config/oclcts-authorities.yml"
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,193 @@
|
|
1
|
+
[1m[36m (1.7ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
2
|
+
[1m[35m (1.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
+
Migrating to CreateQaSubjectMeshTerms (20130930151844)
|
5
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "qa_subject_mesh_terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "term_id" varchar(255), "term" varchar(255), "synonyms" text) [0m
|
7
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_qa_subject_mesh_terms_on_term_id" ON "qa_subject_mesh_terms" ("term_id")
|
8
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_qa_subject_mesh_terms_on_term" ON "qa_subject_mesh_terms" ("term")[0m
|
9
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130930151844"]]
|
10
|
+
[1m[36m (1.7ms)[0m [1mcommit transaction[0m
|
11
|
+
Migrating to CreateQaMeshTree (20130930151845)
|
12
|
+
[1m[35m (0.1ms)[0m begin transaction
|
13
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "qa_mesh_trees" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "term_id" varchar(255), "tree_number" varchar(255)) [0m
|
14
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_qa_mesh_trees_on_term_id" ON "qa_mesh_trees" ("term_id")
|
15
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_qa_mesh_trees_on_tree_number" ON "qa_mesh_trees" ("tree_number")[0m
|
16
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130930151845"]]
|
17
|
+
[1m[36m (1.6ms)[0m [1mcommit transaction[0m
|
18
|
+
Migrating to AddTermLowerToQaSubjectMeshTerms (20130930151846)
|
19
|
+
[1m[35m (0.1ms)[0m begin transaction
|
20
|
+
[1m[36m (0.4ms)[0m [1mALTER TABLE "qa_subject_mesh_terms" ADD "term_lower" varchar(255)[0m
|
21
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_qa_subject_mesh_terms_on_term_lower" ON "qa_subject_mesh_terms" ("term_lower")
|
22
|
+
[1m[36m (0.2ms)[0m [1mDROP INDEX "index_qa_subject_mesh_terms_on_term"[0m
|
23
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130930151846"]]
|
24
|
+
[1m[36m (1.6ms)[0m [1mcommit transaction[0m
|
25
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
26
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "qa_mesh_trees" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "term_id" varchar(255), "tree_number" varchar(255)) [0m
|
27
|
+
[1m[35m (1.2ms)[0m CREATE INDEX "index_qa_mesh_trees_on_term_id" ON "qa_mesh_trees" ("term_id")
|
28
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_qa_mesh_trees_on_tree_number" ON "qa_mesh_trees" ("tree_number")[0m
|
29
|
+
[1m[35m (1.3ms)[0m CREATE TABLE "qa_subject_mesh_terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "term_id" varchar(255), "term" varchar(255), "synonyms" text, "term_lower" varchar(255))
|
30
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_qa_subject_mesh_terms_on_term_id" ON "qa_subject_mesh_terms" ("term_id")[0m
|
31
|
+
[1m[35m (1.2ms)[0m CREATE INDEX "index_qa_subject_mesh_terms_on_term_lower" ON "qa_subject_mesh_terms" ("term_lower")
|
32
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
33
|
+
[1m[35m (1.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
34
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
35
|
+
[1m[35m (1.2ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20130930151846')
|
36
|
+
[1m[36m (1.2ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20130930151844')[0m
|
37
|
+
[1m[35m (1.3ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20130930151845')
|
38
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
39
|
+
[1m[35m (0.1ms)[0m begin transaction
|
40
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
41
|
+
[1m[35m (0.1ms)[0m begin transaction
|
42
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
43
|
+
[1m[35m (0.1ms)[0m begin transaction
|
44
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
45
|
+
[1m[35m (0.1ms)[0m begin transaction
|
46
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
47
|
+
[1m[35m (0.1ms)[0m begin transaction
|
48
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
49
|
+
[1m[35m (0.1ms)[0m begin transaction
|
50
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
51
|
+
[1m[35m (0.1ms)[0m begin transaction
|
52
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
53
|
+
[1m[35m (0.1ms)[0m begin transaction
|
54
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
55
|
+
[1m[35m (0.1ms)[0m begin transaction
|
56
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
57
|
+
[1m[35m (0.0ms)[0m begin transaction
|
58
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
59
|
+
[1m[35m (0.1ms)[0m begin transaction
|
60
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
61
|
+
[1m[35m (0.1ms)[0m begin transaction
|
62
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
63
|
+
[1m[35m (0.0ms)[0m begin transaction
|
64
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
65
|
+
[1m[35mClass Create Many Without Validations Or Callbacks (0.5ms)[0m INSERT INTO "qa_subject_mesh_terms" ("term_id","term","term_lower","synonyms") VALUES ('D008288','Malaria','malaria','Marsh Fever|Plasmodium Infections|Remittent Fever|Infections, Plasmodium|Paludism|Fever, Marsh|Fever, Remittent|Infection, Plasmodium|Plasmodium Infection'),('D000001','Calcimycin','calcimycin','A-23187|A23187|Antibiotic A23187|A 23187|A23187, Antibiotic'),('D005260','Female','female','Females'),('D005261','Female Urogenital Diseases and Pregnancy Complications','female urogenital diseases and pregnancy complications',''),('D010272','Parasitic Diseases','parasitic diseases','Disease, Parasitic|Diseases, Parasitic|Parasitic Disease'),('D011528','Protozoan Infections','protozoan infections','Histomoniasis|Infections, Protozoan|Histomoniases|Infection, Protozoan|Protozoan Infection'),('D062310','Tropical Diseases','tropical diseases','Disease, Tropical|Diseases, Tropical|Tropical Disease'),('D013568','Pathological Conditions, Signs and Symptoms','pathological conditions, signs and symptoms','Symptoms and General Pathology'),('D001583','Benzoxazoles','benzoxazoles',''),('D006574','Heterocyclic Compounds, 2-Ring','heterocyclic compounds, 2-ring','2-Ring Heterocyclic Compounds|Compounds, 2-Ring Heterocyclic|Heterocyclic Compounds, 2 Ring'),('D006571','Heterocyclic Compounds','heterocyclic compounds','Compounds, Heterocyclic')
|
66
|
+
[1m[36mClass Create Many Without Validations Or Callbacks (0.3ms)[0m [1mINSERT INTO "qa_mesh_trees" ("term_id","tree_number") VALUES ('D008288','C03.752.530'),('D008288','C23.996.660'),('D000001','D03.438.221.173'),('D005261','C13'),('D010272','C03'),('D011528','C03.752'),('D062310','C03.883'),('D062310','C23.996'),('D013568','C23'),('D001583','D03.438.221'),('D006574','D03.438'),('D006571','D03')[0m
|
67
|
+
[1m[35mQa::SubjectMeshTerm Load (0.1ms)[0m SELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms" WHERE "qa_subject_mesh_terms"."term_lower" = 'malaria'
|
68
|
+
[1m[36mQa::SubjectMeshTerm Load (0.1ms)[0m [1mSELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms" WHERE "qa_subject_mesh_terms"."term" = 'Malaria'[0m
|
69
|
+
[1m[35mQa::SubjectMeshTerm Load (0.1ms)[0m SELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms" WHERE "qa_subject_mesh_terms"."term_id" = 'D008288'
|
70
|
+
[1m[36mQa::SubjectMeshTerm Load (0.1ms)[0m [1mSELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms"[0m
|
71
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
72
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
73
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "qa_subject_mesh_terms" ("term", "term_id", "term_lower") VALUES (?, ?, ?) [["term", "Mr Plow"], ["term_id", "1"], ["term_lower", "mr plow"]]
|
74
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
75
|
+
[1m[35m (0.1ms)[0m begin transaction
|
76
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "qa_subject_mesh_terms" ("term", "term_id", "term_lower") VALUES (?, ?, ?)[0m [["term", "Mr Snow"], ["term_id", "2"], ["term_lower", "mr snow"]]
|
77
|
+
[1m[35m (0.8ms)[0m commit transaction
|
78
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
79
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "qa_subject_mesh_terms" ("term", "term_id", "term_lower") VALUES (?, ?, ?) [["term", "Mrs Fields"], ["term_id", "3"], ["term_lower", "mrs fields"]]
|
80
|
+
[1m[36m (2.3ms)[0m [1mcommit transaction[0m
|
81
|
+
[1m[35m (0.1ms)[0m begin transaction
|
82
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
83
|
+
[1m[35mSQL (1.7ms)[0m DELETE FROM "qa_subject_mesh_terms"
|
84
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
85
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
86
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
87
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
88
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
89
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
90
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
91
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
92
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
93
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
94
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
95
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
96
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
97
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
98
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
99
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
100
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
101
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
102
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
103
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
104
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
105
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
106
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
107
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
108
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
109
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
110
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
111
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
112
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
113
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
114
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
115
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
116
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
117
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
118
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
119
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
120
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
121
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
122
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
123
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
124
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
125
|
+
Processing by Qa::TermsController#index as HTML
|
126
|
+
Parameters: {"vocab"=>nil}
|
127
|
+
Redirected to http://test.host/qa/terms
|
128
|
+
Filter chain halted as :check_vocab_param rendered or redirected
|
129
|
+
Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)
|
130
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
131
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
132
|
+
Processing by Qa::TermsController#index as HTML
|
133
|
+
Parameters: {"q"=>"foo", "vocab"=>"loc", "sub_authority"=>"foo"}
|
134
|
+
Redirected to http://test.host/qa/terms/loc/foo
|
135
|
+
Filter chain halted as :check_sub_authority rendered or redirected
|
136
|
+
Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)
|
137
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
138
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
139
|
+
Processing by Qa::TermsController#index as HTML
|
140
|
+
Parameters: {"q"=>nil}
|
141
|
+
Redirected to http://test.host/qa/terms
|
142
|
+
Filter chain halted as :check_vocab_param rendered or redirected
|
143
|
+
Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)
|
144
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
145
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
146
|
+
Processing by Qa::TermsController#index as HTML
|
147
|
+
Parameters: {"q"=>"foo", "vocab"=>"bar"}
|
148
|
+
Redirected to http://test.host/qa/terms/bar
|
149
|
+
Filter chain halted as :check_authority rendered or redirected
|
150
|
+
Completed 400 Bad Request in 3ms (ActiveRecord: 0.0ms)
|
151
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
152
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
153
|
+
Processing by Qa::TermsController#index as HTML
|
154
|
+
Parameters: {"q"=>"Blues", "vocab"=>"lcsh"}
|
155
|
+
Completed 200 OK in 44ms (Views: 39.1ms | ActiveRecord: 0.0ms)
|
156
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
157
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
158
|
+
Processing by Qa::TermsController#index as HTML
|
159
|
+
Parameters: {"q"=>"foo", "vocab"=>"loc", "sub_authority"=>"relators"}
|
160
|
+
Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.0ms)
|
161
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
162
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
163
|
+
Processing by Qa::TermsController#index as HTML
|
164
|
+
Parameters: {"q"=>"Tibetan", "vocab"=>"tgnlang"}
|
165
|
+
Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 0.0ms)
|
166
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
167
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
168
|
+
Processing by Qa::TermsController#index as HTML
|
169
|
+
Parameters: {"q"=>"foo", "vocab"=>"loc"}
|
170
|
+
Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
171
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
172
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
173
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "qa_subject_mesh_terms" ("term", "term_id") VALUES (?, ?) [["term", "Glyphon"], ["term_id", "ABCDEFG"]]
|
174
|
+
[1m[36m (1.6ms)[0m [1mcommit transaction[0m
|
175
|
+
[1m[35m (0.1ms)[0m begin transaction
|
176
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
177
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "qa_subject_mesh_terms" ("synonyms", "term_id") VALUES (?, ?) [["synonyms", "b|c"], ["term_id", "a"]]
|
178
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
179
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
180
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
181
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
182
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
183
|
+
[1m[35mQa::MeshTree Load (0.2ms)[0m SELECT "qa_mesh_trees".* FROM "qa_mesh_trees" WHERE "qa_mesh_trees"."term_id" = 'ABCDEFG'
|
184
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
185
|
+
[1m[35m (0.1ms)[0m begin transaction
|
186
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
187
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "qa_mesh_trees" ("term_id", "tree_number") VALUES (?, ?) [["term_id", "ABCDEFG"], ["tree_number", "D1.2.3.4"]]
|
188
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
189
|
+
[1m[35mQa::SubjectMeshTerm Load (0.2ms)[0m SELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms" INNER JOIN qa_mesh_trees ON qa_subject_mesh_terms.term_id = qa_mesh_trees.term_id WHERE (qa_mesh_trees.tree_number = 'D1.2.3.4')
|
190
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
191
|
+
[1m[35m (0.1ms)[0m begin transaction
|
192
|
+
[1m[36mSQL (28.9ms)[0m [1mDELETE FROM "qa_subject_mesh_terms" WHERE "qa_subject_mesh_terms"."id" = ?[0m [["id", 4]]
|
193
|
+
[1m[35m (2.9ms)[0m commit transaction
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/404.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
54
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
55
|
+
</div>
|
56
|
+
<p>If you are the application owner check the logs for more information.</p>
|
57
|
+
</body>
|
58
|
+
</html>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/422.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>The change you wanted was rejected.</h1>
|
54
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
55
|
+
</div>
|
56
|
+
<p>If you are the application owner check the logs for more information.</p>
|
57
|
+
</body>
|
58
|
+
</html>
|