calabash-android 0.4.3.pre7 → 0.4.3.pre8

Sign up to get free protection for your applications and to get access to all the features.
@@ -267,12 +267,7 @@ module Operations
267
267
  @@screenshot_count ||= 0
268
268
  path = "#{prefix}#{name}_#{@@screenshot_count}.png"
269
269
 
270
- if ENV["SCREENSHOT_VIA_USB"] == "true"
271
- device_args = "-s #{@serial}" if @serial
272
- screenshot_cmd = "java -jar #{File.join(File.dirname(__FILE__), 'lib', 'screenShotTaker.jar')} #{path} #{device_args}"
273
- log screenshot_cmd
274
- raise "Could not take screenshot" unless system(screenshot_cmd)
275
- else
270
+ if ENV["SCREENSHOT_VIA_USB"] == "false"
276
271
  begin
277
272
  res = http("/screenshot")
278
273
  rescue EOFError
@@ -281,9 +276,13 @@ module Operations
281
276
  File.open(path, 'wb') do |f|
282
277
  f.write res
283
278
  end
279
+ else
280
+ device_args = "-s #{@serial}" if @serial
281
+ screenshot_cmd = "java -jar #{File.join(File.dirname(__FILE__), 'lib', 'screenShotTaker.jar')} #{path} #{device_args}"
282
+ log screenshot_cmd
283
+ raise "Could not take screenshot" unless system(screenshot_cmd)
284
284
  end
285
285
 
286
-
287
286
  @@screenshot_count += 1
288
287
  path
289
288
  end
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.4.3.pre7"
3
+ VERSION = "0.4.3.pre8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-android
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3.pre7
4
+ version: 0.4.3.pre8
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-22 00:00:00.000000000 Z
12
+ date: 2013-03-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber