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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c3a5a5f5c2e5fdce0a5270fa703ab31a72196a1
4
- data.tar.gz: 96bad6202e435d62d9b25b32b1a7c96b333f8fe3
3
+ metadata.gz: 6e4cad89d20572615c5206b58e5af9b1d974bf99
4
+ data.tar.gz: f87a9e0a1e20371e462bffefc15ffac916265529
5
5
  SHA512:
6
- metadata.gz: c8a67e56e9c167a820f0bba16d1437e5f84be7f971629f548939a17598cdbf32b07ff15542bb4d5b869448d0539634bbacc9502a781e2ce4d0c547dbdd541b89
7
- data.tar.gz: 24d1d651a927629d63d06a1ea4d3038d056d9555d2baf6820dd4292d505d4174009495856801c69b76af9b9e17cb0d049a5d4227e32b07a4ef6a92708e5956a2
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 [![Build Status](https://travis-ci.org/sethherr/soulheart.svg)](https://travis-ci.org/sethherr/soulheart) [![Code Climate](https://codeclimate.com/github/sethherr/soulheart/badges/gpa.svg)](https://codeclimate.com/github/sethherr/soulheart) [![Test Coverage](https://codeclimate.com/github/sethherr/soulheart/badges/coverage.svg)](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 [![Build Status](https://travis-ci.org/sethherr/soulheart.svg)](https://travis-ci.org/sethherr/soulheart) [![Code Climate](https://codeclimate.com/github/sethherr/soulheart/badges/gpa.svg)](https://codeclimate.com/github/sethherr/soulheart) [![Test Coverage](https://codeclimate.com/github/sethherr/soulheart/badges/coverage.svg)](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 simple to set up.
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/example_data_sources)
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 - your choice.
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, even pre-formatted HTML :boom:
23
- - **Load remote data**
24
- <br>Makes loading data via gists (or any url) possible.
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
+ [![Autocomplete in action](https://github.com/sethherr/soulheart/raw/master/examples/screenshot.png)](https://sethherr.github.io/soulheart/)
28
+
29
+
27
30
  ## Getting started
28
31
 
29
- See the [Soulheart demos 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.
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 [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
35
38
 
36
- You can instantly deploy Soulheart to Heroku for free - just click the button - which deploys this repository using `rackup` to start the server. Because of this, there's a `config.ru` and a `Gemfile.lock`&mdash;to make it (and any forks) runnable on Heroku. These files aren't in the Gem.
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 'sidekiq/web'
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`&mdash;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.
@@ -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
 
@@ -1,5 +1,4 @@
1
1
  # coding: utf-8
2
-
3
2
  module Soulheart
4
3
  module Helpers
5
4
  def normalize(str)
@@ -1,3 +1,4 @@
1
+ # coding: utf-8
1
2
  module Soulheart
2
3
  class Matcher < Base
3
4
  def initialize(params = {})
@@ -18,8 +18,8 @@ module Soulheart
18
18
  MultiJson.encode(matches: matches)
19
19
  end
20
20
 
21
- get '/status' do
22
- MultiJson.encode(soulheart: Soulheart::VERSION, status: 'ok')
21
+ get '/version' do
22
+ MultiJson.encode(soulheart: Soulheart::VERSION)
23
23
  end
24
24
 
25
25
  not_found do
@@ -1,3 +1,3 @@
1
1
  module Soulheart
2
- VERSION = '0.0.11'
2
+ VERSION = '0.1.0'
3
3
  end
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.11
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-05 00:00:00.000000000 Z
11
+ date: 2015-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hiredis