qa 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. data/LICENSE +15 -0
  2. data/README.md +174 -0
  3. data/Rakefile +10 -0
  4. data/app/assets/javascripts/qa/application.js +13 -0
  5. data/app/assets/stylesheets/qa/application.css +13 -0
  6. data/app/controllers/qa/application_controller.rb +4 -0
  7. data/app/controllers/qa/terms_controller.rb +76 -0
  8. data/app/helpers/qa/application_helper.rb +2 -0
  9. data/app/models/qa/mesh_tree.rb +37 -0
  10. data/app/models/qa/subject_mesh_term.rb +45 -0
  11. data/app/views/layouts/qa/application.html.erb +14 -0
  12. data/config/authorities.yml +1 -0
  13. data/config/authorities/states.yml +101 -0
  14. data/config/initializers/authorities.rb +1 -0
  15. data/config/oclcts-authorities.yml +24 -0
  16. data/config/routes.rb +7 -0
  17. data/db/migrate/20130917200611_create_qa_subject_mesh_terms.rb +11 -0
  18. data/db/migrate/20130917201026_create_qa_mesh_tree.rb +10 -0
  19. data/db/migrate/20130918141523_add_term_lower_to_qa_subject_mesh_terms.rb +7 -0
  20. data/lib/qa.rb +9 -0
  21. data/lib/qa/authorities.rb +12 -0
  22. data/lib/qa/authorities/base.rb +50 -0
  23. data/lib/qa/authorities/lcsh.rb +46 -0
  24. data/lib/qa/authorities/loc.rb +200 -0
  25. data/lib/qa/authorities/local.rb +69 -0
  26. data/lib/qa/authorities/mesh.rb +20 -0
  27. data/lib/qa/authorities/mesh_tools.rb +6 -0
  28. data/lib/qa/authorities/mesh_tools/mesh_data_parser.rb +65 -0
  29. data/lib/qa/authorities/mesh_tools/mesh_importer.rb +41 -0
  30. data/lib/qa/authorities/oclcts.rb +63 -0
  31. data/lib/qa/authorities/tgnlang.rb +40 -0
  32. data/lib/qa/data/TGN_LANGUAGES.xml +7435 -0
  33. data/lib/qa/engine.rb +5 -0
  34. data/lib/qa/version.rb +3 -0
  35. data/lib/tasks/qa_tasks.rake +4 -0
  36. data/spec/controllers/terms_controller_spec.rb +70 -0
  37. data/spec/fixtures/authorities/authority_A.yml +10 -0
  38. data/spec/fixtures/authorities/authority_B.yml +7 -0
  39. data/spec/fixtures/authorities/authority_C.yml +4 -0
  40. data/spec/fixtures/lcsh-response.txt +1 -0
  41. data/spec/fixtures/loc-response.txt +147 -0
  42. data/spec/fixtures/mesh.txt +334 -0
  43. data/spec/fixtures/oclcts-response-mesh-1.txt +28 -0
  44. data/spec/fixtures/oclcts-response-mesh-2.txt +253 -0
  45. data/spec/fixtures/oclcts-response-mesh-3.txt +28 -0
  46. data/spec/internal/Gemfile +48 -0
  47. data/spec/internal/Gemfile.lock +156 -0
  48. data/spec/internal/README.rdoc +28 -0
  49. data/spec/internal/Rakefile +6 -0
  50. data/spec/internal/app/assets/javascripts/application.js +16 -0
  51. data/spec/internal/app/assets/stylesheets/application.css +13 -0
  52. data/spec/internal/app/controllers/application_controller.rb +5 -0
  53. data/spec/internal/app/helpers/application_helper.rb +2 -0
  54. data/spec/internal/app/views/layouts/application.html.erb +14 -0
  55. data/spec/internal/bin/bundle +3 -0
  56. data/spec/internal/bin/rails +4 -0
  57. data/spec/internal/bin/rake +4 -0
  58. data/spec/internal/config.ru +4 -0
  59. data/spec/internal/config/application.rb +23 -0
  60. data/spec/internal/config/boot.rb +4 -0
  61. data/spec/internal/config/database.yml +25 -0
  62. data/spec/internal/config/environment.rb +5 -0
  63. data/spec/internal/config/environments/development.rb +29 -0
  64. data/spec/internal/config/environments/production.rb +80 -0
  65. data/spec/internal/config/environments/test.rb +36 -0
  66. data/spec/internal/config/initializers/backtrace_silencers.rb +7 -0
  67. data/spec/internal/config/initializers/filter_parameter_logging.rb +4 -0
  68. data/spec/internal/config/initializers/inflections.rb +16 -0
  69. data/spec/internal/config/initializers/mime_types.rb +5 -0
  70. data/spec/internal/config/initializers/secret_token.rb +12 -0
  71. data/spec/internal/config/initializers/session_store.rb +3 -0
  72. data/spec/internal/config/initializers/wrap_parameters.rb +14 -0
  73. data/spec/internal/config/locales/en.yml +23 -0
  74. data/spec/internal/config/oclcts-authorities.yml +24 -0
  75. data/spec/internal/config/routes.rb +60 -0
  76. data/spec/internal/db/development.sqlite3 +0 -0
  77. data/spec/internal/db/migrate/20130930151844_create_qa_subject_mesh_terms.qa.rb +12 -0
  78. data/spec/internal/db/migrate/20130930151845_create_qa_mesh_tree.qa.rb +11 -0
  79. data/spec/internal/db/migrate/20130930151846_add_term_lower_to_qa_subject_mesh_terms.qa.rb +8 -0
  80. data/spec/internal/db/schema.rb +34 -0
  81. data/spec/internal/db/seeds.rb +7 -0
  82. data/spec/internal/db/test.sqlite3 +0 -0
  83. data/spec/internal/lib/generators/test_app_generator.rb +20 -0
  84. data/spec/internal/log/development.log +193 -0
  85. data/spec/internal/public/404.html +58 -0
  86. data/spec/internal/public/422.html +58 -0
  87. data/spec/internal/public/500.html +57 -0
  88. data/spec/internal/public/favicon.ico +0 -0
  89. data/spec/internal/public/robots.txt +5 -0
  90. data/spec/internal/test/test_helper.rb +15 -0
  91. data/spec/lib/authorities_lcsh_spec.rb +61 -0
  92. data/spec/lib/authorities_loc_spec.rb +35 -0
  93. data/spec/lib/authorities_local_spec.rb +89 -0
  94. data/spec/lib/authorities_mesh_spec.rb +38 -0
  95. data/spec/lib/authorities_oclcts_spec.rb +49 -0
  96. data/spec/lib/authorities_tgnlang_spec.rb +22 -0
  97. data/spec/lib/mesh_data_parser_spec.rb +125 -0
  98. data/spec/models/subject_mesh_term_spec.rb +49 -0
  99. data/spec/spec_helper.rb +60 -0
  100. data/spec/support/lib/generators/test_app_generator.rb +20 -0
  101. 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
