bel-search-sqlite 1.0.0-java → 1.1.0-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fb551a0b2a1ab8b082820e06c5f838e58c49c8c
4
- data.tar.gz: 0c7b801bebe545734d65a7085dfbb939e318204b
3
+ metadata.gz: 23b855e444ebbc11c7ff06aad7e858d0c09a3bfd
4
+ data.tar.gz: f189214394a8e0c361179c5ea2b317093aceea02
5
5
  SHA512:
6
- metadata.gz: 15e8fb14a5c79667815931b23ca3f98030df748555dff62fc8f802d65ca18522ac0824b6e4bca0b53147006ffbc0658fe897570cf7d9427f87da938007d71e5b
7
- data.tar.gz: 762a734d8db5edb0f07b64da9346470d329e132a8f4cfe1ec2dc522e8cbb3871a7c35abff5b45bd26bbf5b2fc576aefa00d4e5e28b2a515b4ce78f121aa2412b
6
+ metadata.gz: b4ff4ca7d8ae9603c4a6683f9809216fec399660ed3729f20e0da6e942da72daca69e2e2851ede9f5a691bf7a6521e95a6cc442a193fb0a5ecc62c929305b73b
7
+ data.tar.gz: 49fa6505342a6a3698c3cf093fc48c987b16264cd7f2e2dc6444373e5d51f9b52f5c1a0fbdb0d76d31d69153018b0a9d2a42bc57c9de4f5e724e0a1205812059
@@ -1,18 +1,20 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'bel-search-sqlite'
3
- spec.version = '1.0.0'
3
+ spec.version = File.read(File.join(
4
+ File.expand_path(File.dirname(__FILE__)),
5
+ 'VERSION'))
4
6
  spec.summary = '''
5
7
  Resource search plugin for bel.rb using Sqlite FTS.
6
8
  '''.gsub(%r{^\s+}, ' ').gsub(%r{\n}, '')
7
9
  spec.description = '''
8
10
  A resource search plugin for bel.rb that uses FTS tables in
9
- Sqlite to search annotation and namespace values. Built to
10
- run on JRuby to take advantage of JDBC.
11
+ Sqlite to search annotation and namespace values.
11
12
  '''.gsub(%r{^\s+}, ' ').gsub(%r{\n}, '')
12
13
  spec.license = 'Apache-2.0'
13
14
  spec.authors = [
14
15
  'Anthony Bargnesi',
15
16
  ]
17
+ spec.date = %q{2017-01-13}
16
18
  spec.email = [
17
19
  'abargnesi@selventa.com',
18
20
  ]
@@ -36,21 +38,28 @@ Gem::Specification.new do |spec|
36
38
  'README.md',
37
39
  ]
38
40
 
39
- spec.platform = 'java'
40
- spec.required_ruby_version = '>= 2.0.0'
41
- spec.add_runtime_dependency 'bel', '~> 1.0.0'
42
- spec.add_runtime_dependency 'sequel', '4.28.0'
43
- spec.add_runtime_dependency 'jdbc-sqlite3', '3.8.11.2'
41
+ if RUBY_ENGINE =~ /jruby/
42
+ # dependencies when building for JRuby (Java based)
43
+ spec.platform = 'java'
44
+ spec.required_ruby_version = '>= 2.0.0'
45
+ spec.add_runtime_dependency 'bel', '~> 1.1.0'
46
+ spec.add_runtime_dependency 'sequel', '4.28.0'
47
+ spec.add_runtime_dependency 'jdbc-sqlite3', '3.8.11.2'
48
+ else
49
+ # dependencies when building for all other platforms (C based)
50
+ spec.platform = 'ruby'
51
+ spec.required_ruby_version = '>= 2.0.0'
52
+ spec.add_runtime_dependency 'bel', '~> 1.1.0'
53
+ spec.add_runtime_dependency 'sequel', '4.28.0'
54
+ spec.add_runtime_dependency 'sqlite3', '1.3.11'
55
+ end
56
+
44
57
  spec.post_install_message = %Q{
45
58
  ******************************
46
59
  * bel-search-sqlite plugin *
47
60
  ******************************
48
61
  Thank you for installing the bel-search-sqlite plugin to bel.rb.
49
62
 
50
- This plugin is built to run on JRuby and uses JDBC to access a
51
- SQLite database for full-text search of annotation and namespace
52
- values.
53
-
54
63
  To verify the bel-search-sqlite plugin can be used by bel.rb
55
64
  execute the bel.rb command:
56
65
 
@@ -64,8 +73,7 @@ To access this within bel.rb execute the following ruby code:
64
73
  :database => 'resources.db'
65
74
  )
66
75
 
67
- }
68
-
76
+ }
69
77
  end
70
78
  # vim: ft=ruby ts=2 sw=2:
71
79
  # encoding: utf-8
