sim_launcher 0.4.3.pre1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sim_launcher/simulator.rb +25 -0
- data/lib/sim_launcher/version.rb +1 -1
- metadata +6 -5
@@ -5,11 +5,36 @@ class Simulator
|
|
5
5
|
@iphonesim_path = iphonesim_path_external || iphonesim_path(xcode_version)
|
6
6
|
end
|
7
7
|
|
8
|
+
def check_app_path( app_path )
|
9
|
+
unless File.exists?( app_path )
|
10
|
+
return "The specified app path doesn't seem to exist: #{app_path}"
|
11
|
+
end
|
12
|
+
|
13
|
+
unless File.directory? app_path
|
14
|
+
file_appears_to_be_a_binary = !!( `file "#{app_path}"` =~ /Mach-O executable/ )
|
15
|
+
if file_appears_to_be_a_binary
|
16
|
+
return <<-EOS
|
17
|
+
The specified app path is a binary executable, rather than a directory. You need to provide the path to the app *bundle*, not the app executable itself.
|
18
|
+
The path you specified was: #{app_path}
|
19
|
+
You might want to instead try specifying: #{File.dirname(app_path)}
|
20
|
+
EOS
|
21
|
+
else
|
22
|
+
return "The specified app path is not a directory. You need to provide the path to your app bundle.\nSpecified app path was: #{app_path}"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
nil
|
27
|
+
end
|
28
|
+
|
8
29
|
def showsdks
|
9
30
|
run_synchronous_command( 'showsdks' )
|
10
31
|
end
|
11
32
|
|
12
33
|
def launch_ios_app(app_path, sdk_version, device_family)
|
34
|
+
if problem = check_app_path( app_path )
|
35
|
+
bangs = '!'*80
|
36
|
+
raise "\n#{bangs}\nENCOUNTERED A PROBLEM WITH THE SPECIFIED APP PATH:\n\n#{problem}\n#{bangs}"
|
37
|
+
end
|
13
38
|
sdk_version ||= SdkDetector.new(self).latest_sdk_version
|
14
39
|
run_synchronous_command( :launch, app_path, '--sdk', sdk_version, '--family', device_family, '--exit' )
|
15
40
|
end
|
data/lib/sim_launcher/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sim_launcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.3
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.3
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Pete Hodgson
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06
|
12
|
+
date: 2012-07-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
@@ -63,9 +63,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
64
|
none: false
|
65
65
|
requirements:
|
66
|
-
- - ! '
|
66
|
+
- - ! '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '0'
|
69
69
|
requirements: []
|
70
70
|
rubyforge_project:
|
71
71
|
rubygems_version: 1.8.24
|
@@ -73,3 +73,4 @@ signing_key:
|
|
73
73
|
specification_version: 3
|
74
74
|
summary: tiny HTTP server to launch an app in the iOS simulator
|
75
75
|
test_files: []
|
76
|
+
has_rdoc:
|