motion-objection 0.5 → 0.6
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 +8 -8
- data/.travis.yml +3 -0
- data/README.md +22 -0
- data/Rakefile +1 -0
- data/lib/motion-objection/objection.rb +8 -0
- data/lib/motion-objection/version.rb +1 -1
- data/spec/objection_spec.rb +8 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWQzMWNjZDg0ZDFmY2M5ODIyZGYwMmIzNmI0ZWQxODdiYTljMTliYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDRlNGMzZTQ3MjRhMzUxNzdiZjRiYWE1NmQ1MjFlMThjYWUzY2M5NA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzA0N2M1YmVhMjljNmFjZTFmNDhiMDk1N2U0ODhiYjU0ZmQ1NmRlOTc1NmE5
|
10
|
+
Zjc2NjQwODc2OTFkNWVlMjYzOTkxMTZjZmRhMjFjMWIxMjkxNDA0NWE5MjUy
|
11
|
+
YTQ1Yzg0YWJhZDQ4ZWEzMjdlZjFiZTg3YTBjYjM3NjUzZjZiZTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGI1NzBmMGVhYTliOTI5ODliM2VjYjUwODhjZjYzZjliN2QyZjQ3YjYzOWJk
|
14
|
+
NTIzYTdiNjE5YzBmMDgxOWViNDYxMmJjYWUxYjFhMTNhZjVjNjhjNmY3OGNl
|
15
|
+
ODZhM2M4NDNkNjk4NjIzMWU1ZTM1YWM2MjgyNGJmYjU1OWMxYjI=
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -3,6 +3,10 @@ motion-objection
|
|
3
3
|
|
4
4
|
Wrapping Objection in RubyMotion.
|
5
5
|
|
6
|
+
[](https://travis-ci.org/atomicobject/motion-objection)
|
7
|
+
|
8
|
+
## Basic Example
|
9
|
+
|
6
10
|
```ruby
|
7
11
|
class Car
|
8
12
|
include Objection
|
@@ -30,3 +34,21 @@ class Brakes
|
|
30
34
|
end
|
31
35
|
end
|
32
36
|
```
|
37
|
+
|
38
|
+
## Initializers
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
class ViewController < NSObject
|
42
|
+
include Objection
|
43
|
+
initializer "initWithNibName:bundle:", "Home"
|
44
|
+
|
45
|
+
attr_reader :name
|
46
|
+
|
47
|
+
def initWithNibName(name, bundle: bundle)
|
48
|
+
self.init
|
49
|
+
self.tap do
|
50
|
+
@name = name
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
```
|
data/Rakefile
CHANGED
@@ -9,6 +9,7 @@ require './lib/motion-objection'
|
|
9
9
|
Motion::Project::App.setup do |app|
|
10
10
|
# Use `rake config' to see complete project settings.
|
11
11
|
app.name = 'motion-objection'
|
12
|
+
app.identifier = 'com.atomicobject.motion-objection'
|
12
13
|
app.pods do
|
13
14
|
pod "Objection", "~>1.0.3"
|
14
15
|
end
|
@@ -14,6 +14,14 @@ module Objection
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
+
def self.default_injector=(injector)
|
18
|
+
JSObjection.setDefaultInjector injector
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.default_injector
|
22
|
+
JSObjection.defaultInjector
|
23
|
+
end
|
24
|
+
|
17
25
|
module Initializer
|
18
26
|
def objectionInitializer
|
19
27
|
@_initializer
|
data/spec/objection_spec.rb
CHANGED
@@ -3,6 +3,14 @@ describe "Objection" do
|
|
3
3
|
@injector = Objection.injector
|
4
4
|
end
|
5
5
|
|
6
|
+
describe "#default_injector" do
|
7
|
+
it "returns the default injector" do
|
8
|
+
Objection.default_injector.should.equal nil
|
9
|
+
Objection.default_injector = @injector
|
10
|
+
Objection.default_injector.should.equal @injector
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
6
14
|
describe "dependency injection" do
|
7
15
|
it "supports inheritance" do
|
8
16
|
@engine = @injector[V6Engine]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-objection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin DeWind
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: motion-cocoapods
|
@@ -32,6 +32,7 @@ extensions: []
|
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
34
|
- .gitignore
|
35
|
+
- .travis.yml
|
35
36
|
- Gemfile
|
36
37
|
- Gemfile.lock
|
37
38
|
- LICENSE
|