gem-ext-cleaner 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/gem-ext-cleaner +8 -0
- data/lib/gem-ext-cleaner.rb +16 -0
- data/lib/rubygems_plugin.rb +2 -15
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e1553d6f3ed36696dbb8625209f7ef21680904b89afeb347c2345ba6505ffba
|
4
|
+
data.tar.gz: 94cf5aad01aa04121eb07ba07c850a1393f7a6e683ea18033e2b08292e9498ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f94b7db519dc4184b7b1ab63b2357ccddc63360aa8b8f3d9cec9c5387610a7dd2222b3e836390d5fd9120e848e9be543e07afdae3ff037ac75d3938f1e46a92
|
7
|
+
data.tar.gz: 69cc56cbb35db6951c385a88df34c90626f7d36c4d1cbcd39dffebd473ada92109d5baf12381720ab157a2ba10ce1e5b40844c16f75f901aacc73c17a9eb95e0
|
data/exe/gem-ext-cleaner
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require "rbconfig"
|
2
|
+
require "pathname"
|
3
|
+
|
4
|
+
module GemExtCleaner
|
5
|
+
def self.clean(spec)
|
6
|
+
(spec.full_require_paths - [spec.extension_dir]).each do |path|
|
7
|
+
Dir.glob(File.join(path, "**/*")).each do |file|
|
8
|
+
if Pathname(file).extname == ".#{RbConfig::CONFIG["DLEXT"]}"
|
9
|
+
File.delete(file)
|
10
|
+
puts "Delete #{file}"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
rescue Errno::EPERM
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/rubygems_plugin.rb
CHANGED
@@ -1,18 +1,5 @@
|
|
1
|
-
|
2
|
-
# このプラグインは `lib` の下にコピーされた foo.so や foo.bundle などのファイルを削除する
|
3
|
-
|
4
|
-
require "rbconfig"
|
5
|
-
require "pathname"
|
1
|
+
require "gem-ext-cleaner"
|
6
2
|
|
7
3
|
Gem.post_install do |installer|
|
8
|
-
(installer.spec
|
9
|
-
Dir.glob(File.join(path, "**/*")).each do |file|
|
10
|
-
next if file =~ /\/\d+\.\d\// # for fat gem
|
11
|
-
if Pathname(file).extname == ".#{RbConfig::CONFIG["DLEXT"]}"
|
12
|
-
File.delete(file)
|
13
|
-
puts "Delete #{file}"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
rescue Errno::EPERM
|
4
|
+
GemExtCleaner.clean(installer.spec)
|
18
5
|
end
|
metadata
CHANGED
@@ -1,22 +1,24 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-ext-cleaner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi SHIBATA
|
8
|
-
|
9
|
-
bindir: bin
|
8
|
+
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2024-05-28 00:00:00.000000000 Z
|
12
11
|
dependencies: []
|
13
12
|
description: Clean up unnecessary extension files for gem command.
|
14
13
|
email:
|
15
14
|
- hsbt@ruby-lang.org
|
16
|
-
executables:
|
15
|
+
executables:
|
16
|
+
- gem-ext-cleaner
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- exe/gem-ext-cleaner
|
21
|
+
- lib/gem-ext-cleaner.rb
|
20
22
|
- lib/rubygems_plugin.rb
|
21
23
|
homepage: https://github.com/hsbt/gem-ext-cleaner
|
22
24
|
licenses:
|
@@ -25,7 +27,6 @@ licenses:
|
|
25
27
|
metadata:
|
26
28
|
homepage_uri: https://github.com/hsbt/gem-ext-cleaner
|
27
29
|
source_code_uri: https://github.com/hsbt/gem-ext-cleaner
|
28
|
-
post_install_message:
|
29
30
|
rdoc_options: []
|
30
31
|
require_paths:
|
31
32
|
- lib
|
@@ -40,8 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
40
41
|
- !ruby/object:Gem::Version
|
41
42
|
version: '0'
|
42
43
|
requirements: []
|
43
|
-
rubygems_version: 3.
|
44
|
-
signing_key:
|
44
|
+
rubygems_version: 3.6.0.dev
|
45
45
|
specification_version: 4
|
46
46
|
summary: Clean up unnecessary extension files for gem command.
|
47
47
|
test_files: []
|