wedge 0.1.5 → 0.1.6

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: ac3731821b07863c0126576d57b06874e3bfec63
4
- data.tar.gz: b0d87766926902c7b17e26cd5e1ac007efed2a91
3
+ metadata.gz: e446e1a51f9cf2ef4a91336a092939ee4e1031d2
4
+ data.tar.gz: cff121115b103c3090b08164345de1411364cf50
5
5
  SHA512:
6
- metadata.gz: 13daa53b74eb6a37c688d24c74612519deea48f08a4fe89a87bebb90f538914e5735bdc9d59d6876a68c2eaae06ddd862d5827a491db9a8a153adf096abb98d7
7
- data.tar.gz: 0f86a4b29929e42e6efc10907d5fc9b2ae856e7e80be843e1fd629fb2585bc05dfc5236156374141230efc0ae8bbdbd84b4d6615d05b65119681d890265018c6
6
+ metadata.gz: 780c0d077e650463bba52ee2469c3cb2aef65a07e82f6366899e5177a2ce7941998a1c8c3b15d6ff25ba4ca53afbc60b6ee7c801a0d9d81bcf5a3866658cdff6
7
+ data.tar.gz: 1f18c8282f0775d1914977d0d3fae1e05a7f6281ed0c39f9381baaa204d4667e05afccdfa7b7f02af3bfdfa01730060e12f4b1c1dc7a0c0ebf57574855affd72
@@ -70,6 +70,17 @@ class Wedge
70
70
  end
71
71
  end
72
72
 
73
+ def resume options = {}
74
+ options = options.indifferent
75
+ wedge_name = options.delete :wedge_name
76
+ wedge_method = options.delete :resume_method
77
+
78
+ if wedge_name
79
+ response.headers["Content-Type"] = 'application/json; charset=UTF-8'
80
+ wedge(wedge_name).send(wedge_method, options)
81
+ end
82
+ end
83
+
73
84
  def button el, options = {}
74
85
  options = { multiple: false }.merge options
75
86
  drag_n_drop el, options
@@ -195,12 +206,13 @@ class Wedge
195
206
  }
196
207
  end
197
208
 
198
- # if options[:resume_method]
199
- # uploader_settings[:session] = {
200
- # endpoint: "#{Wedge.assets_url}/app/components/#{options[:wedge_name]}.call?wedge_method=#{options[:resume_method]}&wedge_method_args=wedge_data&wedge_name=registration",
201
- # params: options
202
- # }
203
- # end
209
+ if options[:resume_method]
210
+ uploader_settings[:session] = {
211
+ endpoint: "#{Wedge.assets_url}/wedge/plugins/uploader.call?__wedge_method__=resume&__wedge_args__=__wedge_data__&__wedge_name__=uploader_plugin",
212
+ # endpoint: "#{Wedge.assets_url}/app/components/#{options[:wedge_name]}.call?wedge_method=#{options[:resume_method]}&wedge_method_args=wedge_data&wedge_name=registration",
213
+ params: options
214
+ }
215
+ end
204
216
  if !options[:multiple].nil?
205
217
  uploader_settings[:multiple] = options.delete(:multiple)
206
218
  end
data/lib/wedge/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Wedge
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wedge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
@@ -283,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
283
283
  version: '0'
284
284
  requirements: []
285
285
  rubyforge_project:
286
- rubygems_version: 2.2.2
286
+ rubygems_version: 2.4.3
287
287
  signing_key:
288
288
  specification_version: 4
289
289
  summary: Components for the Browser and Server