ruby-progressbar 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65d4119d92f6886b3336cb4a1f4aae7c0f41db32
4
- data.tar.gz: 61cbb19a13d99c622042ae32cfb5e132658d25ff
3
+ metadata.gz: f7b639ec0747152725fee788709585fd801c1e96
4
+ data.tar.gz: 17ff15869c3f7961637e7e2d1c83dd86b5ce12dd
5
5
  SHA512:
6
- metadata.gz: 8080a8cc6c2565958dc51ebbead22286f2ba38ebd3c2ab83d61f658989dceea0bea077d3894333790251450b197c9b86494a5801a6bcfd2d4f05d1344fa0d29f
7
- data.tar.gz: e48ece20505cc7406467d4c1e3aa1d4761003eb27886b5a6459f4769c67869a8e24cf77163ba20b7a11256c18fdd97bedd6551ae86a2fb2b411c62c3f2b27d99
6
+ metadata.gz: 30a80f66102830ee061b661a6267b05a7397047015c549b06ffdef091785e272a476465b0e551c27164faa8ce62b14d5352743c51acabac50efef62e6813a998
7
+ data.tar.gz: 03173ee0ca1e2eb74813d77138674389b1f1a9c3783cbb20f4327b50f3ae5e2c1badfe69e3937f48dc902f76e9eb5be1afbb4555e07131a3c4289ff607258279
data/README.md CHANGED
@@ -1,456 +1,34 @@
1
- Ruby/ProgressBar: A Text Progress Bar Library for Ruby
1
+ Ruby/ProgressBar
2
2
  ================================
3
3
  [![Build Status](https://secure.travis-ci.org/jfelchner/ruby-progressbar.png?branch=master)](http://travis-ci.org/jfelchner/ruby-progressbar) [![Code Climate](https://codeclimate.com/github/jfelchner/ruby-progressbar.png)](https://codeclimate.com/github/jfelchner/ruby-progressbar) [![Code Climate](https://codeclimate.com/github/jfelchner/ruby-progressbar/coverage.png)](https://codeclimate.com/github/jfelchner/ruby-progressbar)
4
4
 
5
+ <img src="https://www.dropbox.com/s/pe9o1yobxtubof8/ruby-progressbar-cage.png?dl=1" align="right" />
6
+
5
7
  The **ultimate** text progress bar library for Ruby! It'll **SMASH YOU OVER THE HEAD** with a **PURE RUSH** of progress bar excitement!
6
8
 
7
9
  Don't miss out on what all the kids are talking about! If you want everyone to know that your gem or app can survive _in the cage_ then YOU WANT **RUBY-PROGRESSBAR**!
8
10
 
9
- ![The Cage](http://www.thekompanee.com/public_files/the-cage.png)
10
-
11
- Supported Rubies
12
- --------------------------------
13
- * MRI Ruby 1.8.7
14
- * MRI Ruby 1.9.2
15
- * MRI Ruby 1.9.3
16
- * MRI Ruby 2.0
17
- * MRI Ruby 2.1
18
- * JRuby (in 1.8 compat mode)
19
- * JRuby (in 1.9 compat mode)
20
-
21
- It's Better Than The Other 186,312 Progress Bar Libraries Because...
22
- --------------------------------
23
- * Full test suite [![Code Climate](https://codeclimate.com/github/jfelchner/ruby-progressbar/coverage.png)](https://codeclimate.com/github/jfelchner/ruby-progressbar)
24
- * _**ZERO**_ dependencies
25
- * Used by tons of other open source projects (which means we find out about bugs quickly)
26
- * It's pretty [freakin' sweet](https://www.youtube.com/watch?v=On3IoVhf_GM)
27
- * We have a road map of new features to make it even better
28
- * And most importantly... our awesome [contributors](#contributors)
29
-
30
- Installation
31
- --------------------------------
32
-
33
- First:
34
-
35
- ```ruby
36
- gem install ruby-progressbar
37
- ```
38
-
39
- Then in your script:
11
+ &nbsp;
40
12
 
41
- ```ruby
42
- require 'ruby-progressbar'
43
- ```
44
-
45
- or in your Gemfile
46
-
47
- ```ruby
48
- gem 'ruby-progressbar'
49
- ```
50
-
51
- or from IRB
52
-
53
- ```ruby
54
- irb -r 'ruby-progressbar'
55
- ```
56
-
57
- Basic Usage
13
+ Full Reference
58
14
  --------------------------------
59
15
 
60
- ### Creation
61
-
62
- It's simple to get started:
63
-
64
- ```ruby
65
- ProgressBar.create
66
- ```
67
-
68
- Creates a basic progress bar beginning at `0`, a maximum capacity of `100` and tells it to start.
69
-
70
- Progress: | |
71
-
72
- ### Marking Progress
73
-
74
- Every call to `#increment` will advance the bar by `1`. Therefore:
75
-
76
- ```ruby
77
- 50.times { progressbar.increment }
78
- ```
79
-
80
- Would output an advancing line which would end up here:
81
-
82
- Progress: |=================================== |
83
-
84
- Advanced Usage
85
- --------------------------------
86
-
87
- ### Options
88
-
89
- If you would like to customize your prompt, you can pass options when you call `.create`.
90
-
91
- ```ruby
92
- ProgressBar.create(:title => "Items", :starting_at => 20, :total => 200)
93
- ```
94
-
95
- This will output:
96
-
97
- Items: |======= |
98
-
99
- The following are the list of options you can use:
100
-
101
- * `:title` - _(Defaults to `Progress`)_ - The title of the progress bar.
102
- * `:total` - _(Defaults to `100`)_ The total number of the items that can be completed.
103
- * `:starting_at` - _(Defaults to `0`)_ The number of items that should be considered completed when the bar first starts. This is also the default number that the bar will be set to if `#reset` is called.
104
- * `:progress_mark` - _(Defaults to `=`)_ The mark which indicates the amount of progress that has been made.
105
- * `:remainder_mark` - _(Defaults to ` `)_ The mark which indicates the remaining amount of progress to be made.
106
- * `:format` - _(Defaults to `%t: |%B|`)_ The format string which determines how the bar is displayed. See [**Formatting**](#formatting) below.
107
- * `:length` - _(Defaults to full width if possible, otherwise `80`)_ The preferred width of the entire progress bar including any format options.
108
- * `:output` - _(Defaults to `STDOUT`)_ All output will be sent to this object. Can be any object which responds to `.print` `.flush` `.tty?` `.puts`.
109
- * `:smoothing` - _(Defaults to `0.1`)_ See [**Smoothing Out Estimated Time Jitters**](#smoothing-out-estimated-time-jitters) below.
110
- * `:throttle_rate` - _(Defaults to `0.01`)_ See [**Throttling**](#throttling) below.
111
- * `:unknown_progress_animation_steps` - _(Defaults to `['=---', '-=--', '--=-', '---=']`)_ See [**Unknown Progress**](#unknown-progress) The graphical elements used to cycle when progress is changed but the total amount of items being processed is unknown.
112
-
113
- ### Changing Progress
114
-
115
- * `#increment`: Will advance the bar's progress by `1` unit. This is the main way of progressing the bar.
116
- * `#decrement`: Will retract the bar's progress by `1` unit.
117
- * `#progress +=`: Will allow you to increment by a relative amount.
118
- * `#progress -=`: Will allow you to decrement by a relative amount.
119
- * `#progress=`: Will set the bar's progress to whatever value you would like. _Note: This will likely mess up your estimated time if you're using it._
120
- * `#total=`: Will change the total number of items being processed by the bar. This can be anything (even nil) but cannot be less than the amount of progress already accumulated by the bar.
121
-
122
- ### Stopping
123
-
124
- The bar can be stopped in four ways:
125
-
126
- * `#finish`: Will stop the bar by completing it immediately. The current position will be advanced to the total.
127
- * `#stop`: Will stop the bar by immediately cancelling it. The current position will remain where it is.
128
- * `#pause`: Will stop the bar like `#stop` but will allow it to be restarted from where it previously left off by calling `#resume`. _Note: Elapsed Time and Estimated Time will stop being affected while the bar is paused._
129
- * `#reset`: Will stop the bar by resetting all information. The current position of the bar will be reset to where it began when it was created. _(eg if you passed `:starting_at => 5` when you created the bar, it would reset to `5` and not `0`)_
130
-
131
- ### Finishing
132
-
133
- * See `#finish` above.
134
-
135
- By default, the bar will be finished automatically if the current value ever
136
- becomes equal to the total. If you do not want the bar to autofinish, pass
137
- `:autofinish => false` when creating your bar.
138
-
139
- ```ruby
140
- progressbar = ProgressBar.create(:starting_at => 9, :total => 10)
141
- progressbar.increment
142
-
143
- progressbar.finished? # => true
144
- ```
145
-
146
- ```ruby
147
- progressbar = ProgressBar.create(:starting_at => 9, :total => 10, :autofinish => false)
148
- progressbar.increment
149
-
150
- progressbar.finished? # => false
151
- ```
152
-
153
- ### Refreshing
154
-
155
- * If you need to redisplay the progress bar to give your users a "real-time" feel, you can call `#refresh`. `#refresh` will not affect the current position but will update the elapsed and estimated timers.
156
-
157
- ### Unknown Progress
158
-
159
- Sometimes when processing work, you don't know exactly how many items you will need to process. This might be because you're downloading a chunked file or because you're processing a set of jobs that hasn't been fully loaded yet.
160
-
161
- In times like these, you can set total to `nil` and continue to increment the bar as usual. The bar will display an 'unknown' animation which will change every time you increment. This will give the appearance (by default) that the bar is processing work even though there is no "progress".
162
-
163
- ```ruby
164
- progressbar = ProgressBar.create(:starting_at => 20, :total => nil)
165
- ```
166
-
167
- Will output:
168
-
169
- Progress: |=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---|
170
-
171
- Calling
172
-
173
- ```ruby
174
- progressbar.increment
175
- ```
176
-
177
- once more will output:
178
-
179
- Progress: |-=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=--|
180
-
181
- ad infinitum.
182
-
183
- At whatever point you discover the total that you will be processing, you can call:
184
-
185
- ```ruby
186
- progressbar.total = 100
187
- ```
188
-
189
- And the bar will magically transform into its typical state:
190
-
191
- Progress: |======== |
192
-
193
- ### Logging
194
-
195
- While using the progress bar, you may wish to log some output for the user. If you attempt to do this using a standard `puts` statement, you'll find that the text will overwrite the bar. For example if you were to `puts "hello"` after progress has already begun, you may get something like this:
196
-
197
- helloess: |======= |
198
- Progress: |======== |
199
-
200
- This happens because the ruby-progressbar has to keep redrawing itself every time you change the progress. It's a limitation of terminal output. Using `puts` messes that up because `puts` adds a newline which moves the cursor to the next line, then when ruby-progressbar updates, it does so on the following line.
201
-
202
- To circumvent this, use `#log` instead.
203
-
204
- ```ruby
205
- progressbar = ProgressBar.create
206
- progressbar.progress = 20
207
- progressbar.log 'hello'
208
- ```
209
-
210
- hello
211
- Progress: |============= |
212
-
213
- `#log` will automatically clear the bar, print your desired text and then redraw the bar on the following line. Notice that we did not get a bar **above** the logged output. If you consistently use `#log`, you should only ever see one bar on the screen at any time.
214
-
215
- Formatting
216
- --------------------------------
217
-
218
- The format of the progress bar is extremely easy to customize. When you create the progress bar and pass the `:format` option, that string will be used to determine what the bar looks like.
219
-
220
- The flags you can use in the format string are as follows:
221
-
222
- * `%t`: Title
223
- * `%a`: Elapsed (absolute) time
224
- * `%e`: Estimated time (will fall back to `ETA: ??:??:??` when it exceeds `99:00:00`)
225
- * `%E`: Estimated time (will fall back to `ETA: > 4 Days` when it exceeds `99:00:00`)
226
- * `%f`: Force estimated time to be displayed even if it exceeds `99:00:00`
227
- * `%p`: Percentage complete represented as a whole number (eg: `82`)
228
- * `%P`: Percentage complete represented as a decimal number (eg: `82.33`)
229
- * `%j`: Percentage complete right-justified to 3 places (eg: ` 82`)
230
- * `%J`: Percentage complete right-justified to 6 places (eg: ` 82.33`)
231
- * `%c`: Number of items currently completed
232
- * `%C`: Total number of items to be completed
233
- * `%B`: The full progress bar including 'incomplete' space (eg: `========== `)
234
- * `%b`: Progress bar only (eg: `==========`)
235
- * `%w`: Bar With Integrated Percentage (eg: `==== 75 ====`)
236
- * `%r`: Rate of Progress as a whole number (eg: `13`)
237
- * `%R`: Rate of Progress as a decimal number (eg: `13.67`)
238
- * `%i`: Display the incomplete space of the bar (this string will only contain whitespace eg: ` `)
239
- * `%%`: A literal percent sign `%`
240
-
241
- All values have an absolute length with the exception of the bar flags (eg `%B`, `%b`, etc) which will occupy any leftover space.
242
- You can use as many bar flags as you'd like, but if you do weird things, weird things will happen; so be wary.
243
-
244
- ### Example
245
-
246
- If you would like a bar with the elapsed time on the left and the percentage complete followed by the title on the right, you'd do this:
247
-
248
- ```ruby
249
- ProgressBar.create(:format => '%a %B %p%% %t')
250
- ```
251
-
252
- Which will output something like this:
253
-
254
- Time: --:--:-- 0% Progress
255
-
256
- Hard to see where the bar is? Just add your own end caps, whatever you'd like. Like so:
257
-
258
- ```ruby
259
- ProgressBar.create(:format => '%a <%B> %p%% %t')
260
- ```
261
-
262
- Becomes:
263
-
264
- Time: --:--:-- < > 0% Progress
265
-
266
- Want to put an end cap on your bar? Nothing special, just use the bar flag `%b` combined with the incomplete space flag `%i` like so:
267
-
268
- ```ruby
269
- ProgressBar.create(:format => '%a |%b>>%i| %p%% %t', :starting_at => 10)
270
- ```
271
-
272
- Becomes:
273
-
274
- Time: --:--:-- |====>> | 10% Progress
275
-
276
- Notice that the absolute length doesn't get any longer, the bar just shrinks to fill the remaining space.
277
-
278
- Want to play a game of PAC-MAN while you wait for your progress?
279
-
280
- ```ruby
281
- ProgressBar.create( :format => '%a %bᗧ%i %p%% %t',
282
- :progress_mark => ' ',
283
- :remainder_mark => '・',
284
- :starting_at => 10)
285
- ```
286
-
287
- Becomes **PAC-MAN**!
288
-
289
- Time: --:--:-- ᗧ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 10% Progress
290
-
291
- ### Overriding the Length
292
-
293
- By default, the progress bar will try to be as smart as possible about how wide it can be. Under most Unix systems, it should be as wide as the terminal will allow while still fitting on one line. If you wish to override this behavior, you can pass in the `:length` option when creating the bar:
294
-
295
- ```ruby
296
- ProgressBar.create(:length => 40)
297
- ```
298
-
299
- If you don't have access to the code calling the progress bar itself (say if you're using a gem like Fuubar), you can set the `RUBY_PROGRESS_BAR_LENGTH` environment variable and it will override any other setting.
300
-
301
- _Note: If the terminal width is less than 20 characters or ruby-progressbar is being used on a non-*nix system, the bar will default to an 80 character width._
302
-
303
- ### Realtime Customization
304
-
305
- The following items can be set at any time. Changes cause an immediate bar refresh so no other action is needed:
306
-
307
- * `#progress_mark=`: Sets the string used to represent progress along the bar.
308
- * `#remainder_mark=`: Sets the string used to represent the empty part of the bar.
309
- * `#title=`: Sets the string used to represent the items the bar is tracking (or I guess whatever else you want it to be).
310
- * `#format(format_string)`: If you need to adjust the format that the bar uses when rendering itself, just pass in a string in the same format as describe [above](#formatting).
311
-
312
- ### Rate Scaling
313
-
314
- By default the rate shown on the progress bar is shown as the number of items
315
- processed per second. Often times, you won't want to display the literal number
316
- of items, but rather scale it in some way. For example, if you're displaying
317
- the progress of a file being transferred, and you are representing the bar as
318
- the number of bytes in the file, by default the `%r` formatter will show the
319
- number of bytes per second.
320
-
321
- If instead of the bytes per second you wanted to show the user the number of
322
- kilobytes per second, you can do that like so:
323
-
324
- ```ruby
325
- ProgressBar.create(:format => '%a %B %p%% %r KB/sec',
326
- :rate_scale => lambda { |rate| rate / 1024 })
327
- ```
328
-
329
- Now, when the bar is displayed it will look something like so:
330
-
331
- Time: --:--:-- =============== 40% - 102 KB/sec
332
-
333
- ## In The Weeds
334
-
335
- This is some stuff that makes ruby-progressbar extra awesome, but for the most part it "Just Works" and you won't have to even know it's there, but if you're curious like us, here it is.
336
-
337
- ### Times... They Are A Changin'
338
-
339
- #### Smoothing Out Estimated Time Jitters
340
-
341
- Sometimes when you're tracking progress, you might have some items which take significantly longer than others to complete. When this is the case, the ETA gauge can vary wildly from increment to increment.
342
-
343
- __RUBY PROGRESS BAR TO THE RESCUE!__
344
-
345
- Thanks to [@L2G](https://github.com/L2G) and 'the maths' you can pass the `:smoothing` option when creating a new bar. Your progress bar will then use an exponentially smoothed average rather than a linear one. A value of `0.0` means no smoothing and is equivalent to the classic behavior. A value of `1.0` is the maximum amount of smoothing. Any values between those two are valid. The default value is `0.1`.
346
-
347
- ```ruby
348
- ProgressBar.create(:smoothing => 0.6)
349
- ```
350
-
351
- #### Time Mocking Support
352
-
353
- When mocking time, the concept of when `now` is becomes distorted. You can imagine that because ruby-progressbar tracks elapsed and estimated times, if it used the mocked version of `now` the results would be very undesirable. But, if you use one of our supported Ruby time mocking libraries, your elapsed and estimated times will always appear correctly. Currently supported are:
354
-
355
- * [Timecop](https://github.com/jtrupiano/timecop)
356
- * [Delorean](https://github.com/bebanjo/delorean)
357
-
358
- ### Throttling
359
-
360
- When reporting progress of large amounts of very fast operations, whose duration is comparable to the output time of a progress bar, it becomes desirable to throttle output to the console and only perform it once in a set period. ProgressBar supports throttling if given `:throttle_rate` option:
361
-
362
- ```ruby
363
- ProgressBar.create(:throttle_rate => 0.1)
364
- ```
365
-
366
- The above progress bar will output at most 10 times a second.
367
-
368
- The default throttling rate is 100 times per second (or 0.01)
369
-
370
- ### Custom Unknown Progress Animations
371
-
372
- Following up on [unknown progress](#unknown-progress), you may wish to update the unknown progress animation to suit your specific needs. This can be easily done by passing in the `:unknown_progress_animation_steps` option.
373
-
374
- This item should be an array of strings that represent each step of the animation. The specific step used for a given progress is determined by the current progress of the bar. For example:
375
-
376
- ```ruby
377
- progressbar = ProgressBar.create(:unknown_progress_animation_steps => ['==>', '>==', '=>='])
378
- ```
379
-
380
- Would use element 0 ('==>') for a progress of 1, 4, 7, 10, etc. It would use element 3 for a progress of 3, 6, 9, 12, etc.
381
-
382
- You can have an array of as many elements as you'd like and they will be used in the same manner. For example if you have an array of 50 animation steps, element 0 would only be used for every 50th progress (eg: 1, 51, 101, etc).
383
-
384
- Whatever element is chosen is repeated along the entire 'incomplete' portion of the bar.
385
-
386
- ### Non-TTY Output
387
-
388
- Normally, when the progress bar is updated, the entire previous bar is 'overwritten' with the updated information. However when the bar is being output on a non-TTY enabled output stream (such as a file or pipe), that standard behavior of outputting the progress bar will not work. This is mainly due to the fact that we can't easily go back and replace the content that the bar had previously written.
389
-
390
- To try to solve this problem, ruby-progressbar, when it determines that it is being used on a non-TTY device, will override any format which was set in the initializer to something which more closely resembles this:
391
-
392
- Progress: |=============
393
-
394
- Notice that there are no dynamically updating segments like counters or ETA. Dynamic segments are incompatible with non-TTY devices. This is because dynamic segments need to be updated on each refresh of the bar, which is impossible in non-TTY mode.
395
-
396
- Also notice that there is no end cap on the righthand side of the bar. Again, we cannot output something which is past the point at which we next need to output text. If we added an end cap, that would mean that any additional progress text would be placed _after_ the end cap. Definitely not what we want.
397
-
398
- So how does it work?
399
-
400
- First we output the title and the first end cap:
401
-
402
- Progress: |
403
-
404
- Next, every time we increment the bar, we check whether the progress bar has grown. If it has, we _only output the additional portion_ of the bar to the output.
405
-
406
- For example, given the previous title output, if we increment the bar once, we would get:
407
-
408
- Progress: |=
409
-
410
- But in this case, only one `=` was output. Not the entire `Progress: |=`.
411
-
412
- However when the bar is completed:
413
-
414
- Progress: |====================================================================|
415
-
416
- The end cap can now be added (since there is no more progress to be displayed).
16
+ There's gotten to be too much awesome to pack into one page. Visit the [wiki](https://github.com/jfelchner/ruby-progressbar/wiki) for the full documentation.
417
17
 
418
18
  Issues
419
19
  --------------------------------
420
20
 
421
- If you have problems, please create a [Github issue](https://github.com/nex3/ruby-progressbar/issues).
21
+ If you have problems, please create a [Github issue](https://github.com/jfelchner/ruby-progressbar/issues).
422
22
 
423
23
  Credits
424
24
  --------------------------------
425
25
 
426
- ![thekompanee](http://www.thekompanee.com/public_files/kompanee-github-readme-logo.png)
26
+ ![The Kompanee](https://www.dropbox.com/s/86jfka1d6bhv8as/kompanee-text-black.png?dl=1)
427
27
 
428
28
  ruby-progressbar is maintained by [The Kompanee, Ltd.](http://www.thekompanee.com)
429
29
 
430
30
  The names and logos for The Kompanee are trademarks of The Kompanee, Ltd.
431
31
 
432
- Contributors
433
- --------------------------------
434
- * [Lawrence Leonard "Larry" Gilbert](https://github.com/L2G)
435
- * [Aleksei Gusev](https://github.com/hron)
436
- * [Yves Senn](https://github.com/senny)
437
- * [Nathan Weizenbaum](https://github.com/nex3)
438
- * [Oleg Dashevskii](https://github.com/be9)
439
- * [Chris Griego](https://github.com/cgriego)
440
- * [Tim Harper](https://github.com/timcharper)
441
- * [Chalo Fernandez](https://github.com/chalofa)
442
- * [Laust Rud Jacobsen](https://github.com/rud)
443
- * [Ryan Wood](https://github.com/ryanwood)
444
- * [Jim Benton](https://github.com/jim)
445
-
446
- Thanks
447
- --------------------------------
448
-
449
- Thanks to [@nex3](https://github.com/nex3) for giving us contributor access to the initial repo.
450
- Thanks to Hiroyuki Iwatsuki for giving us access to the gem on [rubygems.org](http://rubygems.org) to allow us to push our new versions.
451
-
452
- And a special thanks to [Satoru Takabayashi](http://namazu.org/~satoru/) who was the original author of the `progressbar` gem and who inspired us to do this rewrite.
453
-
454
32
  License
455
33
  --------------------------------
456
34
 
@@ -89,7 +89,7 @@ class Progress
89
89
  end
90
90
 
91
91
  def none?
92
- progress.zero?
92
+ running_average.zero? || progress.zero?
93
93
  end
94
94
 
95
95
  def unknown?
@@ -1,3 +1,3 @@
1
1
  class ProgressBar
2
- VERSION = '1.7.0'
2
+ VERSION = '1.7.1'
3
3
  end
@@ -866,6 +866,13 @@ describe ProgressBar::Base do
866
866
  progressbar = ProgressBar::Base.new
867
867
  expect(progressbar.to_s('%e')).to match(/^ ETA: \?\?:\?\?:\?\?\z/)
868
868
  end
869
+
870
+ context 'when started_at is set to a value greater than 0' do
871
+ it 'displays unknown time until finished when passed the "%e" flag' do
872
+ progressbar = ProgressBar::Base.new(:starting_at => 1)
873
+ expect(progressbar.to_s('%e')).to match(/^ ETA: \?\?:\?\?:\?\?\z/)
874
+ end
875
+ end
869
876
  end
870
877
 
871
878
  context 'when called after #start' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-progressbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thekompanee
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-05 00:00:00.000000000 Z
12
+ date: 2014-12-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -196,3 +196,4 @@ test_files:
196
196
  - spec/ruby-progressbar/timer_spec.rb
197
197
  - spec/spec_helper.rb
198
198
  - spec/support/time.rb
199
+ has_rdoc: