pretty_strings 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3903bf68c19e20283baaaeca3d44b71683ba5e22
4
- data.tar.gz: c1d39e2f09f3a43dc60c7779cd1a8d8decc694b9
3
+ metadata.gz: 69f404ce3a7e5b50beaffbb42b695c5f110dd9a8
4
+ data.tar.gz: 7d06f91be8f0c05f6708ef9b49e90834e4628e23
5
5
  SHA512:
6
- metadata.gz: bba83e084eb1ef9077aedbbf89cbecb022d174755dc6fa455315cf4dbaac27208a85453d452abc25b5afd64ad4b350ae4e33505c9e6557da6e463dcdc34937c6
7
- data.tar.gz: a107bf2676f8426f87f25adc9f4104a30a59a691dd05fc77c7d3d6e670238b1109e757abe4ac5d2ef1971ca208a2ee5e49d2753ef8cc1750f90975b58dd5045a
6
+ metadata.gz: 5b22be2ebfac04032d66f97c3c262584492ff5fb97be573db5fb3a58b2694750f513f07887ab4e957fbb2861d78dbc8ce1dd1ce85b00b1fef10e41a8e5ad6a82
7
+ data.tar.gz: 65c535c17ddcb8c4641120899a4a4174bf184dae6c6c9daf5d0d6f01348548410940f6082ebaaa9584d6605c3c27131bc4664be7f67bcf1e060b6acbc724fd45
@@ -11,6 +11,7 @@ module PrettyStrings
11
11
  def pretty
12
12
  return '' if text.nil? || text.empty?
13
13
  remove_bracketed_numbers(
14
+ remove_consecutive_dots(
14
15
  replace_symbol_with_bracket(
15
16
  remove_newlines(
16
17
  replace_tabs(
@@ -23,7 +24,7 @@ module PrettyStrings
23
24
  sanitize_text(
24
25
  replace_bracket_with_symbol(
25
26
  text
26
- )))))))))))).squeeze(" ").strip
27
+ ))))))))))))).squeeze(" ").strip
27
28
  end
28
29
 
29
30
  private
@@ -51,6 +52,10 @@ module PrettyStrings
51
52
  text.gsub!(/⚘/, '{') || text
52
53
  end
53
54
 
55
+ def remove_consecutive_dots(text)
56
+ text.gsub!(/\.{5,}/, '') || text
57
+ end
58
+
54
59
  def replace_bracket_with_symbol(text)
55
60
  text.gsub!(/<(?=\s*\d+)/, '♳') || text
56
61
  end
@@ -1,3 +1,3 @@
1
1
  module PrettyStrings
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pretty_strings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-19 00:00:00.000000000 Z
11
+ date: 2016-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails-html-sanitizer