very_safe_rm 0.2.5 → 0.2.6

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
  SHA1:
3
- metadata.gz: 792ea87c0f1f38eb3dd06d48d1997c2645d01c6a
4
- data.tar.gz: 8868266655e70d1bc33fec575fa43a395157c27b
3
+ metadata.gz: 8242f26620b7c9650da6ad127f77ecd3e52992d0
4
+ data.tar.gz: 3bc08c375cce30f9a395395616c02d5c9e93b8ea
5
5
  SHA512:
6
- metadata.gz: 5f1e5a90a2194ac0ef5cbd749af09374d5a9fab204327a10ad627d5d274a585ae96147f57c50c6eb7948fe417b1e974fafd9e6c1bdcf5e52470362bad60901c4
7
- data.tar.gz: f92d232e00ef46830ccaa7be3a3e1b318ad4532c9afc61995934d83c70aa042097b99a5ec4a49b4e8224f208d777b6b9b8c2749662dceceb99dd567a09831b43
6
+ metadata.gz: e498cff33226dd84da0e3b231751892c526665364a2e8909d14f0b6399508549c123312376889fb1ce778b7ab911f74d31dbd9e2dbd648b86bfc58e38c25734e
7
+ data.tar.gz: 346283fae911a0b950d0a35054cf5a4ab3a30d0da04a9dd60b80e5e5d04ea69323f0e5eb9ee6b8ccfdc86d2915e2e1af3fe11a12e462d8e8040d42777638c63d
@@ -12,6 +12,7 @@ module VerySafeRm
12
12
  end
13
13
 
14
14
  def self.rm_one(file, args)
15
+ return RM.rm file, [] unless File.exist? file
15
16
  filesystem = `stat -fc %T #{file}`
16
17
  if filesystem == 'nilfs' then RM.rm file, ['-r', '-v', '-f']
17
18
  elsif Dir.empty? file then RM.rm file, ['-r', '-f', '-v']
@@ -21,7 +22,7 @@ module VerySafeRm
21
22
  end
22
23
  end
23
24
 
24
- def self.check_force_rm(file)
25
+ def self.check_force_rm?(file)
25
26
  return false unless File.exist? \
26
27
  File.expand_path("-#{file}.rm", File.dirname(file))
27
28
  RM.rm "-#{file}.rm", ['-r', '-f']
@@ -1,3 +1,3 @@
1
1
  module VerySafeRm
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: very_safe_rm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - 71e6fd52