xcodebuild-rb 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/xcode_build/build_action.rb +22 -1
- data/lib/xcode_build/build_step.rb +1 -1
- data/lib/xcode_build/formatters/progress_formatter.rb +37 -4
- data/lib/xcode_build/reporter.rb +4 -0
- data/lib/xcode_build/reporting/build_reporting.rb +5 -0
- data/lib/xcode_build/tasks/build_task.rb +9 -5
- data/lib/xcode_build/translations/building.rb +23 -4
- data/spec/build_task_spec.rb +18 -6
- data/spec/reporting/build_reporting_spec.rb +36 -3
- data/spec/reporting/clean_reporting_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -1
- data/spec/translations/building_translations_spec.rb +57 -8
- metadata +20 -28
@@ -4,13 +4,14 @@ require "xcode_build/build_step"
|
|
4
4
|
|
5
5
|
module XcodeBuild
|
6
6
|
class BuildAction
|
7
|
-
attr_reader :steps_completed
|
7
|
+
attr_reader :steps_completed, :warnings
|
8
8
|
attr_writer :finished_at
|
9
9
|
|
10
10
|
def initialize(metadata)
|
11
11
|
@steps_completed = []
|
12
12
|
@metadata = metadata
|
13
13
|
@started_at = Time.now
|
14
|
+
@warnings = []
|
14
15
|
super()
|
15
16
|
end
|
16
17
|
|
@@ -51,6 +52,14 @@ module XcodeBuild
|
|
51
52
|
def has_errors?
|
52
53
|
failed_steps.any?
|
53
54
|
end
|
55
|
+
|
56
|
+
def has_warnings?
|
57
|
+
warnings.any?
|
58
|
+
end
|
59
|
+
|
60
|
+
def error_count
|
61
|
+
has_errors? ? (failed_steps.map { |s| s.errors.length }) : 0
|
62
|
+
end
|
54
63
|
|
55
64
|
def duration
|
56
65
|
return nil unless finished?
|
@@ -76,5 +85,17 @@ module XcodeBuild
|
|
76
85
|
def default_configuration?
|
77
86
|
@metadata[:default]
|
78
87
|
end
|
88
|
+
|
89
|
+
def add_warning(params)
|
90
|
+
@warnings << Warning.new(params)
|
91
|
+
end
|
92
|
+
|
93
|
+
private
|
94
|
+
|
95
|
+
class Warning < OpenStruct
|
96
|
+
def warning_detail
|
97
|
+
"in #{self.file}:#{self.line.to_s}"
|
98
|
+
end
|
99
|
+
end
|
79
100
|
end
|
80
101
|
end
|
@@ -8,10 +8,17 @@ module XcodeBuild
|
|
8
8
|
|
9
9
|
def initialize(output = STDOUT)
|
10
10
|
@output = output
|
11
|
+
@action_count = 0
|
12
|
+
end
|
13
|
+
|
14
|
+
def build_action_starting(action_type)
|
15
|
+
puts cyan("=> Running xcodebuild #{action_type}")
|
16
|
+
@action_count = 0
|
11
17
|
end
|
12
18
|
|
13
19
|
def clean_started(clean)
|
14
20
|
report_started("Cleaning", clean)
|
21
|
+
@action_count += 1
|
15
22
|
end
|
16
23
|
|
17
24
|
def clean_step_finished(step)
|
@@ -24,6 +31,7 @@ module XcodeBuild
|
|
24
31
|
|
25
32
|
def build_started(build)
|
26
33
|
report_started("Building", build)
|
34
|
+
@action_count += 1
|
27
35
|
end
|
28
36
|
|
29
37
|
def build_step_finished(step)
|
@@ -34,15 +42,24 @@ module XcodeBuild
|
|
34
42
|
report_finished(build)
|
35
43
|
end
|
36
44
|
|
45
|
+
def warning_detected
|
46
|
+
print yellow("x")
|
47
|
+
end
|
48
|
+
|
37
49
|
def report_finished(object)
|
38
50
|
puts
|
51
|
+
report_warnings(object)
|
39
52
|
puts
|
40
53
|
puts "Finished in #{object.duration} seconds."
|
41
54
|
|
42
55
|
if object.successful?
|
43
|
-
|
56
|
+
if object.has_warnings?
|
57
|
+
puts green("#{object.label} succeeded.") + yellow(" (#{object.warnings.length} warnings)")
|
58
|
+
else
|
59
|
+
puts green("#{object.label} succeeded.")
|
60
|
+
end
|
44
61
|
else
|
45
|
-
puts red("#{object.label} failed.")
|
62
|
+
puts red("#{object.label} failed. (#{object.error_count} errors)")
|
46
63
|
puts
|
47
64
|
puts "Failed #{object.label.downcase} steps:"
|
48
65
|
puts
|
@@ -53,9 +70,9 @@ module XcodeBuild
|
|
53
70
|
puts indent("#{error_counter}) #{step.type} #{step.arguments.join(" ")}")
|
54
71
|
|
55
72
|
step.errors.each do |err|
|
56
|
-
|
73
|
+
puts indent(indent(red(err.message.capitalize)))
|
57
74
|
if err.error_detail
|
58
|
-
puts indent(cyan(err.error_detail))
|
75
|
+
puts indent(indent(cyan(err.error_detail)))
|
59
76
|
else
|
60
77
|
puts
|
61
78
|
end
|
@@ -68,6 +85,21 @@ module XcodeBuild
|
|
68
85
|
puts
|
69
86
|
end
|
70
87
|
|
88
|
+
def report_warnings(object)
|
89
|
+
return unless object.respond_to?(:warnings)
|
90
|
+
return unless object.warnings.count > 0
|
91
|
+
|
92
|
+
puts
|
93
|
+
puts "The following warnings were reported:"
|
94
|
+
puts
|
95
|
+
|
96
|
+
object.warnings.each_with_index do |warning, index|
|
97
|
+
puts indent(yellow("#{index+1}) #{warning.message}"))
|
98
|
+
puts indent(cyan(warning.warning_detail))
|
99
|
+
puts
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
71
103
|
private
|
72
104
|
|
73
105
|
def puts(str = "")
|
@@ -83,6 +115,7 @@ module XcodeBuild
|
|
83
115
|
end
|
84
116
|
|
85
117
|
def report_started(type, object)
|
118
|
+
puts unless @action_count.zero?
|
86
119
|
puts
|
87
120
|
banner = "#{type} target: #{object.target} (in #{object.project_name}.xcproject)"
|
88
121
|
puts bold(banner)
|
data/lib/xcode_build/reporter.rb
CHANGED
@@ -28,6 +28,11 @@ module XcodeBuild
|
|
28
28
|
build.last_step.add_error(params)
|
29
29
|
end
|
30
30
|
|
31
|
+
def build_warning_detected(params)
|
32
|
+
build.add_warning(params)
|
33
|
+
notify :warning_detected
|
34
|
+
end
|
35
|
+
|
31
36
|
def build_env_variable_detected(key, value)
|
32
37
|
build.set_environment_variable(key, value)
|
33
38
|
end
|
@@ -17,6 +17,7 @@ module XcodeBuild
|
|
17
17
|
attr_accessor :formatter
|
18
18
|
attr_accessor :invoke_from_within
|
19
19
|
attr_accessor :reporter_klass
|
20
|
+
attr_accessor :xcodebuild_log_path
|
20
21
|
|
21
22
|
def initialize(namespace = :xcode, &block)
|
22
23
|
@namespace = namespace
|
@@ -53,11 +54,11 @@ module XcodeBuild
|
|
53
54
|
|
54
55
|
def build_opts
|
55
56
|
[].tap do |opts|
|
56
|
-
opts << "-project #{project_name}" if project_name
|
57
|
-
opts << "-target #{target}" if target
|
58
|
-
opts << "-workspace #{workspace}" if workspace
|
59
|
-
opts << "-scheme #{scheme}" if scheme
|
60
|
-
opts << "-configuration #{configuration}" if configuration
|
57
|
+
opts << "-project \"#{project_name}\"" if project_name
|
58
|
+
opts << "-target \"#{target}\"" if target
|
59
|
+
opts << "-workspace \"#{workspace}\"" if workspace
|
60
|
+
opts << "-scheme \"#{scheme}\"" if scheme
|
61
|
+
opts << "-configuration \"#{configuration}\"" if configuration
|
61
62
|
opts << "-arch #{arch}" if arch
|
62
63
|
opts << "-sdk #{sdk}" if sdk
|
63
64
|
opts << "-xcconfig #{xcconfig}" if xcconfig
|
@@ -80,6 +81,9 @@ module XcodeBuild
|
|
80
81
|
|
81
82
|
def xcodebuild(action)
|
82
83
|
reporter.direct_raw_output_to = output_to unless formatter
|
84
|
+
reporter.direct_raw_output_to = File.open(xcodebuild_log_path, 'w') if xcodebuild_log_path
|
85
|
+
|
86
|
+
reporter.report_running_action(action) if reporter.respond_to?(:report_running_action)
|
83
87
|
|
84
88
|
status = Dir.chdir(invoke_from_within) do
|
85
89
|
XcodeBuild.run(build_opts_string(action), output_buffer)
|
@@ -28,8 +28,18 @@ module XcodeBuild
|
|
28
28
|
end
|
29
29
|
|
30
30
|
case line
|
31
|
-
when /^(.*):(\d+):(\d+): error: (.*)$/
|
32
|
-
|
31
|
+
when /^(.*):(\d+):(\d+):(.*): (error|warning): (.*)$/ # xcode 4.3.2
|
32
|
+
if $5 == 'error'
|
33
|
+
notify_build_error($1, $2, $3, $6)
|
34
|
+
else
|
35
|
+
notify_build_warning($1, $2, $3, $6)
|
36
|
+
end
|
37
|
+
when /^(.*):(\d+):(\d+): (error|warning): (.*)$/ # xcode < 4.3.2
|
38
|
+
if $4 == 'error'
|
39
|
+
notify_build_error($1, $2, $3, $5)
|
40
|
+
else
|
41
|
+
notify_build_warning($1, $2, $3, $5)
|
42
|
+
end
|
33
43
|
when /^\s+setenv (\w+) (.*)/
|
34
44
|
notify_env_var($1, $2)
|
35
45
|
when /^Command (.*) failed with exit code (\d+)/
|
@@ -50,8 +60,8 @@ module XcodeBuild
|
|
50
60
|
def notify_build_started(line)
|
51
61
|
@building = true
|
52
62
|
|
53
|
-
target = line.match(/TARGET (\w+)/)[1]
|
54
|
-
project = line.match(/PROJECT (\w+)/)[1]
|
63
|
+
target = line.match(/TARGET ([\w\-\.]+)/)[1]
|
64
|
+
project = line.match(/PROJECT ([\w\-\.]+)/)[1]
|
55
65
|
|
56
66
|
if line =~ /DEFAULT CONFIGURATION \((\w+)\)/
|
57
67
|
configuration = $1
|
@@ -82,6 +92,15 @@ module XcodeBuild
|
|
82
92
|
}])
|
83
93
|
end
|
84
94
|
|
95
|
+
def notify_build_warning(file, line, char, message)
|
96
|
+
notify_delegate(:build_warning_detected, :args => [{
|
97
|
+
:file => file,
|
98
|
+
:line => line.to_i,
|
99
|
+
:char => char.to_i,
|
100
|
+
:message => message
|
101
|
+
}])
|
102
|
+
end
|
103
|
+
|
85
104
|
def notify_build_step_command_failed(command, exit_code)
|
86
105
|
notify_delegate(:build_error_detected, :args => [{:command => command, :exit_code => exit_code.to_i}])
|
87
106
|
end
|
data/spec/build_task_spec.rb
CHANGED
@@ -34,27 +34,27 @@ describe XcodeBuild::Tasks::BuildTask do
|
|
34
34
|
|
35
35
|
it "includes the project" do
|
36
36
|
task.project_name = "TestProject.xcproject"
|
37
|
-
task.build_opts.should include(
|
37
|
+
task.build_opts.should include(%{-project "TestProject.xcproject"})
|
38
38
|
end
|
39
39
|
|
40
40
|
it "includes the target" do
|
41
41
|
task.target = "TestTarget"
|
42
|
-
task.build_opts.should include(
|
42
|
+
task.build_opts.should include(%{-target "TestTarget"})
|
43
43
|
end
|
44
44
|
|
45
45
|
it "includes the workspace" do
|
46
46
|
task.workspace = "SomeWorkspace.xcworkspace"
|
47
|
-
task.build_opts.should include(
|
47
|
+
task.build_opts.should include(%{-workspace "SomeWorkspace.xcworkspace"})
|
48
48
|
end
|
49
49
|
|
50
50
|
it "includes the scheme" do
|
51
51
|
task.scheme = "TestScheme"
|
52
|
-
task.build_opts.should include(
|
52
|
+
task.build_opts.should include(%{-scheme "TestScheme"})
|
53
53
|
end
|
54
54
|
|
55
55
|
it "includes the configuration" do
|
56
56
|
task.configuration = "TestConfiguration"
|
57
|
-
task.build_opts.should include(
|
57
|
+
task.build_opts.should include(%{-configuration "TestConfiguration"})
|
58
58
|
end
|
59
59
|
|
60
60
|
it "includes the arch" do
|
@@ -102,7 +102,19 @@ describe XcodeBuild::Tasks::BuildTask do
|
|
102
102
|
XcodeBuild.stub(:run).with(anything, anything).and_return(0)
|
103
103
|
task.run(task_name)
|
104
104
|
end
|
105
|
-
|
105
|
+
|
106
|
+
it "uses a file output buffer if xcodebuild_log_path is specified even if a formatter is set" do
|
107
|
+
task = XcodeBuild::Tasks::BuildTask.new do |t|
|
108
|
+
t.formatter = stub('formatter')
|
109
|
+
t.xcodebuild_log_path = 'path/to/xcodebuild.log'
|
110
|
+
t.scheme = 'TestScheme'
|
111
|
+
end
|
112
|
+
File.should_receive(:open).with('path/to/xcodebuild.log', 'w').and_return(buffer = stub)
|
113
|
+
task.reporter.should_receive(:direct_raw_output_to=).with(buffer)
|
114
|
+
XcodeBuild.stub(:run).with(anything, anything).and_return(0)
|
115
|
+
task.run(task_name)
|
116
|
+
end
|
117
|
+
|
106
118
|
it "raises if xcodebuild returns a non-zero exit code" do
|
107
119
|
task = XcodeBuild::Tasks::BuildTask.new { |t| t.scheme = 'TestScheme' }
|
108
120
|
XcodeBuild.stub(:run).with(anything, anything).and_return(99)
|
@@ -155,19 +155,19 @@ describe XcodeBuild::Reporting::BuildReporting do
|
|
155
155
|
end
|
156
156
|
|
157
157
|
it "tracks the time a build takes" do
|
158
|
-
Timecop.travel(
|
158
|
+
Timecop.travel(Time.parse("01 Jan 2012 00:00:00")) do
|
159
159
|
event({:build_started=>
|
160
160
|
{:target=>"ExampleProject",
|
161
161
|
:project=>"ExampleProject",
|
162
162
|
:configuration=>"Release",
|
163
163
|
:default=>true}})
|
164
164
|
|
165
|
-
Timecop.travel(
|
165
|
+
Timecop.travel(Time.parse("01 Jan 2012 00:00:05")) do
|
166
166
|
event({:build_succeeded=>["BUILD"]})
|
167
167
|
end
|
168
168
|
end
|
169
169
|
|
170
|
-
reporter.build.duration.should be_within(0.
|
170
|
+
reporter.build.duration.should be_within(0.001).of(5)
|
171
171
|
end
|
172
172
|
|
173
173
|
it "tracks any environment variables reported by the build" do
|
@@ -175,6 +175,39 @@ describe XcodeBuild::Reporting::BuildReporting do
|
|
175
175
|
event({:build_env_variable_detected=>["TEST_AFTER_BUILD", "YES"]})
|
176
176
|
reporter.build.environment["TEST_AFTER_BUILD"].should == "YES"
|
177
177
|
end
|
178
|
+
|
179
|
+
it "tracks any warnings that occur" do
|
180
|
+
assume_build_started
|
181
|
+
|
182
|
+
event({:build_warning_detected=>
|
183
|
+
{:file=>
|
184
|
+
"/Users/luke/Code/mine/xcodebuild/resources/ExampleProject/ExampleProject/main.m",
|
185
|
+
:line=>16,
|
186
|
+
:char=>42,
|
187
|
+
:message=>"expected ';' after expression [1]"}})
|
188
|
+
|
189
|
+
event({:build_warning_detected=>
|
190
|
+
{:file=>
|
191
|
+
"/Users/luke/Code/mine/xcodebuild/resources/ExampleProject/ExampleProject/main.m",
|
192
|
+
:line=>16,
|
193
|
+
:char=>180,
|
194
|
+
:message=>"expected ';' after expression [1]"}})
|
195
|
+
|
196
|
+
reporter.build.should have(2).warnings
|
197
|
+
end
|
198
|
+
|
199
|
+
it "notifies it's delegate of any warnings" do
|
200
|
+
assume_build_started
|
201
|
+
|
202
|
+
delegate.should_receive(:warning_detected)
|
203
|
+
|
204
|
+
event({:build_warning_detected=>
|
205
|
+
{:file=>
|
206
|
+
"/Users/luke/Code/mine/xcodebuild/resources/ExampleProject/ExampleProject/main.m",
|
207
|
+
:line=>16,
|
208
|
+
:char=>42,
|
209
|
+
:message=>"expected ';' after expression [1]"}})
|
210
|
+
end
|
178
211
|
end
|
179
212
|
|
180
213
|
context "once a build has started" do
|
@@ -112,19 +112,19 @@ describe XcodeBuild::Reporting::CleanReporting do
|
|
112
112
|
end
|
113
113
|
|
114
114
|
it "tracks the time a clean takes" do
|
115
|
-
Timecop.travel(
|
115
|
+
Timecop.travel(Time.parse("01 Jan 2012 00:00:00")) do
|
116
116
|
event({:clean_started=>
|
117
117
|
{:target=>"ExampleProject",
|
118
118
|
:project=>"ExampleProject",
|
119
119
|
:configuration=>"Release",
|
120
120
|
:default=>true}})
|
121
121
|
|
122
|
-
Timecop.travel(
|
122
|
+
Timecop.travel(Time.parse("01 Jan 2012 00:00:05")) do
|
123
123
|
event({:clean_succeeded=>{}})
|
124
124
|
end
|
125
125
|
end
|
126
126
|
|
127
|
-
reporter.clean.duration.should be_within(0.
|
127
|
+
reporter.clean.duration.should be_within(0.001).of(5)
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
data/spec/spec_helper.rb
CHANGED
@@ -20,36 +20,46 @@ describe XcodeBuild::Translations::Building do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
it "notifies the delegate of the start of a build with the default configuration" do
|
23
|
-
delegate.stub(:beginning_translation_of_line)
|
24
23
|
delegate.should_receive(:build_started).with(
|
25
24
|
:target => "ExampleProject",
|
26
|
-
:project => "ExampleProject",
|
25
|
+
:project => "ExampleProject.xcodeproj",
|
27
26
|
:configuration => "Release",
|
28
27
|
:default => true
|
29
28
|
)
|
30
|
-
translator << "=== BUILD NATIVE TARGET ExampleProject OF PROJECT ExampleProject WITH THE DEFAULT CONFIGURATION (Release) ==="
|
29
|
+
translator << "=== BUILD NATIVE TARGET ExampleProject OF PROJECT ExampleProject.xcodeproj WITH THE DEFAULT CONFIGURATION (Release) ==="
|
31
30
|
end
|
32
31
|
|
33
32
|
it "notifies the delegate of the start of a build with a non-default configuration" do
|
34
|
-
delegate.stub(:beginning_translation_of_line)
|
35
33
|
delegate.should_receive(:build_started).with(
|
36
34
|
:target => "ExampleProject",
|
37
|
-
:project => "ExampleProject",
|
35
|
+
:project => "ExampleProject.xcodeproj",
|
38
36
|
:configuration => "Debug",
|
39
37
|
:default => false
|
40
38
|
)
|
41
|
-
translator << "=== BUILD NATIVE TARGET ExampleProject OF PROJECT ExampleProject WITH THE CONFIGURATION Debug ==="
|
39
|
+
translator << "=== BUILD NATIVE TARGET ExampleProject OF PROJECT ExampleProject.xcodeproj WITH THE CONFIGURATION Debug ==="
|
42
40
|
end
|
43
41
|
|
44
42
|
it "treats :build_started as a required delegate message and raise if it doesn't respond" do
|
45
43
|
delegate_should_not_respond_to(:build_started)
|
46
44
|
lambda {
|
47
|
-
translator << "=== BUILD NATIVE TARGET ExampleProject OF PROJECT ExampleProject WITH THE CONFIGURATION Debug ==="
|
45
|
+
translator << "=== BUILD NATIVE TARGET ExampleProject OF PROJECT ExampleProject.xcodeproj WITH THE CONFIGURATION Debug ==="
|
48
46
|
|
49
47
|
}.should raise_error(XcodeBuild::OutputTranslator::MissingDelegateMethodError)
|
50
48
|
end
|
51
49
|
end
|
52
50
|
|
51
|
+
context "when translating a built started line" do
|
52
|
+
it "handles hyphens in the target name" do
|
53
|
+
delegate.should_receive(:build_started).with(
|
54
|
+
:target => "ExampleProject-Test",
|
55
|
+
:project => "ExampleProject.xcodeproj",
|
56
|
+
:configuration => "Release",
|
57
|
+
:default => true
|
58
|
+
)
|
59
|
+
translator << "=== BUILD NATIVE TARGET ExampleProject-Test OF PROJECT ExampleProject.xcodeproj WITH THE DEFAULT CONFIGURATION (Release) ==="
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
53
63
|
context "once a build start has been detected" do
|
54
64
|
before do
|
55
65
|
translation.stub(:building?).and_return(true)
|
@@ -116,7 +126,7 @@ describe XcodeBuild::Translations::Building do
|
|
116
126
|
translator << "\tCodeSign build/Debug-iphoneos/ExampleProject.app"
|
117
127
|
end
|
118
128
|
|
119
|
-
it "notifies the delegate of errors that occur throughout the build" do
|
129
|
+
it "notifies the delegate of errors that occur throughout the build on < Xcode 4.3.2" do
|
120
130
|
delegate.should_receive(:build_error_detected).with(
|
121
131
|
:file => "/ExampleProject/main.m",
|
122
132
|
:line => 16,
|
@@ -125,6 +135,15 @@ describe XcodeBuild::Translations::Building do
|
|
125
135
|
)
|
126
136
|
translator << "/ExampleProject/main.m:16:42: error: expected ';' after expression [1]"
|
127
137
|
end
|
138
|
+
it "notifies the delegate of errors that occur throughout the build on >= Xcode 4.3.2" do
|
139
|
+
delegate.should_receive(:build_error_detected).with(
|
140
|
+
:file => "/ExampleProject/main.m",
|
141
|
+
:line => 16,
|
142
|
+
:char => 42,
|
143
|
+
:message => "expected ';' after expression [1]"
|
144
|
+
)
|
145
|
+
translator << "/ExampleProject/main.m:16:42:{16:42-16:80}: error: expected ';' after expression [1]"
|
146
|
+
end
|
128
147
|
|
129
148
|
it "notifies the delegate of errors for different build steps" do
|
130
149
|
delegate.should_receive(:build_error_detected).with(
|
@@ -162,6 +181,30 @@ describe XcodeBuild::Translations::Building do
|
|
162
181
|
)
|
163
182
|
translator << "Command /bin/sh failed with exit code 1"
|
164
183
|
end
|
184
|
+
|
185
|
+
it "notifies the delegate of warnings on < Xcode 4.3.2" do
|
186
|
+
delegate.should_receive(:build_warning_detected).with(
|
187
|
+
:file => "/ExampleProject/main.m",
|
188
|
+
:line => 16,
|
189
|
+
:char => 42,
|
190
|
+
:message => "'foo:' is deprecated"
|
191
|
+
)
|
192
|
+
translator << "CompileC ExampleProject/main.m normal"
|
193
|
+
translator << "/ExampleProject/main.m:16:42: warning: 'foo:' is deprecated"
|
194
|
+
translator << "1 warning generated."
|
195
|
+
end
|
196
|
+
|
197
|
+
it "notifies the delegate of warnings on >= Xcode 4.3.2" do
|
198
|
+
delegate.should_receive(:build_warning_detected).with(
|
199
|
+
:file => "/ExampleProject/main.m",
|
200
|
+
:line => 16,
|
201
|
+
:char => 42,
|
202
|
+
:message => "'foo:' is deprecated"
|
203
|
+
)
|
204
|
+
translator << "CompileC ExampleProject/main.m normal"
|
205
|
+
translator << "/ExampleProject/main.m:16:42:{16:42-16:80}: warning: 'foo:' is deprecated"
|
206
|
+
translator << "1 warning generated."
|
207
|
+
end
|
165
208
|
|
166
209
|
it "treats :build_error_detected as an optional delegate message" do
|
167
210
|
delegate_should_not_respond_to(:build_error_detected)
|
@@ -169,6 +212,12 @@ describe XcodeBuild::Translations::Building do
|
|
169
212
|
translator << "/ExampleProject/main.m:16:42: error: expected ';' after expression [1]"
|
170
213
|
end
|
171
214
|
|
215
|
+
it "treats :build_warning_detected as an optional delegate message" do
|
216
|
+
delegate_should_not_respond_to(:build_warning_detected)
|
217
|
+
delegate.should_not_receive(:build_warning_detected)
|
218
|
+
translator << "/ExampleProject/main.m:16:42: warning: expected ';' after expression [1]"
|
219
|
+
end
|
220
|
+
|
172
221
|
it "notifies the delegate of any environment variables that the build outputs" do
|
173
222
|
delegate.should_receive(:build_env_variable_detected).with("ARCHS", "armv7")
|
174
223
|
translator << " setenv ARCHS armv7"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcodebuild-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
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-
|
12
|
+
date: 2012-07-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: state_machine
|
16
|
-
requirement: &
|
16
|
+
requirement: &70169454206120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.1.2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70169454206120
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &70169454216780 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70169454216780
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rake
|
38
|
-
requirement: &
|
38
|
+
requirement: &70169454226380 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.9.2.2
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70169454226380
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rdoc
|
49
|
-
requirement: &
|
49
|
+
requirement: &70169454221180 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '3.12'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70169454221180
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: guard-rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &70169454236540 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70169454236540
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: growl
|
71
|
-
requirement: &
|
71
|
+
requirement: &70169454235020 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70169454235020
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: timecop
|
82
|
-
requirement: &
|
82
|
+
requirement: &70169454231400 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,18 +87,7 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
91
|
-
- !ruby/object:Gem::Dependency
|
92
|
-
name: chronic
|
93
|
-
requirement: &2171021380 !ruby/object:Gem::Requirement
|
94
|
-
none: false
|
95
|
-
requirements:
|
96
|
-
- - ! '>='
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: '0'
|
99
|
-
type: :development
|
100
|
-
prerelease: false
|
101
|
-
version_requirements: *2171021380
|
90
|
+
version_requirements: *70169454231400
|
102
91
|
description:
|
103
92
|
email: luke@lukeredpath.co.uk
|
104
93
|
executables:
|
@@ -151,13 +140,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
140
|
version: '0'
|
152
141
|
segments:
|
153
142
|
- 0
|
154
|
-
hash:
|
143
|
+
hash: 142715360176815376
|
155
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
145
|
none: false
|
157
146
|
requirements:
|
158
147
|
- - ! '>='
|
159
148
|
- !ruby/object:Gem::Version
|
160
149
|
version: '0'
|
150
|
+
segments:
|
151
|
+
- 0
|
152
|
+
hash: 142715360176815376
|
161
153
|
requirements: []
|
162
154
|
rubyforge_project:
|
163
155
|
rubygems_version: 1.8.11
|