powerbar 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/lib/powerbar.rb CHANGED
@@ -236,7 +236,7 @@ class PowerBar
236
236
  # Returns nil if the bar-length would be == 0.
237
237
  def bar
238
238
  return nil if state.total.is_a? Symbol
239
- skel = render_template(:main, skip=[:bar])
239
+ skel = render_template(:main, [:bar])
240
240
  lwid = state.scope_at[0] == :tty ? terminal_width() : scope.line_width
241
241
  barlen = [lwid - skel.gsub(STRIP_ANSI, '').length, 0].max
242
242
  fill = [0,[(state.done.to_f/state.total*barlen).to_i,barlen].min].max
@@ -267,7 +267,7 @@ class PowerBar
267
267
  end
268
268
 
269
269
  def elapsed
270
- e = (state.time_now - state.time_start).to_f
270
+ (state.time_now - state.time_start).to_f
271
271
  end
272
272
 
273
273
  def h_elapsed
@@ -333,7 +333,7 @@ class PowerBar
333
333
  t = t[1..-2]
334
334
  begin
335
335
  sub = self.send(('h_'+t).to_sym)
336
- rescue NoMethodError => e
336
+ rescue NoMethodError
337
337
  raise NameError, "Invalid token '#{t}' in template '#{tplid}'"
338
338
  end
339
339
  end[2..-2]
@@ -1,3 +1,3 @@
1
1
  class Powerbar
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: powerbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
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-07-09 00:00:00.000000000Z
12
+ date: 2012-08-05 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ansi
16
- requirement: &17161440 !ruby/object:Gem::Requirement
16
+ requirement: &26372920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.4.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17161440
24
+ version_requirements: *26372920
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: hashie
27
- requirement: &17149480 !ruby/object:Gem::Requirement
27
+ requirement: &26372460 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 1.1.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *17149480
35
+ version_requirements: *26372460
36
36
  description: The last progressbar-library you'll ever need
37
37
  email:
38
38
  - moe@busyloop.net