yaccl 0.0.33 → 0.0.34

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56f4fac51c80131d8619c5cfce687475e823179d
4
- data.tar.gz: 8eb0fc9b0aa0c4d6bb8304333b62efc621451bb8
3
+ metadata.gz: 3482ae343f4d0c79b82399b817a3d91fa1ced4c2
4
+ data.tar.gz: 5af3fa3c01e7fbb37a187e80cbce0163a89ed419
5
5
  SHA512:
6
- metadata.gz: 3234743599f67a8eb93e01757d865c4461a17bc2cfdd1552e2fb7ed4b8ea955f4ec0cf8777d0e6d96c2a8e47e5100b451dc8a54a785a0c2671401985100ad644
7
- data.tar.gz: e9ed4243879cafc394b32f0f7b0940bc7637a063a5e2db5c10c62c595249f7c520f87c22aba63dc5c43a2cf872e1c25933307ac0e9a8c54690375427d4561165
6
+ metadata.gz: f2d52a9fa114b694eddd0a7933c5c92feac4a97ff6f7ff0a5c9307d2ebc7c09d766412a7500549e0106e578d66dbb13ab3a8b272733eb05b8b3078fd70a743aa
7
+ data.tar.gz: a4e0cf077d4b0ee4440a45bc774202107a30dde24b4ee7d4e7771a0403a0979f78356f2b567e8a575804c76dc90b99c8721df76aa89f0c50e61680ac92dfb328
@@ -55,7 +55,7 @@ module YACCL
55
55
  @local_content = content
56
56
  else
57
57
  r = Services.set_content_stream(repository_id, object_id, nil, change_token, content)
58
- change_token = r[:properties][:'cmis:changeToken'][:value]
58
+ update_change_token(r)
59
59
  end
60
60
  end
61
61
 
@@ -12,7 +12,7 @@ module YACCL
12
12
  attr_reader :creation_date
13
13
  attr_reader :last_modified_by
14
14
  attr_reader :last_modification_date
15
- attr_reader :change_token
15
+ attr_accessor :change_token
16
16
  attr_accessor :properties
17
17
 
18
18
  def initialize(repository_id, raw={})
@@ -46,7 +46,7 @@ module YACCL
46
46
 
47
47
  def update_properties(properties)
48
48
  r = Services.update_properties(repository_id, object_id, change_token, properties)
49
- change_token = r[:properties][:'cmis:changeToken'][:value]
49
+ update_change_token(r)
50
50
  end
51
51
 
52
52
  def parents
@@ -122,6 +122,16 @@ module YACCL
122
122
  @properties[method_sym] ? @properties[method_sym] : super
123
123
  end
124
124
 
125
+ def update_change_token(r)
126
+ @change_token = if r[:properties]
127
+ r[:properties][:'cmis:changeToken'][:value]
128
+ elsif r[:succinctProperties]
129
+ r[:succinctProperties][:'cmis:changeToken']
130
+ else
131
+ raise "Unexpected response: #{r}"
132
+ end
133
+ end
134
+
125
135
  private
126
136
 
127
137
  def get_properties_map(raw)
@@ -1,3 +1,3 @@
1
1
  module YACCL
2
- VERSION = '0.0.33'
2
+ VERSION = '0.0.34'
3
3
  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.33
4
+ version: 0.0.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenneth Geerts