very_safe_rm 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/very_safe_rm/rm_one.rb +2 -2
- data/lib/very_safe_rm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fb6bd8e3a478f2d01b8cfbd590caaeb3127e041
|
4
|
+
data.tar.gz: e0ea48605fdf5360269fd54af0b8835945b8a328
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f03cb71491b2ad80ed2ec7d44667fd63f2b065ae5ae656bbf95a3c714ebed96c6428bca29cce4e54b12944f4a9c66f9e1ba31bae15611dd207251d2a62166b2
|
7
|
+
data.tar.gz: cef4759af80c54cba694460d236cf9e5037be0877c39f621b3ba0c0a45cac1ff910695f87fd59d5c6d340d3418da7330d55a37511509d543ce91b104b8d2024f
|
data/lib/very_safe_rm/rm_one.rb
CHANGED
@@ -2,7 +2,7 @@ module VerySafeRm
|
|
2
2
|
# TODO
|
3
3
|
module RM
|
4
4
|
def self.rm(file, args)
|
5
|
-
system
|
5
|
+
system %(rm #{args.join ' '} -- "#{file}")
|
6
6
|
end
|
7
7
|
|
8
8
|
def self.do_rm(file, args)
|
@@ -13,7 +13,7 @@ module VerySafeRm
|
|
13
13
|
|
14
14
|
def self.rm_one(file, args)
|
15
15
|
return RM.rm file, [] unless File.exist? file
|
16
|
-
filesystem = `stat -fc %T #{file}`
|
16
|
+
filesystem = `stat -fc %T "#{file}"`
|
17
17
|
if filesystem == 'nilfs' then RM.rm file, ['-r', '-v', '-f']
|
18
18
|
elsif Dir.empty? file then RM.rm file, ['-r', '-f', '-v']
|
19
19
|
elsif File.empty? file then RM.rm file, ['-f', '-v']
|
data/lib/very_safe_rm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: very_safe_rm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 71e6fd52
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|