fluorescent 0.0.1 → 0.0.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 +4 -4
- data/lib/fluorescent.rb +5 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a383f9c7da3784eb1c27a5f277731a3320cdfdc2
|
4
|
+
data.tar.gz: 8f2ad51f3ee7fe2b38b1d1c18e3b128a613c1433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b939bd8cd62e15bffd8bb82f8c7a33d041e3049ebeaaddafa79762e5f71d7cc6f43e75f1a3b735175a27dd69c775bd3f46793955b13ccd54da4515f8d6b4446
|
7
|
+
data.tar.gz: 84c41eb9df4235c0453e94011d8779093694d8cda53e4f930d93eabfc740e8911ebb87ca040694ae5a9e31e4cb3f4623af39ab7e021e1e6b85c8c46752805aba
|
data/lib/fluorescent.rb
CHANGED
@@ -22,6 +22,10 @@ class Fluorescent
|
|
22
22
|
def distill
|
23
23
|
@results.each do |r|
|
24
24
|
row = {}
|
25
|
+
# make sure we get the rest of the column names in the hash
|
26
|
+
r.column_names.each do |c|
|
27
|
+
row[c] = r.send(c)
|
28
|
+
end
|
25
29
|
@columns.each do |c|
|
26
30
|
# 1. highlight the search terms
|
27
31
|
# 2. replace the search terms in the results with bold text
|
@@ -42,7 +46,7 @@ class Fluorescent
|
|
42
46
|
end
|
43
47
|
end
|
44
48
|
end
|
45
|
-
@formatted_results.push(
|
49
|
+
@formatted_results.push(row)
|
46
50
|
end
|
47
51
|
end
|
48
52
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluorescent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Devin Austin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Highlight search terms in a result set and distill the result text down
|
14
14
|
to the pertinent parts
|
@@ -28,17 +28,17 @@ require_paths:
|
|
28
28
|
- lib
|
29
29
|
required_ruby_version: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
35
|
requirements:
|
36
|
-
- -
|
36
|
+
- - ">="
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: '0'
|
39
39
|
requirements: []
|
40
40
|
rubyforge_project:
|
41
|
-
rubygems_version: 2.
|
41
|
+
rubygems_version: 2.2.2
|
42
42
|
signing_key:
|
43
43
|
specification_version: 4
|
44
44
|
summary: Highlight and distill search terms.
|