qa 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -0
  3. data/app/controllers/qa/terms_controller.rb +1 -1
  4. data/lib/qa/authorities.rb +2 -0
  5. data/lib/qa/authorities/assign_fast.rb +17 -0
  6. data/lib/qa/authorities/assign_fast/generic_authority.rb +61 -0
  7. data/lib/qa/authorities/assign_fast_subauthority.rb +31 -0
  8. data/lib/qa/authorities/getty.rb +12 -3
  9. data/lib/qa/authorities/getty/aat.rb +3 -2
  10. data/lib/qa/authorities/getty/tgn.rb +80 -0
  11. data/lib/qa/authorities/getty/ulan.rb +71 -0
  12. data/lib/qa/authorities/web_service_base.rb +6 -4
  13. data/lib/qa/version.rb +1 -1
  14. data/spec/controllers/terms_controller_spec.rb +26 -12
  15. data/spec/fixtures/assign-fast-noheader.json +1 -0
  16. data/spec/fixtures/assign-fast-noresults.json +10 -0
  17. data/spec/fixtures/assign-fast-oneresult.json +16 -0
  18. data/spec/fixtures/assign-fast-topical-result.json +130 -0
  19. data/spec/fixtures/getty-tgn-find-response.json +1469 -0
  20. data/spec/fixtures/getty-ulan-find-response.json +11565 -0
  21. data/spec/fixtures/tgn-response.txt +87 -0
  22. data/spec/fixtures/ulan-response.txt +1854 -0
  23. data/spec/lib/authorities/assign_fast_spec.rb +115 -0
  24. data/spec/lib/authorities/getty/aat_spec.rb +1 -1
  25. data/spec/lib/authorities/getty/tgn_spec.rb +95 -0
  26. data/spec/lib/authorities/getty/ulan_spec.rb +97 -0
  27. data/spec/lib/authorities/loc_spec.rb +1 -1
  28. data/spec/lib/tasks/mesh.rake_spec.rb +1 -1
  29. data/spec/spec_helper.rb +4 -3
  30. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  31. metadata +35 -116
  32. data/spec/internal/Gemfile +0 -44
  33. data/spec/internal/Gemfile.lock +0 -180
  34. data/spec/internal/README.rdoc +0 -28
  35. data/spec/internal/Rakefile +0 -6
  36. data/spec/internal/app/assets/javascripts/application.js +0 -16
  37. data/spec/internal/app/assets/stylesheets/application.css +0 -15
  38. data/spec/internal/app/controllers/application_controller.rb +0 -5
  39. data/spec/internal/app/helpers/application_helper.rb +0 -2
  40. data/spec/internal/app/views/layouts/application.html.erb +0 -14
  41. data/spec/internal/bin/bundle +0 -3
  42. data/spec/internal/bin/rails +0 -4
  43. data/spec/internal/bin/rake +0 -4
  44. data/spec/internal/bin/setup +0 -29
  45. data/spec/internal/config.ru +0 -4
  46. data/spec/internal/config/application.rb +0 -26
  47. data/spec/internal/config/authorities.yml +0 -1
  48. data/spec/internal/config/authorities/authority_A.yml +0 -10
  49. data/spec/internal/config/authorities/authority_B.yml +0 -7
  50. data/spec/internal/config/authorities/authority_C.yml +0 -4
  51. data/spec/internal/config/authorities/authority_D.yml +0 -4
  52. data/spec/internal/config/authorities/states.yml +0 -101
  53. data/spec/internal/config/boot.rb +0 -3
  54. data/spec/internal/config/database.yml +0 -25
  55. data/spec/internal/config/environment.rb +0 -5
  56. data/spec/internal/config/environments/development.rb +0 -41
  57. data/spec/internal/config/environments/production.rb +0 -79
  58. data/spec/internal/config/environments/test.rb +0 -42
  59. data/spec/internal/config/initializers/assets.rb +0 -11
  60. data/spec/internal/config/initializers/backtrace_silencers.rb +0 -7
  61. data/spec/internal/config/initializers/cookies_serializer.rb +0 -3
  62. data/spec/internal/config/initializers/filter_parameter_logging.rb +0 -4
  63. data/spec/internal/config/initializers/inflections.rb +0 -16
  64. data/spec/internal/config/initializers/mime_types.rb +0 -4
  65. data/spec/internal/config/initializers/session_store.rb +0 -3
  66. data/spec/internal/config/initializers/wrap_parameters.rb +0 -14
  67. data/spec/internal/config/locales/en.yml +0 -23
  68. data/spec/internal/config/oclcts-authorities.yml +0 -24
  69. data/spec/internal/config/routes.rb +0 -58
  70. data/spec/internal/config/secrets.yml +0 -22
  71. data/spec/internal/db/development.sqlite3 +0 -0
  72. data/spec/internal/db/migrate/20150311214117_create_qa_subject_mesh_terms.qa.rb +0 -12
  73. data/spec/internal/db/migrate/20150311214118_create_qa_mesh_tree.qa.rb +0 -11
  74. data/spec/internal/db/migrate/20150311214119_add_term_lower_to_qa_subject_mesh_terms.qa.rb +0 -8
  75. data/spec/internal/db/schema.rb +0 -34
  76. data/spec/internal/db/seeds.rb +0 -7
  77. data/spec/internal/db/test.sqlite3 +0 -0
  78. data/spec/internal/lib/generators/test_app_generator.rb +0 -29
  79. data/spec/internal/log/development.log +0 -21909
  80. data/spec/internal/public/404.html +0 -67
  81. data/spec/internal/public/422.html +0 -67
  82. data/spec/internal/public/500.html +0 -66
  83. data/spec/internal/public/favicon.ico +0 -0
  84. data/spec/internal/public/robots.txt +0 -5
  85. data/spec/internal/test/test_helper.rb +0 -10
