strip_comments 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: a6f9367d9a2c983ee03ec2e9234c3dc5eecfefb0a23902d6c047c46e585e7c70
4
- data.tar.gz: de618829cf9755f3126ecdd55701379f8bb8240daf798a398b21cb887cec6cec
3
+ metadata.gz: 920c33ca0c4a842363383bed65166eab6cf46adda7b1ab1a711c3aa6ddb3c4e6
4
+ data.tar.gz: 72bfd7bcb770d381ef6b443f627b6685f3d265f5e06a900a17fd26fc4e022194
5
5
  SHA512:
6
- metadata.gz: 13ca27a702dff9178b92ca85dc317f79c023778e7f8917013919acea67332f721d9b9fb7e6cfcda0f87184f2068d5b9b9eb0222c521359886b7d32dafde4cec4
7
- data.tar.gz: c141f78bbf7553ea09a834570362f7dd2bbb800bcb6b3748eb935d9e479eb5b7b6a985de1b99ecdda7c3758b91a08441d9729eae8c0dccfdbd28165b95643d98
6
+ metadata.gz: 5ff254735ef99f9320c76f8e4f4410b2be2b1a855821e6ac5c84acd2e5d41c3b3c61de806130dd39f5ae72a2fc68922e05b7fc5c8d8ac7199d262590e8f801a1
7
+ data.tar.gz: 3fb1ec51ea8917396b06724437f477a68042b5b25e7d7dc478d5d5d4939bd6ae603fb743c6e52e7060bd7cc70e85f5289f5ec0bb9f088f2c2b330d68a031c16f
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StripComments
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
@@ -25,17 +25,15 @@ module StripComments
25
25
  def self.strip_yaml(str)
26
26
  stripped_strings_to_not_be_uncommented = {}
27
27
 
28
- str.gsub!(/'([^']+)'/) do |m|
28
+ str.gsub!(/"([^\n"]+)"/) do |m|
29
29
  strip_key = "__STRIPPED_KEY_#{stripped_strings_to_not_be_uncommented.size}__"
30
30
  stripped_strings_to_not_be_uncommented[strip_key] = m
31
- puts "replacing '#{m}' with '#{strip_key}'"
32
31
  strip_key
33
32
  end
34
33
 
35
- str.gsub!(/"([^"]+)"/) do |m|
34
+ str.gsub!(/'([^\n']+)'/) do |m|
36
35
  strip_key = "__STRIPPED_KEY_#{stripped_strings_to_not_be_uncommented.size}__"
37
36
  stripped_strings_to_not_be_uncommented[strip_key] = m
38
- puts "replacing '#{m}' with '#{strip_key}'"
39
37
  strip_key
40
38
  end
41
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strip_comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jevon Wright