devbar 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/devbar.rb +9 -7
  2. data/lib/devbar/version.rb +1 -1
  3. metadata +5 -6
data/lib/devbar.rb CHANGED
@@ -9,15 +9,17 @@ module Rack
9
9
  def call(env)
10
10
  status, headers, body = @app.call(env)
11
11
 
12
- body.each do |part|
13
- if part =~ /<\/body>/
14
- part.sub!(/<\/body>/, "#{bar}</body>")
12
+ if body && body.respond_to?(:each)
13
+ body.each do |part|
14
+ if part =~ /<\/body>/
15
+ part.sub!(/<\/body>/, "#{bar}</body>")
15
16
 
16
- if headers['Content-Length']
17
- headers['Content-Length'] = (headers['Content-Length'].to_i + bar.length).to_s
18
- end
17
+ if headers['Content-Length']
18
+ headers['Content-Length'] = (headers['Content-Length'].to_i + bar.length).to_s
19
+ end
19
20
 
20
- break
21
+ break
22
+ end
21
23
  end
22
24
  end
23
25
 
@@ -1,3 +1,3 @@
1
1
  module Devbar
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
5
4
  prerelease:
5
+ version: 0.0.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - John Beynon
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-12 00:00:00.000000000 Z
12
+ date: 2013-05-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! ' Rack middleware to output a bar showing environment '
15
15
  email:
@@ -33,22 +33,21 @@ rdoc_options: []
33
33
  require_paths:
34
34
  - lib
35
35
  required_ruby_version: !ruby/object:Gem::Requirement
36
- none: false
37
36
  requirements:
38
37
  - - ! '>='
39
38
  - !ruby/object:Gem::Version
40
39
  version: '0'
41
- required_rubygems_version: !ruby/object:Gem::Requirement
42
40
  none: false
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
42
  requirements:
44
43
  - - ! '>='
45
44
  - !ruby/object:Gem::Version
46
45
  version: '0'
46
+ none: false
47
47
  requirements: []
48
48
  rubyforge_project:
49
- rubygems_version: 1.8.25
49
+ rubygems_version: 1.8.23
50
50
  signing_key:
51
51
  specification_version: 3
52
52
  summary: Middleware to show what env your app is running in
53
53
  test_files: []
54
- has_rdoc: