strip_comments 0.1.5 → 0.2.0

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: 3f9e16503c9d04afbbae765175aed88aadf3bfab276d3700c7f7f567f55d0663
4
- data.tar.gz: b6a7531445417be527fbb185688c2bbd29410529e367f45c79f112dcb1b6f8fd
3
+ metadata.gz: 24843c0b9b7dd3bdf82bd0e951cb3ce0c981f294d7a6324577e84bccffb7362e
4
+ data.tar.gz: 2d6e82506144c68b5ad333c21cd41dad14df6f6eb988e77f8e280df538dba88b
5
5
  SHA512:
6
- metadata.gz: 57be646f36a83b9fba2d525142da161b6f9db842e561309e75684c07b075c71f0f519f9a43190b71568b06c3c96dfa5686c5faf8a5aa08d285aff765f749cf36
7
- data.tar.gz: 95d0565dfb0867264e7ffc5a5386b7c7f5fe1cc47b237aeadf1fbe8ae33c182b24a10d2b44877066773d2ab1e0c21aee68efedb1f6a230e76c401e49b48ff985
6
+ metadata.gz: 0d675f04fef958452d383dbde97048cd46e074b7678508d24bf060e2f88a6d73d3fa3b39a33959b0bdd05f0cd536d46d8ade823162fac3750600e88e652aa181
7
+ data.tar.gz: '099ca0984bebe01c6eef730d5877272642acbcdb0c6a4e5337b7c18c1d092dfae8fc2f488fa5e829270fe9f492364d62e82d3db672bcb2bff330b8a8189ebf14'
data/README.md CHANGED
@@ -29,7 +29,15 @@ stripped = StripComments::strip_yaml(input)
29
29
  You can use this to, for example, rewrite all source files in a folder:
30
30
 
31
31
  ```rb
32
- TODO
32
+ require "strip_comments"
33
+
34
+ Dir.glob(File.join(File.dirname(__FILE__), "..", "**", "*.{css,html,yml,properties,glsl}")).each do |filename|
35
+ extension = filename.split(".").last
36
+ input = File.open(filename).read
37
+ output = StripComments::strip(extension, input)
38
+
39
+ File.write(filename, output)
40
+ end
33
41
  ```
34
42
 
35
43
  ## Development
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StripComments
4
- VERSION = "0.1.5"
4
+ VERSION = "0.2.0"
5
5
  end
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.5
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jevon Wright