heroku-nav 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ begin
21
21
  gemspec.add_dependency(%q<rest-client>, [">= 1.0"])
22
22
  gemspec.add_dependency(%q<json>, [">= 0"])
23
23
 
24
- gemspec.version = '0.1.10'
24
+ gemspec.version = '0.1.11'
25
25
  end
26
26
  rescue LoadError
27
27
  puts "Jeweler not available. Install it with: gem install jeweler"
data/heroku-nav.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{heroku-nav}
8
- s.version = "0.1.10"
8
+ s.version = "0.1.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Todd Matthews", "Pedro Belo"]
data/lib/heroku/nav.rb CHANGED
@@ -92,7 +92,7 @@ module Heroku
92
92
  @body.send(@body_accessor).gsub!(/(<head>)/i, "\\1#{@nav['head']}")
93
93
  end
94
94
  if @nav['body']
95
- @body.send(@body_accessor).gsub!(/(<body.*?>)/i, "\\1#{@nav['body']}")
95
+ @body.send(@body_accessor).gsub!(/(<\/body>)/i, "#{@nav['body']}\\1")
96
96
  end
97
97
  @headers['Content-Length'] = @body.send(@body_accessor).size.to_s
98
98
  end
data/spec/nav_spec.rb CHANGED
@@ -98,12 +98,12 @@ describe Heroku::Nav::Internal do
98
98
 
99
99
  it "adds the head" do
100
100
  get '/', :body => '<head><title /></head><body>'
101
- last_response.body.should.equal '<head><!-- head --><title /></head><body><!-- body -->'
101
+ last_response.body.should.equal '<head><!-- head --><title /></head><body>'
102
102
  end
103
103
 
104
104
  it "adds the body" do
105
- get '/', :body => '<html><body>hi'
106
- last_response.body.should.equal '<html><body><!-- body -->hi'
105
+ get '/', :body => '<html><body>hi</body>'
106
+ last_response.body.should.equal '<html><body>hi<!-- body --></body>'
107
107
  end
108
108
 
109
109
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 10
9
- version: 0.1.10
8
+ - 11
9
+ version: 0.1.11
10
10
  platform: ruby
11
11
  authors:
12
12
  - Todd Matthews