flaky 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6164251eb88190e5da605eb81d846be8960f0fea
4
- data.tar.gz: 58b4537320b25d5362d4dbfffc8e22b1c729a3df
3
+ metadata.gz: ea9d7dbbe57676f347a4ed2e98e57027fa5a99db
4
+ data.tar.gz: 23f719d9c931e725b99514b6eced447c02967074
5
5
  SHA512:
6
- metadata.gz: 8e8bbe7d253534769f80fe775e4c6ea1a1c2dda773538c008136c9ed4e464a44df4f516ff77cb53ad3f9691dbeb1c7532df54e3ec1ecccffe0514780f9baf828
7
- data.tar.gz: 882d1d81b39a10c8b173ad54a3b1bf95d8bfa9de30edaf1ae34da1fe2b3b1e4a05f18e94d52adb6917feb5c4686664b98c6045b9716f71393fb6a46746e25339
6
+ metadata.gz: 0a63c28a824fab077e4085d5c6ecca6e94731651a40bf6b711981dfd128ec0a962e77438800d156c94d9abf508d448889f215f30b081ae85c03619ab63b43906
7
+ data.tar.gz: e8d20d407790239b7fa85347cccdeb25a8902fc21794cb2c03888b75edb214085ec5ee0be39cbaf992feae2563be16e7b2792546a41cadca686d5e230f281eb3
@@ -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.24' unless defined? ::Flaky::VERSION
13
- DATE = '2014-01-09' unless defined? ::Flaky::DATE
12
+ VERSION = '0.0.25' unless defined? ::Flaky::VERSION
13
+ DATE = '2014-01-13' unless defined? ::Flaky::DATE
14
14
 
15
15
  class << self; attr_accessor :no_video; end
16
16
  self.no_video = false; # set default value
@@ -18,7 +18,6 @@ module Flaky
18
18
  # require internal files
19
19
  require_relative 'flaky/appium'
20
20
  require_relative 'flaky/applescript'
21
- require_relative 'flaky/reset_android'
22
21
  require_relative 'flaky/run'
23
22
 
24
23
  require_relative 'flaky/run/all_tests'
@@ -61,7 +61,6 @@ module Flaky
61
61
  @log = ''
62
62
  @buffer = ''
63
63
  @android = opts.fetch(:android, false)
64
- @droid = Flaky::Android.new if @android
65
64
  @ios = ! @android
66
65
  end
67
66
 
@@ -69,12 +68,8 @@ module Flaky
69
68
  self.stop # stop existing process
70
69
  @log = "/tmp/flaky/appium_tmp_log.txt"
71
70
  File.delete(@log) if File.exists? @log
72
- # must not rely on appium for reset.
73
- if @android
74
- @droid.reset
75
- else
76
- self.class.remove_ios_apps
77
- end
71
+
72
+ # appium should reset at startup
78
73
 
79
74
  @@thread.exit if @@thread
80
75
  @@thread = Thread.new do
@@ -1,3 +1,9 @@
1
+ #### v0.0.24 2014-01-09
2
+
3
+ - [83081fe](https://github.com/appium/flaky/commit/83081fea11707fd045602038f3991be4c21433f0) Release 0.0.24
4
+ - [d43b541](https://github.com/appium/flaky/commit/d43b5410f1d6a48b97fcafc4d8a8998bfae29437) Tail without using appium for 100% success
5
+
6
+
1
7
  #### v0.0.23 2014-01-08
2
8
 
3
9
  - [2b19619](https://github.com/appium/flaky/commit/2b19619a2f544c0e29592a2eb814276cb61f1266) Release 0.0.23
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.24
4
+ version: 0.0.25
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-09 00:00:00.000000000 Z
11
+ date: 2014-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chronic_duration
@@ -70,7 +70,6 @@ files:
70
70
  - lib/flaky.rb
71
71
  - lib/flaky/appium.rb
72
72
  - lib/flaky/applescript.rb
73
- - lib/flaky/reset_android.rb
74
73
  - lib/flaky/run.rb
75
74
  - lib/flaky/run/all_tests.rb
76
75
  - lib/flaky/run/from_file.rb
@@ -1,62 +0,0 @@
1
- # encoding: utf-8
2
- module Flaky
3
-
4
- # Flaky::Android.new.reset
5
- class Android
6
- def initialize
7
- apk_path = ENV['APK_PATH']
8
- raise 'Environment variable APK_PATH must be set' if apk_path.nil? ||
9
- apk_path.empty? || File.extname(apk_path).downcase != '.apk'
10
- @md5 = Digest::MD5.file(apk_path).hexdigest
11
- @apk = apk_path
12
-
13
- app_package = ENV['APP_PACKAGE']
14
- raise 'Environment variable APP_PACKAGE must be set' if app_package.nil? ||
15
- app_package.empty?
16
- @package = app_package
17
- end
18
-
19
- def _remove_old_apks
20
- list_apks = POSIX::Spawn::Child.new 'adb shell "ls /data/local/tmp/*.apk"'
21
- raise "list_apks errored with: #{list_apks.err}" unless list_apks.err.empty?
22
-
23
- apk_on_device = false
24
- remove_apks = ''
25
- list_apks.out.split(/\r?\n/).each do |path|
26
- if path.include?(@md5)
27
- apk_on_device = true
28
- else
29
- remove_apks += ' rm \\"' + path + '\\";'
30
- end
31
- end
32
-
33
- # must return if there are no apks to remove
34
- return if remove_apks.empty?
35
-
36
- remove_apks = 'adb shell "' + remove_apks + '"'
37
- remove_apks = POSIX::Spawn::Child.new remove_apks
38
- raise "remove_apks errored with: #{remove_apks.err}" unless remove_apks.err.empty?
39
- end
40
-
41
- def _push_apk
42
- # dir must exist before pushing
43
- POSIX::Spawn::Child.new 'adb shell "mkdir /data/local/tmp/"'
44
- push_apk = POSIX::Spawn::Child.new %Q(adb push "#{@apk}" "/data/local/tmp/#{@md5}.apk")
45
- raise "push_apk errored with: #{push_apk.err}" unless push_apk.err.empty?
46
- end
47
-
48
- def _reinstall_apk
49
- POSIX::Spawn::Child.new %Q(adb shell "am force-stop #{@package}")
50
- apk_uninstall = POSIX::Spawn::Child.new "adb uninstall #{@package}"
51
- raise "apk_uninstall errored with: #{apk_uninstall.err}" unless apk_uninstall.err.empty?
52
- apk_install = POSIX::Spawn::Child.new "adb shell pm install /data/local/tmp/#{@md5}.apk"
53
- raise "apk_install errored with: #{apk_install.err}" unless apk_install.err.empty?
54
- end
55
-
56
- def reset
57
- apk_on_device = _remove_old_apks
58
- _push_apk unless apk_on_device
59
- _reinstall_apk
60
- end
61
- end
62
- end