yaccl 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/yaccl/model/folder.rb +6 -2
- data/lib/yaccl/model/object.rb +7 -6
- data/lib/yaccl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTIzNjljOTQ0YTA0YjI4NjNiNGQzNmI0NmRiMDY0NDNlYTgzNzhlOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzFlMzQ0ZTdmOTljY2YxYmNkZjc1ZjZmNzM1ZTdlMzhhMzhiNzNlZA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmUxYjFiNTlhYWEyOTc5MTY1YmZlMDZiOTliYmMzMWE4NTk0NTNmNmIyZmMz
|
10
|
+
ODRiMzM1Y2I5ZjdjZTgyN2YxMzRiYjIyMDYzZmUwMmExYmE4OGY0Y2RiNDJi
|
11
|
+
MWQ4OTBhNDNiZGRiZjQ1YTFlYjFmMTlhZWRlYTFiZjlhYzVlZDU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2NhNTA1NDEyNGMyNTk2ZWYyMmRjOWQ2MmE1YWI2ZDcyNDZmN2E5MmFlYmRh
|
14
|
+
ODBiNGEzNzg0ZmVmYzkzMDhhNDczOGY0NTRlZGFmNTk2M2IwNWE5MjJkOWEy
|
15
|
+
MTA0MzQwYWVmMzY0YzEwNzJmYWFhM2U0MGUyYzlmMDRhNGQ2NjM=
|
data/lib/yaccl/model/folder.rb
CHANGED
@@ -25,8 +25,12 @@ module YACCL
|
|
25
25
|
|
26
26
|
def children(max_items=nil, skip_count=nil)
|
27
27
|
children = Services.get_children(repository_id, object_id, nil, nil, nil, nil, nil, nil, max_items, skip_count)
|
28
|
-
children[:objects]
|
29
|
-
|
28
|
+
if children[:objects]
|
29
|
+
children[:objects].map! { |o| ObjectFactory.create(repository_id, o[:object]) }
|
30
|
+
else
|
31
|
+
children[:objects] = []
|
32
|
+
end
|
33
|
+
children[:num_items] = children.delete(:numItems).to_i
|
30
34
|
children[:has_more_items] = children.delete(:hasMoreItems)
|
31
35
|
|
32
36
|
yield(children) if block_given?
|
data/lib/yaccl/model/object.rb
CHANGED
@@ -19,9 +19,6 @@ module YACCL
|
|
19
19
|
@repository_id = repository_id
|
20
20
|
@properties = get_properties_map(raw)
|
21
21
|
|
22
|
-
@properties[:'cmis:creationDate'] = Time.at(@properties[:'cmis:creationDate'] / 1000) unless @properties[:'cmis:creationDate'].nil?
|
23
|
-
@properties[:'cmis:lastModificationDate'] = Time.at(@properties[:'cmis:lastModificationDate'] / 1000) unless @properties[:'cmis:lastModificationDate'].nil?
|
24
|
-
|
25
22
|
@object_id = @properties[:'cmis:objectId']
|
26
23
|
@base_type_id = @properties[:'cmis:baseTypeId']
|
27
24
|
@object_type_id = @properties[:'cmis:objectTypeId']
|
@@ -128,12 +125,16 @@ module YACCL
|
|
128
125
|
|
129
126
|
def get_properties_map(raw)
|
130
127
|
if raw[:succinctProperties]
|
131
|
-
raw[:succinctProperties]
|
128
|
+
result = raw[:succinctProperties]
|
132
129
|
elsif raw[:properties]
|
133
|
-
raw[:properties].reduce({}) { |h, (k, v)| h.merge(k => v[:value]) }
|
130
|
+
result = raw[:properties].reduce({}) { |h, (k, v)| h.merge(k => v[:value]) }
|
134
131
|
else
|
135
|
-
{}
|
132
|
+
result = {}
|
133
|
+
end
|
134
|
+
[:'cmis:creationDate', :'cmis:lastModificationDate'].each do |k|
|
135
|
+
result[k] = Time.at(result[k] / 1000) if result[k]
|
136
136
|
end
|
137
|
+
result
|
137
138
|
end
|
138
139
|
end
|
139
140
|
end
|
data/lib/yaccl/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaccl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenneth Geerts
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|