tigre-client 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/lib/tigre-client/sample.rb +24 -0
- data/lib/tigre-client/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/tigre-client/sample.rb
CHANGED
@@ -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
|
data/lib/tigre-client/version.rb
CHANGED
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.
|
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-
|
14
|
+
date: 2011-04-28 00:00:00 -04:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|