qa 0.10.0 → 0.10.1
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/config/initializers/authorities.rb +0 -2
- data/lib/qa/authorities/local/table_based_authority.rb +10 -7
- data/lib/qa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87d95a0b1bdcbe0f16ac1ab1a5df3c0f3f5c84d7
|
4
|
+
data.tar.gz: d05ff39f1e7cf5f3803d79c8633cae5269a8746f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0786240f76d29bb086fdd5b196f39761986f89aaa03a3f61116ac55e59ae8206607c8fc5c5cc2ad30b89d15fc39606f52af301ca50f670307404c257f9f2bcfd
|
7
|
+
data.tar.gz: 92f2bb8cfe4d4c6fd16e01a66d8fdd9c27d488786844ff96b409b37507291ff4f349c2e151d98e0e81eaf12ccc652c7f3569fffcbbd4d452f82ac83fe2f3f204
|
@@ -1,19 +1,22 @@
|
|
1
1
|
module Qa::Authorities
|
2
2
|
class Local::TableBasedAuthority < Base
|
3
3
|
def self.check_for_index
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
"
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
@checked_for_index ||= begin
|
5
|
+
conn = ActiveRecord::Base.connection
|
6
|
+
if table_or_view_exists? && !conn.indexes('local_authority_entries').find { |i| i.name == 'index_local_authority_entries_on_lower_label' }
|
7
|
+
Rails.logger.error "You've installed local authority tables, but you haven't indexed the label. Rails doesn't support functional indexes in migrations, so you'll have to add this manually:\n" \
|
8
|
+
"CREATE INDEX \"index_qa_local_authority_entries_on_lower_label\" ON \"qa_local_authority_entries\" (local_authority_id, lower(label))\n" \
|
9
|
+
" OR on Sqlite: \n" \
|
10
|
+
"CREATE INDEX \"index_qa_local_authority_entries_on_lower_label\" ON \"qa_local_authority_entries\" (local_authority_id, label collate nocase)\n" \
|
11
|
+
" OR for MySQL use the MSQLTableBasedAuthority instead, since mysql does not support functional indexes."
|
12
|
+
end
|
11
13
|
end
|
12
14
|
end
|
13
15
|
|
14
16
|
attr_reader :subauthority
|
15
17
|
|
16
18
|
def initialize(subauthority)
|
19
|
+
self.class.check_for_index
|
17
20
|
@subauthority = subauthority
|
18
21
|
end
|
19
22
|
|
data/lib/qa/version.rb
CHANGED
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.10.
|
4
|
+
version: 0.10.1
|
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: 2016-
|
18
|
+
date: 2016-09-27 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rails
|