gem-ext-cleaner 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gem-ext-cleaner.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73c77011b33a102341408753f7320f664811a8f757cecb461545cc525e9eacfc
|
4
|
+
data.tar.gz: 894d7f4f5b2bbd325de370ca8862ba80bf2d31fa56e356022d3cf239e7a0a3ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4fc14d2abd9276c650ac6248f09546c4974aa209fe0d481ef45a0f14c2288d436a95441fb618d4bd1d4b8b11f76b3b3c34402e0a2c31ef6e11c6480d7461c38
|
7
|
+
data.tar.gz: 516d9c5d70390ea730c1c43b7c30bdff95a54a827637ad2927d2d5f5240ffb135256b598148f9d44c7176a46a4124f0ae78c11d484cad434fdee40ea6be3760d
|
data/lib/gem-ext-cleaner.rb
CHANGED
@@ -5,6 +5,9 @@ module GemExtCleaner
|
|
5
5
|
def self.clean(spec)
|
6
6
|
(spec.full_require_paths - [spec.extension_dir]).each do |path|
|
7
7
|
Dir.glob(File.join(path, "**/*")).each do |file|
|
8
|
+
# Prevent deleting files in versioned directories like google-protobuf, nokogiri
|
9
|
+
next if file =~ /(\d+\.\d+\/)/
|
10
|
+
|
8
11
|
if Pathname(file).extname == ".#{RbConfig::CONFIG["DLEXT"]}"
|
9
12
|
File.delete(file)
|
10
13
|
puts "Delete #{file}"
|