stashify 1.0.2 → 1.0.4
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/stashify/directory/local.rb +8 -6
- data/lib/stashify/directory.rb +6 -1
- data/lib/stashify/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac39c7eaa7f0a6e924497457841cc2087d34cacda4d400d32d3fa3e95965de69
|
4
|
+
data.tar.gz: fcb7cef63717efdbcb91eb0e668282352f62581e3205423bb16cfb4be0077210
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e592aeefb27cd272449dc897ce23a59abd2f298f115280b5c5eac26d9b448c6169cb29280350ba4ab3f1c19746779b976c54a85aa95ca11bc61c20d451b0a3a
|
7
|
+
data.tar.gz: 15ed987a91e39127836c08b7a9f4099aab4a2b16b804e3f944f987ce50b62ed9a65516032e99c27cd10efc65f177840b66bde5e19b779cf6f053f34453a5c967
|
data/Gemfile.lock
CHANGED
@@ -14,10 +14,8 @@ module Stashify
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def write_directory(directory)
|
17
|
-
|
18
|
-
|
19
|
-
subdir = Stashify::Directory::Local.new(path)
|
20
|
-
directory.files.each { |file| subdir.write(file) }
|
17
|
+
FileUtils.mkdir(path_of(directory.name))
|
18
|
+
super
|
21
19
|
end
|
22
20
|
|
23
21
|
def write_file(file)
|
@@ -45,14 +43,18 @@ module Stashify
|
|
45
43
|
|
46
44
|
private
|
47
45
|
|
48
|
-
def
|
49
|
-
::File.
|
46
|
+
def file?(name)
|
47
|
+
::File.exist?(path_of(name))
|
50
48
|
end
|
51
49
|
|
52
50
|
def file(name)
|
53
51
|
Stashify::File::Local.new(path_of(name))
|
54
52
|
end
|
55
53
|
|
54
|
+
def directory?(name)
|
55
|
+
::File.directory?(path_of(name))
|
56
|
+
end
|
57
|
+
|
56
58
|
def directory(name)
|
57
59
|
Stashify::Directory::Local.new(path_of(name))
|
58
60
|
end
|
data/lib/stashify/directory.rb
CHANGED
@@ -12,7 +12,7 @@ module Stashify
|
|
12
12
|
def find(name)
|
13
13
|
if directory?(name)
|
14
14
|
directory(name)
|
15
|
-
|
15
|
+
elsif file?(name)
|
16
16
|
file(name)
|
17
17
|
end
|
18
18
|
end
|
@@ -24,5 +24,10 @@ module Stashify
|
|
24
24
|
write_file(file)
|
25
25
|
end
|
26
26
|
end
|
27
|
+
|
28
|
+
def write_directory(directory)
|
29
|
+
subdir = self.directory(directory.name)
|
30
|
+
directory.files.each { |file| subdir.write(file) }
|
31
|
+
end
|
27
32
|
end
|
28
33
|
end
|
data/lib/stashify/version.rb
CHANGED