tigre-client 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tigre-client (0.3.0)
4
+ tigre-client (0.3.1)
5
5
  faraday (~> 0.6.0)
6
6
 
7
7
  GEM
@@ -39,6 +39,10 @@ module Tigre
39
39
  Tigre.put_connection("/samples/#{md5}", update_data)
40
40
  end
41
41
 
42
+ # required params
43
+ # hash => Hash
44
+ # :digest => String, The digest type
45
+ # :value => String, The digest value
42
46
  def self.get(params_hash)
43
47
  unless params_hash[:digest] && params_hash[:value]
44
48
  raise 'Missing parameter :digest or :value'
@@ -240,5 +244,25 @@ module Tigre
240
244
  Tigre.put_connection("/samples/#{hash[:digest]}/value/#{hash[:value]}/remove_mime_types", update_data)
241
245
  end
242
246
 
247
+ # required params
248
+ # hash => Hash
249
+ # :samples => String (comma seperated) => I.E 'ce78f201b54e68263f0ddc1b2f8b1b65,d9226e3d5abeef9de15eeabc3c075fb1
250
+ # :samples => Array => I.E ['ce78f201b54e68263f0ddc1b2f8b1b65','d9226e3d5abeef9de15eeabc3c075fb1']
251
+ # :callback => The callback URL for when the job is finished
252
+ # :job_id => A job id so the requestor can handle the post and
253
+ # know which job they submitted is finished
254
+ # optional params
255
+ # hash => Hash
256
+ # :digest => the digest type of the samples. Defaults to MD5
257
+ # :password => a password for the created compressed file
258
+ def self.compress(hash)
259
+ unless hash[:samples] && hash[:callback] && hash[:job_id]
260
+ raise 'Missing parameter :samples or :callback or :job_id'
261
+ end
262
+ digest = hash[:digest] || 'md5'
263
+ samples = package_array_list(hash[:samples])
264
+ Tigre.get_connection("/samples_for_compression?samples=#{samples}&digest=#{digest}&callback=#{hash[:callback]}&job_id=#{hash[:job_id]}&password=#{hash[:password]}")
265
+ end
266
+
243
267
  end
244
268
  end
@@ -1,5 +1,5 @@
1
1
  module Tigre
2
2
  module Client
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: tigre-client
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.1
5
+ version: 0.3.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Marcio Castilho
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-04-27 00:00:00 -04:00
14
+ date: 2011-04-28 00:00:00 -04:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency