qa 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qa/authorities/local/subauthority.rb +4 -0
- data/lib/qa/authorities/local.rb +11 -6
- data/lib/qa/version.rb +1 -1
- data/lib/tasks/mesh.rake +26 -0
- data/spec/internal/Gemfile.lock +4 -1
- data/spec/internal/db/development.sqlite3 +0 -0
- data/spec/internal/log/development.log +496 -0
- data/spec/lib/authorities_local_spec.rb +21 -5
- data/spec/lib/tasks/mesh.rake_spec.rb +43 -0
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fed80fc0a3c24bbbd3032d4073f7e75aac0aa9c5
|
4
|
+
data.tar.gz: 965f2f9ec8fe396b5d31bfc3fa6d87e2787cd556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c008f809edb88cdea1d9f39c17f938d6d496b9b2e709976789b206cccc9c37bcbe72f30cf585c6f05fce0701fa50337bc6809303863d6d192db0d51652b6b69
|
7
|
+
data.tar.gz: 80c6e14d23838e345affc9723f0d99d56f3c2731a6be9f45d939966ee2d22ea8bcfb80746d1612379cf50837386959aded55bc664dfe88c8169df566b721cb50
|
data/lib/qa/authorities/local.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
require 'deprecation'
|
1
2
|
module Qa::Authorities
|
2
3
|
|
3
4
|
class Local < Qa::Authorities::Base
|
5
|
+
extend Deprecation
|
4
6
|
|
5
7
|
class << self
|
6
8
|
def sub_authority(name)
|
@@ -18,16 +20,19 @@ module Qa::Authorities
|
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
23
|
+
delegate :sub_authority, to: self
|
24
|
+
|
21
25
|
def search(q, sub_authority)
|
22
|
-
|
26
|
+
sub_authority(sub_authority).search(q)
|
27
|
+
end
|
28
|
+
|
29
|
+
def full_record(id, sub_authority)
|
30
|
+
sub_authority(sub_authority).full_record(id)
|
23
31
|
end
|
24
32
|
|
25
33
|
def get_full_record(id, sub_authority)
|
26
|
-
|
27
|
-
|
28
|
-
return term if term[:id] == id
|
29
|
-
end
|
30
|
-
return {}
|
34
|
+
Deprecation.warn(Local, "get_full_record is deprecated and will be removed in 0.1.0. Use full_record instead", caller)
|
35
|
+
full_record(id, sub_authority)
|
31
36
|
end
|
32
37
|
|
33
38
|
end
|
data/lib/qa/version.rb
CHANGED
data/lib/tasks/mesh.rake
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'benchmark'
|
2
|
+
|
3
|
+
namespace :mesh do
|
4
|
+
desc "Import MeSH terms from the file $MESH_FILE, it will update any terms which are already in the database"
|
5
|
+
task :import => :environment do
|
6
|
+
fname = ENV['MESH_FILE']
|
7
|
+
if fname.nil?
|
8
|
+
puts "Need to set $MESH_FILE with path to file to ingest"
|
9
|
+
next # transfers control out of this block
|
10
|
+
end
|
11
|
+
Benchmark.bm(30) do |bm|
|
12
|
+
bm.report("Importing #{fname}") do
|
13
|
+
m = Qa::Authorities::MeshTools::MeshImporter.new
|
14
|
+
File.open(fname) do |f|
|
15
|
+
m.import_from_file(f)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
desc "Delete all mesh terms from the database---not implemented"
|
22
|
+
task :clear do
|
23
|
+
puts "Not implemented"
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
data/spec/internal/Gemfile.lock
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../../../questioning_authority
|
3
3
|
specs:
|
4
|
-
qa (0.0.
|
4
|
+
qa (0.0.2)
|
5
5
|
activerecord-import (>= 0.4.0)
|
6
6
|
curb
|
7
|
+
deprecation
|
7
8
|
nokogiri (~> 1.6.0)
|
8
9
|
rails (~> 4.0.0)
|
9
10
|
rest-client
|
@@ -51,6 +52,8 @@ GEM
|
|
51
52
|
crack (0.4.1)
|
52
53
|
safe_yaml (~> 0.9.0)
|
53
54
|
curb (0.8.5)
|
55
|
+
deprecation (0.0.5)
|
56
|
+
activesupport
|
54
57
|
diff-lcs (1.2.4)
|
55
58
|
erubis (2.7.0)
|
56
59
|
execjs (2.0.2)
|
Binary file
|
@@ -6548,3 +6548,499 @@ Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)
|
|
6548
6548
|
[1m[35m (0.1ms)[0m rollback transaction
|
6549
6549
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6550
6550
|
[1m[35m (0.1ms)[0m rollback transaction
|
6551
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6552
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6553
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
6554
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6555
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6556
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6557
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6558
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6559
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6560
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6561
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6562
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6563
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
6564
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6565
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6566
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6567
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6568
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6569
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
6570
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6571
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6572
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6573
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
6574
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6575
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6576
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6577
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6578
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6579
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
6580
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6581
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6582
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6583
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6584
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6585
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6586
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6587
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6588
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6589
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6590
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6591
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6592
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6593
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6594
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6595
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6596
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6597
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6598
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6599
|
+
[1m[35m (0.2ms)[0m begin transaction
|
6600
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6601
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6602
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6603
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6604
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6605
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6606
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6607
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6608
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6609
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6610
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6611
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6612
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6613
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6614
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6615
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6616
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6617
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6618
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6619
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6620
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6621
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6622
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6623
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6624
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6625
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6626
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6627
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6628
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6629
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6630
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6631
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6632
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6633
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6634
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6635
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6636
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6637
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6638
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6639
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6640
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6641
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6642
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6643
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6644
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6645
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6646
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6647
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6648
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6649
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6650
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6651
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6652
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6653
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6654
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6655
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6656
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6657
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6658
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6659
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6660
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6661
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6662
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6663
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6664
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6665
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6666
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6667
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6668
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6669
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6670
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6671
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6672
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6673
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6674
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6675
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6676
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6677
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6678
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6679
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6680
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6681
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6682
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6683
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6684
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6685
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6686
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6687
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6688
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6689
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6690
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6691
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6692
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6693
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6694
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6695
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6696
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6697
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6698
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6699
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6700
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6701
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6702
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6703
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6704
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6705
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6706
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6707
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6708
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6709
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6710
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6711
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6712
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6713
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6714
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6715
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6716
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6717
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6718
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6719
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6720
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6721
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6722
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6723
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6724
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6725
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6726
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6727
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6728
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6729
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6730
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6731
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6732
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6733
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6734
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6735
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6736
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6737
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6738
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6739
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6740
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6741
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6742
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6743
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6744
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6745
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6746
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6747
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6748
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6749
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6750
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6751
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6752
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6753
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6754
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6755
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6756
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6757
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6758
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6759
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6760
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6761
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6762
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6763
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6764
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6765
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6766
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6767
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6768
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6769
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6770
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6771
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6772
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6773
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6774
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6775
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6776
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6777
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6778
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6779
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6780
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6781
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6782
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6783
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6784
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6785
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6786
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6787
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6788
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6789
|
+
[1m[35m (0.2ms)[0m begin transaction
|
6790
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6791
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6792
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6793
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6794
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6795
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6796
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6797
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6798
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6799
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6800
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6801
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6802
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6803
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6804
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6805
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6806
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6807
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6808
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6809
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6810
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6811
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6812
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6813
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6814
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6815
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6816
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6817
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6818
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6819
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6820
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6821
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6822
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6823
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6824
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6825
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6826
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6827
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6828
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6829
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6830
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6831
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6832
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6833
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6834
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6835
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6836
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6837
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6838
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6839
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6840
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6841
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6842
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6843
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6844
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6845
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6846
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6847
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6848
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6849
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6850
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6851
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6852
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6853
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6854
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6855
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6856
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6857
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6858
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6859
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6860
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6861
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6862
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6863
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6864
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6865
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6866
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6867
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6868
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6869
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6870
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6871
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6872
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6873
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6874
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6875
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6876
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6877
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6878
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6879
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6880
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6881
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6882
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6883
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6884
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6885
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6886
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6887
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6888
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6889
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6890
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6891
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6892
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6893
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6894
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6895
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6896
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6897
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6898
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6899
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
6900
|
+
[1m[35mClass Create Many Without Validations Or Callbacks (0.4ms)[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')
|
6901
|
+
[1m[36mClass Create Many Without Validations Or Callbacks (0.2ms)[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
|
6902
|
+
[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'
|
6903
|
+
[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
|
6904
|
+
[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'
|
6905
|
+
[1m[36mQa::SubjectMeshTerm Load (0.3ms)[0m [1mSELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms"[0m
|
6906
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
6907
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6908
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "qa_subject_mesh_terms" ("term", "term_id", "term_lower") VALUES (?, ?, ?) [["term", "Mr Plow"], ["term_id", "1"], ["term_lower", "mr plow"]]
|
6909
|
+
[1m[36m (1.5ms)[0m [1mcommit transaction[0m
|
6910
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6911
|
+
[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"]]
|
6912
|
+
[1m[35m (1.4ms)[0m commit transaction
|
6913
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6914
|
+
[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"]]
|
6915
|
+
[1m[36m (1.4ms)[0m [1mcommit transaction[0m
|
6916
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6917
|
+
[1m[36mQa::SubjectMeshTerm Load (0.2ms)[0m [1mSELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms" WHERE (term_lower LIKE 'mr%') LIMIT 10[0m
|
6918
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6919
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6920
|
+
[1m[35mQa::SubjectMeshTerm Load (0.2ms)[0m SELECT "qa_subject_mesh_terms".* FROM "qa_subject_mesh_terms" WHERE "qa_subject_mesh_terms"."term_id" = '2' ORDER BY "qa_subject_mesh_terms"."id" ASC LIMIT 1
|
6921
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6922
|
+
[1m[35mSQL (1.6ms)[0m DELETE FROM "qa_subject_mesh_terms"
|
6923
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6924
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6925
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6926
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6927
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6928
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6929
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
6930
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6931
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6932
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6933
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6934
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6935
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6936
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6937
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6938
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6939
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6940
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6941
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
6942
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6943
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
6944
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6945
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6946
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6947
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6948
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6949
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6950
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6951
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6952
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6953
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6954
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6955
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6956
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6957
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6958
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6959
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6960
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6961
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6962
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6963
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6964
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6965
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6966
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6967
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6968
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6969
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6970
|
+
Processing by Qa::TermsController#index as HTML
|
6971
|
+
Parameters: {"q"=>"foo", "vocab"=>"loc"}
|
6972
|
+
Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
6973
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6974
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6975
|
+
Processing by Qa::TermsController#index as HTML
|
6976
|
+
Parameters: {"q"=>"Tibetan", "vocab"=>"tgnlang"}
|
6977
|
+
Completed 200 OK in 48ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
6978
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6979
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6980
|
+
Processing by Qa::TermsController#index as HTML
|
6981
|
+
Parameters: {"q"=>"foo", "vocab"=>"loc", "sub_authority"=>"relators"}
|
6982
|
+
Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
6983
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6984
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6985
|
+
Processing by Qa::TermsController#index as HTML
|
6986
|
+
Parameters: {"q"=>"Blues", "vocab"=>"lcsh"}
|
6987
|
+
Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.0ms)
|
6988
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6989
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6990
|
+
Processing by Qa::TermsController#index as HTML
|
6991
|
+
Parameters: {"q"=>"foo", "vocab"=>"bar"}
|
6992
|
+
Filter chain halted as :check_authority rendered or redirected
|
6993
|
+
Completed 400 Bad Request in 2ms (ActiveRecord: 0.0ms)
|
6994
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6995
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6996
|
+
Processing by Qa::TermsController#index as HTML
|
6997
|
+
Parameters: {"q"=>nil}
|
6998
|
+
Filter chain halted as :check_vocab_param rendered or redirected
|
6999
|
+
Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)
|
7000
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
7001
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7002
|
+
Processing by Qa::TermsController#index as HTML
|
7003
|
+
Parameters: {"q"=>"foo", "vocab"=>"loc", "sub_authority"=>"foo"}
|
7004
|
+
Filter chain halted as :check_sub_authority rendered or redirected
|
7005
|
+
Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)
|
7006
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
7007
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7008
|
+
Processing by Qa::TermsController#index as HTML
|
7009
|
+
Parameters: {"vocab"=>nil}
|
7010
|
+
Filter chain halted as :check_vocab_param rendered or redirected
|
7011
|
+
Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)
|
7012
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
7013
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7014
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
7015
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7016
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
7017
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7018
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
7019
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7020
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
7021
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7022
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "qa_subject_mesh_terms" ("term", "term_id") VALUES (?, ?) [["term", "Glyphon"], ["term_id", "ABCDEFG"]]
|
7023
|
+
[1m[36m (1.4ms)[0m [1mcommit transaction[0m
|
7024
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7025
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
7026
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7027
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
7028
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "qa_subject_mesh_terms" ("synonyms", "term_id") VALUES (?, ?) [["synonyms", "b|c"], ["term_id", "a"]]
|
7029
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
7030
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
7031
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7032
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
7033
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "qa_mesh_trees" ("term_id", "tree_number") VALUES (?, ?)[0m [["term_id", "ABCDEFG"], ["tree_number", "D1.2.3.4"]]
|
7034
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
7035
|
+
[1m[36mQa::SubjectMeshTerm Load (0.1ms)[0m [1mSELECT "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')[0m
|
7036
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
7037
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7038
|
+
[1m[35mQa::MeshTree Load (0.2ms)[0m SELECT "qa_mesh_trees".* FROM "qa_mesh_trees" WHERE "qa_mesh_trees"."term_id" = 'ABCDEFG'
|
7039
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
7040
|
+
[1m[35m (0.1ms)[0m begin transaction
|
7041
|
+
[1m[36mSQL (2.2ms)[0m [1mDELETE FROM "qa_subject_mesh_terms" WHERE "qa_subject_mesh_terms"."id" = ?[0m [["id", 180]]
|
7042
|
+
[1m[35m (1.6ms)[0m commit transaction
|
7043
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7044
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
7045
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7046
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
@@ -12,9 +12,17 @@ describe Qa::Authorities::Local do
|
|
12
12
|
Qa::Authorities::Local.sub_authorities.should include "authority_B"
|
13
13
|
end
|
14
14
|
|
15
|
+
describe "the class" do
|
16
|
+
subject { Qa::Authorities::Local }
|
17
|
+
it "should return a sub_authority" do
|
18
|
+
expect { subject.sub_authority('authority_Z')}.to raise_error ArgumentError, "Invalid sub-authority 'authority_Z'"
|
19
|
+
expect(subject.sub_authority('authority_A')).to be_kind_of Qa::Authorities::Subauthority
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
15
23
|
it "should return a sub_authority" do
|
16
|
-
expect {
|
17
|
-
expect(
|
24
|
+
expect { subject.sub_authority('authority_Z')}.to raise_error ArgumentError, "Invalid sub-authority 'authority_Z'"
|
25
|
+
expect(subject.sub_authority('authority_A')).to be_kind_of Qa::Authorities::Subauthority
|
18
26
|
end
|
19
27
|
end
|
20
28
|
|
@@ -78,14 +86,14 @@ describe Qa::Authorities::Local do
|
|
78
86
|
let(:id) { "A2" }
|
79
87
|
let(:expected) { { 'id' => "A2", 'term' => "Term A2", 'active' => false } }
|
80
88
|
it "should return the full term record" do
|
81
|
-
record = authorities.
|
89
|
+
record = authorities.full_record(id, "authority_A")
|
82
90
|
expect(record).to be_a HashWithIndifferentAccess
|
83
91
|
expect(record).to eq(expected)
|
84
92
|
end
|
85
93
|
end
|
86
94
|
context "source is a list" do
|
87
95
|
it "should be indifferent access" do
|
88
|
-
record = authorities.
|
96
|
+
record = authorities.full_record('Term C1', "authority_C")
|
89
97
|
expect(record).to be_a HashWithIndifferentAccess
|
90
98
|
end
|
91
99
|
end
|
@@ -94,7 +102,15 @@ describe Qa::Authorities::Local do
|
|
94
102
|
let(:id) { "NonID" }
|
95
103
|
let(:expected) { {} }
|
96
104
|
it "should return an empty hash" do
|
97
|
-
expect(authorities.
|
105
|
+
expect(authorities.full_record(id, "authority_A")).to eq(expected)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
context "on a sub-authority" do
|
110
|
+
it "should return the full term record" do
|
111
|
+
record = authorities.sub_authority('authority_A').full_record('A2')
|
112
|
+
expect(record).to be_a HashWithIndifferentAccess
|
113
|
+
expect(record).to eq('id' => "A2", 'term' => "Term A2", 'active' => false)
|
98
114
|
end
|
99
115
|
end
|
100
116
|
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rake'
|
3
|
+
require 'stringio'
|
4
|
+
|
5
|
+
describe "mesh rake tasks" do
|
6
|
+
before do
|
7
|
+
@rake = Rake::Application.new
|
8
|
+
Rake.application = @rake
|
9
|
+
Rake.application.rake_require "mesh", ["#{Rails.root}/lib/tasks", "#{Rails.root}/../../lib/tasks"], []
|
10
|
+
Rake::Task.define_task(:environment) # rspec has loaded rails
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "mesh:import" do
|
14
|
+
before do
|
15
|
+
@task_name = "mesh:import"
|
16
|
+
@output = StringIO.new
|
17
|
+
$stdout = @output
|
18
|
+
end
|
19
|
+
after :all do
|
20
|
+
$stdout = STDOUT
|
21
|
+
end
|
22
|
+
it "should have 'environment' as a prereq" do
|
23
|
+
@rake[@task_name].prerequisites.should include("environment")
|
24
|
+
end
|
25
|
+
it "should require $MESH_FILE to be set" do
|
26
|
+
old_mesh_file = ENV.delete('MESH_FILE')
|
27
|
+
@rake[@task_name].invoke
|
28
|
+
@output.seek(0)
|
29
|
+
@output.read.should =~ /Need to set \$MESH_FILE with path to file to ingest/
|
30
|
+
ENV['MESH_FILE'] = old_mesh_file
|
31
|
+
end
|
32
|
+
it "should create or update all records in the config file" do
|
33
|
+
ENV['MESH_FILE'] = "dummy"
|
34
|
+
input = StringIO.new("*NEWRECORD\nUI = 5\nMH = test\n")
|
35
|
+
File.should_receive(:open).with("dummy").and_yield(input)
|
36
|
+
@rake[@task_name].invoke
|
37
|
+
term = Qa::SubjectMeshTerm.find_by_term_id(5)
|
38
|
+
term.should_not be_nil
|
39
|
+
term.term.should == "test"
|
40
|
+
ENV['MESH_FILE'] = nil
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Anderson
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2013-11-
|
18
|
+
date: 2013-11-11 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rails
|
@@ -87,6 +87,20 @@ dependencies:
|
|
87
87
|
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 0.4.0
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: deprecation
|
92
|
+
requirement: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
type: :runtime
|
98
|
+
prerelease: false
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
90
104
|
- !ruby/object:Gem::Dependency
|
91
105
|
name: sqlite3
|
92
106
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,6 +240,7 @@ files:
|
|
226
240
|
- lib/qa/engine.rb
|
227
241
|
- lib/qa/version.rb
|
228
242
|
- lib/qa.rb
|
243
|
+
- lib/tasks/mesh.rake
|
229
244
|
- lib/tasks/qa_tasks.rake
|
230
245
|
- LICENSE
|
231
246
|
- Rakefile
|
@@ -293,6 +308,7 @@ files:
|
|
293
308
|
- spec/lib/authorities_oclcts_spec.rb
|
294
309
|
- spec/lib/authorities_tgnlang_spec.rb
|
295
310
|
- spec/lib/mesh_data_parser_spec.rb
|
311
|
+
- spec/lib/tasks/mesh.rake_spec.rb
|
296
312
|
- spec/models/subject_mesh_term_spec.rb
|
297
313
|
- spec/spec_helper.rb
|
298
314
|
- spec/support/lib/generators/test_app_generator.rb
|
@@ -384,6 +400,7 @@ test_files:
|
|
384
400
|
- spec/lib/authorities_oclcts_spec.rb
|
385
401
|
- spec/lib/authorities_tgnlang_spec.rb
|
386
402
|
- spec/lib/mesh_data_parser_spec.rb
|
403
|
+
- spec/lib/tasks/mesh.rake_spec.rb
|
387
404
|
- spec/models/subject_mesh_term_spec.rb
|
388
405
|
- spec/spec_helper.rb
|
389
406
|
- spec/support/lib/generators/test_app_generator.rb
|