soulheart 0.0.4 → 0.0.5
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 +6 -6
- data/lib/soulheart/loader.rb +2 -4
- 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: cd989a4107aacd141e1ecbcdcab17c4565237768
|
|
4
|
+
data.tar.gz: eadaae2aad79d613be888a6cd39fe130071c8b00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8f476069f2c8ff7491142570abc525ca25d0ad9870ac22398b6ee1fa6c55653b828ae6f3cc2bc427ea32103fbd8cd4a3649483aefebdf31cdf3a0e4fad4714b1
|
|
7
|
+
data.tar.gz: a4a3682db05d5227469b5291399be897cb006ebed4654aae8a305f2c84eb388afce580974fbe4d6578cac17ce0521300921e1f6d76001df0b8c84e645a66fb12
|
data/README.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
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)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
**Soulheart is a ready to use remote data source for autocomplete**. It supports:
|
|
3
|
+
**Soulheart is a ready-to-use remote data source for autocomplete**. It supports:
|
|
5
4
|
|
|
6
5
|
- pagination
|
|
7
6
|
- categories
|
|
8
7
|
- sorting by priority (not just alphabetically)
|
|
9
|
-
- arbitrary
|
|
10
|
-
- loading data via gists
|
|
8
|
+
- arbitrary return values/objects
|
|
9
|
+
- loading data via gists (or any url)
|
|
11
10
|
- mounting standalone or inside of a rails app
|
|
12
11
|
|
|
13
12
|
... and is [instantly deployable to heroku](https://heroku.com/deploy) (for free).
|
|
14
13
|
|
|
15
|
-
To get started, check out examples and documentation at [sethherr.github.io/soulheart](https://sethherr.github.io/soulheart).
|
|
14
|
+
To get started, check out examples and documentation at [sethherr.github.io/soulheart/](https://sethherr.github.io/soulheart/).
|
|
16
15
|
|
|
16
|
+
----
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Soulheart is in Beta. It's probably appropriate to use in production... but maybe wait? There are a few more changes coming, and some documentation improvements to be made.
|
|
19
19
|
|
|
20
20
|
### Adding data
|
|
21
21
|
|
data/lib/soulheart/loader.rb
CHANGED
|
@@ -66,10 +66,8 @@ module Soulheart
|
|
|
66
66
|
unless cleaned
|
|
67
67
|
item = clean(item)
|
|
68
68
|
category_base_id ||= category_id(item['category'])
|
|
69
|
-
item.keys.select{ |k| k
|
|
70
|
-
item['data'].merge!({
|
|
71
|
-
"#{key.gsub(/data-/i,'')}" => item.delete(key)
|
|
72
|
-
})
|
|
69
|
+
item.keys.select{ |k| !%w(category priority term aliases data).include?(k) }.each do |key|
|
|
70
|
+
item['data'].merge!({"#{key}" => item.delete(key)})
|
|
73
71
|
end
|
|
74
72
|
unless redis.smembers(categories_id).include?(item['category'])
|
|
75
73
|
redis.sadd categories_id, item['category']
|
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.0.5
|
|
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-06-
|
|
11
|
+
date: 2015-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: hiredis
|