guard-xcode 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/README.md +2 -0
- data/guard-xcode.gemspec +1 -1
- data/lib/guard/xcode.rb +17 -29
- data/lib/guard/xcode/version.rb +1 -1
- data/test/test_build.rb +2 -1
- metadata +3 -3
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/guard-xcode.gemspec
CHANGED
data/lib/guard/xcode.rb
CHANGED
@@ -15,29 +15,15 @@ module Guard
|
|
15
15
|
# @param [Hash] options the custom Guard options
|
16
16
|
def initialize(watchers = [], options = {})
|
17
17
|
super
|
18
|
-
@target = options[:target]
|
19
18
|
@config = options[:configuration]
|
20
19
|
@scheme = options[:scheme]
|
21
20
|
@arch = options[:arch]
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
@all = false
|
28
|
-
end
|
29
|
-
|
30
|
-
if true == options[:quiet]
|
31
|
-
@quiet = true
|
32
|
-
else
|
33
|
-
@quiet = false
|
34
|
-
end
|
21
|
+
@suppress_all_output = options[:suppress_all_output] or false
|
22
|
+
@all = options[:all] or false
|
23
|
+
@target = options[:target] unless @all
|
24
|
+
@quiet = options[:quiet] or false
|
25
|
+
@clean = options[:clean] or false
|
35
26
|
|
36
|
-
if true == options[:clean]
|
37
|
-
@clean = true
|
38
|
-
else
|
39
|
-
@clean = false
|
40
|
-
end
|
41
27
|
end
|
42
28
|
|
43
29
|
def get_build_line
|
@@ -65,7 +51,7 @@ module Guard
|
|
65
51
|
build_line += "-arch #{@arch} "
|
66
52
|
end
|
67
53
|
|
68
|
-
|
54
|
+
if @clean
|
69
55
|
build_line += "clean "
|
70
56
|
end
|
71
57
|
|
@@ -80,36 +66,38 @@ module Guard
|
|
80
66
|
# indicate the build included warnings or errors. Returning an empty list
|
81
67
|
# means no errors were detected.
|
82
68
|
alerts = []
|
83
|
-
|
84
|
-
|
69
|
+
puts "building..." unless @suppress_all_output
|
70
|
+
|
71
|
+
unless @quiet or @suppress_all_output
|
85
72
|
UI.info "guard-xcode: starting build"
|
86
73
|
Notifier.notify("kicking off build with:\n#{build_line}")
|
87
74
|
end
|
88
75
|
|
89
|
-
output = `#{build_line}`
|
76
|
+
output = `#{build_line} 2>&1`
|
90
77
|
res = $?
|
91
78
|
|
92
|
-
unless @quiet
|
79
|
+
unless @quiet or @suppress_all_output
|
93
80
|
UI.info "guard-xcode: build finished."
|
94
81
|
Notifier.notify("build finished.")
|
95
82
|
end
|
96
83
|
|
97
|
-
unless @quiet
|
84
|
+
unless @quiet or @suppress_all_output
|
98
85
|
puts output
|
99
86
|
end
|
100
87
|
|
101
88
|
if not 0 == res or output =~ /errors? generated/
|
102
|
-
UI.warn "guard-xcode: errors in build"
|
103
|
-
Notifier.notify("guard-xcode: errors in build!")
|
89
|
+
UI.warn "guard-xcode: errors in build" unless @suppress_all_output
|
90
|
+
Notifier.notify("guard-xcode: errors in build!") unless @suppress_all_output
|
104
91
|
alerts.push :errors
|
105
92
|
end
|
106
93
|
|
107
94
|
if output =~ /warning/
|
108
|
-
UI.warn "guard-xcode: warnings in build"
|
109
|
-
Notifier.notify("guard-xcode: warnings in build!")
|
95
|
+
UI.warn "guard-xcode: warnings in build" unless @suppress_all_output
|
96
|
+
Notifier.notify("guard-xcode: warnings in build!") unless @suppress_all_output
|
110
97
|
alerts.push :warnings
|
111
98
|
end
|
112
99
|
|
100
|
+
puts "build finished." unless @suppress_all_output
|
113
101
|
alerts
|
114
102
|
end
|
115
103
|
|
data/lib/guard/xcode/version.rb
CHANGED
data/test/test_build.rb
CHANGED
@@ -5,7 +5,8 @@ class TestBuild < Test::Unit::TestCase
|
|
5
5
|
def setup
|
6
6
|
@xcode_test_path = 'test/GuardXcodeTest'
|
7
7
|
@toplevel = Dir.pwd
|
8
|
-
@builder = Guard::Xcode.new [], :quiet => true, :clean => true,
|
8
|
+
@builder = Guard::Xcode.new [], :quiet => true, :clean => true,
|
9
|
+
:all => true, :suppress_all_output => true
|
9
10
|
end
|
10
11
|
|
11
12
|
def teardown
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-xcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-03-17 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|
16
|
-
requirement: &
|
16
|
+
requirement: &70287962219420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70287962219420
|
25
25
|
description: Build an Xcode project when source files change.
|
26
26
|
email:
|
27
27
|
- coder@kyleisom.net
|