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 +1 -1
- data/heroku-nav.gemspec +1 -1
- data/lib/heroku/nav.rb +1 -1
- data/spec/nav_spec.rb +3 -3
- metadata +2 -2
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.
|
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
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!(/(
|
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
|
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
|
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
|