fluorescent 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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fluorescent.rb +4 -10
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de719a25cca25bfd5f7d5da989a4ba1bcac65f3e
4
- data.tar.gz: ef6c4e7c5b75d73435f1a6b81d6ae7d281a5be6f
3
+ metadata.gz: 18c8a78e868d8e98f41b90aacffb1d8382bc3928
4
+ data.tar.gz: 722e204650ee3978f02c2cf1730bee6ad54f9d44
5
5
  SHA512:
6
- metadata.gz: ba36f827f2c4f70efca5c13f86413c9bd53116ed687fc7ff74d43f4bc37acd448364b44abec96a1b2ea1904f1c4826e0c5b9e619062a954838242a0e5fd3e11f
7
- data.tar.gz: db0bfa09d452c286df00704cd8c4acdbbbccd16431af7975d723a4b5e0c08c3639f194f4fff6d04b317e3fa8c507f3210338fdf1edcaf63f5b0969b35742b3b1
6
+ metadata.gz: 69a75bdd56007068c5efbfbf003da3320e5e9a4811cddc02e4c185cb4942406d62fa9264eb6d78be9017b3830de119c226c360ff2affba6a029961046d478ab9
7
+ data.tar.gz: 571a4f29225c9d847ef43ccd82db8a244765bc83662df9d0d647b1f723584136075751de6320c43c4ecbd2b76152d67868570a4429c15c201d97d6b3f391c158
data/lib/fluorescent.rb CHANGED
@@ -34,16 +34,10 @@ class Fluorescent
34
34
  string = r.send(c).to_s
35
35
  row[c] = highlight string # need to find a better way to do this
36
36
  if @to_filter.include? c
37
- # account for things like one word search terms
38
- # or if the padding length is longer than the search term string
39
- if string.length <= @padding
40
- row[c] = highlight @terms
41
- else
42
- row[c] = highlight string[
43
- string.index(@terms[0]),
44
- string.index(@terms[0]) + @terms.length + @padding
45
- ] << "..."
46
- end
37
+ row[c] = highlight string[
38
+ string.index(@terms[0]),
39
+ string.index(@terms[0]) + @terms.length + @padding
40
+ ] << "..."
47
41
  end
48
42
  end
49
43
  @formatted_results.push(row)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluorescent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devin Austin