motion.h 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/lib/motion.h.rb +27 -9
- data/motion.h.gemspec +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1b8b25851ba972e8ffcbc21bfa7d56100ecb3ae
|
4
|
+
data.tar.gz: 9a35878e0f8b949ab027d727a08ab421831bc737
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48d984f3aa2c329d7e3ebf98f8b170621992e3b0358005764d984132a52e413023e0f2fafd537182a5575014a81a7ef88cdf61692cce6e05dc1ed6c8f3c5d708
|
7
|
+
data.tar.gz: 48e3021449d08ce4b9cede3c0f30b75c2860f2b2e860221aae89420ed8e329abbe93f6339ce567fa99850038f24d3704f96d33a284684b18e5c21a81dc96b07b
|
data/lib/motion.h.rb
CHANGED
@@ -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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
-
|
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
|
-
`/
|
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
|
data/motion.h.gemspec
CHANGED
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
|
+
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:
|
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.
|
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:
|