motion-objection 0.5 → 0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGY0M2YxMGNiZGQ3NTNlNDUyMDNjOGI1MTE4OTE2YjU2ZWQ4MTcxNA==
4
+ YWQzMWNjZDg0ZDFmY2M5ODIyZGYwMmIzNmI0ZWQxODdiYTljMTliYg==
5
5
  data.tar.gz: !binary |-
6
- NzcwOWM0NmVmNDMzYzFkNGNhMGQ3Nzg5N2ZmM2ZlZTA1NmE4MWRlYg==
6
+ NDRlNGMzZTQ3MjRhMzUxNzdiZjRiYWE1NmQ1MjFlMThjYWUzY2M5NA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZDkyMmRlNzdhMjQ3YjE3MDA2Y2Y4ZDBjMjhmNTA0Mzk3NzFjM2E4MTgxMDgz
10
- NDllMjdjMDA1MTg1ZmI1YjkxNDBhMjE0MWI5MzdlN2NhNTk1YzdhNGRmMzFj
11
- NWQ4YjdhZGQzYTIxNzY4ZDczNWI2MGJiNmZkNjdmNzAxNjJlMDY=
9
+ YzA0N2M1YmVhMjljNmFjZTFmNDhiMDk1N2U0ODhiYjU0ZmQ1NmRlOTc1NmE5
10
+ Zjc2NjQwODc2OTFkNWVlMjYzOTkxMTZjZmRhMjFjMWIxMjkxNDA0NWE5MjUy
11
+ YTQ1Yzg0YWJhZDQ4ZWEzMjdlZjFiZTg3YTBjYjM3NjUzZjZiZTM=
12
12
  data.tar.gz: !binary |-
13
- NzgyM2M2YTEzNTQ3ZjI0ZDBkOTY5Yjk4YzAyOTdjZDhjNTFmMzkwYzI2MGJk
14
- ZWUyNjdhOTkzZWRkMTIwYjgwZDExYjIzYWU2YTAwZTI1ZDU0YTQ2MWZlZGI3
15
- ZmExNmI3MGVkNGEyNTY2NTUwYTE2MWVkMWQ3YTc5ZjZjOWZmZWU=
13
+ OGI1NzBmMGVhYTliOTI5ODliM2VjYjUwODhjZjYzZjliN2QyZjQ3YjYzOWJk
14
+ NTIzYTdiNjE5YzBmMDgxOWViNDYxMmJjYWUxYjFhMTNhZjVjNjhjNmY3OGNl
15
+ ODZhM2M4NDNkNjk4NjIzMWU1ZTM1YWM2MjgyNGJmYjU1OWMxYjI=
@@ -0,0 +1,3 @@
1
+ language: objective-c
2
+ before_script: sudo chown -R travis ~/Library/RubyMotion
3
+
data/README.md CHANGED
@@ -3,6 +3,10 @@ motion-objection
3
3
 
4
4
  Wrapping Objection in RubyMotion.
5
5
 
6
+ [![Build Status](https://travis-ci.org/atomicobject/motion-objection.png)](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
@@ -1,3 +1,3 @@
1
1
  module Objection
2
- VERSION = "0.5"
2
+ VERSION = "0.6"
3
3
  end
@@ -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.5'
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-05 00:00:00.000000000 Z
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