mack_ruby_core_extensions 0.0.3 → 0.0.4

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.
@@ -1,25 +0,0 @@
1
- class Dir
2
-
3
-
4
- #creates multiple directories
5
- def self.make_dirs(path)
6
- dir_names = path.split('/')
7
- new_path=""
8
- dir_names.each do |x|
9
- new_path = new_path << x << '/'
10
- if !File.directory?(new_path)
11
- Dir.mkdir(new_path)
12
- end
13
- end
14
- end
15
-
16
-
17
- #if a directory exists, it deletes everything in it, otherwise it creates the directory
18
- def self.prep_dir(path)
19
- if File.directory?(path)
20
- Dir.foreach(path) {|x| File.delete(path + x) unless File.directory?(path + x)}
21
- else
22
- Dir.make_dirs(path)
23
- end
24
- end
25
- end
@@ -1,15 +0,0 @@
1
- require File.dirname(__FILE__) + '/../test_helper.rb'
2
-
3
- class DirTest < Test::Unit::TestCase
4
-
5
- def setup
6
- end
7
-
8
- def teardown
9
- end
10
-
11
- # replace this with tests of your own.
12
- def test_truth
13
- assert true
14
- end
15
- end