calatrava 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/calatrava.gemspec +10 -10
- data/lib/calatrava/project_script.rb +40 -44
- data/lib/calatrava/templates/ios/Podfile.calatrava +1 -1
- data/lib/calatrava/version.rb +1 -1
- data/lib/calatrava.rb +0 -1
- metadata +46 -47
- data/lib/calatrava/resources_build_phase.rb +0 -19
data/calatrava.gemspec
CHANGED
@@ -21,14 +21,14 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_development_dependency "rspec"
|
22
22
|
s.add_development_dependency "aruba"
|
23
23
|
|
24
|
-
s.add_runtime_dependency "rake"
|
25
|
-
s.add_runtime_dependency "thor"
|
26
|
-
s.add_runtime_dependency "haml"
|
27
|
-
s.add_runtime_dependency "sass"
|
28
|
-
s.add_runtime_dependency "mustache"
|
29
|
-
s.add_runtime_dependency "cucumber"
|
30
|
-
s.add_runtime_dependency "watir-webdriver"
|
31
|
-
s.add_runtime_dependency "frank-cucumber"
|
32
|
-
s.add_runtime_dependency "xcodeproj"
|
33
|
-
s.add_runtime_dependency "cocoapods"
|
24
|
+
s.add_runtime_dependency "rake", "~> 0.9.5"
|
25
|
+
s.add_runtime_dependency "thor", "~> 0.16.0"
|
26
|
+
s.add_runtime_dependency "haml", "~> 3.1.7"
|
27
|
+
s.add_runtime_dependency "sass", "~> 3.2.3"
|
28
|
+
s.add_runtime_dependency "mustache", "~> 0.99.4"
|
29
|
+
s.add_runtime_dependency "cucumber", "~> 1.2.1"
|
30
|
+
s.add_runtime_dependency "watir-webdriver", "~> 0.6.1"
|
31
|
+
s.add_runtime_dependency "frank-cucumber", "~> 1.1.1"
|
32
|
+
s.add_runtime_dependency "xcodeproj", "~> 0.4.0"
|
33
|
+
s.add_runtime_dependency "cocoapods", "~> 0.16.0"
|
34
34
|
end
|
@@ -93,9 +93,7 @@ module Calatrava
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def create_ios_project
|
96
|
-
Xcodeproj::Project.new
|
97
|
-
%w{Foundation UIKit CoreGraphics}.each { |fw| proj.add_system_framework fw }
|
98
|
-
end
|
96
|
+
Xcodeproj::Project.new
|
99
97
|
end
|
100
98
|
|
101
99
|
def create_ios_project_groups(base_dir, proj, target)
|
@@ -104,71 +102,69 @@ module Calatrava
|
|
104
102
|
walker = lambda do |item, group|
|
105
103
|
if item.directory?
|
106
104
|
group_name = item.basename
|
107
|
-
child_group = group.
|
105
|
+
child_group = group.new_group(group_name.to_s)
|
108
106
|
item.each_child { |item| walker.call(item, child_group) }
|
109
107
|
elsif item.file?
|
110
108
|
file_path = item.relative_path_from(base_dir)
|
111
|
-
group.
|
112
|
-
source_files_for_target << Xcodeproj::Project::Object::PBXNativeTarget::SourceFileDescription.new(file_path, "", nil)
|
109
|
+
source_files_for_target << group.new_file(file_path.to_s)
|
113
110
|
else
|
114
111
|
raise 'what is it then?!'
|
115
112
|
end
|
116
113
|
end
|
117
114
|
(base_dir + "src").each_child { |item| walker.call(item, proj.main_group) }
|
118
|
-
target.
|
115
|
+
target.add_file_references source_files_for_target
|
119
116
|
end
|
120
117
|
|
121
118
|
def create_ios_folder_references(base_dir, proj, target)
|
122
|
-
public_folder = proj.main_group.
|
119
|
+
public_folder = proj.main_group.new_file "public"
|
123
120
|
public_folder.last_known_file_type = 'folder'
|
124
|
-
build_file = public_folder.build_files.new
|
125
|
-
|
126
|
-
shared_phase = Xcodeproj::Project::Object::PBXResourcesBuildPhase.new(proj,nil,{})
|
127
121
|
|
128
|
-
shared_phase
|
122
|
+
shared_phase = Xcodeproj::Project::Object::PBXResourcesBuildPhase.new(proj, nil)
|
123
|
+
shared_phase.add_file_reference(public_folder)
|
129
124
|
target.build_phases << shared_phase
|
130
125
|
|
131
126
|
end
|
132
127
|
|
133
128
|
def create_ios_project_target(proj)
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
config.build_settings.
|
129
|
+
proj.new_target(:application, @name, :ios).tap do |target|
|
130
|
+
|
131
|
+
target.build_configurations.each do |config|
|
132
|
+
config.build_settings.merge!({
|
133
|
+
"GCC_PREFIX_HEADER" => "src/#{@name}-Prefix.pch",
|
134
|
+
"OTHER_LDFLAGS" => ['-ObjC', '-all_load'],
|
135
|
+
"INFOPLIST_FILE" => "src/#{@name}-Info.plist",
|
136
|
+
"SKIP_INSTALL" => "NO",
|
137
|
+
"IPHONEOS_DEPLOYMENT_TARGET" => "5.0",
|
138
|
+
})
|
139
|
+
config.build_settings.delete "DSTROOT"
|
140
|
+
config.build_settings.delete "INSTALL_PATH"
|
141
|
+
|
146
142
|
end
|
147
143
|
|
148
|
-
|
149
|
-
|
150
|
-
"
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
144
|
+
%w{UIKit CoreGraphics}.each do |name|
|
145
|
+
fw = proj.frameworks_group.new_file("System/Library/Frameworks/#{name}.framework")
|
146
|
+
fw.name = "#{name}.framework"
|
147
|
+
fw.source_tree = 'SDKROOT'
|
148
|
+
|
149
|
+
bf = proj.new(Xcodeproj::Project::Object::PBXBuildFile)
|
150
|
+
bf.file_ref = fw
|
151
|
+
target.frameworks_build_phase.files << bf
|
152
|
+
end
|
157
153
|
|
158
|
-
end
|
159
154
|
|
160
|
-
|
161
|
-
target.build_phase_references.insert(0,calatrava_phase.uuid) # hacky manual way to get build phase inserted in the right place
|
155
|
+
calatrava_phase = proj.new(Xcodeproj::Project::Object::PBXShellScriptBuildPhase)
|
162
156
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
source ${SRCROOT}/../build_env.sh
|
167
|
-
bundle exec rake ios:xcode:prebuild
|
168
|
-
EOS
|
157
|
+
# hacky manual way to get build phase inserted in the right place
|
158
|
+
target.build_phases.insert(0, calatrava_phase)
|
159
|
+
calatrava_phase.add_referrer(target.build_phases.owner)
|
169
160
|
|
170
|
-
|
171
|
-
|
161
|
+
calatrava_phase.name = "Build Calatrava Kernel & Shell"
|
162
|
+
calatrava_phase.shell_path = '/bin/bash'
|
163
|
+
calatrava_phase.shell_script = <<-EOS.split("\n").collect(&:strip).join("\n")
|
164
|
+
source ${SRCROOT}/../build_env.sh
|
165
|
+
bundle exec rake ios:xcode:prebuild
|
166
|
+
EOS
|
167
|
+
end
|
172
168
|
end
|
173
169
|
|
174
170
|
def create_ios_tree(template)
|
@@ -3,7 +3,7 @@ platform :ios, '5.0'
|
|
3
3
|
xcodeproj '{{ project_name}}.xcodeproj'
|
4
4
|
|
5
5
|
{{^dev?}}
|
6
|
-
pod 'calatrava', :git => 'https://github.com/calatrava/calatrava-ios', :commit => '
|
6
|
+
pod 'calatrava', :git => 'https://github.com/calatrava/calatrava-ios', :commit => '51391eb66a605801351e65a670b9466082623a3c'
|
7
7
|
{{/dev?}}
|
8
8
|
{{#dev?}}
|
9
9
|
pod 'calatrava', :local => '../../../calatrava-ios'
|
data/lib/calatrava/version.rb
CHANGED
data/lib/calatrava.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calatrava
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70320900615840 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70320900615840
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: aruba
|
27
|
-
requirement: &
|
27
|
+
requirement: &70320900638120 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,117 +32,117 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70320900638120
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rake
|
38
|
-
requirement: &
|
38
|
+
requirement: &70320900637600 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - ~>
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 0.9.5
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70320900637600
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: thor
|
49
|
-
requirement: &
|
49
|
+
requirement: &70320900637100 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.16.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70320900637100
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: haml
|
60
|
-
requirement: &
|
60
|
+
requirement: &70320900636640 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
|
-
- -
|
63
|
+
- - ~>
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version:
|
65
|
+
version: 3.1.7
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70320900636640
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sass
|
71
|
-
requirement: &
|
71
|
+
requirement: &70320900636180 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ~>
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
76
|
+
version: 3.2.3
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70320900636180
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: mustache
|
82
|
-
requirement: &
|
82
|
+
requirement: &70320900635720 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
|
-
- -
|
85
|
+
- - ~>
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
87
|
+
version: 0.99.4
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70320900635720
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: cucumber
|
93
|
-
requirement: &
|
93
|
+
requirement: &70320900635240 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
|
-
- -
|
96
|
+
- - ~>
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
98
|
+
version: 1.2.1
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70320900635240
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: watir-webdriver
|
104
|
-
requirement: &
|
104
|
+
requirement: &70320900634620 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ~>
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: 0.6.1
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70320900634620
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: frank-cucumber
|
115
|
-
requirement: &
|
115
|
+
requirement: &70320900634040 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
|
-
- -
|
118
|
+
- - ~>
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
120
|
+
version: 1.1.1
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70320900634040
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: xcodeproj
|
126
|
-
requirement: &
|
126
|
+
requirement: &70320900633200 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 0.4.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70320900633200
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: cocoapods
|
137
|
-
requirement: &
|
137
|
+
requirement: &70320900632700 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
|
-
- -
|
140
|
+
- - ~>
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version:
|
142
|
+
version: 0.16.0
|
143
143
|
type: :runtime
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *70320900632700
|
146
146
|
description: A framework to build cross-platform mobile apps with high quality native
|
147
147
|
UIs.
|
148
148
|
email:
|
@@ -180,7 +180,6 @@ files:
|
|
180
180
|
- lib/calatrava/mobile_web_app.rb
|
181
181
|
- lib/calatrava/project.rb
|
182
182
|
- lib/calatrava/project_script.rb
|
183
|
-
- lib/calatrava/resources_build_phase.rb
|
184
183
|
- lib/calatrava/shell.rb
|
185
184
|
- lib/calatrava/tasks.rb
|
186
185
|
- lib/calatrava/tasks/artifact.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'xcodeproj'
|
2
|
-
|
3
|
-
module Xcodeproj
|
4
|
-
class Project
|
5
|
-
module Object
|
6
|
-
|
7
|
-
class PBXResourcesBuildPhase < PBXBuildPhase
|
8
|
-
has_many :files
|
9
|
-
|
10
|
-
def initialize(*)
|
11
|
-
super
|
12
|
-
self.file_references ||= []
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|