flaky 0.0.25 → 0.0.26

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: ea9d7dbbe57676f347a4ed2e98e57027fa5a99db
4
- data.tar.gz: 23f719d9c931e725b99514b6eced447c02967074
3
+ metadata.gz: 752ccabfa98b60bf491925462e7499943f4b64c7
4
+ data.tar.gz: 169a03a438dac6bb9d8f1bb232eba39f6c559931
5
5
  SHA512:
6
- metadata.gz: 0a63c28a824fab077e4085d5c6ecca6e94731651a40bf6b711981dfd128ec0a962e77438800d156c94d9abf508d448889f215f30b081ae85c03619ab63b43906
7
- data.tar.gz: e8d20d407790239b7fa85347cccdeb25a8902fc21794cb2c03888b75edb214085ec5ee0be39cbaf992feae2563be16e7b2792546a41cadca686d5e230f281eb3
6
+ metadata.gz: 3f9600cdf874c364cd613aae907b91063938bb8872d1b9c931b4df2c00f806a737421dc01e21d59d173bbe8ed9ea442ae458d64cfc7d39a222a863cdabb6a144
7
+ data.tar.gz: b73ac1fed7d6413891b651969838f9cbf07e3bbb4e30206982e7a05dd6d28222880bfefb490c2d8722135e37f79273c606fa7c277832ebb6ca3f661c074ab703
data/lib/flaky/appium.rb CHANGED
@@ -44,14 +44,20 @@ module Flaky
44
44
  end
45
45
 
46
46
  def self.kill_all process_name
47
- _pid, _in, _out, _err = POSIX::Spawn::popen4('killall', '-9', process_name)
48
- raise "Unable to kill #{process_name}" unless _pid
49
- _in.close
50
- _out.read
51
- _err.read
52
- ensure
53
- [_in, _out, _err].each { |io| io.close unless io.nil? || io.closed? }
54
- Process::waitpid(_pid) if _pid
47
+ begin
48
+ _pid, _in, _out, _err = POSIX::Spawn::popen4('killall', '-9', process_name)
49
+ raise "Unable to kill #{process_name}" unless _pid
50
+ _in.close
51
+ _out.read
52
+ _err.read
53
+ rescue Errno::EAGAIN
54
+ # POSIX::Spawn::popen4 may raise EAGAIN. If it does, retry after a second.
55
+ sleep 1
56
+ retry
57
+ ensure
58
+ [_in, _out, _err].each { |io| io.close unless io.nil? || io.closed? }
59
+ Process::waitpid(_pid) if _pid
60
+ end
55
61
  end
56
62
 
57
63
  # android: true to activate Android mode
data/lib/flaky.rb CHANGED
@@ -9,8 +9,8 @@ require 'posix/spawn' # http://rubygems.org/gems/posix-spawn
9
9
  require 'digest/md5'
10
10
 
11
11
  module Flaky
12
- VERSION = '0.0.25' unless defined? ::Flaky::VERSION
13
- DATE = '2014-01-13' unless defined? ::Flaky::DATE
12
+ VERSION = '0.0.26' unless defined? ::Flaky::VERSION
13
+ DATE = '2014-01-18' unless defined? ::Flaky::DATE
14
14
 
15
15
  class << self; attr_accessor :no_video; end
16
16
  self.no_video = false; # set default value
data/readme.md CHANGED
@@ -59,28 +59,12 @@ Run `flake auth` to automatically dismiss security dialogs.
59
59
  #
60
60
  # The following code goes after Driver.new.start_driver
61
61
 
62
- def save_logs
63
- file = '/tmp/flaky_logs.txt'
64
- logs = nil
65
-
66
- begin
67
- logs = $driver.driver.manage.logs.get(:logcat)
68
- rescue # try iOS
69
- logs = $driver.driver.manage.logs.get(:syslog)
70
- end
71
-
72
- File.open(file, 'w') do |f|
73
- # Save only the message from Selenium::WebDriver::LogEntry
74
- f.write (logs.map { |line| line.message }).join("\n")
75
- end
76
- end
77
62
 
78
63
  puts "Recording #{device} to /tmp/video.mov"
79
64
  flaky_screen_recording_pid = Flaky.screen_recording_start os: device, path: '/tmp/video.mov'
80
65
 
81
66
  Minitest.after_run do
82
67
  if $driver
83
- save_logs
84
68
  puts "Ending pid: #{flaky_screen_recording_pid}"
85
69
  Flaky.screen_recording_stop flaky_screen_recording_pid # save video
86
70
  ignore { wait(10) { $driver.x } }
data/release_notes.md CHANGED
@@ -1,3 +1,10 @@
1
+ #### v0.0.25 2014-01-13
2
+
3
+ - [8df71ee](https://github.com/appium/flaky/commit/8df71eebc6830c7d8375dfc1d2fc17e2a4829540) Release 0.0.25
4
+ - [e15c023](https://github.com/appium/flaky/commit/e15c0239f004fae6387fcd882338a9064591407b) Try relying on Appium for reset on session start
5
+ - [8493e5f](https://github.com/appium/flaky/commit/8493e5f128b25738f7148620800b0b0e30685d10) Add note to android reset
6
+
7
+
1
8
  #### v0.0.24 2014-01-09
2
9
 
3
10
  - [83081fe](https://github.com/appium/flaky/commit/83081fea11707fd045602038f3991be4c21433f0) Release 0.0.24
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flaky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - code@bootstraponline.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-13 00:00:00.000000000 Z
11
+ date: 2014-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chronic_duration