boxnet 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/boxnet/version.rb +1 -1
- data/lib/boxnet.rb +1 -1
- data/lib/file_node.rb +8 -5
- metadata +2 -2
data/lib/boxnet/version.rb
CHANGED
data/lib/boxnet.rb
CHANGED
data/lib/file_node.rb
CHANGED
@@ -3,13 +3,15 @@ module Boxnet
|
|
3
3
|
attr :files, :folders
|
4
4
|
|
5
5
|
def process_node(data)
|
6
|
+
return data.nil?
|
6
7
|
@files = []
|
7
|
-
@folders = []
|
8
|
-
|
9
|
-
if data
|
8
|
+
@folders = []
|
9
|
+
|
10
|
+
if data.has_key?("folder")
|
10
11
|
self.folders << Folder.new(data["folder"])
|
11
|
-
elsif data
|
12
|
+
elsif data.has_key?("folders")
|
12
13
|
folder = data["folders"]["folder"]
|
14
|
+
|
13
15
|
if folder.class == Array
|
14
16
|
folder.each do |f|
|
15
17
|
self.folders << Folder.new(f)
|
@@ -19,8 +21,9 @@ module Boxnet
|
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
22
|
-
if data
|
24
|
+
if data.has_key?("files")
|
23
25
|
file = data["files"]["file"]
|
26
|
+
|
24
27
|
if file.class == Array
|
25
28
|
file.each do |f|
|
26
29
|
self.files << File.new(f)
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: boxnet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jonathan Birkholz
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-12-05 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|