ruby-deepviz 1.0.0 → 1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6999d5f4123bd1008e08680b767d07182a366bc
4
- data.tar.gz: c1789782ba04e29cff292cbcf62b7829334ffd14
3
+ metadata.gz: 148be5362fbc0a4f9c269bcb5b34722d50210aaa
4
+ data.tar.gz: 6a63b4356641b77b83ac4fd629e82f234f86e0b7
5
5
  SHA512:
6
- metadata.gz: b270f7c5adf1a4d60ee6b16b9ada00d2fb108b6528142610a136ffa3e28fe24cbee0f04b86e5d655325f81113be2553850379f51f09924f12e83ec44fbfd10a8
7
- data.tar.gz: 2e68c2ebf0d5dd8be2ba88047103b65d244c4aaa50348d3f98f12263ee278bd1b9dbeeda848e0970e9189d846422acd8490a5c0eaf1b1970229fcf6ba53e9bb3
6
+ metadata.gz: 160f640cf1abc93a2a415fe4fdff4cda77e29d0a97d15567c3fd08754193eadeea438edf811d97026d0793783d048c92f78e9842f0ddbd4120ca9aeb6eb1ed5b
7
+ data.tar.gz: 6f2fe54b1292801a477c5fe3676cb9263b9f9fc798432b9ae7964ec8da68cf49bc22aff6090b6e143db086f53c7f2ae2101ca30b35b3105465eb053aae22ebae
@@ -41,13 +41,17 @@ class Sandbox
41
41
  return Result.new(status=NETWORK_ERROR, msg='%s - Error while connecting to Deepviz: %s' % [response.code, body['errmsg']])
42
42
  end
43
43
 
44
- if response.code == 200
45
- return Result.new(status=SUCCESS, msg=response.body['data'])
44
+ if response.code == 428
45
+ return Result.new(status=PROCESSING, msg='Analysis is running')
46
46
  else
47
- if response.code >= 500
48
- return Result.new(status=SERVER_ERROR, msg='%s - Error while connecting to Deepviz: %s' % [response.code, response.body['errmsg']])
47
+ if response.code == 200
48
+ return Result.new(status=SUCCESS, msg=response.body['data'])
49
49
  else
50
- return Result.new(status=CLIENT_ERROR, msg='%s - Error while connecting to Deepviz: %s' % [response.code, response.body['errmsg']])
50
+ if response.code >= 500
51
+ return Result.new(status=SERVER_ERROR, msg='%s - Error while connecting to Deepviz: %s' % [response.code, response.body['errmsg']])
52
+ else
53
+ return Result.new(status=CLIENT_ERROR, msg='%s - Error while connecting to Deepviz: %s' % [response.code, response.body['errmsg']])
54
+ end
51
55
  end
52
56
  end
53
57
  end
@@ -78,7 +82,7 @@ class Sandbox
78
82
  if x != '.' and x != '..'
79
83
  file_path = File.join(path, x)
80
84
  result = upload_sample(api_key, file_path)
81
- if result.status != SUCCESS
85
+ if result.status != SUCCESS and result.status != PROCESSING
82
86
  result.msg = '"Unable to upload file "%s"' % file_path
83
87
  return result
84
88
  end
@@ -235,13 +239,17 @@ class Sandbox
235
239
  return Result.new(status=NETWORK_ERROR, msg='%s - Error while connecting to Deepviz: %s' % [response.code, response.body['errmsg']])
236
240
  end
237
241
 
238
- if response.code == 200
239
- return Result.new(status=SUCCESS, msg=response.body['data'])
242
+ if response.code == 428
243
+ return Result.new(status=PROCESSING, msg='Analysis is running')
240
244
  else
241
- if response.code >= 500
242
- return Result.new(status=SERVER_ERROR, msg='%s - Error while connecting to Deepviz: %s' % [response.code, response.body['errmsg']])
245
+ if response.code == 200
246
+ return Result.new(status=SUCCESS, msg=response.body['data'])
243
247
  else
244
- return Result.new(status=CLIENT_ERROR, msg='%s - Error while connecting to Deepviz: %s' % [response.code, response.body['errmsg']])
248
+ if response.code >= 500
249
+ return Result.new(status=SERVER_ERROR, msg='%s - Error while connecting to Deepviz: %s' % [response.code, response.body['errmsg']])
250
+ else
251
+ return Result.new(status=CLIENT_ERROR, msg='%s - Error while connecting to Deepviz: %s' % [response.code, response.body['errmsg']])
252
+ end
245
253
  end
246
254
  end
247
255
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-deepviz
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saferbytes S.r.l.s.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-16 00:00:00.000000000 Z
11
+ date: 2016-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -61,7 +61,6 @@ files:
61
61
  - lib/deepviz/intel.rb
62
62
  - lib/deepviz/result.rb
63
63
  - lib/deepviz/sandbox.rb
64
- - lib/deepviz/version.rb
65
64
  homepage: https://www.deepviz.com
66
65
  licenses:
67
66
  - MIT
@@ -1,3 +0,0 @@
1
- module Deepviz
2
- VERSION = '1.0.0'
3
- end