files.com 1.0.186 → 1.0.187

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
  SHA256:
3
- metadata.gz: dd6b8cb725740fa166bbc1ce206311927d47ff2b8e31646f2d8f42f0c2cbceb9
4
- data.tar.gz: 72b86fe34d261f24fd19893434d5876fb2f556d11968cf617ec51a5d948acced
3
+ metadata.gz: 4d5bb31875a4586b91754ab369dcc86a3c2fa37eeddca9dda476087512aed6a1
4
+ data.tar.gz: ad6d4e2eca2914934aa18edeca1eeee889e0166b3cc8dd1086aa3a320f070bad
5
5
  SHA512:
6
- metadata.gz: 8c58e5414b8d30902338b6d2e0f6419ba591190d48bf34344718170a7155191f0b4e6aa4655683219b78e8c900e1f008993dddd94dc276c855c528439b013ae2
7
- data.tar.gz: '0887f3a898073aeb880648cde030f192056660213bfce7f725cc31927b7b4a95b803b48dff42b7cfa3524373167094fd36850ca142a42454a2dbfbc8ce7ab542'
6
+ metadata.gz: 9b514f80a52e9294e7c83ffd9b54ead85793adfb0d6072b1891893c1380beea2c02043208a099f87969fe890a93c4fc90f324d4fbdc27e3927eaa53eeaa7f660
7
+ data.tar.gz: 54ef9dde013fa812864094a5aeed693792e719c1fc3288b8ea134504af316bcd5bc737f3a6ef764ffcdee313d3024975bb9a941d5ff1112e7b74d05f423181b1
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.186
1
+ 1.0.187
data/docs/lock.md CHANGED
@@ -7,22 +7,28 @@
7
7
  "path": "locked_file",
8
8
  "timeout": 43200,
9
9
  "depth": "infinity",
10
+ "recursive": true,
10
11
  "owner": "user",
11
12
  "scope": "shared",
13
+ "exclusive": true,
12
14
  "token": "17c54824e9931a4688ca032d03f6663c",
13
15
  "type": "write",
16
+ "allow_access_by_any_user": true,
14
17
  "user_id": 1,
15
18
  "username": ""
16
19
  }
17
20
  ```
18
21
 
19
22
  * `path` (string): Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
20
- * `timeout` (int64): Lock timeout
21
- * `depth` (string): Lock depth (0 or infinity)
22
- * `owner` (string): Owner of lock. This can be any arbitrary string.
23
- * `scope` (string): Lock scope(shared or exclusive)
23
+ * `timeout` (int64): Lock timeout in seconds
24
+ * `depth` (string): DEPRECATED: Lock depth
25
+ * `recursive` (boolean): Does lock apply to subfolders?
26
+ * `owner` (string): Owner of the lock. This can be any arbitrary string.
27
+ * `scope` (string): DEPRECATED: Lock scope
28
+ * `exclusive` (boolean): Is lock exclusive?
24
29
  * `token` (string): Lock token. Use to release lock.
25
- * `type` (string): Lock type
30
+ * `type` (string): DEPRECATED: Lock type
31
+ * `allow_access_by_any_user` (boolean): Can lock be modified by users other than its creator?
26
32
  * `user_id` (int64): Lock creator user ID
27
33
  * `username` (string): Lock creator username
28
34
 
@@ -52,6 +58,9 @@ Files::Lock.list_for(path,
52
58
 
53
59
  ```
54
60
  Files::Lock.create(path,
61
+ allow_access_by_any_user: true,
62
+ exclusive: true,
63
+ recursive: true,
55
64
  timeout: 1
56
65
  )
57
66
  ```
@@ -59,6 +68,9 @@ Files::Lock.create(path,
59
68
  ### Parameters
60
69
 
61
70
  * `path` (string): Required - Path
71
+ * `allow_access_by_any_user` (boolean): Allow lock to be updated by any user?
72
+ * `exclusive` (boolean): Is lock exclusive?
73
+ * `recursive` (string): Does lock apply to subfolders?
62
74
  * `timeout` (int64): Lock timeout length
63
75
 
64
76
 
@@ -18,7 +18,7 @@ module Files
18
18
  @attributes[:path] = value
19
19
  end
20
20
 
21
- # int64 - Lock timeout
21
+ # int64 - Lock timeout in seconds
22
22
  def timeout
23
23
  @attributes[:timeout]
24
24
  end
@@ -27,7 +27,7 @@ module Files
27
27
  @attributes[:timeout] = value
28
28
  end
29
29
 
30
- # string - Lock depth (0 or infinity)
30
+ # string - DEPRECATED: Lock depth
31
31
  def depth
32
32
  @attributes[:depth]
33
33
  end
@@ -36,7 +36,16 @@ module Files
36
36
  @attributes[:depth] = value
37
37
  end
38
38
 
39
- # string - Owner of lock. This can be any arbitrary string.
39
+ # boolean - Does lock apply to subfolders?
40
+ def recursive
41
+ @attributes[:recursive]
42
+ end
43
+
44
+ def recursive=(value)
45
+ @attributes[:recursive] = value
46
+ end
47
+
48
+ # string - Owner of the lock. This can be any arbitrary string.
40
49
  def owner
41
50
  @attributes[:owner]
42
51
  end
@@ -45,7 +54,7 @@ module Files
45
54
  @attributes[:owner] = value
46
55
  end
47
56
 
48
- # string - Lock scope(shared or exclusive)
57
+ # string - DEPRECATED: Lock scope
49
58
  def scope
50
59
  @attributes[:scope]
51
60
  end
@@ -54,6 +63,15 @@ module Files
54
63
  @attributes[:scope] = value
55
64
  end
56
65
 
66
+ # boolean - Is lock exclusive?
67
+ def exclusive
68
+ @attributes[:exclusive]
69
+ end
70
+
71
+ def exclusive=(value)
72
+ @attributes[:exclusive] = value
73
+ end
74
+
57
75
  # string - Lock token. Use to release lock.
58
76
  def token
59
77
  @attributes[:token]
@@ -63,7 +81,7 @@ module Files
63
81
  @attributes[:token] = value
64
82
  end
65
83
 
66
- # string - Lock type
84
+ # string - DEPRECATED: Lock type
67
85
  def type
68
86
  @attributes[:type]
69
87
  end
@@ -72,6 +90,15 @@ module Files
72
90
  @attributes[:type] = value
73
91
  end
74
92
 
93
+ # boolean - Can lock be modified by users other than its creator?
94
+ def allow_access_by_any_user
95
+ @attributes[:allow_access_by_any_user]
96
+ end
97
+
98
+ def allow_access_by_any_user=(value)
99
+ @attributes[:allow_access_by_any_user] = value
100
+ end
101
+
75
102
  # int64 - Lock creator user ID
76
103
  def user_id
77
104
  @attributes[:user_id]
@@ -133,11 +160,15 @@ module Files
133
160
 
134
161
  # Parameters:
135
162
  # path (required) - string - Path
163
+ # allow_access_by_any_user - boolean - Allow lock to be updated by any user?
164
+ # exclusive - boolean - Is lock exclusive?
165
+ # recursive - string - Does lock apply to subfolders?
136
166
  # timeout - int64 - Lock timeout length
137
167
  def self.create(path, params = {}, options = {})
138
168
  params ||= {}
139
169
  params[:path] = path
140
170
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
171
+ raise InvalidParameterError.new("Bad parameter: recursive must be an String") if params.dig(:recursive) and !params.dig(:recursive).is_a?(String)
141
172
  raise InvalidParameterError.new("Bad parameter: timeout must be an Integer") if params.dig(:timeout) and !params.dig(:timeout).is_a?(Integer)
142
173
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
143
174
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.186
4
+ version: 1.0.187
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-20 00:00:00.000000000 Z
11
+ date: 2021-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable