ruby-safenet 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/safenet.rb +6 -4
- data/lib/safenet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90946ad95b2eb47e5f0e1d89e46e3b826fcb76f5
|
4
|
+
data.tar.gz: b660969da66807f9cbe228d4a4150bf152b2441b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 171fcca1cb7dcf7f31d2760c70f19b3de3cba2d4d96abd4ecf47d1257419e1c4dad809b6886181c8796ab55d6d309cb60251b1a1a760ae5f9c42cd4efecde472
|
7
|
+
data.tar.gz: b7034064dd83d23b485634306cdc89ace5713796e163d24d3a024026bab323736aaa27459f4f9186732665780b21eae855247309594d9c4b4282232c28d76113
|
data/lib/safenet.rb
CHANGED
@@ -178,7 +178,8 @@ module SafeNet
|
|
178
178
|
# Create a File using the NFS API.
|
179
179
|
# Only authorised requests can invoke the API.
|
180
180
|
#
|
181
|
-
# Usage: SafeNet.file("/photos/cat.jpg"
|
181
|
+
# Usage: SafeNet.file("/photos/cat.jpg")
|
182
|
+
# Adv.Usage: SafeNet.file("/photos/cat.jpg", is_private: true, metadata: "some meta", is_path_shared: false, is_versioned: false)
|
182
183
|
# Fail: {"errorCode"=>-505, "description"=>"NfsError::FileAlreadyExistsWithSameName"}
|
183
184
|
# Success: true
|
184
185
|
#
|
@@ -201,7 +202,7 @@ module SafeNet
|
|
201
202
|
}
|
202
203
|
|
203
204
|
# optional
|
204
|
-
payload["metadata"] = options[:metadata] if options.has_key?(:metadata)
|
205
|
+
payload["metadata"] = Base64.strict_encode64(options[:metadata]) if options.has_key?(:metadata)
|
205
206
|
|
206
207
|
# api call
|
207
208
|
uri = URI(url)
|
@@ -220,7 +221,8 @@ module SafeNet
|
|
220
221
|
# Create a directory using the NFS API.
|
221
222
|
# Only authorised requests can create a directory.
|
222
223
|
#
|
223
|
-
# Usage: SafeNet.create_directory("/photos"
|
224
|
+
# Usage: SafeNet.create_directory("/photos")
|
225
|
+
# Adv.Usage: SafeNet.create_directory("/photos", is_private: true, metadata: "some meta", is_path_shared: false, is_versioned: false)
|
224
226
|
# Fail: {"errorCode"=>-505, "description"=>"NfsError::FileAlreadyExistsWithSameName"}
|
225
227
|
# Success: true
|
226
228
|
#
|
@@ -244,7 +246,7 @@ module SafeNet
|
|
244
246
|
}
|
245
247
|
|
246
248
|
# optional
|
247
|
-
payload["metadata"] = options[:metadata] if options.has_key?(:metadata)
|
249
|
+
payload["metadata"] = Base64.strict_encode64(options[:metadata]) if options.has_key?(:metadata)
|
248
250
|
|
249
251
|
# api call
|
250
252
|
uri = URI(url)
|
data/lib/safenet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-safenet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Loureiro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|