yaccl 0.0.12 → 0.0.13
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/object.rb +13 -0
- data/lib/yaccl/services/internal/browser_binding_service.rb +1 -0
- data/lib/yaccl/version.rb +1 -1
- data/spec/model/relationship_spec.rb +15 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2VhNjc2ODcxODliMWM1MjlkYjQwOGY0MjdmNmM2YzA0NGQ3NDIwYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2QyOThiMzY1MGNhODdjM2U4MWU4MWM3MmE5NDhiYjY2ZDdjZGEwNg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTk5ODE4Yzc3NWQ4N2RkOTBmY2M1MTRkNDQ2Y2YwNDdlOTI5MmViOTBkYzli
|
10
|
+
ZGIyMzg1NDNjOWE3MTY2YzBlN2MwMmJkMzNjZDJlMTc3YTExYmJkNTdiMGJk
|
11
|
+
MWJhYzMyMzY5OGNjYjU2NGQ2NThmYzJmZDUyY2NjMzUwN2Y4MjY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjhiODBjZThiYzRlM2E5ODRhZTdiMmRjOWExNTcxYjBlM2NjMzYyMDU1ZjYz
|
14
|
+
ZmVkOGZhMDdkZGQwMzYzMjVmYTRlNGRhMGU5NzU0ZjM3MjQ4NzA0YTI3ZmNm
|
15
|
+
YWMzMjU5YTk2ZTdlYjYxMTYwODZkZTEyNGRiOTA3OWZkZjBkYWI=
|
data/lib/yaccl/model/object.rb
CHANGED
@@ -77,6 +77,15 @@ module YACCL
|
|
77
77
|
Services.remove_object_from_folder(repository_id, object_id, nil)
|
78
78
|
end
|
79
79
|
|
80
|
+
def move(target_folder)
|
81
|
+
object_parents = parents
|
82
|
+
if object_parents.size == 1
|
83
|
+
Services.move_object(repository_id, object_id, target_folder.object_id, object_parents.first.object_id)
|
84
|
+
else
|
85
|
+
# raise?
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
80
89
|
def acls
|
81
90
|
Services.get_acl(repository_id, object_id, nil)
|
82
91
|
end
|
@@ -111,6 +120,10 @@ module YACCL
|
|
111
120
|
allowable_actions[:canUpdateProperties]
|
112
121
|
end
|
113
122
|
|
123
|
+
def method_missing(method_sym, *arguments, &block)
|
124
|
+
@properties[method_sym] ? @properties[method_sym] : super
|
125
|
+
end
|
126
|
+
|
114
127
|
private
|
115
128
|
|
116
129
|
def get_properties_map(raw)
|
@@ -95,6 +95,7 @@ module YACCL
|
|
95
95
|
props = hash.delete(:properties)
|
96
96
|
if props.is_a?(Hash)
|
97
97
|
props.each_with_index do |(id, value), index|
|
98
|
+
value = (value.to_f * 1000).to_i if value.is_a?(Time)
|
98
99
|
hash.merge!("propertyId[#{index}]" => id,
|
99
100
|
"propertyValue[#{index}]" => value)
|
100
101
|
end
|
data/lib/yaccl/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative '../helper'
|
2
|
+
|
3
|
+
describe YACCL::Model::Relationship do
|
4
|
+
|
5
|
+
it 'should make properties accessible through method' do
|
6
|
+
new_object = YACCL::Model::Relationship.new('repoId', {succinctProperties: {myProp: 'myValue'}})
|
7
|
+
new_object.myProp.should eq 'myValue'
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should raise methodmissing for unknown property' do
|
11
|
+
new_object = YACCL::Model::Relationship.new('repoId', {succinctProperties: {'myProp' => 'myValue'}})
|
12
|
+
expect {new_object.myOtherProp}.to raise_error(NoMethodError, /undefined method `myOtherProp'/)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
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.13
|
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-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- spec/model/document_spec.rb
|
110
110
|
- spec/model/folder_spec.rb
|
111
111
|
- spec/model/object_spec.rb
|
112
|
+
- spec/model/relationship_spec.rb
|
112
113
|
- spec/model/repository_spec.rb
|
113
114
|
- spec/model/server_spec.rb
|
114
115
|
- spec/services/navigation_services_spec.rb
|
@@ -143,6 +144,7 @@ test_files:
|
|
143
144
|
- spec/model/document_spec.rb
|
144
145
|
- spec/model/folder_spec.rb
|
145
146
|
- spec/model/object_spec.rb
|
147
|
+
- spec/model/relationship_spec.rb
|
146
148
|
- spec/model/repository_spec.rb
|
147
149
|
- spec/model/server_spec.rb
|
148
150
|
- spec/services/navigation_services_spec.rb
|