word_count_analyzer 0.0.6 → 0.0.7

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: b715b4c2304ae956644121693d584b0b37638845
4
- data.tar.gz: 3b6d753132d5b9e511378ec06f990efa21fcc86b
3
+ metadata.gz: 4196889f5b1468ba043a02237ae4226c6696e257
4
+ data.tar.gz: 908da31fc4e6aca7a3f36c059d8a8aac497199f5
5
5
  SHA512:
6
- metadata.gz: 504f3e98b336ebcce4129b137e5293f3fbe38593fd935d55b56d9807f77c17a7e5ae955c4fba41fde8fe8a9e725232253038e5b912ff892eed8ece89f1819b34
7
- data.tar.gz: 2ae63d08ea641d00f60f4d83f07e1a376cd51cdc632bafcf96a1c3e6b7b173c5e970625fa51749b879893e0386a202bebf799448703373cccd6c855bf8c56040
6
+ metadata.gz: 701cff3bcf553ccb6850484bb5095dcb6785e71e562afbb30063a6d60568718ae1c15a2a85993573009c0b299b4aaad9573cb34848e220d1d1c8a9e5913be6cf
7
+ data.tar.gz: 02348ebdd3b8d5ab7dcc40522b9a9d9925d462238f93427acbb5468e3921332b8876cf815e0456ec5ab6d43cc23c76264ece4e3c24e2a6e54162b45b39aee582
@@ -10,7 +10,7 @@ module WordCountAnalyzer
10
10
  UNDERSCORE_REGEX = /(?<=\s)_{2,}(\s|$)|\A_{2,}(?=(\s|$))/
11
11
 
12
12
  # Rubular: http://rubular.com/r/FexKxGUuIe
13
- STRAY_PUNCTUATION_REGEX = /(?<=\s)[[:punct:]](?=(\s|$))|(?<=\s)\|(?=(\s|$))/
13
+ STRAY_PUNCTUATION_REGEX = /(?<=\s|\A)[[:punct:]](?=(\s|$))|(?<=\s|\A)\|(?=(\s|$))/
14
14
 
15
15
  attr_reader :string
16
16
  def initialize(string:)
@@ -1,3 +1,3 @@
1
1
  module WordCountAnalyzer
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -55,6 +55,12 @@ RSpec.describe WordCountAnalyzer::Punctuation do
55
55
  ws = WordCountAnalyzer::Punctuation.new(string: string)
56
56
  expect(ws.stray_punctuation_occurences).to eq(0)
57
57
  end
58
+
59
+ it 'returns the number of stray punctuation occurences #003' do
60
+ string = "."
61
+ ws = WordCountAnalyzer::Punctuation.new(string: string)
62
+ expect(ws.stray_punctuation_occurences).to eq(1)
63
+ end
58
64
  end
59
65
 
60
66
  context '#replace_dotted_line' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: word_count_analyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias