gramrb 1.0.6 → 1.0.8

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: 6cf8e4a48fdc5f714a69178bd7b66fab76dc40804e16a55fc619de6034878dd6
4
- data.tar.gz: b64231f40b0377ffddd24f45ec41dc584ae7bca9b2ddc929ed2a6a0a31cd4c4b
3
+ metadata.gz: ab57b9e180b10b719026d2d425f2a0ddd968a53bee6280dc03c4d4588f6410ef
4
+ data.tar.gz: 8773800ddbd38b8fcfa4f53e4ca168c7323d863a2eecfaac33dd6c04ee1a8ecf
5
5
  SHA512:
6
- metadata.gz: abdec6bc264c80dd6f2aad08f3c97f493ba66e50c48d39b41bc096e7449a88f93950982375beb3b825937311875e846e2a95161a9eb99524e6eb1a865697c7f7
7
- data.tar.gz: 44f41c44272e67611517ca53fa88c1807eeffcb80cbb533de8f5ab58bbdb2e57027f2a4018cbb531db7b6f74922add894c250839346b4e3fb565a1d6e5ed4c65
6
+ metadata.gz: 83730b53d58b85da07ce558132a7be0f6920c3c0c4eb10ef2e8ce9b2fbedb56557256ab1d8b8bef9f6b9951df27d8dcde66e3236d5839ba58a21d23314b2150c
7
+ data.tar.gz: 2c27a537cdbefc649d7656fd130b1f81fa3a752cabb9dea011d0f31671b23a99db652c6aaec5d7e5b2920c3ceb63bd5f82e550a39bb250facb7d687a9989cc41
data/lib/gramrb/cli.rb CHANGED
@@ -54,7 +54,11 @@ module Gramrb
54
54
  def highlight(error) = error[:item].gsub(error[:error], red(error[:error]))
55
55
 
56
56
  def files
57
- @files ||= File.file?(@path) ? [@path] : Dir.glob("#{@path}/**/*.rb").reject { |file| config.excluded.any? { |excluded| file.include?(excluded) } }
57
+ @files ||= if File.file?(@path)
58
+ [@path]
59
+ else
60
+ Dir.glob("#{@path}/**/*.rb").reject { |file| config.excluded.any? { |excluded| file.include?(excluded) } }
61
+ end
58
62
  end
59
63
 
60
64
  def config = @config ||= Config.new
@@ -18,6 +18,7 @@ module Gramrb
18
18
  return { item:, words: [] } if invalid?(item)
19
19
 
20
20
  words = item.gsub(/\\[ntrfvab\\]/, ' ')
21
+ .gsub(/\S*[^\x00-\x7F]\S*/, ' ')
21
22
  .gsub(%r{https?://\S+}, ' ')
22
23
  .gsub(/([a-zA-Z])(\d)/, '\1 \2')
23
24
  .gsub(/(\d)([a-zA-Z])/, '\1 \2')
@@ -1,5 +1,5 @@
1
1
  module Gramrb
2
2
  module Version
3
- VERSION = '1.0.6'.freeze
3
+ VERSION = '1.0.8'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gramrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pandaman74
@@ -49,7 +49,6 @@ licenses:
49
49
  metadata:
50
50
  rubygems_mfa_required: 'true'
51
51
  homepage_uri: https://github.com/Pandaman74/Gramrb
52
- source_code_uri: https://github.com/Pandaman74/Gramrb
53
52
  rdoc_options: []
54
53
  require_paths:
55
54
  - lib