flaky 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/flake +10 -3
- data/lib/flaky.rb +2 -1
- data/lib/flaky/appium.rb +1 -13
- data/lib/flaky/applescript.rb +16 -0
- data/readme.md +2 -0
- data/release_notes.md +10 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e970eaab75dfe6fc14f6830cdb90ddc9b72d7cd
|
4
|
+
data.tar.gz: abd1bb1139418e8c6c955afad104c683c8b4619b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3a28833c28dc8e5bab36f8c220607c48e8af06489cab4d8aaa703df365e262dcc2df6d2a8814f96dac53ffe0f470b6789ce1eff94e5e8cb9d9ffbe13de1bee5
|
7
|
+
data.tar.gz: 4801462f74d8e772c8851c25c1fab56136840a0f127bf9e344527f9037ba6934aecefe9ab89a9f758ef50ebdeab6618d3736f49271cb1b20a981525c8d14a343
|
data/bin/flake
CHANGED
@@ -12,13 +12,20 @@ flake 3 ios
|
|
12
12
|
If one run passes or 3 runs fail, then we move onto the next test.
|
13
13
|
MSG
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
if ARGV && ARGV.length === 1 && ARGV.first === 'auth'
|
16
|
+
require File.expand_path '../../lib/flaky', __FILE__
|
17
|
+
Flaky::AppleScript.beat_security_agent
|
18
|
+
exit
|
19
|
+
else
|
20
|
+
unless ARGV && ARGV.length === 2
|
21
|
+
puts usage_string
|
22
|
+
exit
|
23
|
+
end
|
18
24
|
end
|
19
25
|
|
20
26
|
require File.expand_path '../../lib/flaky', __FILE__
|
21
27
|
|
28
|
+
|
22
29
|
# flaky 1 ios[test_name]
|
23
30
|
|
24
31
|
count = ARGV.first
|
data/lib/flaky.rb
CHANGED
@@ -9,7 +9,7 @@ require 'posix/spawn' # http://rubygems.org/gems/posix-spawn
|
|
9
9
|
require 'digest/md5'
|
10
10
|
|
11
11
|
module Flaky
|
12
|
-
VERSION = '0.0.
|
12
|
+
VERSION = '0.0.12' unless defined? ::Flaky::VERSION
|
13
13
|
DATE = '2013-11-04' unless defined? ::Flaky::DATE
|
14
14
|
|
15
15
|
# https://github.com/appium/ruby_lib/blob/0e203d76610abd519ba9d2fe9c14b50c94df5bbd/lib/appium_lib.rb#L24
|
@@ -25,6 +25,7 @@ module Flaky
|
|
25
25
|
# TODO: Use require_relative instead of add_to_path
|
26
26
|
# require internal files
|
27
27
|
require 'flaky/appium'
|
28
|
+
require 'flaky/applescript'
|
28
29
|
require 'flaky/log'
|
29
30
|
require 'flaky/run'
|
30
31
|
|
data/lib/flaky/appium.rb
CHANGED
@@ -22,7 +22,6 @@ module Flaky
|
|
22
22
|
# logcat is read & stopped by run.execute
|
23
23
|
attr_reader :ready, :pid, :in, :out, :err, :log, :tail, :logcat
|
24
24
|
@@thread = nil
|
25
|
-
@@osascript = nil
|
26
25
|
|
27
26
|
def self.remove_ios_apps
|
28
27
|
user = ENV['USER']
|
@@ -58,17 +57,6 @@ module Flaky
|
|
58
57
|
if @android
|
59
58
|
@droid = Flaky::Android.new
|
60
59
|
@logcat = Flaky::Logcat.new
|
61
|
-
else # dismiss iOS auth dialogs
|
62
|
-
@@osascript = Thread.new do
|
63
|
-
Thread.current.abort_on_exception = true
|
64
|
-
flaky_password = ENV['FLAKY_PASSWORD']
|
65
|
-
raise 'FLAKY_PASSWORD must be defined' if flaky_password.nil? || flaky_password.empty?
|
66
|
-
flaky_user = ENV['FLAKY_USER']
|
67
|
-
raise 'FLAKY_USER must be defined' if flaky_user.nil? || flaky_user.empty?
|
68
|
-
|
69
|
-
script = File.expand_path('../../BeatSecurityAgent.applescript', __FILE__)
|
70
|
-
Cmd.new("/usr/bin/osascript #{script} #{flaky_user} #{flaky_password}")
|
71
|
-
end unless @@osascript
|
72
60
|
end
|
73
61
|
end
|
74
62
|
|
@@ -80,7 +68,7 @@ module Flaky
|
|
80
68
|
@droid.reset
|
81
69
|
@logcat.start
|
82
70
|
else
|
83
|
-
|
71
|
+
self.class.remove_ios_apps
|
84
72
|
end
|
85
73
|
|
86
74
|
@@thread.exit if @@thread
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Flaky
|
3
|
+
class AppleScript
|
4
|
+
def self.beat_security_agent
|
5
|
+
flaky_password = ENV['FLAKY_PASSWORD']
|
6
|
+
raise 'FLAKY_PASSWORD must be defined' if flaky_password.nil? || flaky_password.empty?
|
7
|
+
flaky_user = ENV['FLAKY_USER']
|
8
|
+
raise 'FLAKY_USER must be defined' if flaky_user.nil? || flaky_user.empty?
|
9
|
+
|
10
|
+
script = File.expand_path('../../BeatSecurityAgent.applescript', __FILE__)
|
11
|
+
osascript = 'osascript'
|
12
|
+
Appium.kill_all osascript
|
13
|
+
Process::waitpid(POSIX::Spawn::spawn("/usr/bin/#{osascript} #{script} #{flaky_user} #{flaky_password}"))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/readme.md
CHANGED
data/release_notes.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
#### v0.0.11 2013-11-04
|
2
|
+
|
3
|
+
- [017a45f](https://github.com/appium/flaky/commit/017a45ffb32663570c6e6a2f0f7943a143edaf5f) Release 0.0.11
|
4
|
+
- [2ec2700](https://github.com/appium/flaky/commit/2ec27002c339ab515edcee607f9959217f44aef8) Fix docs
|
5
|
+
- [531709e](https://github.com/appium/flaky/commit/531709e68e676d9642239ef1555ded0ff4447d82) Update readme.md
|
6
|
+
- [0b633e0](https://github.com/appium/flaky/commit/0b633e08db8c68e9dad1270235e3bf34bbcba5b7) Update docs
|
7
|
+
- [a05118d](https://github.com/appium/flaky/commit/a05118d3f723d79e15fda1dc4e90acbc00273745) Update readme.md
|
8
|
+
- [50c5e1e](https://github.com/appium/flaky/commit/50c5e1e4f7fc8d71a0762ae142c95105bed82f34) Update docs
|
9
|
+
|
10
|
+
|
1
11
|
#### v0.0.10 2013-11-01
|
2
12
|
|
3
13
|
- [2930fad](https://github.com/appium/flaky/commit/2930fad03109ef705837d72e5a2457895974f741) Release 0.0.10
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- lib/BeatSecurityAgent.applescript
|
83
83
|
- lib/flaky.rb
|
84
84
|
- lib/flaky/appium.rb
|
85
|
+
- lib/flaky/applescript.rb
|
85
86
|
- lib/flaky/log.rb
|
86
87
|
- lib/flaky/logcat.rb
|
87
88
|
- lib/flaky/reset_android.rb
|