no_comments 0.1.7 → 0.1.9

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: b0866e1f078f1e7465e0196ca4a71cac6956bb607452f7fec15f55ebf7e2f417
4
- data.tar.gz: fbec43970d78b83199c3c5288e72fb300bb4382c82c98555c4e7089c4abddf88
3
+ metadata.gz: 4bd25fbe95f21f9b67340ed123921b6b483c3134edbc4b8924f4bff6395daaa8
4
+ data.tar.gz: de4c4dd2964da1ed0720f7265813c27a54f2a98dc5cd66a6c56544276709d9e7
5
5
  SHA512:
6
- metadata.gz: 32de2f75bcaf62648b319e6bab3da0020115ce52454c63081f91e71a6670a0fa6c5f66e0da0043a1bd22fc68a547a2622c19ddb55feb95046ff06843b34c175e
7
- data.tar.gz: 292f77329f185d695359a9d14e0b724118409a2bb44904488d761e7ff89eeaf9ef6f6286630fb6f0ff40f2b8d63089420c774d29a8b575585b72daa197994658
6
+ metadata.gz: 58cd74ff623136cd6af53270606a9db22bdd7ea6dec8c7e8b952d05b4c2c91079b53c029a21c8b60fa8e90a2d721cc3a0a39f5807a5fd56bfe82ba4351e4503d
7
+ data.tar.gz: 860f0e0646154364946327a9294464dc933fd191e20cbb2a47f25b342798af9afd5587d8118a134897735f12f08d9420ea9bea0b685f81db3fa8f03a726e3a02
@@ -93,7 +93,10 @@ module NoComments
93
93
 
94
94
  def process_code_line(line)
95
95
  code_part, comment_part = split_line(line)
96
- if comment_part && tool_comment?(comment_part.strip)
96
+
97
+ if code_part.strip.empty? && comment_part.nil?
98
+ @result_lines << line.rstrip
99
+ elsif comment_part && tool_comment?(comment_part.strip)
97
100
  @result_lines << ("#{code_part.rstrip} #{comment_part.strip}")
98
101
  else
99
102
  @comments << [@line_number, comment_part.strip] if comment_part
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NoComments
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.9"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: no_comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justyna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-17 00:00:00.000000000 Z
11
+ date: 2024-11-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -35,6 +35,8 @@ homepage: https://github.com/justi/no_comments
35
35
  licenses:
36
36
  - MIT
37
37
  metadata:
38
+ source_code_uri: https://github.com/justi/no_comments
39
+ homepage_uri: https://github.com/justi/no_comments
38
40
  rubygems_mfa_required: 'true'
39
41
  post_install_message:
40
42
  rdoc_options: []