sim_launcher 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
+ .DS_Store
1
2
  pkg
@@ -1,8 +1,8 @@
1
1
  module SimLauncher
2
2
  class Simulator
3
3
 
4
- def initialize( iphonesim_path = nil )
5
- @iphonesim_path = iphonesim_path || File.join( File.dirname(__FILE__), '..', '..', 'native', 'iphonesim' )
4
+ def initialize( iphonesim_path_external = nil )
5
+ @iphonesim_path = iphonesim_path_external || iphonesim_path(xcode_version)
6
6
  end
7
7
 
8
8
  def showsdks
@@ -36,5 +36,19 @@ class Simulator
36
36
  cmd_sections = [@iphonesim_path] + args.map{ |x| "\"#{x.to_s}\"" } << '2>&1'
37
37
  cmd_sections.join(' ')
38
38
  end
39
+
40
+ def xcode_version
41
+ version = `xcodebuild -version`
42
+ raise "xcodebuild not found" unless $? == 0
43
+ version[/([0-9]\.[0-9])/, 1].to_f
44
+ end
45
+
46
+ def iphonesim_path(version)
47
+ if version < 4.3
48
+ File.join( File.dirname(__FILE__), '..', '..', 'native', 'iphonesim-legacy' )
49
+ else
50
+ File.join( File.dirname(__FILE__), '..', '..', 'native', 'iphonesim' )
51
+ end
52
+ end
39
53
  end
40
54
  end
@@ -1,3 +1,3 @@
1
1
  module SimLauncher
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
data/native/iphonesim CHANGED
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sim_launcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-22 00:00:00.000000000Z
12
+ date: 2012-03-02 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
16
- requirement: &70345085009420 !ruby/object:Gem::Requirement
16
+ requirement: &70359920610120 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70345085009420
24
+ version_requirements: *70359920610120
25
25
  description:
26
26
  email:
27
27
  - rubygems@thepete.net
@@ -42,6 +42,7 @@ files:
42
42
  - lib/sim_launcher/simulator.rb
43
43
  - lib/sim_launcher/version.rb
44
44
  - native/iphonesim
45
+ - native/iphonesim-legacy
45
46
  - sim_launcher.gemspec
46
47
  homepage: http://rubygems.org/gems/sim_launcher
47
48
  licenses: []