relinker 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/relinker/discoverer.rb +8 -2
- data/lib/relinker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06c4f0a93483f02dc239eb09f872ba17ae7ce52f64b1e31fd68b490985863b4a
|
4
|
+
data.tar.gz: 25adabb0e84fd4ed9e0e1e7ce1112bf5266d250de61e5c36e7a50a06803c42bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bfa0cd151016ecb2214c2055f68b192058e29df8c7a36c2e3cb42de1f96765cf23e6fefdb00f9436b569fc49cff988e9017f70c1ac5aa1fec96cb0a1b8c0917
|
7
|
+
data.tar.gz: 35f4f0e5d4b557a68f83a970e90233b2c07e06901c8a183e2bc706a8361551f5c1da667868346db6269fe999875650df02f92bc7a270f8e0748977d1d1c79257
|
data/Gemfile.lock
CHANGED
data/lib/relinker/discoverer.rb
CHANGED
@@ -29,9 +29,9 @@ module Relinker
|
|
29
29
|
children.each do |child|
|
30
30
|
next if child.symlink?
|
31
31
|
if child.directory?
|
32
|
-
discover(child) { |file| yield(file, checksum(file)) }
|
32
|
+
discover(child) { |file| yield(file, checksum(file)) if regular_file?(file) }
|
33
33
|
else
|
34
|
-
yield(child, checksum(child))
|
34
|
+
yield(child, checksum(child)) if regular_file?(child)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -46,6 +46,12 @@ module Relinker
|
|
46
46
|
|
47
47
|
private
|
48
48
|
|
49
|
+
def regular_file?(path)
|
50
|
+
special_types = %i[symlink chardev blockdev socket pipe]
|
51
|
+
special_type = special_types.find { |test| path.send("#{test}?") }
|
52
|
+
path.file? && !special_type && !path.to_s.match(/:|pid$|swap$|lock$/)
|
53
|
+
end
|
54
|
+
|
49
55
|
def merge_options(options = {})
|
50
56
|
options = options.map { |key, val| [key.to_sym, val] }.to_h
|
51
57
|
default_options.merge(options)
|
data/lib/relinker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relinker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Zinovyev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|