ib 0.2.10 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96f38d8cf9d04ac8f0650ec9c792e177f89ab686
4
- data.tar.gz: 2d678c7ca90bd86e78bfd9b96e5493fce1b8a7cf
3
+ metadata.gz: abd6fcbc4b234c20e6fc6b290fe148e98cd99c69
4
+ data.tar.gz: afc1c2f661411d34bf8e65af2b6e724702e1787a
5
5
  SHA512:
6
- metadata.gz: f33b4de7e654c1d422fd677bdc97f629076a711d921198aa0d24de322f47a268ce288148ed107ba984d20af1e5049a92b861e4e8f48d0cf4cf50f0895bb08537
7
- data.tar.gz: 63b9833813ccb146520953cc7d5ef17297d36bc822675c323cb0f632cca0327f38158c443cca369b4a0a36746be5afa927d7f25fded1f56ae4698e4b244de7c2
6
+ metadata.gz: 7a338975d989e3f5723d331d7e171db7255ecb6de4c0ef9eab0d20a7d5d04b871ac61b7bb8c35eb2454b259d540c6ad45d6553562ecf58e8a3ab931bae6d65b2
7
+ data.tar.gz: 511e6be82243dacf594dfbde07ef6cf8796eba98f60b53cacfd79adc429ac2637ca032a2dd71b3b5d7fef23f238a3103f643ba33d870b5e94dbaf5ee7386a060
data/Gemfile CHANGED
@@ -3,5 +3,4 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in ib.gemspec
4
4
  gemspec
5
5
 
6
- gem 'rake'
7
6
  gem 'bundler'
data/ib.gemspec CHANGED
@@ -19,4 +19,5 @@ Gem::Specification.new do |gem|
19
19
  gem.add_dependency "thor", ">= 0.15.4"
20
20
 
21
21
  gem.add_development_dependency "rspec", ">= 2.0"
22
+ gem.add_development_dependency "rake"
22
23
  end
data/lib/ib/generator.rb CHANGED
@@ -27,7 +27,7 @@ OBJC
27
27
  #{generate_objc_impl(files)}
28
28
  OBJC
29
29
  end
30
-
30
+
31
31
  end
32
32
 
33
33
  def generate_objc files
data/lib/ib/project.rb CHANGED
@@ -1,7 +1,25 @@
1
1
  class IB::Project
2
- def write app_path = "app", resources_path = "resources", pods_headers_path = "vendor/Pods/Headers"
2
+ attr_accessor :platform, :app_path, :resources_path, :pods_headers_path
3
+
4
+ def initialize options={}
5
+ @platform = options[:platform] || detect_platform || :ios
6
+ @app_path = options[:app_path] || "app"
7
+ @resources_path = options[:resources_path] || "resources"
8
+ @pods_headers_path = options[:pods_headers_path] || "vendor/Pods/Headers"
9
+ end
10
+
11
+ def detect_platform
12
+ # TODO: find a better way to detect platform
13
+ if defined?(Motion::Project::Config)
14
+ if Motion::Project::App.config.respond_to?(:platforms)
15
+ Motion::Project::App.config.platforms[0] == 'MacOSX' ? :osx : :ios
16
+ end
17
+ end
18
+ end
19
+
20
+ def write
3
21
  project = Xcodeproj::Project.new
4
- target = project.new_target(:static_library, 'ib', :ios)
22
+ target = project.new_target(:static_library, 'ib', platform)
5
23
 
6
24
  resources = project.new_group("Resources")
7
25
  resources.path = resources_path
data/lib/ib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module IB
2
- VERSION = "0.2.10"
2
+ VERSION = '0.3.0'
3
3
  end
data/spec/project_spec.rb CHANGED
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  require "ib/project"
4
4
 
5
5
  describe IB::Project do
6
- it "generates xcode project" do
7
- IB::Project.new.write("spec/fixtures")
6
+ it "generates xcode project" do
7
+ IB::Project.new(app_path:"spec/fixtures").write()
8
8
  end
9
9
  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.2.10
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Korolev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-19 00:00:00.000000000 Z
12
+ date: 2013-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: xcodeproj
@@ -53,6 +53,20 @@ dependencies:
53
53
  - - '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '2.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rake
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
56
70
  description: Magic rubymotion ib outlets support
57
71
  email:
58
72
  - yury.korolev@gmail.com
@@ -107,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
121
  version: '0'
108
122
  requirements: []
109
123
  rubyforge_project:
110
- rubygems_version: 2.0.0
124
+ rubygems_version: 2.0.3
111
125
  signing_key:
112
126
  specification_version: 4
113
127
  summary: Small portion of love to interface builder with rubymotion