korekto 1.0.210310 → 1.1.210313

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
  SHA256:
3
- metadata.gz: d4409a65275e6ef8463f5327214f5af2e45353adc5c471b822c17da786a9868d
4
- data.tar.gz: cad5bc96ef5b026bc5e841eb4c235525f8daff9c6fcb6d5c6f9aa78cd7f53a6e
3
+ metadata.gz: 13c8ee5024318dfb63cf663bbcf574c22a98b3e7a86e455a31ce0a79690cecda
4
+ data.tar.gz: f2b9f9e3b261eb62bdd2b85f7659e459bfda3fe32a20afe22d028aed6b54f395
5
5
  SHA512:
6
- metadata.gz: 9494098bfb53f6f58136530e923d08c6b8b9e9d5a416dca8c3073a14549fb2e55dab264b18b43ae87f79ba0123c454e2aff89077bba90752c34383142567df1d
7
- data.tar.gz: 7168c686fdeb51c562a77e780ecaaca6a1eb9c0d0d0ff5cfef6900ce486f0f76ce205f06887c97895a648c46914bc03ee3551cf2565250c7fcee82ccb9b8a01c
6
+ metadata.gz: ba22bf373161134aa32acb1ebf9a0eddfe17384f2b43a1c5311dfeb0ac88423a53056fed8637e87bcf42e3a70f94f798a84d22ddddac98f10c8649e0ebbde1b5
7
+ data.tar.gz: a4dbdfae0c6c932ef63a86882633cc12a077092173e5b077ff444a29e027c0f4939ab9249e2590599c85beaac202738cad47997e2a97659a34c031bddd3649a0
data/bin/korekto CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'help_parser'
3
3
 
4
- OPTIONS = HelpParser['1.0.210310', <<HELP]
4
+ OPTIONS = HelpParser['1.1.210313', <<HELP]
5
5
  Usage:
6
6
  korekto [:options+]
7
7
  Options:
data/lib/korekto.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Korekto
2
- VERSION = '1.0.210310'
2
+ VERSION = '1.1.210313'
3
3
  class Error < Exception; end
4
4
  require 'korekto/symbols'
5
5
  require 'korekto/syntax'
@@ -36,13 +36,13 @@ class Symbols
36
36
  if statement[0]=='/' and statement[-1]=='/'
37
37
  Regexp.new(statement[1..-2])
38
38
  else
39
- pattern,count,seen = '^',0,{}
39
+ pattern,count,seen = '\A',0,{}
40
40
  Regexp.quote(statement).scan(@scanner) do |v|
41
41
  if n=seen[v]
42
42
  pattern << '\\'+n
43
43
  elsif type = @v2t[v]
44
44
  regex = @t2p[type]
45
- if regex=='\n'
45
+ if type[0]=='.'
46
46
  pattern << regex
47
47
  else
48
48
  count += 1
@@ -57,7 +57,7 @@ class Symbols
57
57
  end
58
58
  end
59
59
  raise Error, 'pattern with no captures' if count < 1
60
- pattern << '$'
60
+ pattern << '\Z'
61
61
  Regexp.new(pattern)
62
62
  end
63
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: korekto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.210310
4
+ version: 1.1.210313
5
5
  platform: ruby
6
6
  authors:
7
7
  - carlosjhr64
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-10 00:00:00.000000000 Z
11
+ date: 2021-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: help_parser