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 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.tap do |proj|
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.create_group group_name
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.create_file file_path.to_s
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.add_source_files source_files_for_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.create_file "public"
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 << build_file
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
- target = Xcodeproj::Project::Object::PBXNativeTarget.new(proj,
135
- nil,
136
- 'productType' => 'com.apple.product-type.application',
137
- 'productName' => @name)
138
-
139
- target.build_configurations.each do |config|
140
- config.build_settings.merge!(Xcodeproj::Project::Object::XCBuildConfiguration::COMMON_BUILD_SETTINGS[:ios])
141
-
142
- # E.g. [:ios, :release]
143
- extra_settings_key = [:ios, config.name.downcase.to_sym]
144
- if extra_settings = Xcodeproj::Project::Object::XCBuildConfiguration::COMMON_BUILD_SETTINGS[extra_settings_key]
145
- config.build_settings.merge!(extra_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
- config.build_settings.merge!({
149
- "GCC_PREFIX_HEADER" => "src/#{@name}-Prefix.pch",
150
- "OTHER_LDFLAGS" => ['-ObjC', '-all_load'],
151
- "INFOPLIST_FILE" => "src/#{@name}-Info.plist",
152
- "SKIP_INSTALL" => "NO",
153
- "IPHONEOS_DEPLOYMENT_TARGET" => "5.0",
154
- })
155
- config.build_settings.delete "DSTROOT"
156
- config.build_settings.delete "INSTALL_PATH"
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
- calatrava_phase = Xcodeproj::Project::Object::PBXShellScriptBuildPhase.new(proj,nil,{})
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
- calatrava_phase.name = "Build Calatrava Kernel & Shell"
164
- calatrava_phase.shell_path = '/bin/bash'
165
- calatrava_phase.shell_script = <<-EOS.split("\n").collect(&:strip).join("\n")
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
- proj.targets << target
171
- target
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 => '7a57332b1bd74726240247f22d48dae89fdfce4a'
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'
@@ -1,3 +1,3 @@
1
1
  module Calatrava
2
- Version = "0.6.0"
2
+ Version = "0.6.1"
3
3
  end
data/lib/calatrava.rb CHANGED
@@ -14,6 +14,5 @@ require 'calatrava/manifest'
14
14
  require 'calatrava/mobile_web_app'
15
15
  require 'calatrava/project'
16
16
  require 'calatrava/project_script'
17
- require 'calatrava/resources_build_phase'
18
17
  require 'calatrava/shell'
19
18
  require 'calatrava/template'
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.0
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-11 00:00:00.000000000 Z
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: &70224599001040 !ruby/object:Gem::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: *70224599001040
24
+ version_requirements: *70320900615840
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: aruba
27
- requirement: &70224599000620 !ruby/object:Gem::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: *70224599000620
35
+ version_requirements: *70320900638120
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &70224599000200 !ruby/object:Gem::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: '0'
43
+ version: 0.9.5
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70224599000200
46
+ version_requirements: *70320900637600
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: thor
49
- requirement: &70224598999780 !ruby/object:Gem::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: '0'
54
+ version: 0.16.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70224598999780
57
+ version_requirements: *70320900637100
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: haml
60
- requirement: &70224598999360 !ruby/object:Gem::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: '0'
65
+ version: 3.1.7
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70224598999360
68
+ version_requirements: *70320900636640
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sass
71
- requirement: &70224598998940 !ruby/object:Gem::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: '0'
76
+ version: 3.2.3
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70224598998940
79
+ version_requirements: *70320900636180
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: mustache
82
- requirement: &70224598998520 !ruby/object:Gem::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: '0'
87
+ version: 0.99.4
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70224598998520
90
+ version_requirements: *70320900635720
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: cucumber
93
- requirement: &70224598998100 !ruby/object:Gem::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: '0'
98
+ version: 1.2.1
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70224598998100
101
+ version_requirements: *70320900635240
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: watir-webdriver
104
- requirement: &70224598997680 !ruby/object:Gem::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: '0'
109
+ version: 0.6.1
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70224598997680
112
+ version_requirements: *70320900634620
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: frank-cucumber
115
- requirement: &70224598997260 !ruby/object:Gem::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: '0'
120
+ version: 1.1.1
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *70224598997260
123
+ version_requirements: *70320900634040
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: xcodeproj
126
- requirement: &70224598996840 !ruby/object:Gem::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: '0'
131
+ version: 0.4.0
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *70224598996840
134
+ version_requirements: *70320900633200
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: cocoapods
137
- requirement: &70224598996420 !ruby/object:Gem::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: '0'
142
+ version: 0.16.0
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *70224598996420
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