decimate 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +5 -0
- data/README.md +3 -1
- data/Rakefile +6 -1
- data/decimate.gemspec +0 -3
- data/lib/decimate.rb +2 -2
- data/lib/decimate/version.rb +1 -1
- data/spec/lib/decimate_spec.rb +1 -1
- metadata +3 -34
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Decimate
|
2
2
|
|
3
|
+
[](http://travis-ci.org/justinwiley/decimate)
|
4
|
+
|
3
5
|
Discipline your file system by securely deleting some of its precious files or directories using shred.
|
4
6
|
|
5
7
|
### Notable features:
|
@@ -35,7 +37,7 @@ See RDoc for details.
|
|
35
37
|
- The gem shells out to shred. If shred is not installed, an error will be raised.
|
36
38
|
- Since it's shredding files, disk-recovery utilities won't save you if you accidentally delete something.
|
37
39
|
- Shred has many limitations, especially on journaling file systems, see the man page.
|
38
|
-
- The find command with the -
|
40
|
+
- The find command is executed with the -exec option instead of -execdir due to issues with some build environments. This is theoretically less secure. Read the man page for security implications.
|
39
41
|
- Decimate has been tested on Ubuntu Linux. It won't work on Windows-based systems.
|
40
42
|
- Decimate has few scruples, it only tries to prevent you from blowing away the root directory, and whatever regex you provide. If you tell it to delete /bin/bash, it will do it.
|
41
43
|
|
data/Rakefile
CHANGED
data/decimate.gemspec
CHANGED
@@ -22,9 +22,6 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.add_dependency "fileutils"
|
26
|
-
spec.add_dependency "open3"
|
27
|
-
|
28
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
29
26
|
spec.add_development_dependency "rake"
|
30
27
|
spec.add_development_dependency "pry"
|
data/lib/decimate.rb
CHANGED
@@ -10,7 +10,7 @@ module Decimate
|
|
10
10
|
#
|
11
11
|
def self.run cmd
|
12
12
|
stdout,stderr,status = Open3.capture3 cmd
|
13
|
-
raise "Domination failed
|
13
|
+
raise "Domination failed executing #{cmd}: stdout: #{stdout}, stderr: #{stderr}, status #{status}" unless status.nil? || status == 0
|
14
14
|
stdout
|
15
15
|
end
|
16
16
|
|
@@ -61,7 +61,7 @@ module Decimate
|
|
61
61
|
fail_unless_shred
|
62
62
|
validate_path path, opts[:path_must_match]
|
63
63
|
|
64
|
-
stdout = run "find #{path} -type f -
|
64
|
+
stdout = run "find #{path} -type f -exec #{shred_cmd} '{}' ';'"
|
65
65
|
FileUtils.rm_rf path
|
66
66
|
stdout
|
67
67
|
end
|
data/lib/decimate/version.rb
CHANGED
data/spec/lib/decimate_spec.rb
CHANGED
@@ -84,7 +84,7 @@ describe Decimate do
|
|
84
84
|
end
|
85
85
|
|
86
86
|
it 'should securely delete all files under the given file' do
|
87
|
-
Open3.should_receive(:capture3).with("find #{dir} -type f -
|
87
|
+
Open3.should_receive(:capture3).with("find #{dir} -type f -exec shred -uv '{}' ';'")
|
88
88
|
Decimate.dir! dir
|
89
89
|
end
|
90
90
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decimate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,40 +9,8 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: fileutils
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: open3
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0'
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
14
|
- !ruby/object:Gem::Dependency
|
47
15
|
name: bundler
|
48
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,6 +85,7 @@ extra_rdoc_files: []
|
|
117
85
|
files:
|
118
86
|
- .gitignore
|
119
87
|
- .rspec
|
88
|
+
- .travis.yml
|
120
89
|
- Gemfile
|
121
90
|
- LICENSE.txt
|
122
91
|
- README.md
|