dir-to-xml 0.9.5 → 1.0.0
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 +0 -0
- data/lib/dir-to-xml.rb +15 -9
- metadata +37 -36
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6496a0f8c9d61c424059f610d41ec4694af6b0978becff48d288fa69f6e92a1
|
4
|
+
data.tar.gz: 727f869e42d65809b44ae09fa8047d8489b861030545dfc4697823bf0803f7f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66b044181149d1560fe343c4de959667475322503ac124a522b33a2b6ad8625b2325d7c949ec1dca2adc01c0fc03413d8b273b35ae973297afec99cb9bb95beb
|
7
|
+
data.tar.gz: 2e04fe70291f883a0c165baa5dd4337841682f34888d36a3a57763e4b1867d1746650ae2375a525eece11c576b75bdbd5503b21b263be691b5f9e7384e241840
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dir-to-xml.rb
CHANGED
@@ -2,18 +2,20 @@
|
|
2
2
|
|
3
3
|
# file: dir-to-xml.rb
|
4
4
|
|
5
|
-
require '
|
5
|
+
require 'dxlite'
|
6
6
|
|
7
7
|
|
8
8
|
class DirToXML
|
9
9
|
|
10
10
|
attr_reader :dx
|
11
11
|
|
12
|
-
def initialize(x= '.', recursive: false, index: 'dir.xml')
|
13
|
-
|
12
|
+
def initialize(x= '.', recursive: false, index: 'dir.xml', debug: false)
|
13
|
+
|
14
14
|
super()
|
15
15
|
|
16
|
-
|
16
|
+
@debug = debug
|
17
|
+
|
18
|
+
if x.is_a? DxLite then
|
17
19
|
|
18
20
|
@dx = x
|
19
21
|
@a = @dx.to_a
|
@@ -122,7 +124,7 @@ class DirToXML
|
|
122
124
|
@object = ext != '*' ? @a.select{|x| x[:ext][/#{ext}$/]} : @a
|
123
125
|
return if @object.empty?
|
124
126
|
|
125
|
-
dx =
|
127
|
+
dx = DxLite.new
|
126
128
|
dx.import @object
|
127
129
|
dtx = DirToXML.new(dx)
|
128
130
|
block_given? ? dtx.dx.all.map(&:name).each(&blk) : dtx
|
@@ -162,9 +164,9 @@ class DirToXML
|
|
162
164
|
|
163
165
|
def dxify(a)
|
164
166
|
|
165
|
-
dx =
|
167
|
+
dx = DxLite.new('directory[title, file_path, description]/file(name, ' + \
|
166
168
|
'type, ext, ctime, mtime, atime, description, owner, ' + \
|
167
|
-
'group, permissions)'
|
169
|
+
'group, permissions)')
|
168
170
|
|
169
171
|
dx.title = 'Index of ' + File.expand_path(@path)
|
170
172
|
dx.file_path = File.expand_path(@path)
|
@@ -179,14 +181,18 @@ class DirToXML
|
|
179
181
|
|
180
182
|
def refresh(cur_files)
|
181
183
|
|
182
|
-
|
184
|
+
puts 'inside refresh' if @debug
|
185
|
+
dx = DxLite.new(File.join(@path, @index), debug: @debug)
|
183
186
|
|
184
187
|
prev_files = dx.to_a
|
188
|
+
|
189
|
+
#puts 'prev_files: ' + prev_files.inspect
|
190
|
+
#puts 'cur_files: ' + cur_files.inspect
|
185
191
|
|
186
192
|
cur_files.each do |x|
|
187
193
|
|
188
194
|
file = prev_files.find {|item| item[:name] == x[:name] }
|
189
|
-
|
195
|
+
#puts 'found : ' + file.inspect if @debug
|
190
196
|
x[:description] = file[:description] if file and file[:description]
|
191
197
|
end
|
192
198
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dir-to-xml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -11,54 +11,54 @@ cert_chain:
|
|
11
11
|
- |
|
12
12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HQ4EFgQUEmUqvmku
|
26
|
+
azMk41rHySinmAUmae8wJgYDVR0RBB8wHYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0
|
27
27
|
c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1hc3RlckBqYW1lc3JvYmVydHNvbi5ldTAN
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
28
|
+
BgkqhkiG9w0BAQsFAAOCAYEAUyL0Sh3Ld6sK0fldg057McECcaOIyB/nKJApz1er
|
29
|
+
ET9qYthBvhpcaNNo19NFuf9W9UyaE6RI9Eb07DvGYyVP/b0yTrIKyzXzSAwFmrek
|
30
|
+
3VUVAhdqOIrIrf16Zpm4NoOGTOst+6sXZ9KQ52DPPwxdLbRCL7HkUFBMIVf2x2LV
|
31
|
+
XflA8IOlSUPH2vmHJnE0yfs7Lzd5+xYpKeOzQSHo0p+SBDzIim3mOZ3ryf4IZQhv
|
32
|
+
wh0fYGJ2iC/w3rPA78Awm6FNPlGCPjgPIz4mliMicRI/sZmFQvn8+2HYWEzDDOO8
|
33
|
+
zYvUB7rkjDGXYqN1Ft3N6EOuNworOFjUlcPrDFCQHf4UgPjD6Z8WbYkI9c7LWtjc
|
34
|
+
HJCyl/PVyS0Srbl8IPn7JsgUCS7S02KOnVzukQ7PTc1wBlAZ4mNb7N9EOp90GP9a
|
35
|
+
YSREEphg3phQsU9LV4Dlc2Id4gB3W+//c1Ek6TFieKoVemKMkbtB1lgqsEpTCfwh
|
36
|
+
oNUg84DlSmZ2z9LKagBVAlDy
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2021-01-23 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
|
-
name:
|
41
|
+
name: dxlite
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- - "~>"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '1.8'
|
47
44
|
- - ">="
|
48
45
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
46
|
+
version: 0.3.0
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0.3'
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- - "~>"
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '1.8'
|
57
54
|
- - ">="
|
58
55
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
56
|
+
version: 0.3.0
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0.3'
|
60
60
|
description:
|
61
|
-
email:
|
61
|
+
email: digital.robertson@gmail.com
|
62
62
|
executables: []
|
63
63
|
extensions: []
|
64
64
|
extra_rdoc_files: []
|
@@ -76,14 +76,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
76
|
requirements:
|
77
77
|
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: 2.
|
79
|
+
version: 2.5.3
|
80
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - ">="
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|
86
|
-
|
86
|
+
rubyforge_project:
|
87
|
+
rubygems_version: 2.7.10
|
87
88
|
signing_key:
|
88
89
|
specification_version: 4
|
89
90
|
summary: Dir-to-xml saves a directory listing in the Dynarex XML format
|
metadata.gz.sig
CHANGED
Binary file
|