@@ -1,44 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
-
4
- # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5
- gem 'rails', '4.2.0'
6
- # Use sqlite3 as the database for Active Record
7
- gem 'sqlite3'
8
- # Use SCSS for stylesheets
9
- gem 'sass-rails', '~> 5.0'
10
- # Use Uglifier as compressor for JavaScript assets
11
- gem 'uglifier', '>= 1.3.0'
12
- # Use CoffeeScript for .coffee assets and views
13
- gem 'coffee-rails', '~> 4.1.0'
14
- # See https://github.com/sstephenson/execjs#readme for more supported runtimes
15
- # gem 'therubyracer', platforms: :ruby
16
-
17
- # Use jquery as the JavaScript library
18
- gem 'jquery-rails'
19
- # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
20
- gem 'turbolinks'
21
- # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
22
- gem 'jbuilder', '~> 2.0'
23
- # bundle exec rake doc:rails generates the API under doc/api.
24
- gem 'sdoc', '~> 0.4.0', group: :doc
25
-
26
- # Use ActiveModel has_secure_password
27
- # gem 'bcrypt', '~> 3.1.7'
28
-
29
- # Use Unicorn as the app server
30
- # gem 'unicorn'
31
-
32
- # Use Capistrano for deployment
33
- # gem 'capistrano-rails', group: :development
34
-
35
- group :development, :test do
36
- # Call 'byebug' anywhere in the code to stop execution and get a debugger console
37
- gem 'byebug'
38
-
39
- # Access an IRB console on exception pages or by using <%= console %> in views
40
- gem 'web-console', '~> 2.0'
41
- end
42
-
43
-
44
- gem 'qa', :path => '/Users/justin/workspace/questioning_authority'
@@ -1,180 +0,0 @@
1
- PATH
2
- remote: /Users/justin/workspace/questioning_authority
3
- specs:
4
- qa (0.3.0)
5
- activerecord-import
6
- deprecation
7
- nokogiri (~> 1.6.0)
8
- rails (>= 3.2.13, < 5.0)
9
- rest-client
10
-
11
- GEM
12
- remote: https://rubygems.org/
13
- specs:
14
- actionmailer (4.2.0)
15
- actionpack (= 4.2.0)
16
- actionview (= 4.2.0)
17
- activejob (= 4.2.0)
18
- mail (~> 2.5, >= 2.5.4)
19
- rails-dom-testing (~> 1.0, >= 1.0.5)
20
- actionpack (4.2.0)
21
- actionview (= 4.2.0)
22
- activesupport (= 4.2.0)
23
- rack (~> 1.6.0)
24
- rack-test (~> 0.6.2)
25
- rails-dom-testing (~> 1.0, >= 1.0.5)
26
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
27
- actionview (4.2.0)
28
- activesupport (= 4.2.0)
29
- builder (~> 3.1)
30
- erubis (~> 2.7.0)
31
- rails-dom-testing (~> 1.0, >= 1.0.5)
32
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
33
- activejob (4.2.0)
34
- activesupport (= 4.2.0)
35
- globalid (>= 0.3.0)
36
- activemodel (4.2.0)
37
- activesupport (= 4.2.0)
38
- builder (~> 3.1)
39
- activerecord (4.2.0)
40
- activemodel (= 4.2.0)
41
- activesupport (= 4.2.0)
42
- arel (~> 6.0)
43
- activerecord-import (0.7.0)
44
- activerecord (>= 3.0)
45
- activesupport (4.2.0)
46
- i18n (~> 0.7)
47
- json (~> 1.7, >= 1.7.7)
48
- minitest (~> 5.1)
49
- thread_safe (~> 0.3, >= 0.3.4)
50
- tzinfo (~> 1.1)
51
- arel (6.0.0)
52
- binding_of_caller (0.7.2)
53
- debug_inspector (>= 0.0.1)
54
- builder (3.2.2)
55
- byebug (3.5.1)
56
- columnize (~> 0.8)
57
- debugger-linecache (~> 1.2)
58
- slop (~> 3.6)
59
- coffee-rails (4.1.0)
60
- coffee-script (>= 2.2.0)
61
- railties (>= 4.0.0, < 5.0)
62
- coffee-script (2.3.0)
63
- coffee-script-source
64
- execjs
65
- coffee-script-source (1.9.1)
66
- columnize (0.9.0)
67
- debug_inspector (0.0.2)
68
- debugger-linecache (1.2.0)
69
- deprecation (0.2.2)
70
- activesupport
71
- erubis (2.7.0)
72
- execjs (2.4.0)
73
- globalid (0.3.3)
74
- activesupport (>= 4.1.0)
75
- hike (1.2.3)
76
- i18n (0.7.0)
77
- jbuilder (2.2.11)
78
- activesupport (>= 3.0.0, < 5)
79
- multi_json (~> 1.2)
80
- jquery-rails (4.0.3)
81
- rails-dom-testing (~> 1.0)
82
- railties (>= 4.2.0)
83
- thor (>= 0.14, < 2.0)
84
- json (1.8.2)
85
- loofah (2.0.1)
86
- nokogiri (>= 1.5.9)
87
- mail (2.6.3)
88
- mime-types (>= 1.16, < 3)
89
- mime-types (2.4.3)
90
- mini_portile (0.6.2)
91
- minitest (5.5.1)
92
- multi_json (1.11.0)
93
- netrc (0.10.3)
94
- nokogiri (1.6.6.2)
95
- mini_portile (~> 0.6.0)
96
- rack (1.6.0)
97
- rack-test (0.6.3)
98
- rack (>= 1.0)
99
- rails (4.2.0)
100
- actionmailer (= 4.2.0)
101
- actionpack (= 4.2.0)
102
- actionview (= 4.2.0)
103
- activejob (= 4.2.0)
104
- activemodel (= 4.2.0)
105
- activerecord (= 4.2.0)
106
- activesupport (= 4.2.0)
107
- bundler (>= 1.3.0, < 2.0)
108
- railties (= 4.2.0)
109
- sprockets-rails
110
- rails-deprecated_sanitizer (1.0.3)
111
- activesupport (>= 4.2.0.alpha)
112
- rails-dom-testing (1.0.5)
113
- activesupport (>= 4.2.0.beta, < 5.0)
114
- nokogiri (~> 1.6.0)
115
- rails-deprecated_sanitizer (>= 1.0.1)
116
- rails-html-sanitizer (1.0.2)
117
- loofah (~> 2.0)
118
- railties (4.2.0)
119
- actionpack (= 4.2.0)
120
- activesupport (= 4.2.0)
121
- rake (>= 0.8.7)
122
- thor (>= 0.18.1, < 2.0)
123
- rake (10.4.2)
124
- rdoc (4.2.0)
125
- rest-client (1.7.3)
126
- mime-types (>= 1.16, < 3.0)
127
- netrc (~> 0.7)
128
- sass (3.4.13)
129
- sass-rails (5.0.1)
130
- railties (>= 4.0.0, < 5.0)
131
- sass (~> 3.1)
132
- sprockets (>= 2.8, < 4.0)
133
- sprockets-rails (>= 2.0, < 4.0)
134
- tilt (~> 1.1)
135
- sdoc (0.4.1)
136
- json (~> 1.7, >= 1.7.7)
137
- rdoc (~> 4.0)
138
- slop (3.6.0)
139
- sprockets (2.12.3)
140
- hike (~> 1.2)
141
- multi_json (~> 1.0)
142
- rack (~> 1.0)
143
- tilt (~> 1.1, != 1.3.0)
144
- sprockets-rails (2.2.4)
145
- actionpack (>= 3.0)
146
- activesupport (>= 3.0)
147
- sprockets (>= 2.8, < 4.0)
148
- sqlite3 (1.3.10)
149
- thor (0.19.1)
150
- thread_safe (0.3.5)
151
- tilt (1.4.1)
152
- turbolinks (2.5.3)
153
- coffee-rails
154
- tzinfo (1.2.2)
155
- thread_safe (~> 0.1)
156
- uglifier (2.7.1)
157
- execjs (>= 0.3.0)
158
- json (>= 1.8.0)
159
- web-console (2.1.1)
160
- activemodel (>= 4.0)
161
- binding_of_caller (>= 0.7.2)
162
- railties (>= 4.0)
163
- sprockets-rails (>= 2.0, < 4.0)
164
-
165
- PLATFORMS
166
- ruby
167
-
168
- DEPENDENCIES
169
- byebug
170
- coffee-rails (~> 4.1.0)
171
- jbuilder (~> 2.0)
172
- jquery-rails
173
- qa!
174
- rails (= 4.2.0)
175
- sass-rails (~> 5.0)
176
- sdoc (~> 0.4.0)
177
- sqlite3
178
- turbolinks
179
- uglifier (>= 1.3.0)
180
- web-console (~> 2.0)
@@ -1,28 +0,0 @@
1
- == README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Rails.application.load_tasks
@@ -1,16 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require jquery
14
- //= require jquery_ujs
15
- //= require turbolinks
16
- //= require_tree .
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Internal</title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
4
- Rake.application.run
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'pathname'
3
-
4
- # path to your application root.
5
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
-
7
- Dir.chdir APP_ROOT do
8
- # This script is a starting point to setup your application.
9
- # Add necessary setup steps to this file:
10
-
11
- puts "== Installing dependencies =="
12
- system "gem install bundler --conservative"
13
- system "bundle check || bundle install"
14
-
15
- # puts "\n== Copying sample files =="
16
- # unless File.exist?("config/database.yml")
17
- # system "cp config/database.yml.sample config/database.yml"
18
- # end
19
-
20
- puts "\n== Preparing database =="
21
- system "bin/rake db:setup"
22
-
23
- puts "\n== Removing old logs and tempfiles =="
24
- system "rm -f log/*"
25
- system "rm -rf tmp/cache"
26
-
27
- puts "\n== Restarting application server =="
28
- system "touch tmp/restart.txt"
29
- end
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Rails.application
@@ -1,26 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- # Require the gems listed in Gemfile, including any gems
6
- # you've limited to :test, :development, or :production.
7
- Bundler.require(*Rails.groups)
8
-
9
- module Internal
10
- class Application < Rails::Application
11
- # Settings in config/environments/* take precedence over those specified here.
12
- # Application configuration should go into files in config/initializers
13
- # -- all .rb files in that directory are automatically loaded.
14
-
15
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17
- # config.time_zone = 'Central Time (US & Canada)'
18
-
19
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
21
- # config.i18n.default_locale = :de
22
-
23
- # Do not swallow errors in after_commit/after_rollback callbacks.
24
- config.active_record.raise_in_transactional_callbacks = true
25
- end
26
- end
@@ -1 +0,0 @@
1
- :local_path: "config/authorities"
@@ -1,10 +0,0 @@
1
- :terms:
2
- - :id: A1
3
- :term: Abc Term A1
4
- :active: true
5
- - :id: A2
6
- :term: Term A2
7
- :active: false
8
- - :id: A3
9
- :term: Abc Term A3
10
- :active: true
@@ -1,7 +0,0 @@
1
- terms:
2
- - id:
3
- term: Term B1
4
- - id:
5
- term: Term B2
6
- - id:
7
- term: Term B3
@@ -1,4 +0,0 @@
1
- :terms:
2
- - Term C1
3
- - Term C2
4
- - Term C3
@@ -1,4 +0,0 @@
1
- # this file is purposfully malformed so it should raise an error.
2
- :terms:
3
- -:bar: baz
4
- :biz: bzzz