bel-search-sqlite 0.4.0.beta1-java → 0.4.0.beta2-java

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: 04b16da767d542c5bdfcbabd6b12b451796e2f3a
4
- data.tar.gz: d2dada927e19145955d22064d8b3a2a29c985a8f
3
+ metadata.gz: 3328735db5c7e2e07c03ffcab951012ec7ee5aa0
4
+ data.tar.gz: 72457e66d8f68af76a8207d89012c63372c75b56
5
5
  SHA512:
6
- metadata.gz: a6d37c04243d4874818a0533a23919935778567ec47e7a293cfd72ba468ea428c639c1a6e4a9a3936d628746e920214f62c7299b98946e8d9289b2465014a3d9
7
- data.tar.gz: 26a2db93168a98e1107e48ac591c5a0009497297d19f356fc5b4c972f581be210769e5b5ac5cc0c8e76c5b7356685a355b90a67377ab5032484b2abb004222ae
6
+ metadata.gz: 4295e30e87d3f067d1d40b2c7a698dbec114f1cf2c49ceafeb6cdf06654024ff8f6272128e7295a95171e7a70cb7d4937478a85e64bde32ce235979fe1d74a24
7
+ data.tar.gz: 3c88cb2e0596506bdf730fe0d42c51c89f42822d925c46eba0195a48b4e9d7345240936e86e963cd6a61c0c5791e5031a0618893366b5648882fd5270b3ce572
data/.gemspec-java 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.beta1'
3
+ spec.version = '0.4.0.beta2'
4
4
  spec.summary = '''
5
5
  Resource search plugin for bel.rb using Sqlite FTS.
6
6
  '''.gsub(%r{^\s+}, ' ').gsub(%r{\n}, '')
data/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@ 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.1.0][0.1.0] - 2015-11-19
6
+ ## [0.4.0][0.4.0] - 2015-12-09
7
7
  ### Fixed
8
8
  ### Changed
9
9
  ### Added
@@ -24,23 +24,23 @@ module BEL::Resource::Search::Plugins
24
24
  # @see BEL::Resource::Search::API#search
25
25
  def search(query_expression, concept_type = nil, scheme_uri = nil, species = nil, options = {})
26
26
  # required SQL parameters
27
- match = query_expression.encode('UTF-8')
28
- start = (options.delete(:start) || 0).to_i
29
- size = options.delete(:size) || -1
27
+ size = options.delete(:size) || -1
30
28
  if size.to_i.zero?
31
29
  fail ArgumentError.new(":size is zero")
32
30
  end
33
31
 
34
32
  # optional SQL parameters
35
- options = {
33
+ params = {
34
+ :match => query_expression.encode('UTF-8'),
35
+ :start => (options.delete(:start) || 0).to_i,
36
+ :size => size,
36
37
  :concept_type => (concept_type ? concept_type.to_s.encode('UTF-8') : nil),
37
38
  :scheme_uri => (scheme_uri ? scheme_uri.to_s.encode('UTF-8') : nil),
38
39
  :species => (species ? species.to_s.encode('UTF-8') : nil),
39
40
  }
40
- options.keep_if { |key, value| value != nil }
41
41
 
42
42
  query = QUERY_TEMPLATE.result(binding)
43
- enum = @db.fetch(query, :match => match, :start => start, :size => size)
43
+ enum = @db.fetch(query, params)
44
44
 
45
45
  if enum.respond_to? :lazy
46
46
  enum = enum.lazy
@@ -6,7 +6,7 @@ FROM
6
6
  WHERE
7
7
  concepts_fts MATCH :match
8
8
  <% [:concept_type, :scheme_type, :scheme_uri, :species].each do |column| %>
9
- <% if options[column] %>
9
+ <% if params[column] %>
10
10
 
11
11
  AND <%= column %> = <%= ":#{column}" %>
12
12
 
metadata CHANGED
@@ -1,46 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bel-search-sqlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.beta1
4
+ version: 0.4.0.beta2
5
5
  platform: java
6
6
  authors:
7
7
  - Anthony Bargnesi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-01 00:00:00.000000000 Z
11
+ date: 2015-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: sequel
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - '='
18
17
  - !ruby/object:Gem::Version
19
18
  version: 4.28.0
20
- type: :runtime
19
+ name: sequel
21
20
  prerelease: false
21
+ type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.28.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: jdbc-sqlite3
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - '='
32
31
  - !ruby/object:Gem::Version
33
32
  version: 3.8.11.2
34
- type: :runtime
33
+ name: jdbc-sqlite3
35
34
  prerelease: false
35
+ type: :runtime
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.8.11.2
41
- description: " A resource search plugin for bel.rb that uses FTS tables in Sqlite
42
- to search annotation and namespace values. Built to run on JRuby to take advantage
43
- of JDBC. "
41
+ description: " A resource search plugin for bel.rb that uses FTS tables in Sqlite\
42
+ \ to search annotation and namespace values. Built to run on JRuby to take advantage\
43
+ \ of JDBC. "
44
44
  email:
45
45
  - abargnesi@selventa.com
46
46
  executables: []
@@ -106,10 +106,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: 1.3.1
108
108
  requirements: []
109
- rubyforge_project:
110
- rubygems_version: 2.4.5.1
111
- signing_key:
109
+ rubyforge_project:
110
+ rubygems_version: 2.4.8
111
+ signing_key:
112
112
  specification_version: 4
113
113
  summary: Resource search plugin for bel.rb using Sqlite FTS.
114
114
  test_files: []
115
- has_rdoc:
115
+ has_rdoc: