motion.h 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/motion.h.rb +27 -9
  3. data/motion.h.gemspec +1 -1
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 658a40d4452058be04fc540bce0b8f4b9cd1d586
4
- data.tar.gz: 12953de5cb72faac6539d8ccca02814cb94654b1
3
+ metadata.gz: f1b8b25851ba972e8ffcbc21bfa7d56100ecb3ae
4
+ data.tar.gz: 9a35878e0f8b949ab027d727a08ab421831bc737
5
5
  SHA512:
6
- metadata.gz: dcd79de13a2ccfc3a824c97e67e015cac191326099fe7f42ff207f79e8fd598f8de64d69ec81f5072bcd986e22582d14bea7d71f6f3f5ab36fb0bdacac274fe5
7
- data.tar.gz: e11d43ea20cc60d97ed092b13c23a4a060580aa6551dddada1858814c1e1af004e7db1fe47462c0744f2f39869dc3a4b27b1f2eadf6688ff7ef82d01741e7ea5
6
+ metadata.gz: 48d984f3aa2c329d7e3ebf98f8b170621992e3b0358005764d984132a52e413023e0f2fafd537182a5575014a81a7ef88cdf61692cce6e05dc1ed6c8f3c5d708
7
+ data.tar.gz: 48e3021449d08ce4b9cede3c0f30b75c2860f2b2e860221aae89420ed8e329abbe93f6339ce567fa99850038f24d3704f96d33a284684b18e5c21a81dc96b07b
@@ -2,13 +2,31 @@ unless defined? Motion::Project::Config
2
2
  raise '"motion.h" must be required within a RubyMotion project Rakefile.'
3
3
  end
4
4
 
5
- class Motion::Project::Config
6
- # @param [String] header_file Requested C header file.
7
- # @param [Hash] options Options for customizing BridgeSupport file generation
8
- # @option options [String] :prefix Subdirectory of /usr/include used for root of included header files.
9
- # @option options [String] :bridgesupport_dir Path where the generated bridgesupport file is saved. Defaults to ./build
10
- def include(header_file, options={})
11
- MotionHeader.new(header_file, self, options).integrate
5
+ module Motion::Project
6
+ class Config
7
+ # @param [String] header_file Requested C header file.
8
+ # @param [Hash] options Options for customizing BridgeSupport file generation
9
+ # @option options [String] :prefix Subdirectory of /usr/include used for root of included header files.
10
+ # @option options [String] :bridgesupport_dir Path where the generated bridgesupport file is saved. Defaults to ./build
11
+ def include(header_file, options={})
12
+ motion_h << MotionHeader.new(header_file, self, options).integrate
13
+ end
14
+
15
+ def motion_h
16
+ @motion_h ||= []
17
+ end
18
+ end
19
+
20
+ class App
21
+ class << self
22
+ def build_with_motion_h(platform, opts = {})
23
+ config.bridgesupport_files.concat(config.motion_h)
24
+ build_without_motion_h(platform, opts)
25
+ end
26
+
27
+ alias_method "build_without_motion_h", "build"
28
+ alias_method "build", "build_with_motion_h"
29
+ end
12
30
  end
13
31
  end
14
32
 
@@ -31,7 +49,7 @@ class MotionHeader
31
49
  def integrate
32
50
  verify_header_file
33
51
  generate_bridgesupport_file
34
- @config.bridgesupport_files << bridgesupport_file
52
+ bridgesupport_file
35
53
  end
36
54
 
37
55
  def verify_header_file
@@ -50,7 +68,7 @@ class MotionHeader
50
68
  "--64-bit"
51
69
  end
52
70
  end
53
- `/usr/bin/gen_bridge_metadata --format complete #{flag} --cflags '-I#{include_path} -F#{frameworks_path}' #{@header_file} > #{bridgesupport_file}`
71
+ `/Library/RubyMotion/bin/gen_bridge_metadata --format complete #{flag} --cflags '-I#{include_path} -F#{frameworks_path}' #{@header_file} > #{bridgesupport_file}`
54
72
  end
55
73
 
56
74
  def include_path
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "motion.h"
4
- spec.version = '0.0.4'
4
+ spec.version = '0.0.5'
5
5
  spec.authors = ["Dave Lee"]
6
6
  spec.email = ['dave@kastiglione.com']
7
7
  spec.description = 'Expose iOS system C libraries in RubyMotion'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion.h
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-25 00:00:00.000000000 Z
11
+ date: 2018-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,9 +72,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  version: '0'
73
73
  requirements: []
74
74
  rubyforge_project:
75
- rubygems_version: 2.2.0
75
+ rubygems_version: 2.5.1
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: Expose iOS system C libraries in RubyMotion
79
79
  test_files: []
80
- has_rdoc: