guard-xcode 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.0.4
4
+ * add console output for build start and finish to show build occurring
5
+ * add `gem "guard"` and `gem "rb-readline"` to Gemfile in README.md
6
+ * improved test output
7
+
3
8
  ## 1.0.3
4
9
  * Add UI.info and UI.warn to code
5
10
 
data/README.md CHANGED
@@ -23,7 +23,9 @@ Create a Gemfile in your project root:
23
23
  source :rubygems
24
24
 
25
25
  gem "guard-xcode"
26
+ gem "guard"
26
27
  gem "growl"
28
+ gem "rb-readline" # improved interface for MRI
27
29
  ```
28
30
 
29
31
  Run `bundle install` and run `guard xcode` in your project root. You may wish
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "guard-xcode"
6
- s.version = "1.0.3"
6
+ s.version = "1.0.4"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
 
@@ -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
- if true == options[:all]
24
- @all = true
25
- @target = nil
26
- else
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
- unless false == @clean
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
- unless @quiet
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
 
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module Xcode
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
@@ -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, :all => 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.3
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: &70108466796700 !ruby/object:Gem::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: *70108466796700
24
+ version_requirements: *70287962219420
25
25
  description: Build an Xcode project when source files change.
26
26
  email:
27
27
  - coder@kyleisom.net