@@ -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
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
+ Migrating to CreateQaSubjectMeshTerms (20130930151844)
5
+  (0.1ms) begin transaction
6
+  (0.4ms) CREATE TABLE "qa_subject_mesh_terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "term_id" varchar(255), "term" varchar(255), "synonyms" text) 
7
+  (0.1ms) CREATE INDEX "index_qa_subject_mesh_terms_on_term_id" ON "qa_subject_mesh_terms" ("term_id")
8
+  (0.1ms) CREATE INDEX "index_qa_subject_mesh_terms_on_term" ON "qa_subject_mesh_terms" ("term")
9
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130930151844"]]
10
+  (1.7ms) commit transaction
11
+ Migrating to CreateQaMeshTree (20130930151845)
12
+  (0.1ms) begin transaction
13
+  (0.4ms) CREATE TABLE "qa_mesh_trees" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "term_id" varchar(255), "tree_number" varchar(255)) 
14
+  (0.1ms) CREATE INDEX "index_qa_mesh_trees_on_term_id" ON "qa_mesh_trees" ("term_id")
15
+  (0.1ms) CREATE INDEX "index_qa_mesh_trees_on_tree_number" ON "qa_mesh_trees" ("tree_number")
16
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130930151845"]]
17
+  (1.6ms) commit transaction
18
+ Migrating to AddTermLowerToQaSubjectMeshTerms (20130930151846)
19
+  (0.1ms) begin transaction
20
+  (0.4ms) ALTER TABLE "qa_subject_mesh_terms" ADD "term_lower" varchar(255)
21
+  (0.1ms) CREATE INDEX "index_qa_subject_mesh_terms_on_term_lower" ON "qa_subject_mesh_terms" ("term_lower")
22
+  (0.2ms) DROP INDEX "index_qa_subject_mesh_terms_on_term"
23
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130930151846"]]
24
+  (1.6ms) commit transaction
25
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
26
+  (1.2ms) CREATE TABLE "qa_mesh_trees" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "term_id" varchar(255), "tree_number" varchar(255)) 
27
+  (1.2ms) CREATE INDEX "index_qa_mesh_trees_on_term_id" ON "qa_mesh_trees" ("term_id")
28
+  (1.2ms) CREATE INDEX "index_qa_mesh_trees_on_tree_number" ON "qa_mesh_trees" ("tree_number")
29
+  (1.3ms) 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
+  (1.2ms) CREATE INDEX "index_qa_subject_mesh_terms_on_term_id" ON "qa_subject_mesh_terms" ("term_id")
31
+  (1.2ms) CREATE INDEX "index_qa_subject_mesh_terms_on_term_lower" ON "qa_subject_mesh_terms" ("term_lower")
32
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
33
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
34
+  (0.1ms) SELECT version FROM "schema_migrations"
35
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130930151846')
36
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130930151844')
37
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130930151845')
38
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
39
+  (0.1ms) begin transaction
40
+  (0.1ms) rollback transaction
41
+  (0.1ms) begin transaction
42
+  (0.1ms) rollback transaction
43
+  (0.1ms) begin transaction
44
+  (0.0ms) rollback transaction
45
+  (0.1ms) begin transaction
46
+  (0.1ms) rollback transaction
47
+  (0.1ms) begin transaction
48
+  (0.1ms) rollback transaction
49
+  (0.1ms) begin transaction
50
+  (0.0ms) rollback transaction
51
+  (0.1ms) begin transaction
52
+  (0.0ms) rollback transaction
53
+  (0.1ms) begin transaction
54
+  (0.1ms) rollback transaction
55
+  (0.1ms) begin transaction
56
+  (0.0ms) rollback transaction
57
+  (0.0ms) begin transaction
58
+  (0.1ms) rollback transaction
59
+  (0.1ms) begin transaction
60
+  (0.1ms) rollback transaction
61
+  (0.1ms) begin transaction
62
+  (0.1ms) rollback transaction
63
+  (0.0ms) begin transaction
64
+  (0.1ms) select sqlite_version(*)
65
+ Class Create Many Without Validations Or Callbacks (0.5ms) 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
+ Class Create Many Without Validations Or Callbacks (0.3ms) INSERT 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')
67
+ Qa::SubjectMeshTerm Load (0.1ms) SELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms" WHERE "qa_subject_mesh_terms"."term_lower" = 'malaria'
68
+ Qa::SubjectMeshTerm Load (0.1ms) SELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms" WHERE "qa_subject_mesh_terms"."term" = 'Malaria'
69
+ Qa::SubjectMeshTerm Load (0.1ms) SELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms" WHERE "qa_subject_mesh_terms"."term_id" = 'D008288'
70
+ Qa::SubjectMeshTerm Load (0.1ms) SELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms"
71
+  (1.4ms) rollback transaction
72
+  (0.1ms) begin transaction
73
+ SQL (0.5ms) INSERT INTO "qa_subject_mesh_terms" ("term", "term_id", "term_lower") VALUES (?, ?, ?) [["term", "Mr Plow"], ["term_id", "1"], ["term_lower", "mr plow"]]
74
+  (0.9ms) commit transaction
75
+  (0.1ms) begin transaction
76
+ SQL (0.3ms) INSERT INTO "qa_subject_mesh_terms" ("term", "term_id", "term_lower") VALUES (?, ?, ?) [["term", "Mr Snow"], ["term_id", "2"], ["term_lower", "mr snow"]]
77
+  (0.8ms) commit transaction
78
+  (0.0ms) begin transaction
79
+ SQL (0.3ms) INSERT INTO "qa_subject_mesh_terms" ("term", "term_id", "term_lower") VALUES (?, ?, ?) [["term", "Mrs Fields"], ["term_id", "3"], ["term_lower", "mrs fields"]]
80
+  (2.3ms) commit transaction
81
+  (0.1ms) begin transaction
82
+  (0.1ms) rollback transaction
83
+ SQL (1.7ms) DELETE FROM "qa_subject_mesh_terms"
84
+  (0.1ms) begin transaction
85
+  (0.1ms) rollback transaction
86
+  (0.1ms) begin transaction
87
+  (0.1ms) rollback transaction
88
+  (0.1ms) begin transaction
89
+  (0.1ms) rollback transaction
90
+  (0.1ms) begin transaction
91
+  (0.1ms) rollback transaction
92
+  (0.1ms) begin transaction
93
+  (0.1ms) rollback transaction
94
+  (0.1ms) begin transaction
95
+  (0.1ms) rollback transaction
96
+  (0.1ms) begin transaction
97
+  (0.1ms) rollback transaction
98
+  (0.1ms) begin transaction
99
+  (0.1ms) rollback transaction
100
+  (0.1ms) begin transaction
101
+  (0.1ms) rollback transaction
102
+  (0.1ms) begin transaction
103
+  (0.0ms) rollback transaction
104
+  (0.0ms) begin transaction
105
+  (0.0ms) rollback transaction
106
+  (0.1ms) begin transaction
107
+  (0.1ms) rollback transaction
108
+  (0.1ms) begin transaction
109
+  (0.0ms) rollback transaction
110
+  (0.1ms) begin transaction
111
+  (0.1ms) rollback transaction
112
+  (0.1ms) begin transaction
113
+  (0.0ms) rollback transaction
114
+  (0.1ms) begin transaction
115
+  (0.1ms) rollback transaction
116
+  (0.1ms) begin transaction
117
+  (0.0ms) rollback transaction
118
+  (0.0ms) begin transaction
119
+  (0.1ms) rollback transaction
120
+  (0.1ms) begin transaction
121
+  (0.1ms) rollback transaction
122
+  (0.1ms) begin transaction
123
+  (0.1ms) rollback transaction
124
+  (0.1ms) begin transaction
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
+  (0.1ms) rollback transaction
131
+  (0.1ms) begin transaction
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
+  (0.1ms) rollback transaction
138
+  (0.1ms) begin transaction
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
+  (0.1ms) rollback transaction
145
+  (0.1ms) begin transaction
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
+  (0.1ms) rollback transaction
152
+  (0.1ms) begin transaction
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
+  (0.1ms) rollback transaction
157
+  (0.1ms) begin transaction
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
+  (0.1ms) rollback transaction
162
+  (0.1ms) begin transaction
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
+  (0.1ms) rollback transaction
167
+  (0.1ms) begin transaction
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
+  (0.1ms) rollback transaction
172
+  (0.1ms) begin transaction
173
+ SQL (0.4ms) INSERT INTO "qa_subject_mesh_terms" ("term", "term_id") VALUES (?, ?) [["term", "Glyphon"], ["term_id", "ABCDEFG"]]
174
+  (1.6ms) commit transaction
175
+  (0.1ms) begin transaction
176
+  (0.1ms) SAVEPOINT active_record_1
177
+ SQL (0.3ms) INSERT INTO "qa_subject_mesh_terms" ("synonyms", "term_id") VALUES (?, ?) [["synonyms", "b|c"], ["term_id", "a"]]
178
+  (0.0ms) RELEASE SAVEPOINT active_record_1
179
+  (0.5ms) rollback transaction
180
+  (0.1ms) begin transaction
181
+  (0.1ms) rollback transaction
182
+  (0.1ms) begin transaction
183
+ Qa::MeshTree Load (0.2ms) SELECT "qa_mesh_trees".* FROM "qa_mesh_trees" WHERE "qa_mesh_trees"."term_id" = 'ABCDEFG'
184
+  (0.1ms) rollback transaction
185
+  (0.1ms) begin transaction
186
+  (0.1ms) SAVEPOINT active_record_1
187
+ SQL (0.4ms) INSERT INTO "qa_mesh_trees" ("term_id", "tree_number") VALUES (?, ?) [["term_id", "ABCDEFG"], ["tree_number", "D1.2.3.4"]]
188
+  (0.1ms) RELEASE SAVEPOINT active_record_1
189
+ Qa::SubjectMeshTerm Load (0.2ms) 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
+  (0.5ms) rollback transaction
191
+  (0.1ms) begin transaction
192
+ SQL (28.9ms) DELETE FROM "qa_subject_mesh_terms" WHERE "qa_subject_mesh_terms"."id" = ? [["id", 4]]
193
+  (2.9ms) 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>