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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2fd845e03b3d1254c4a2d51007b7a7626a31efa0
4
- data.tar.gz: cb52f9349cf546fe6ef203a06fd983b3d9305033
3
+ metadata.gz: 90946ad95b2eb47e5f0e1d89e46e3b826fcb76f5
4
+ data.tar.gz: b660969da66807f9cbe228d4a4150bf152b2441b
5
5
  SHA512:
6
- metadata.gz: 3b0c0aa75968b2c8db96d1cfd49d79f7ab8e780b290dd2a7495a1f29f7f176ef0f4802977305cd14adb785b8ebda24784474b49ec15f11b7f2ee893ddcdaa32c
7
- data.tar.gz: 403be8627d2416aefefdcf47f8d803a09f0444db5946ce13ff97d7483d05bf7c6752ec938d83c56510adcf2952cb1265525d2c709cf9cc299e6a7d7cbb4c89df
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", metadata: {item1: "ad sad"}, is_path_shared: false, is_private: true, is_versioned: false)
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", metadata: {entry1: "2323"}, is_private: true, is_path_shared: false, is_versioned: false)
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)
@@ -1,3 +1,3 @@
1
1
  module Safenet
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
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
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-25 00:00:00.000000000 Z
11
+ date: 2016-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler