autobuild 1.7.0.rc2 → 1.7.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,6 +33,15 @@ module Autobuild
33
33
  Autobuild.silent = silent
34
34
  end
35
35
 
36
+ def self.progress_display_enabled?
37
+ @progress_display_enabled
38
+ end
39
+
40
+ def self.progress_display_enabled=(value)
41
+ @progress_display_enabled = value
42
+ end
43
+
44
+ @progress_display_enabled = true
36
45
 
37
46
  def self.message(*args)
38
47
  return if silent?
@@ -47,6 +56,11 @@ module Autobuild
47
56
  else "#{color(*args)}"
48
57
  end
49
58
 
59
+ if !Autobuild.progress_display_enabled?
60
+ puts msg
61
+ return
62
+ end
63
+
50
64
  size =
51
65
  if @last_progress_msg then @last_progress_msg.size
52
66
  else 0
@@ -84,7 +98,11 @@ module Autobuild
84
98
  progress_done(key)
85
99
  display_lock.synchronize do
86
100
  progress_messages << [key, color(*args)]
87
- display_progress
101
+ if Autobuild.progress_display_enabled?
102
+ display_progress
103
+ else
104
+ display_message(" " + color(*args))
105
+ end
88
106
  end
89
107
 
90
108
  if block_given?
@@ -114,9 +132,13 @@ module Autobuild
114
132
  if !found
115
133
  progress_messages << [key, color(*args)]
116
134
  end
135
+
136
+ return if !Autobuild.progress_display_enabled?
137
+
117
138
  display_progress
118
139
  end
119
140
  end
141
+
120
142
  def self.progress_done(key, display_last = true)
121
143
  found = false
122
144
  display_lock.synchronize do
@@ -127,9 +149,13 @@ module Autobuild
127
149
  last_msg = msg
128
150
  end
129
151
  end
130
- if found && @last_progress_msg
131
- display_message(" #{last_msg}") if display_last && last_msg
132
- display_progress
152
+ if found
153
+ if display_last
154
+ display_message(" #{last_msg}")
155
+ end
156
+ if @last_progress_msg
157
+ display_progress
158
+ end
133
159
  end
134
160
  end
135
161
  found
@@ -207,13 +233,22 @@ module Autobuild
207
233
  end
208
234
 
209
235
  if msg.empty?
210
- print "\r" + " " * last_msg_length if !silent?
236
+ blank = " " * last_msg_length
211
237
  @last_progress_msg = nil
212
238
  else
213
239
  msg = " #{msg}"
214
- print "\r#{msg}#{" " * [last_msg_length - msg.length, 0].max}" if !silent?
240
+ blank = " " * [last_msg_length - msg.length, 0].max
215
241
  @last_progress_msg = msg
216
242
  end
243
+
244
+ if !silent?
245
+ if Autobuild.progress_display_enabled?
246
+ print "\r#{msg}#{blank}"
247
+ print "\r#{msg}"
248
+ elsif @last_progress_msg
249
+ puts msg
250
+ end
251
+ end
217
252
  end
218
253
 
219
254
  # The exception type that is used to report multiple errors that occured
@@ -1,5 +1,5 @@
1
1
  module Autobuild
2
- VERSION = "1.7.0.rc2" unless defined? Autobuild::VERSION
2
+ VERSION = "1.7.0.rc3" unless defined? Autobuild::VERSION
3
3
  end
4
4
 
5
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autobuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0.rc2
4
+ version: 1.7.0.rc3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-11-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &9890940 !ruby/object:Gem::Requirement
16
+ requirement: &24357060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.7.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *9890940
24
+ version_requirements: *24357060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: utilrb
27
- requirement: &9890480 !ruby/object:Gem::Requirement
27
+ requirement: &24356620 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.3.3
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *9890480
35
+ version_requirements: *24356620
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: highline
38
- requirement: &9890020 !ruby/object:Gem::Requirement
38
+ requirement: &24356180 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *9890020
46
+ version_requirements: *24356180
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rdoc
49
- requirement: &9889580 !ruby/object:Gem::Requirement
49
+ requirement: &24355740 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '3.10'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *9889580
57
+ version_requirements: *24355740
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: hoe
60
- requirement: &9889000 !ruby/object:Gem::Requirement
60
+ requirement: &24355300 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '3.3'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *9889000
68
+ version_requirements: *24355300
69
69
  description: Collection of classes to handle build systems (CMake, autotools, ...)
70
70
  and import mechanisms (tarballs, CVS, SVN, git, ...). It also offers a Rake integration
71
71
  to import and build such software packages. It is the backbone of the autoproj (http://rock-robotics.org/autoproj)