zm-ruby-client 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/zm/client/folder/folder.rb +2 -1
- data/lib/zm/client/folder/folder_grant.rb +1 -1
- data/lib/zm/client/folder/folder_jsns_initializer.rb +21 -22
- data/lib/zm-ruby-client.rb +0 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e4c2c32c371d0de77fe4892230e967cbba6afc90e0aae91b82af2e4ef9fbc09c
|
|
4
|
+
data.tar.gz: e22eb3274715dfe64d2a67c0bbf1df6caf502c51450ae24767f7ed473e041b11
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 494f3fd894e55e673bd7e3322718cbe4905caabee6ac5ae92b3968ded15440e8549c4a8240229847005852f1fb99c1ef4e8257ce9e9442b0949032a2578cb715
|
|
7
|
+
data.tar.gz: 0ef90ae3f7cb2e75f23b05f314e00d46bdcf398e324e9613ecd1729e63b77f7737b125fa27231038cfa9e2b3a6b67617e39b0ac9f23d864cdefdd3d182f1eef7
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.
|
|
1
|
+
3.0.1
|
|
@@ -10,7 +10,7 @@ module Zm
|
|
|
10
10
|
|
|
11
11
|
attr_accessor :type, :uuid, :name, :absFolderPath, :url, :luuid, :f, :view, :rev, :ms,
|
|
12
12
|
:webOfflineSyncDays, :activesyncdisabled, :n, :s, :i4ms, :i4next, :zid, :rid, :ruuid,
|
|
13
|
-
:owner, :reminder, :
|
|
13
|
+
:owner, :reminder, :itemCount, :broken, :deletable, :color, :rgb, :fb, :folders
|
|
14
14
|
|
|
15
15
|
alias nb_messages n
|
|
16
16
|
alias nb_items n
|
|
@@ -37,6 +37,7 @@ module Zm
|
|
|
37
37
|
|
|
38
38
|
@grants = FolderGrantsCollection.new(self)
|
|
39
39
|
end
|
|
40
|
+
alias acl grants
|
|
40
41
|
|
|
41
42
|
def retention_policies
|
|
42
43
|
return @retention_policies if defined? @retention_policies
|
|
@@ -35,7 +35,6 @@ module Zm
|
|
|
35
35
|
item.ruuid = json.delete(:ruuid)
|
|
36
36
|
item.owner = json.delete(:owner)
|
|
37
37
|
item.reminder = json.delete(:reminder)
|
|
38
|
-
item.acl = json.delete(:acl)
|
|
39
38
|
item.itemCount = json.delete(:itemCount)
|
|
40
39
|
item.broken = json.delete(:broken)
|
|
41
40
|
item.deletable = json.delete(:deletable)
|
|
@@ -43,17 +42,7 @@ module Zm
|
|
|
43
42
|
item.rgb = json.delete(:rgb)
|
|
44
43
|
item.fb = json.delete(:fb)
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
if grants.is_a?(Array)
|
|
48
|
-
grants.each do |grant|
|
|
49
|
-
item.grants.create(
|
|
50
|
-
grant.delete(:zid),
|
|
51
|
-
grant.delete(:gt),
|
|
52
|
-
grant.delete(:perm),
|
|
53
|
-
grant.delete(:d)
|
|
54
|
-
)
|
|
55
|
-
end
|
|
56
|
-
end
|
|
45
|
+
update_grants(item, json)
|
|
57
46
|
|
|
58
47
|
if (policies = json.fetch(:retentionPolicy, []).first).is_a?(Array)
|
|
59
48
|
policies.each do |policy, v|
|
|
@@ -66,20 +55,30 @@ module Zm
|
|
|
66
55
|
end
|
|
67
56
|
end
|
|
68
57
|
|
|
69
|
-
# if json[:retentionPolicy].is_a?(Array)
|
|
70
|
-
# json[:retentionPolicy].first.each do |policy, v|
|
|
71
|
-
# next if v.first[:policy].nil?
|
|
72
|
-
#
|
|
73
|
-
# type = v.first[:policy].first[:type]
|
|
74
|
-
# lifetime = v.first[:policy].first[:lifetime]
|
|
75
|
-
# item.retention_policies.create(policy, lifetime, type)
|
|
76
|
-
# end
|
|
77
|
-
# end
|
|
78
|
-
|
|
79
58
|
item.extend(DocumentFolder) if item.view == Zm::Client::FolderView::DOCUMENT
|
|
80
59
|
|
|
81
60
|
item
|
|
82
61
|
end
|
|
62
|
+
|
|
63
|
+
private
|
|
64
|
+
|
|
65
|
+
def update_grants(item, json)
|
|
66
|
+
acl = json.delete(:acl)
|
|
67
|
+
return unless acl.is_a?(Hash)
|
|
68
|
+
|
|
69
|
+
grants = acl[:grant]
|
|
70
|
+
grants = [grants] unless grants.is_a?(Array)
|
|
71
|
+
grants.compact!
|
|
72
|
+
|
|
73
|
+
grants.each do |grant|
|
|
74
|
+
item.grants.create(
|
|
75
|
+
grant.delete(:zid),
|
|
76
|
+
grant.delete(:gt),
|
|
77
|
+
grant.delete(:perm),
|
|
78
|
+
grant.delete(:d)
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
83
82
|
end
|
|
84
83
|
end
|
|
85
84
|
end
|
data/lib/zm-ruby-client.rb
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'zm/client'
|
|
4
|
-
|
|
5
|
-
Kernel.warn '⚠️ [DEPRECATION] memorization will not be supported in zm-ruby-client 3.0. Please do not use .all method as memorized items.'
|
|
6
|
-
Kernel.warn '⚠️ [DEPRECATION] zm-ruby-client 3.0 will not support Ruby < 3.1'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zm-ruby-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maxime Désécot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-07-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|