soulheart 0.0.11 → 0.1.0
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/README.md +18 -13
- data/bin/soulheart +2 -1
- data/lib/soulheart/helpers.rb +0 -1
- data/lib/soulheart/matcher.rb +1 -0
- data/lib/soulheart/server.rb +2 -2
- data/lib/soulheart/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: 6e4cad89d20572615c5206b58e5af9b1d974bf99
|
4
|
+
data.tar.gz: f87a9e0a1e20371e462bffefc15ffac916265529
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bb3531690cdcbd2f67fb3cdacc6609465465349b85caa4e718be9553d1dd905e1ab4031531789d240b77214284003d36a3d22193c71c65d9d014781c386402c
|
7
|
+
data.tar.gz: 36ed6866cf3de19a9a22edf91fec640411ddac96e72d2333111303462e64744b6f6af3825ed24f09e239e57beb2c85acef20b63f4e87af32903201f403375fff
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# <img src="https://raw.githubusercontent.com/sethherr/soulheart/master/logo.png" alt="Soulheart" width="200"> Soulheart [](https://travis-ci.org/sethherr/soulheart) [](https://codeclimate.com/github/sethherr/soulheart) [](https://codeclimate.com/github/sethherr/soulheart/coverage)
|
1
|
+
# <img src="https://raw.githubusercontent.com/sethherr/soulheart/master/examples/logo.png" alt="Soulheart" width="200"> Soulheart [](https://travis-ci.org/sethherr/soulheart) [](https://codeclimate.com/github/sethherr/soulheart) [](https://codeclimate.com/github/sethherr/soulheart/coverage)
|
2
2
|
|
3
|
-
Soulheart is a ready-to-use remote data source for autocomplete. The goal is to provide a solid, flexible tool that's downright
|
3
|
+
Soulheart is a ready-to-use remote data source for autocomplete. The goal is to provide a solid, flexible tool that's downright easy to set up and use.
|
4
4
|
|
5
5
|
- [Demos](https://sethherr.github.io/soulheart/)
|
6
6
|
- [Usage documentation](https://sethherr.github.io/soulheart/commands/)
|
7
|
-
- [Example data sources](https://github.com/sethherr/soulheart/tree/master/
|
7
|
+
- [Example data sources](https://github.com/sethherr/soulheart/tree/master/examples)
|
8
8
|
- [Getting started](#getting-started)
|
9
9
|
- [Deployment](#deployment)
|
10
10
|
- [Testing](#testing)
|
@@ -15,25 +15,28 @@ Soulheart is a ready-to-use remote data source for autocomplete. The goal is to
|
|
15
15
|
- **Pagination**
|
16
16
|
<br>For infinite scrolling of results - wow!
|
17
17
|
- **Categories**
|
18
|
-
<br>Match results for specified categories, or not
|
18
|
+
<br>Match results for specified categories, or not. Your choice
|
19
19
|
- **Prioritization**
|
20
|
-
<br>Return results sorted by priority (not just alphabetically)
|
20
|
+
<br>Return results sorted by priority (not just alphabetically)
|
21
21
|
- **Arbitrary return objects**
|
22
|
-
<br>Get whatever you want back. IDs, URLs, image links,
|
23
|
-
- **
|
24
|
-
<br>
|
22
|
+
<br>Get whatever you want back. IDs, URLs, image links, HTML, :boom:
|
23
|
+
- **Loads data**
|
24
|
+
<br>Accepts local or remote data - e.g. you can use a [gist](https://github.com/sethherr/soulheart/blob/master/examples/manufacturers.tsv)
|
25
25
|
- **Runs Standalone or inside a rails app**
|
26
26
|
|
27
|
+
[](https://sethherr.github.io/soulheart/)
|
28
|
+
|
29
|
+
|
27
30
|
## Getting started
|
28
31
|
|
29
|
-
See the [Soulheart
|
32
|
+
See the [Soulheart demo page](https://sethherr.github.io/soulheart/) for a step-by-step explanation of creating an instance and setting up a select box that uses it as a remote data source.
|
30
33
|
|
31
34
|
|
32
35
|
## Deployment
|
33
36
|
|
34
37
|
#### With Heroku [](https://heroku.com/deploy)
|
35
38
|
|
36
|
-
You can instantly deploy Soulheart to Heroku for free
|
39
|
+
You can instantly deploy Soulheart to Heroku for free.
|
37
40
|
|
38
41
|
To update your Heroku deploy of Soulheart, use the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-command) and redeploy the app:
|
39
42
|
|
@@ -48,11 +51,13 @@ Soulheart is also a gem. Add it to your gemfile:
|
|
48
51
|
|
49
52
|
And then put this in your routes.rb -
|
50
53
|
|
51
|
-
require '
|
54
|
+
require 'soulheart/server'
|
52
55
|
mount Soulheart::Server => "/soulhearts"
|
53
56
|
|
54
57
|
You can then access the server when your rails app is running. You can run the [Soulheart commands](https://sethherr.github.io/soulheart/commands/) from that directory.
|
55
58
|
|
59
|
+
*note: On Heroku Soulheart uses `rackup` to start the server. Because of this, there's a `config.ru` and a `Gemfile.lock`—to make it (and any forks) directly deployable. These files aren't in the Gem.*
|
60
|
+
|
56
61
|
## Testing
|
57
62
|
|
58
63
|
Tested with rspec, check out test information at [Code Climate](https://codeclimate.com/github/sethherr/soulheart).
|
@@ -64,8 +69,8 @@ Run `bundle exec guard` to watch for changes and rerun the tests when files are
|
|
64
69
|
|
65
70
|
Soulheart is a Redis backed Sinatra server. I test with the latest MRI (2.2, 2.1, 2.0) and JRuby versions (1.7). Other versions/VMs are untested but might work fine.
|
66
71
|
|
67
|
-
It requires Redis 3.0
|
72
|
+
It requires Redis >= 3.0
|
68
73
|
|
69
74
|
## Additional info
|
70
75
|
|
71
|
-
This started as a fork of [Soulmate](https://github.com/seatgeek/soulmate). It's MIT licensed.
|
76
|
+
This started as a fork of [Soulmate](https://github.com/seatgeek/soulmate), to bring it up to date and make it slicker. It's MIT licensed.
|
data/bin/soulheart
CHANGED
@@ -21,7 +21,7 @@ parser = OptionParser.new do |opts|
|
|
21
21
|
Soulheart.redis = host
|
22
22
|
end
|
23
23
|
|
24
|
-
opts.on('-s', '--stop-words [FILE]', 'Path to file containing a list of stop words') do |fn|
|
24
|
+
opts.on('-s', '--stop-words [FILE]', 'Path to file containing a list of stop words to overwrite defaults - "the", "at", "vs"') do |fn|
|
25
25
|
File.open(fn) do |file|
|
26
26
|
Soulheart.stop_words = file.readlines.map(&:strip).reject(&:empty?)
|
27
27
|
end
|
@@ -40,6 +40,7 @@ parser = OptionParser.new do |opts|
|
|
40
40
|
opts.separator 'Commands:'
|
41
41
|
opts.separator ' load FILE Loads data from a FILE - can be a local file or a url. Accepted formats are .json, .tsv and .csv'
|
42
42
|
opts.separator " reset FILE Removes all existing data, then runs load on the FILE."
|
43
|
+
opts.separator ''
|
43
44
|
end
|
44
45
|
|
45
46
|
|
data/lib/soulheart/helpers.rb
CHANGED
data/lib/soulheart/matcher.rb
CHANGED
data/lib/soulheart/server.rb
CHANGED
data/lib/soulheart/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soulheart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Herr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hiredis
|