boxr 0.13.0 → 0.14.0

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: 8e288ec193acb62b043385675eb9774600010f64
4
- data.tar.gz: 04154af36d232ae6f5383708c3f759c99d86d8d4
3
+ metadata.gz: a2446a808676d202a93cfebf3c63624ff5357c62
4
+ data.tar.gz: 2fc37f049ad1b8e68806fa5b0224e215117bf08b
5
5
  SHA512:
6
- metadata.gz: 089b8d6d04ac0258883b23522a781a6dc1f8e40f31436a64de711fd691f089b2245dffa6dcc6185dd8b3489d9c1d0c20fdc6d8c03a9223336a3adb054fa1eb9e
7
- data.tar.gz: 858f7f86ada92d1d0ce9668355a226f58f216946790030fd9aa6299f7cb9deb8ea7bc5147e160bfb699001c1686f05c8d80bd8983258de83dac8fd6dffaa4a1f
6
+ metadata.gz: d9915b8d28043a27831d896cc3f077158c950f64be6c2d8d7d3487b660d9493f29d10c9c271dff90ed574db4e046d75607cc61549a1247afa65999545b30fdb2
7
+ data.tar.gz: ebe98be14d0933fa4357b435225c6db008fec37a01ab198c7a267c04a4a0917458f48e4d120caa805f5a30a43c10a8807dd196a85e81ff6205bba2bed005849f
data/lib/boxr/client.rb CHANGED
@@ -226,21 +226,17 @@ module Boxr
226
226
  end
227
227
 
228
228
  def create_shared_link(uri, item_id, access, unshared_at, can_download, can_preview)
229
- if access.nil?
230
- attributes = {shared_link: {}}
231
- else
232
- attributes = {shared_link: {access: access}}
233
- attributes[:shared_link][:unshared_at] = unshared_at.to_datetime.rfc3339 unless unshared_at.nil?
234
- attributes[:shared_link][:permissions] = {} unless can_download.nil? && can_preview.nil?
235
- attributes[:shared_link][:permissions][:can_download] = can_download unless can_download.nil?
236
- attributes[:shared_link][:permissions][:can_preview] = can_preview unless can_preview.nil?
237
- end
229
+ attributes = {shared_link: {access: access}}
230
+ attributes[:shared_link][:unshared_at] = unshared_at.to_datetime.rfc3339 unless unshared_at.nil?
231
+ attributes[:shared_link][:permissions] = {} unless can_download.nil? && can_preview.nil?
232
+ attributes[:shared_link][:permissions][:can_download] = can_download unless can_download.nil?
233
+ attributes[:shared_link][:permissions][:can_preview] = can_preview unless can_preview.nil?
238
234
 
239
235
  updated_item, response = put(uri, attributes)
240
236
  updated_item
241
237
  end
242
238
 
243
- def disable_shared_link(uri, item_id)
239
+ def disable_shared_link(uri)
244
240
  attributes = {shared_link: nil}
245
241
 
246
242
  updated_item, response = put(uri, attributes)
data/lib/boxr/files.rb CHANGED
@@ -187,7 +187,7 @@ module Boxr
187
187
  def disable_shared_link_for_file(file)
188
188
  file_id = ensure_id(file)
189
189
  uri = "#{FILES_URI}/#{file_id}"
190
- disable_shared_link(uri, file_id)
190
+ disable_shared_link(uri)
191
191
  end
192
192
 
193
193
  def trashed_file(file, fields: [])
data/lib/boxr/folders.rb CHANGED
@@ -112,7 +112,7 @@ module Boxr
112
112
  def disable_shared_link_for_folder(folder)
113
113
  folder_id = ensure_id(folder)
114
114
  uri = "#{FOLDERS_URI}/#{folder_id}"
115
- disable_shared_link(uri, folder_id)
115
+ disable_shared_link(uri)
116
116
  end
117
117
 
118
118
  def trash(fields: [], offset: nil, limit: nil)
data/lib/boxr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Boxr
2
- VERSION = "0.13.0"
2
+ VERSION = "0.14.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Burnette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler