mu 5.7.22 → 5.7.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/mu/api/scale.rb +9 -1
  2. data/version.rb +1 -1
  3. metadata +2 -2
data/lib/mu/api/scale.rb CHANGED
@@ -123,7 +123,7 @@ class Scale
123
123
  # * bot_id = the id of the scale engine
124
124
  # * file = the name of the pcap file to retrieve
125
125
  def pcap(bot_id, file)
126
- response = get "pcap", "botId=#{bot_id}&file=#{file}"
126
+ response = download_file "pcap","bot_id=#{bot_id}&file=#{file}", file
127
127
  msg response, Logger::DEBUG
128
128
  return response
129
129
  end
@@ -210,5 +210,13 @@ private
210
210
  @http.post_json(element, JSON.generate(json))
211
211
  end
212
212
 
213
+ # GET file
214
+ def download_file(e=@element, params=nil, filename)
215
+ element = e
216
+ element << "?uuid=#{@uuid}" unless @uuid.nil?
217
+ element << "&#{params}" unless params.nil?
218
+ return @http.download_file(element, filename)
219
+ end
220
+
213
221
  end
214
222
  end
data/version.rb CHANGED
@@ -1 +1 @@
1
- VERSION='5.7.22'
1
+ VERSION='5.7.23'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mu
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 5.7.22
5
+ version: 5.7.23
6
6
  platform: ruby
7
7
  authors:
8
8
  - MuEng
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-12 00:00:00 -07:00
13
+ date: 2011-05-13 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency