qa 0.11.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -6
- data/lib/generators/qa/local/tables/mysql/mysql_generator.rb +2 -2
- data/lib/generators/qa/local/tables/tables_generator.rb +4 -5
- data/lib/qa/version.rb +1 -1
- data/spec/spec_helper.rb +3 -2
- metadata +43 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaf2ea321ec50c2790d269dee43856176fcc22e1
|
4
|
+
data.tar.gz: 18d617298ba9675024a9003c2f4183040cc535c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cec86fa96e3c2c767eeb8b7a7866a3269d975659bc872f5acacde03448385584351420b3c4c6f8f4a6275b8b9b7a8cf9259b027e8c1212a286877ceabcdf156d
|
7
|
+
data.tar.gz: 3a1d18ec438ac477ab6b22a4f08db1b14dc83d8b348a36d754530f1ba5b799747b0a5ffea9b3f8864fd131289e917d76de45b2aa7685f96e350dbee6aab863ee
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Questioning Authority
|
2
2
|
|
3
3
|
[](https://travis-ci.org/projecthydra-labs/questioning_authority) [](http://badge.fury.io/rb/qa)
|
4
|
+
[](https://coveralls.io/github/projecthydra-labs/questioning_authority?branch=master)
|
4
5
|
|
5
6
|
You should question your authorities.
|
6
7
|
|
@@ -186,7 +187,6 @@ module Qa::Authorities
|
|
186
187
|
end
|
187
188
|
```
|
188
189
|
|
189
|
-
|
190
190
|
### Local Sub-Authorities
|
191
191
|
|
192
192
|
#### In YAML files
|
@@ -239,7 +239,6 @@ using the file's name as the sub-authority. For example, if I create `foo.yml`,
|
|
239
239
|
term: Term 2
|
240
240
|
active: false
|
241
241
|
|
242
|
-
|
243
242
|
#### Adding your own local sub-authorities
|
244
243
|
|
245
244
|
If you'd like to add your own local authority that isn't necessarily backed by yaml, create an initializer and tell the local authority about your custom sub-authority:
|
@@ -261,8 +260,7 @@ Run the generator to install configuration files and an example authority.
|
|
261
260
|
rails generate qa:local:tables
|
262
261
|
rake db:migrate
|
263
262
|
|
264
|
-
|
265
|
-
**Note: If you are using MYSQL as your database use the MSQL database generator instead**
|
263
|
+
**Note: If you are using MYSQL as your database use the MSQL database generator instead**
|
266
264
|
|
267
265
|
rails generate qa:local:tables:mysql
|
268
266
|
rake db:migrate
|
@@ -282,13 +280,13 @@ Unfortunately, Rails doesn't have a mechnism for adding functional indexes to ta
|
|
282
280
|
CREATE INDEX "index_qa_local_authority_entries_on_lower_label" ON
|
283
281
|
"qa_local_authority_entries" (local_authority_id, lower(label))
|
284
282
|
|
285
|
-
**Note: If you are using MYSQL as your database and used the MSQL database gerator we tried to execute the correct SQL to create the virtual fields and indexes for you**
|
283
|
+
**Note: If you are using MYSQL as your database and used the MSQL database gerator we tried to execute the correct SQL to create the virtual fields and indexes for you**
|
286
284
|
|
287
285
|
Finall you want register your authority in an initializer:
|
288
286
|
|
289
287
|
Qa::Authorities::Local.register_subauthority('languages', 'Qa::Authorities::Local::TableBasedAuthority')
|
290
288
|
|
291
|
-
**Note: If you are using MYSQL as your database and used the MSQL database gerator register the MysqlTableBasedAuthority instead of the TableBasedAuthority**
|
289
|
+
**Note: If you are using MYSQL as your database and used the MSQL database gerator register the MysqlTableBasedAuthority instead of the TableBasedAuthority**
|
292
290
|
|
293
291
|
Then you can search for
|
294
292
|
|
@@ -18,8 +18,8 @@ module Qa::Local
|
|
18
18
|
.reject { |name| !name.include?('create_qa_local_authority_entries') }.first
|
19
19
|
migration_file = File.join('db/migrate', migration_file)
|
20
20
|
gsub_file migration_file,
|
21
|
-
|
22
|
-
't.
|
21
|
+
/t\.references :local_authority.*/,
|
22
|
+
't.references :local_authority, foreign_key: { to_table: :qa_local_authorities }, index: true'
|
23
23
|
insert_into_file migration_file, after: "add_index :qa_local_authority_entries, :uri, unique: true" do
|
24
24
|
"\n add_foreign_key :qa_local_authority_entries, :qa_local_authorities, column: :local_authority_id\n" \
|
25
25
|
" if ActiveRecord::Base.connection.instance_of? ActiveRecord::ConnectionAdapters::Mysql2Adapter\n" \
|
@@ -16,13 +16,12 @@ module Qa::Local
|
|
16
16
|
.reject { |name| !name.include?('create_qa_local_authority_entries') }.first
|
17
17
|
migration_file = File.join('db/migrate', migration_file)
|
18
18
|
gsub_file migration_file,
|
19
|
-
|
19
|
+
/t\.references :local_authority.*/,
|
20
20
|
't.references :local_authority, foreign_key: { to_table: :qa_local_authorities }, index: true'
|
21
|
-
|
22
21
|
message = "Rails doesn't support functional indexes in migrations, so you'll have to add this manually:\n" \
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
"CREATE INDEX \"index_qa_local_authority_entries_on_lower_label\" ON \"qa_local_authority_entries\" (local_authority_id, lower(label))\n" \
|
23
|
+
" OR on Sqlite: \n" \
|
24
|
+
"CREATE INDEX \"index_qa_local_authority_entries_on_lower_label\" ON \"qa_local_authority_entries\" (local_authority_id, label collate nocase)\n"
|
26
25
|
say_status("info", message, :yellow)
|
27
26
|
end
|
28
27
|
end
|
data/lib/qa/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,15 +1,16 @@
|
|
1
|
-
|
2
1
|
require 'linkeddata'
|
3
|
-
|
4
2
|
require 'engine_cart'
|
5
3
|
require 'simplecov'
|
4
|
+
require 'coveralls'
|
6
5
|
require 'byebug' unless ENV['TRAVIS']
|
7
6
|
|
8
7
|
ENV["RAILS_ENV"] ||= "test"
|
9
8
|
|
9
|
+
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
|
10
10
|
SimpleCov.start "rails"
|
11
11
|
SimpleCov.command_name "spec"
|
12
12
|
EngineCart.load_application!
|
13
|
+
Coveralls.wear!
|
13
14
|
|
14
15
|
require 'rspec/rails'
|
15
16
|
require 'webmock/rspec'
|
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.
|
4
|
+
version: 1.0.0
|
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: 2017-03-
|
18
|
+
date: 2017-03-22 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rails
|
@@ -362,58 +362,58 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
362
362
|
version: '0'
|
363
363
|
requirements: []
|
364
364
|
rubyforge_project:
|
365
|
-
rubygems_version: 2.6.
|
365
|
+
rubygems_version: 2.6.11
|
366
366
|
signing_key:
|
367
367
|
specification_version: 4
|
368
368
|
summary: You should question your authorities.
|
369
369
|
test_files:
|
370
|
-
- spec/lib/authorities/mysql_table_based_authority_spec.rb
|
371
|
-
- spec/lib/authorities/oclcts_spec.rb
|
372
|
-
- spec/lib/authorities/space_fix_encoder.rb
|
373
|
-
- spec/lib/authorities/assign_fast_spec.rb
|
374
|
-
- spec/lib/authorities/table_based_authority_spec.rb
|
375
|
-
- spec/lib/authorities/local_spec.rb
|
376
|
-
- spec/lib/authorities/mesh_spec.rb
|
377
|
-
- spec/lib/authorities/geonames_spec.rb
|
378
|
-
- spec/lib/authorities/base_spec.rb
|
379
|
-
- spec/lib/authorities/file_based_authority_spec.rb
|
380
|
-
- spec/lib/authorities/getty/ulan_spec.rb
|
381
|
-
- spec/lib/authorities/getty/tgn_spec.rb
|
382
|
-
- spec/lib/authorities/getty/aat_spec.rb
|
383
|
-
- spec/lib/authorities/tgnlang_spec.rb
|
384
|
-
- spec/lib/authorities/loc_spec.rb
|
385
|
-
- spec/lib/authorities/getty_spec.rb
|
386
|
-
- spec/lib/services/rdf_authority_parser_spec.rb
|
387
|
-
- spec/lib/tasks/mesh.rake_spec.rb
|
388
|
-
- spec/lib/authorities_loc_subauthorities.rb
|
389
|
-
- spec/lib/mesh_data_parser_spec.rb
|
390
|
-
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
391
|
-
- spec/models/subject_mesh_term_spec.rb
|
392
|
-
- spec/routing/route_spec.rb
|
393
370
|
- spec/controllers/terms_controller_spec.rb
|
394
|
-
- spec/
|
395
|
-
- spec/fixtures/
|
396
|
-
- spec/fixtures/
|
371
|
+
- spec/fixtures/tgn-response.txt
|
372
|
+
- spec/fixtures/assign-fast-topical-result.json
|
373
|
+
- spec/fixtures/loc-subject-find-response.txt
|
397
374
|
- spec/fixtures/loc-names-response.txt
|
398
375
|
- spec/fixtures/mesh.txt
|
399
|
-
- spec/fixtures/
|
376
|
+
- spec/fixtures/aat-response.txt
|
400
377
|
- spec/fixtures/loc-response.txt
|
401
|
-
- spec/fixtures/
|
378
|
+
- spec/fixtures/geonames-response.json
|
379
|
+
- spec/fixtures/oclcts-response-mesh-3.txt
|
380
|
+
- spec/fixtures/assign-fast-oneresult.json
|
381
|
+
- spec/fixtures/getty-aat-find-response.json
|
382
|
+
- spec/fixtures/assign-fast-noheader.json
|
402
383
|
- spec/fixtures/authorities/authority_C.yml
|
384
|
+
- spec/fixtures/authorities/authority_A.yml
|
403
385
|
- spec/fixtures/authorities/authority_B.yml
|
404
386
|
- spec/fixtures/authorities/authority_D.yml
|
405
|
-
- spec/fixtures/
|
406
|
-
- spec/fixtures/aat-response.txt
|
407
|
-
- spec/fixtures/assign-fast-topical-result.json
|
408
|
-
- spec/fixtures/geonames-response.json
|
387
|
+
- spec/fixtures/oclcts-response-mesh-2.txt
|
409
388
|
- spec/fixtures/lexvo_snippet.rdf
|
410
|
-
- spec/fixtures/
|
411
|
-
- spec/fixtures/tgn-response.txt
|
412
|
-
- spec/fixtures/geonames-find-response.json
|
389
|
+
- spec/fixtures/assign-fast-noresults.json
|
413
390
|
- spec/fixtures/getty-tgn-find-response.json
|
391
|
+
- spec/fixtures/loc-subjects-response.txt
|
392
|
+
- spec/fixtures/oclcts-response-mesh-1.txt
|
393
|
+
- spec/fixtures/ulan-response.txt
|
394
|
+
- spec/fixtures/geonames-find-response.json
|
414
395
|
- spec/fixtures/getty-ulan-find-response.json
|
415
|
-
- spec/
|
416
|
-
- spec/
|
417
|
-
- spec/
|
418
|
-
- spec/
|
419
|
-
- spec/
|
396
|
+
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
397
|
+
- spec/routing/route_spec.rb
|
398
|
+
- spec/models/subject_mesh_term_spec.rb
|
399
|
+
- spec/lib/authorities_loc_subauthorities.rb
|
400
|
+
- spec/lib/tasks/mesh.rake_spec.rb
|
401
|
+
- spec/lib/services/rdf_authority_parser_spec.rb
|
402
|
+
- spec/lib/authorities/mysql_table_based_authority_spec.rb
|
403
|
+
- spec/lib/authorities/geonames_spec.rb
|
404
|
+
- spec/lib/authorities/table_based_authority_spec.rb
|
405
|
+
- spec/lib/authorities/loc_spec.rb
|
406
|
+
- spec/lib/authorities/assign_fast_spec.rb
|
407
|
+
- spec/lib/authorities/local_spec.rb
|
408
|
+
- spec/lib/authorities/space_fix_encoder.rb
|
409
|
+
- spec/lib/authorities/file_based_authority_spec.rb
|
410
|
+
- spec/lib/authorities/getty/aat_spec.rb
|
411
|
+
- spec/lib/authorities/getty/ulan_spec.rb
|
412
|
+
- spec/lib/authorities/getty/tgn_spec.rb
|
413
|
+
- spec/lib/authorities/tgnlang_spec.rb
|
414
|
+
- spec/lib/authorities/base_spec.rb
|
415
|
+
- spec/lib/authorities/mesh_spec.rb
|
416
|
+
- spec/lib/authorities/getty_spec.rb
|
417
|
+
- spec/lib/authorities/oclcts_spec.rb
|
418
|
+
- spec/lib/mesh_data_parser_spec.rb
|
419
|
+
- spec/spec_helper.rb
|