rack-noindex_https 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class NoindexHttps
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -10,7 +10,9 @@ module Rack
10
10
  @status, @headers, @body = @app.call(env)
11
11
 
12
12
  if env['rack.url_scheme'] == 'https' && (@headers['Content-Type'] =~ /application\/html/ || @headers['Content-Type'] =~ /text\/html/)
13
- @body = @body.collect {|fragement| fragement.gsub(%r{</head>}, '<meta name="robots" content="noindex"></head>') }
13
+ new_body = []
14
+ @body.each {|fragement| new_body << fragement.gsub(%r{</head>}, '<meta name="robots" content="noindex"></head>') }
15
+ @body = new_body
14
16
  end
15
17
 
16
18
  [@status, @headers, @body]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-noindex_https
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: