dir-to-xml 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +3 -1
- data/lib/dir-to-xml.rb +7 -4
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4bee1bcaf2415070878f969ab97a2fd7138e94b
|
4
|
+
data.tar.gz: 9a7db4b07f4aae56fca9d001d65d1133c9f46e30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2e8e7535604f25b9c206ad36870cec9dcfc92bf62ac0f2b02a468845c77e43a3bcd05cf41f0770c94ce09e9ebeb9427c08d88e8d91db293aa18d07154c87e38
|
7
|
+
data.tar.gz: 00c7c00a798906948d518b2b17b5eb9f958ca6c3956ccd900be453ea0648161e2b1cbfa18fc9d26f828b99a7dafa50a13d916d40266fa36d4038e960ff17912f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
data/lib/dir-to-xml.rb
CHANGED
@@ -17,13 +17,15 @@ class DirToXML
|
|
17
17
|
raise "Directory not found." unless File.exists? path
|
18
18
|
|
19
19
|
a = Dir.glob(File.join(path, "*")).map{|x| File.basename(x) }.sort
|
20
|
-
|
20
|
+
|
21
21
|
a.delete index
|
22
22
|
|
23
|
-
a2 = a.inject([]) do |r,
|
23
|
+
a2 = a.inject([]) do |r, filename|
|
24
24
|
|
25
|
+
x = File.join(path, filename)
|
26
|
+
|
25
27
|
r << {
|
26
|
-
name:
|
28
|
+
name: filename,
|
27
29
|
type: File::ftype(x),
|
28
30
|
ext: File.extname(x),
|
29
31
|
ctime: File::ctime(x),
|
@@ -116,7 +118,8 @@ class DirToXML
|
|
116
118
|
dx.file_path = Dir.pwd
|
117
119
|
|
118
120
|
dx.import a
|
119
|
-
|
121
|
+
|
122
|
+
dx.save File.join(@path, @index)
|
120
123
|
|
121
124
|
return dx
|
122
125
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|