ib 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
18
  ui.xcodeproj
19
+ ib.xcodeproj
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  rubymotion interface builder support (yes, with outlets)
4
4
 
5
+ [**Change Log**](https://github.com/yury/ib/wiki/Change-Log)
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
@@ -48,8 +50,11 @@ class HelloController < UIViewController
48
50
  extend IB
49
51
 
50
52
  # define ib outlet
51
- outlet :title, UILabel # IBOutlet UILabel * title;
52
- outlet :untyped_label # IBOutlet id untyped_label;
53
+ outlet :title, UILabel # @property IBOutlet UILabel * title;
54
+ outlet :untyped_label # @property IBOutlet id untyped_label;
55
+
56
+ # define ib outlet collection
57
+ outlet_collection :labels, UILabel # @property IBOutletCollection(UILabel) NSArray * labels;
53
58
 
54
59
  # define ib action
55
60
  def someAction sender
@@ -107,7 +112,7 @@ end
107
112
 
108
113
  Run `rake design` create Storyboard or nibs (put them in resources folder) and you will be able to bind outlets and actions to your ruby code.
109
114
 
110
- **Note** : add ui.xcodeproj to your .gitignore
115
+ **Note** : add ib.xcodeproj to your .gitignore
111
116
 
112
117
  # Sample app
113
118
 
data/lib/ib/outlets.rb CHANGED
@@ -3,11 +3,6 @@ module IB
3
3
  def ib_outlet name, type = "id"
4
4
  end
5
5
 
6
- def outlet_accessor name, type = "id"
7
- puts "Depricated: use `outlet` instead of `outlet_accessor`"
8
- attr_accessor name
9
- end
10
-
11
6
  def outlet name, type = "id"
12
7
  attr_accessor name
13
8
  end
@@ -15,11 +10,6 @@ module IB
15
10
  def ib_outlet_collection name, type = "id"
16
11
  end
17
12
 
18
- def outlet_collection_accessor name, type = "id"
19
- puts "Depricated: use `outlet_collection` instead of `outlet_collection_accessor`"
20
- attr_accessor name
21
- end
22
-
23
13
  def outlet_collection name, type = "id"
24
14
  attr_accessor name
25
15
  end
data/lib/ib/project.rb CHANGED
@@ -4,10 +4,10 @@ class IB::Project
4
4
  target = project.targets.new_static_library(:ios, 'ui')
5
5
 
6
6
  resources = project.groups.new('path' => resources_path, 'name' => 'Resources')
7
- support = project.groups.new('name' => 'Supporting Files', 'path' => 'ui.xcodeproj')
7
+ support = project.groups.new('name' => 'Supporting Files', 'path' => 'ib.xcodeproj')
8
8
  pods = project.groups.new('name' => 'Pods')
9
9
 
10
- IB::Generator.new.write(app_path, "ui.xcodeproj")
10
+ IB::Generator.new.write(app_path, "ib.xcodeproj")
11
11
  support.files.new 'path' => 'Stubs.h', 'sourceTree' => '<group>'
12
12
 
13
13
  path = Pathname.new("Stubs.m")
@@ -42,6 +42,6 @@ class IB::Project
42
42
  target.frameworks_build_phases.first << file
43
43
  end
44
44
 
45
- project.save_as("ui.xcodeproj")
45
+ project.save_as("ib.xcodeproj")
46
46
  end
47
47
  end
data/lib/ib/tasks.rb CHANGED
@@ -1,7 +1,13 @@
1
1
  require 'rake'
2
2
 
3
- desc "Generates ui.xcodeproj and open it"
4
- task :design do
5
- IB::Project.new.write
6
- system "open ui.xcodeproj"
3
+ namespace :ib do
4
+ desc "Generates ib.xcodeproj and opens it in XCode"
5
+ task :open => :project do
6
+ system "open ib.xcodeproj"
7
+ end
8
+
9
+ desc "Generates ib.xcodeproj"
10
+ task :project do
11
+ IB::Project.new.write
12
+ end
7
13
  end
data/lib/ib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module IB
2
- VERSION = "0.1.4"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-08-09 00:00:00.000000000 Z
13
+ date: 2012-11-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: xcodeproj
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  segments:
110
110
  - 0
111
- hash: 1512499769767831646
111
+ hash: -4495023945043465295
112
112
  required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  none: false
114
114
  requirements:
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  segments:
119
119
  - 0
120
- hash: 1512499769767831646
120
+ hash: -4495023945043465295
121
121
  requirements: []
122
122
  rubyforge_project:
123
123
  rubygems_version: 1.8.24