data/README.md CHANGED
@@ -25,7 +25,7 @@ How can I use this?
25
25
  bel.rb provides an [approach to plugins](https://github.com/OpenBEL/bel.rb/wiki/Plugins-in-bel.rb) that is meant to be uncomplicated. The following steps will get you started:
26
26
 
27
27
  - Build gem with `gem build .gemspec` and install with `gem install bel-search-sqlite-1.0.0.gem`.
28
- - on JRuby, build gem with `gem build .gemspec-java` and install with `gem install bel-search-sqlite-1.0.0-java.gem`.
28
+ - On JRuby, build gem with `gem build .gemspec-java` and install with `gem install bel-search-sqlite-1.0.0-java.gem`.
29
29
  - Now you have this plugin installed and ready for use in bel.rb!
30
30
  - With bel.rb installed run the command `bel plugins` to list available plugins.
31
31
 
@@ -47,3 +47,42 @@ search_plugin.create_search(:database_file => 'resources.db')
47
47
  ```
48
48
 
49
49
  - Enjoy FTS goodness with Sqlite!
50
+
51
+ ## Development
52
+
53
+ ### branches
54
+
55
+ - master branch
56
+ - Contains stable code. Releases are created from this branch using a tag (e.g. `MAJOR.MINOR.PATCH`).
57
+
58
+ - next branch
59
+ - Contains unstable code. Commits should be merged into master after it stabilizes.
60
+
61
+ ### releases
62
+
63
+ Releases of *bel-search-sqlite* should follow these steps:
64
+
65
+ 1. Update the version in the `VERSION` file.
66
+
67
+ 2. Add changes for this version to the `CHANGELOG` file. This file is modelled after http://keepachangelog.com/.
68
+
69
+ 3. Push the changes for `VERSION` and `CHANGELOG` on the master branch.
70
+
71
+ 4. Ensure the *master* branch has all of the required changes.
72
+
73
+ 5. Create a git tag, named after the version, on the *master* branch. Push this tag to GitHub.
74
+
75
+ 6. Create the Ruby and Java RubyGem for *bel-search-sqlite*.
76
+
77
+ `gem build .gemspec`
78
+
79
+ `gem build .gemspec-java`
80
+
81
+ 7. Create a release on GitHub for this version and attach the gem files.
82
+
83
+ 8. Push gems to RubyGems.
84
+
85
+ `gem push bel-search-sqlite-VERSION.gem`
86
+
87
+ `gem push bel-search-sqlite-VERSION-java.gem`
88
+
@@ -37,7 +37,8 @@ module BEL::Resource::Search::Plugins
37
37
  :concept_type => (concept_type ? concept_type.to_s.encode('UTF-8') : nil),
38
38
  :scheme_uri => (scheme_uri ? scheme_uri.to_s.encode('UTF-8') : nil),
39
39
  :species => (species ? species.to_s.encode('UTF-8') : nil),
40
- :exclude_identifier_schemes => options.delete(:exclude_identifier_schemes)
40
+ :exclude_identifier_schemes => options.delete(:exclude_identifier_schemes),
41
+ :exact_match => options.delete(:exact_match)
41
42
  }
42
43
 
43
44
  query = QUERY_TEMPLATE.result(binding)
@@ -16,6 +16,11 @@ WHERE
16
16
  <% if params[:exclude_identifier_schemes] %>
17
17
  AND identifier != pref_label
18
18
  <% end %>
19
+
20
+ <% if params[:exact_match] %>
21
+ AND pref_label = :match COLLATE NOCASE
22
+ <% end %>
23
+
19
24
  ORDER BY
20
25
  length(pref_label) ASC
21
26
  LIMIT :size
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bel-search-sqlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: java
6
6
  authors:
7
7
  - Anthony Bargnesi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-08 00:00:00.000000000 Z
11
+ date: 2017-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 1.0.0
18
+ version: 1.1.0
19
19
  name: bel
20
20
  prerelease: false
21
21
  type: :runtime
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0
26
+ version: 1.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
@@ -53,15 +53,14 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: 3.8.11.2
55
55
  description: " A resource search plugin for bel.rb that uses FTS tables in Sqlite\
56
- \ to search annotation and namespace values. Built to run on JRuby to take advantage\
57
- \ of JDBC. "
56
+ \ to search annotation and namespace values. "
58
57
  email:
59
58
  - abargnesi@selventa.com
60
59
  executables: []
61
60
  extensions: []
62
61
  extra_rdoc_files: []
63
62
  files:
64
- - ".gemspec-java"
63
+ - ".gemspec"
65
64
  - CHANGELOG.md
66
65
  - INSTALL.md
67
66
  - LICENSE
@@ -73,30 +72,13 @@ homepage: https://github.com/OpenBEL/bel.rb-search-plugin
73
72
  licenses:
74
73
  - Apache-2.0
75
74
  metadata: {}
76
- post_install_message: |2+
77
-
78
- ******************************
79
- * bel-search-sqlite plugin *
80
- ******************************
81
- Thank you for installing the bel-search-sqlite plugin to bel.rb.
82
-
83
- This plugin is built to run on JRuby and uses JDBC to access a
84
- SQLite database for full-text search of annotation and namespace
85
- values.
86
-
87
- To verify the bel-search-sqlite plugin can be used by bel.rb
88
- execute the bel.rb command:
89
-
90
- bel plugins --list
91
-
92
- To access this within bel.rb execute the following ruby code:
93
-
94
- require 'bel'
95
- search_plugin = BEL::Resource::Search.plugins[:sqlite]
96
- search_plugin.create_search(
97
- :database => 'resources.db'
98
- )
99
-
75
+ post_install_message: "\n******************************\n* bel-search-sqlite plugin\
76
+ \ *\n******************************\nThank you for installing the bel-search-sqlite\
77
+ \ plugin to bel.rb.\n\nTo verify the bel-search-sqlite plugin can be used by bel.rb\n\
78
+ execute the bel.rb command:\n\n bel plugins --list\n\nTo access this within bel.rb\
79
+ \ execute the following ruby code:\n\n require 'bel'\n search_plugin = BEL::Resource::Search.plugins[:sqlite]\n\
80
+ \ search_plugin.create_search(\n :database => 'resources.db'\n )\n\n\
81
+ \ "
100
82
  rdoc_options:
101
83
  - "--title"
102
84
  - BEL Resource Search - Sqlite
@@ -121,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
103
  version: '0'
122
104
  requirements: []
123
105
  rubyforge_project:
124
- rubygems_version: 2.6.4
106
+ rubygems_version: 2.6.8
125
107
  signing_key:
126
108
  specification_version: 4
127
109
  summary: Resource search plugin for bel.rb using Sqlite FTS.