soulheart 0.1.1 → 0.1.2

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: 1087fd94a27c97abf2d467ddc42654da2efa5b2b
4
- data.tar.gz: 476d8003d86fb2b38adc00e8306904091c1ed25d
3
+ metadata.gz: cb52ba579f66e836ab61e594ab5e13caa7ce9c9f
4
+ data.tar.gz: da7bee76c40547870a68c646587248c0f5d15ab7
5
5
  SHA512:
6
- metadata.gz: e89a98fb8371a656ec5270c190b18d3e8eb120dbde36c13ecda9f3cdb2c93897e34a27823d9c063be9caea85c44df27a12ab6d0af01858b9f84d4b5b71324c8f
7
- data.tar.gz: 14b59ea3289fc49b3f2aa22390bf0c6b4cc998a0bbd5a347f7b4e10deedc8ea24d44eaecc721f68636b6ceb468ab19529275f529011f7ed227a826ea5291ceed
6
+ metadata.gz: e96d2237c67c7ccd7cd46410b6f9bc02c953cf4478bd73c08a747d3f2516cc51939ed67c9c06c61c81a56a4c1527dd1d7d8e650affe7f85bf1cd21a892f987c4
7
+ data.tar.gz: 0b76dce5640c3761886f6ad0fe9e0305c714bd8dab67e44252b5e5b8c65a56a51390e8f342a4982ebac6918c6bdbb700893bfbf3d4647f5918faf15d89a8cbb0
data/bin/soulheart CHANGED
@@ -39,7 +39,7 @@ parser = OptionParser.new do |opts|
39
39
  opts.separator ''
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
- opts.separator " reset FILE Removes all existing data, then runs load on the FILE."
42
+ opts.separator " reset Removes all existing data"
43
43
  opts.separator ''
44
44
  end
45
45
 
@@ -102,7 +102,7 @@ when 'load'
102
102
  load ARGV[1]
103
103
  when 'reset'
104
104
  clear
105
- load ARGV[1]
105
+ load ARGV[1] if ARGV[1]
106
106
  else
107
107
  puts parser.help
108
108
  end
@@ -58,13 +58,19 @@ module Soulheart
58
58
 
59
59
  def load(items)
60
60
  # Replace with item return so we know we have category_id
61
- items.each { |item| item.replace(add_item(item)) }
61
+ i = 0
62
+ items.each do |item|
63
+ item.replace(add_item(item))
64
+ i += 1
65
+ end
62
66
  set_category_combos_array.each do |category_combo|
63
67
  items.each do |item|
64
68
  next unless category_combo.match(item['category']) || category_combo == 'all'
65
69
  add_item(item, category_id(category_combo), true) # send it base
70
+ i += 1
66
71
  end
67
72
  end
73
+ puts "Total items (including combinatored categories): #{i}"
68
74
  end
69
75
 
70
76
  def clean_hash(item)
@@ -23,9 +23,11 @@ module Soulheart
23
23
  end
24
24
 
25
25
  get '/info' do
26
+ info = Soulheart::Base.new.redis.info
26
27
  MultiJson.encode({
27
- soulheart: Soulheart::VERSION,
28
- time: Time.now.utc.strftime('%H:%M:%S UTC')
28
+ soulheart_version: Soulheart::VERSION,
29
+ current_time: Time.now.utc.strftime('%H:%M:%S UTC'),
30
+ redis_used_memory: info['used_memory_human'],
29
31
  })
30
32
  end
31
33
 
@@ -1,3 +1,3 @@
1
1
  module Soulheart
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
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.1.1
4
+ version: 0.1.2
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-10 00:00:00.000000000 Z
11
+ date: 2015-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hiredis
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  requirements: []
166
166
  rubyforge_project:
167
- rubygems_version: 2.4.6
167
+ rubygems_version: 2.4.8
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: Simple, fast autocomplete server for Ruby and Rails