bel-search-sqlite 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemspec +22 -13
- data/README.md +40 -1
- data/lib/bel/resource/search/plugins/sqlite/sqlite3.rb +2 -1
- data/lib/bel/resource/search/plugins/sqlite/sqlite3_template.erb +5 -0
- metadata +22 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4cf76a801e86cba6b4a8ee3fdb71f70b80c1dec
|
4
|
+
data.tar.gz: 157bb2131975e16e137236497ecbdc3ea893ba73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18ea7620b9c44fa4d3aff5645f06239d4ad256ac3fc7243011a6e7c1c314fe1f05fe5bb4d4a77cde55a858d956cda1b50bbd7b8c591dd22ed3534e4f1ada5832
|
7
|
+
data.tar.gz: f7636bd3ac135284dd5a12184bdb9d3b38b617233b583b0fc5dd83e64787e02cc0105fc6057f7e43210e055e5da0165e63456ee53a3eeb98c736562d078ef0d7
|
data/.gemspec
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'bel-search-sqlite'
|
3
|
-
spec.version =
|
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.
|
10
|
-
run on MRI to take advantage of C extensions.
|
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
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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 Ruby and uses sqlite3 + C
|
51
|
-
extensions to access a SQLite database for full-text search of
|
52
|
-
annotation and namespace 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,7 +73,7 @@ To access this within bel.rb execute the following ruby code:
|
|
64
73
|
:database => 'resources.db'
|
65
74
|
)
|
66
75
|
|
67
|
-
}
|
76
|
+
}
|
68
77
|
end
|
69
78
|
# vim: ft=ruby ts=2 sw=2:
|
70
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
|
-
-
|
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)
|
metadata
CHANGED
@@ -1,60 +1,59 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bel-search-sqlite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Bargnesi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: bel
|
14
15
|
requirement: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - "~>"
|
17
18
|
- !ruby/object:Gem::Version
|
18
|
-
version: 1.
|
19
|
-
name: bel
|
20
|
-
prerelease: false
|
19
|
+
version: 1.1.0
|
21
20
|
type: :runtime
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
+
name: sequel
|
28
29
|
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - '='
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: 4.28.0
|
33
|
-
name: sequel
|
34
|
-
prerelease: false
|
35
34
|
type: :runtime
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 4.28.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
+
name: sqlite3
|
42
43
|
requirement: !ruby/object:Gem::Requirement
|
43
44
|
requirements:
|
44
45
|
- - '='
|
45
46
|
- !ruby/object:Gem::Version
|
46
47
|
version: 1.3.11
|
47
|
-
name: sqlite3
|
48
|
-
prerelease: false
|
49
48
|
type: :runtime
|
49
|
+
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.3.11
|
55
|
-
description: " A resource search plugin for bel.rb that uses FTS tables in Sqlite
|
56
|
-
|
57
|
-
\ of C extensions. "
|
55
|
+
description: " A resource search plugin for bel.rb that uses FTS tables in Sqlite
|
56
|
+
to search annotation and namespace values. "
|
58
57
|
email:
|
59
58
|
- abargnesi@selventa.com
|
60
59
|
executables: []
|
@@ -73,30 +72,12 @@ homepage: https://github.com/OpenBEL/bel.rb-search-plugin
|
|
73
72
|
licenses:
|
74
73
|
- Apache-2.0
|
75
74
|
metadata: {}
|
76
|
-
post_install_message:
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
This plugin is built to run on Ruby and uses sqlite3 + C
|
84
|
-
extensions to access a SQLite database for full-text search of
|
85
|
-
annotation and namespace 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\nexecute
|
78
|
+
the bel.rb command:\n\n bel plugins --list\n\nTo access this within bel.rb execute
|
79
|
+
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 "
|
100
81
|
rdoc_options:
|
101
82
|
- "--title"
|
102
83
|
- BEL Resource Search - Sqlite
|
@@ -120,9 +101,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
101
|
- !ruby/object:Gem::Version
|
121
102
|
version: '0'
|
122
103
|
requirements: []
|
123
|
-
rubyforge_project:
|
124
|
-
rubygems_version: 2.6.
|
125
|
-
signing_key:
|
104
|
+
rubyforge_project:
|
105
|
+
rubygems_version: 2.6.8
|
106
|
+
signing_key:
|
126
107
|
specification_version: 4
|
127
108
|
summary: Resource search plugin for bel.rb using Sqlite FTS.
|
128
109
|
test_files: []
|