bel-search-sqlite 0.4.0 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5293683a9d227710257ccc18b90d4b0b0facfe79
4
- data.tar.gz: 0ea715f709440efba97d0c0ab3c09e5dc06fef70
3
+ metadata.gz: 5d0b288c14099de5c0981922e429fcac0245b4d6
4
+ data.tar.gz: 205040f5df8000eccd882a5538501651fcd60017
5
5
  SHA512:
6
- metadata.gz: 8b75d1a25c878846f5bd52fffccccee56ab82188dc36031511841a686e9b1ef4d38cd23991e5cc2cfab55e08cf985cff0e337d01de391b01b5a7b93a008f3c81
7
- data.tar.gz: 59b6e75a6683e22cee8ca386eff2194fab4ae9bc339c75af9c349a95842b7ba8622d98f84c174a3f3b6f3f1d4154f4d8f5811854efecd73586bbb165b5e378f3
6
+ metadata.gz: 6af5cb895fccad063cf65cd6d26c05d0d63dc18a098a07ad938079f1b82a7e7ebc1bcac29c2f5c1b1a5157a0c959c6b0dfd4f41b61d409145443da2a28f1c62f
7
+ data.tar.gz: d5c795cd27fd76f41237ef9d879ab3f2360c20b73ec449dceba3e5efc6fa87cd3963b0851e22ac217dd7dc3f8293360ef9a682215eea7027c1977b9c87c99ea3
data/.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'bel-search-sqlite'
3
- spec.version = '0.4.0'
3
+ spec.version = '0.4.2'
4
4
  spec.summary = '''
5
5
  Resource search plugin for bel.rb using Sqlite FTS.
6
6
  '''.gsub(%r{^\s+}, ' ').gsub(%r{\n}, '')
@@ -38,6 +38,7 @@ Gem::Specification.new do |spec|
38
38
 
39
39
  spec.platform = 'ruby'
40
40
  spec.required_ruby_version = '>= 2.0.0'
41
+ spec.add_runtime_dependency 'bel', '~> 0.4'
41
42
  spec.add_runtime_dependency 'sequel', '4.28.0'
42
43
  spec.add_runtime_dependency 'sqlite3', '1.3.11'
43
44
  spec.post_install_message = %Q{
data/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@ All notable changes to bel-search-sqlite will be documented in this file. The cu
3
3
 
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
- ## [0.4.0][0.4.0] - 2015-12-14
6
+ ## [0.4.2][0.4.2] - 2015-12-17
7
+ ### Added
8
+ - Added the :exclude_identifier_schemes option to search for concepts where their preferred label is not an identifier. This was added to allows more human-friendly biological identifiers to be returned.
9
+ - Allow [bel.rb][bel.rb] gem dependency within version range 0.4.x < 0.5 (pessimistic version qualifier).
10
+
11
+ ## [0.4.1][0.4.1] - 2015-12-17
12
+ ### Note
13
+ - Yanked this version. Dependency on bel.rb was incorrect.
14
+
15
+ ## 0.4.0 - 2015-12-14
7
16
  ### Added
8
17
  - Added full-text-search of annotations and namespaces using SQLite. This implementation provides a solution for CRuby and JRuby using the wonderful "sequel" gem.
18
+
19
+ [0.4.2]: https://github.com/OpenBEL/bel.rb-search-sqlite/compare/0.4.0...0.4.2
@@ -31,12 +31,13 @@ module BEL::Resource::Search::Plugins
31
31
 
32
32
  # optional SQL parameters
33
33
  params = {
34
- :match => query_expression.encode('UTF-8'),
35
- :start => (options.delete(:start) || 0).to_i,
36
- :size => size,
37
- :concept_type => (concept_type ? concept_type.to_s.encode('UTF-8') : nil),
38
- :scheme_uri => (scheme_uri ? scheme_uri.to_s.encode('UTF-8') : nil),
39
- :species => (species ? species.to_s.encode('UTF-8') : nil),
34
+ :match => query_expression.encode('UTF-8'),
35
+ :start => (options.delete(:start) || 0).to_i,
36
+ :size => size,
37
+ :concept_type => (concept_type ? concept_type.to_s.encode('UTF-8') : nil),
38
+ :scheme_uri => (scheme_uri ? scheme_uri.to_s.encode('UTF-8') : nil),
39
+ :species => (species ? species.to_s.encode('UTF-8') : nil),
40
+ :exclude_identifier_schemes => options.delete(:exclude_identifier_schemes)
40
41
  }
41
42
 
42
43
  query = QUERY_TEMPLATE.result(binding)
@@ -12,6 +12,10 @@ WHERE
12
12
 
13
13
  <% end %>
14
14
  <% end %>
15
+
16
+ <% if params[:exclude_identifier_schemes] %>
17
+ AND identifier != pref_label
18
+ <% end %>
15
19
  ORDER BY
16
20
  length(pref_label) ASC
17
21
  LIMIT :size
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bel-search-sqlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Bargnesi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-14 00:00:00.000000000 Z
11
+ date: 2015-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '0.4'
19
+ name: bel
20
+ prerelease: false
21
+ type: :runtime
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.4'
13
27
  - !ruby/object:Gem::Dependency
14
28
  requirement: !ruby/object:Gem::Requirement
15
29
  requirements:
@@ -112,3 +126,4 @@ signing_key:
112
126
  specification_version: 4
113
127
  summary: Resource search plugin for bel.rb using Sqlite FTS.
114
128
  test_files: []
129
+ has_rdoc: