motion-sparkinspector 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/motion-sparkinspector.rb +16 -16
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA512:
3
- data.tar.gz: c259e7bfd92b4485dd4413585d3fc3ee33cbb2d48716d904472fedb7d9c9a3f3ec7c1f2e1457cbeaa34c87a0467864287d345ecfdf63af2acefbc94a8dc104f5
4
- metadata.gz: 1cdb0f3bbfe21b13473b8197576538a69d0e992ef8f2951ced062982b1a1bb2419343f4dd9768aedbad941af46703c340b5b42c5bee0f90d48057ad3912238e1
3
+ metadata.gz: 537a156c49d9e75b5f9cd6e38c5e592c1d7195a249aff1dd0498bea680f81c598528e23bcd47c3f9b418201660774dcb53f1e6a965226f2e7a7f7fa8aac182fb
4
+ data.tar.gz: d03bcbb7bcb68d1555008132eaed0b12dca5b3417ab93de51b218e7d0f2e05c8ea3cde9809dec7a3599712f4f883fd958e63de7c5b81e54816c591516ea97276
5
5
  SHA1:
6
- data.tar.gz: e42d755edbc516c2a92d276c23c50d6a93a92408
7
- metadata.gz: 1dac0bcb101c6631af460f5a7c838d64a186abcd
6
+ metadata.gz: 6121be748fa627b6f76cc4aa8e0d065dacd3694b
7
+ data.tar.gz: 3581386a8361ccbf9f4d29935be28b1a95556ded
@@ -1,35 +1,35 @@
1
1
  unless defined?(Motion::Project::Config)
2
- raise "This file must be required within a RubyMotion project Rakefile."
3
- end
4
-
5
- unless File.exist? '/Applications/Spark Inspector.app'
6
- raise "Please install SparkInspector (http://www.sparkinspector.com"
2
+ raise "This file must be required within a RubyMotion project Rakefile."
7
3
  end
8
4
 
9
5
  def create_launcher(files)
10
6
  # --- based on motion-testflight
11
7
  launcher_code = <<EOF
12
- # created by motion-sparkinspector
8
+ # created by motion-sparkinspector
13
9
  if Object.const_defined?('SparkInspector')
14
10
  SparkInspector.enableObservation
15
11
  end
16
12
  EOF
17
13
 
18
- launcher_file = './app/sparkinspector_launcher.rb'
19
- if !File.exist?(launcher_file) or File.read(launcher_file) != launcher_code
20
- File.open(launcher_file, 'w') { |io| io.write(launcher_code) }
21
- end
22
- files = files.flatten
23
- files << launcher_file unless files.find { |x| File.expand_path(x) == File.expand_path(launcher_file) }
14
+ launcher_file = './app/sparkinspector_launcher.rb'
15
+ if !File.exist?(launcher_file) or File.read(launcher_file) != launcher_code
16
+ File.open(launcher_file, 'w') { |io| io.write(launcher_code) }
17
+ end
18
+ files = files.flatten
19
+ files << launcher_file unless files.find { |x| File.expand_path(x) == File.expand_path(launcher_file) }
24
20
 
25
21
  end
26
22
 
27
23
  Motion::Project::App.setup do |app|
28
24
  app.development do
29
- app.vendor_project('/Applications/Spark Inspector.app/Contents/Resources/Frameworks/SparkInspector.framework', :static, :products => ['SparkInspector'], :force_load => true, :headers_dir => 'Headers')
30
- app.libs += ['/usr/lib/libz.dylib']
31
- app.frameworks += ['QuartzCore']
25
+ if File.exist? '/Applications/Spark Inspector.appx'
26
+ app.vendor_project('/Applications/Spark Inspector.app/Contents/Resources/Frameworks/SparkInspector.framework', :static, :products => ['SparkInspector'], :force_load => true, :headers_dir => 'Headers')
27
+ app.libs += ['/usr/lib/libz.dylib']
28
+ app.frameworks += ['QuartzCore']
32
29
 
33
- create_launcher(app.files)
30
+ create_launcher(app.files)
31
+ else
32
+ puts "[warning] missing SparkInspector (http://www.sparkinspector.com)"
33
+ end
34
34
  end
35
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-sparkinspector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - TBD
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2013-05-10 00:00:00 Z
12
+ date: 2013-05-15 00:00:00 Z
13
13
  dependencies: []
14
14
 
15
15
  description: Use SparkInspector in RubyMotion apps