flaky 0.0.27 → 0.0.28
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 +4 -4
- data/lib/flaky.rb +2 -2
- data/lib/flaky/appium.rb +1 -1
- data/lib/flaky/run.rb +8 -1
- data/lib/screen_recording.rb +17 -0
- data/readme.md +1 -0
- data/release_notes.md +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86be210492db54b0da337ced2f1c1212d3410dee
|
4
|
+
data.tar.gz: 96177157c1513d4a6cba42ea2563753dcdf667b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bbb7033d695786c5e4666ecbb5d5552d871ce2c26d46fbfa7867dc07ee6b22e31817a63f2c6db0338407d6cda48207365cd59e6ec03cb4b759db5472f39313b
|
7
|
+
data.tar.gz: 567c59a3397cb3afa19c5be35def7702a02499f5cc8feceb33a6f60a66cce17ce7ef351b1721f94dcf3fdf5ae36a53f87e26276c1ac5bbd10db0357d0ffa1e9d
|
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.
|
13
|
-
DATE = '2014-01-
|
12
|
+
VERSION = '0.0.28' unless defined? ::Flaky::VERSION
|
13
|
+
DATE = '2014-01-24' 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/lib/flaky/appium.rb
CHANGED
data/lib/flaky/run.rb
CHANGED
@@ -138,7 +138,7 @@ module Flaky
|
|
138
138
|
flaky_logs_txt = '/tmp/flaky_logs.txt'
|
139
139
|
File.delete flaky_logs_txt if File.exist? flaky_logs_txt
|
140
140
|
tail_cmd = "tail -f -n1 /Users/#{ENV['USER']}/Library/Logs/iOS\\ Simulator/7.0.3/system.log > #{flaky_logs_txt}"
|
141
|
-
tail_cmd = "adb logcat > #{flaky_logs_txt}" if !appium.ios
|
141
|
+
tail_cmd = "adb logcat > #{flaky_logs_txt}" if !sauce && !appium.ios
|
142
142
|
|
143
143
|
tail_system_log = Flaky::Cmd.new tail_cmd
|
144
144
|
begin
|
@@ -267,6 +267,13 @@ module Flaky
|
|
267
267
|
File.delete tmp_file if File.exists? tmp_file
|
268
268
|
# also delete the temp ruby log
|
269
269
|
File.delete tmp_ruby_log if File.exists? tmp_ruby_log
|
270
|
+
|
271
|
+
# copy app logs
|
272
|
+
app_logs = '/tmp/flaky_tmp_log_folder'
|
273
|
+
dest_dir = File.dirname(appium_server_path)
|
274
|
+
if File.exists? app_logs
|
275
|
+
Dir.glob(File.join(app_logs, '*')).each { |f| FileUtils.cp f, dest_dir }
|
276
|
+
end
|
270
277
|
end
|
271
278
|
|
272
279
|
passed
|
data/lib/screen_recording.rb
CHANGED
@@ -5,6 +5,23 @@ require 'posix-spawn'
|
|
5
5
|
module Flaky
|
6
6
|
class << self
|
7
7
|
|
8
|
+
# app_name for example MyApp.app
|
9
|
+
#
|
10
|
+
def capture_ios_app_log app_name
|
11
|
+
begin
|
12
|
+
app_glob = "/Users/#{ENV['USER']}/Library/Application Support/iPhone Simulator/7.0.3/Applications/*/#{app_name}"
|
13
|
+
app_folder = File.dirname Dir.glob(app_glob).first
|
14
|
+
|
15
|
+
tmp_log_folder = '/tmp/flaky_tmp_log_folder'
|
16
|
+
FileUtils.rm_rf tmp_log_folder if File.exists? tmp_log_folder
|
17
|
+
FileUtils.mkdir_p tmp_log_folder
|
18
|
+
|
19
|
+
log_glob = File.join app_folder, 'Library/Caches/Logs/*'
|
20
|
+
Dir.glob(log_glob).each { |log| FileUtils.cp log, tmp_log_folder }
|
21
|
+
rescue # folder may not exist. or there could be no longs
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
8
25
|
def screen_recording_binary
|
9
26
|
@screen_recording_binary ||= File.expand_path('../screen-recording', __FILE__)
|
10
27
|
end
|
data/readme.md
CHANGED
@@ -67,6 +67,7 @@ Run `flake auth` to automatically dismiss security dialogs.
|
|
67
67
|
if $driver
|
68
68
|
puts "Ending pid: #{flaky_screen_recording_pid}"
|
69
69
|
Flaky.screen_recording_stop flaky_screen_recording_pid # save video
|
70
|
+
Flaky.capture_ios_app_log 'MyApp.app' # save app logs
|
70
71
|
ignore { wait(10) { $driver.x } }
|
71
72
|
end
|
72
73
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
#### v0.0.27 2014-01-18
|
2
|
+
|
3
|
+
- [a342407](https://github.com/appium/flaky/commit/a342407388e8d8b5bdd09ba2293f2baa25f060b1) Release 0.0.27
|
4
|
+
- [410a64e](https://github.com/appium/flaky/commit/410a64ef7b39380418c84d77459d9a9355df27fa) Retry failed start after 60 seconds
|
5
|
+
|
6
|
+
|
1
7
|
#### v0.0.26 2014-01-18
|
2
8
|
|
3
9
|
- [844516a](https://github.com/appium/flaky/commit/844516a79eb5753aec263fc9fd88dd2fbda9147c) Release 0.0.26
|
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.
|
4
|
+
version: 0.0.28
|
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-
|
11
|
+
date: 2014-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chronic_duration
|