sf-dropbox-ext 0.1.8 → 0.1.9

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: 438b4a182a844a7fe7c446f801eca87154643934
4
- data.tar.gz: 68ddb560bb5131c5f53bb5109a820cc8c5d941e0
3
+ metadata.gz: d6fd94d9ca55c06cefb30804a8652a17b8d685c8
4
+ data.tar.gz: 4c209a3ddb878eb1f76270eb3a4742b517b9b35f
5
5
  SHA512:
6
- metadata.gz: ea091b0a4ff9a9dc4004dfecaf003e3dcc27b226203f8c426b67a3a9c01b52cce89b00f5273b7197f6e69046ab6809709e640e6073f3df6f986e5038e2427299
7
- data.tar.gz: 64e9aebe9d5ce49da59f24a4e833dff402a709dba260565c7d6fe938eed5a89732b86069bac785bbff6ddd0080252ed3a5729dda509bdbd8a92ba4276a38a338
6
+ metadata.gz: 2dbb478dedc6299d00e768967c9fafd04329e6c5d8b9349920edb3cd8e6be8a132f7705ec135677031a9791882950d00f674259f786097dbd97dd4825125b589
7
+ data.tar.gz: 6eb2142e27d34666089d7eaace42e57fcbaa2066977a3258b43a76661cda87f55a22bc96dbf2613d094160ca4bc1a28d82533c344cc281ae7688d4445dbe2841
@@ -14,9 +14,13 @@ module DropboxExt
14
14
 
15
15
  def sync
16
16
  items = params[:items]
17
+ auth_params = params[:auth_params]
18
+
17
19
  if items && items.length > 0
18
20
  items.each do |item|
19
- dropbox.upload("/data/#{item[:content_type]}-#{item[:uuid]}.txt", "#{JSON.pretty_generate(item.as_json)}", {:mode => "overwrite"})
21
+ payload = { "items" => [item]}
22
+ payload["auth_params"] = auth_params if auth_params != nil
23
+ dropbox.upload("/data/#{item[:content_type]}-#{item[:uuid]}.txt", "#{JSON.pretty_generate(payload.as_json)}", {:mode => "overwrite"})
20
24
  end
21
25
  end
22
26
 
@@ -1,3 +1,3 @@
1
1
  module DropboxExt
2
- VERSION = '0.1.8'
2
+ VERSION = '0.1.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sf-dropbox-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Standard File
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-18 00:00:00.000000000 Z
11
+ date: 2017-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails