testautoa 0.4.2.pre1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
data/bin/testautoa
CHANGED
@@ -234,12 +234,6 @@ def smb_connect_mac(location,username,password)
|
|
234
234
|
location = location.tr('\\','/')
|
235
235
|
username = username.tr('\\',';').tr('/',';')
|
236
236
|
raise "The build drop location is incorrect" if not location.start_with?("//")
|
237
|
-
paths = location.split('/')
|
238
|
-
if paths.size > 4
|
239
|
-
location = paths.shift(4).join('/')
|
240
|
-
@settings["build_drop_branch_dir"] = [paths.join('/'), @settings["build_drop_branch_dir"]].join('/')
|
241
|
-
@settings["build_drop_trunk_dir"] = [paths.join('/'), @settings["build_drop_trunk_dir"]].join('/')
|
242
|
-
end
|
243
237
|
cmd = "mount -t smbfs //'#{username}':#{password}@#{location[2..-1]} #{mount_node}"
|
244
238
|
output=`#{cmd}` ; result=$?.success?
|
245
239
|
raise "the command '#{cmd}' failed" if result == false
|
@@ -292,9 +286,7 @@ def get_build
|
|
292
286
|
# copy the version build
|
293
287
|
release_path = File.join(mount_node, @settings["build_drop_branch_dir"], "Android#{ARGV.first}/Release")
|
294
288
|
end
|
295
|
-
raise "No builds found in #{release_path}" unless File.directory?(release_path)
|
296
289
|
build_dir = Dir.entries(release_path).reject{|d|d.start_with?('.')}.sort_by{|c| File.stat(File.join(release_path,c)).ctime}.last
|
297
|
-
raise "No builds found in #{release_path}" if build_dir == nil
|
298
290
|
apk_file = "ConcurMobile.apk"
|
299
291
|
source = File.join(release_path, build_dir, apk_file)
|
300
292
|
raise "the file '#{source}' does not exist" if not File.exists?(source)
|
@@ -319,8 +311,8 @@ def get_script
|
|
319
311
|
uri = URI.join(uri, feature)
|
320
312
|
puts `svn export --force #{uri} features --username #{username} --password #{password}`
|
321
313
|
|
322
|
-
uri = URI.join(@settings["svn_location"], "_support/", "support/")
|
323
|
-
puts `svn export --force #{uri} features/support --username #{username} --password #{password}`
|
314
|
+
#uri = URI.join(@settings["svn_location"], "_support/", "support/")
|
315
|
+
#puts `svn export --force #{uri} features/support --username #{username} --password #{password}`
|
324
316
|
uri = URI.join(@settings["svn_location"], "_support/", "step_definition/")
|
325
317
|
puts `svn export --force #{uri} features/step_definitions --username #{username} --password #{password}`
|
326
318
|
end
|
@@ -334,12 +326,8 @@ end
|
|
334
326
|
def adb_path_w_sn
|
335
327
|
raise_if_android_home_not_set
|
336
328
|
serial_number = @settings["device_serialno"].to_s.strip
|
337
|
-
serial_number = "
|
338
|
-
|
339
|
-
end
|
340
|
-
|
341
|
-
def adb_shell(command)
|
342
|
-
system("#{adb_path_w_sn} shell #{command}")
|
329
|
+
serial_number = "-s #{serial_number}" unless serial_number.empty?
|
330
|
+
File.join(ENV['ANDROID_HOME'], 'platform-tools', 'adb') + " " + serial_number
|
343
331
|
end
|
344
332
|
|
345
333
|
def android_path
|
Binary file
|
@@ -104,10 +104,6 @@ module Operations
|
|
104
104
|
default_device.press_back_key
|
105
105
|
end
|
106
106
|
|
107
|
-
def switch_wifi(on)
|
108
|
-
default_device.switch_wifi(on)
|
109
|
-
end
|
110
|
-
|
111
107
|
#def wait_for(timeout, &block)
|
112
108
|
# value = nil
|
113
109
|
# begin
|
@@ -444,11 +440,6 @@ module Operations
|
|
444
440
|
def press_back_key
|
445
441
|
input_keyevent(4)
|
446
442
|
end
|
447
|
-
|
448
|
-
def switch_wifi(on)
|
449
|
-
cmd = "#{adb_command} shell am start -n com.concur.wifiswitch/." + (on ? "On" : "Off") + "Activity"
|
450
|
-
result = `#{cmd}`
|
451
|
-
end
|
452
443
|
end
|
453
444
|
|
454
445
|
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testautoa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.2
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.2
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- jimtsay
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cucumber
|
@@ -864,9 +864,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
864
864
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
865
865
|
none: false
|
866
866
|
requirements:
|
867
|
-
- - ! '
|
867
|
+
- - ! '>='
|
868
868
|
- !ruby/object:Gem::Version
|
869
|
-
version:
|
869
|
+
version: '0'
|
870
870
|
requirements: []
|
871
871
|
rubyforge_project:
|
872
872
|
rubygems_version: 1.8.25
|