rewritten 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/HISTORY.rdoc CHANGED
@@ -1,3 +1,8 @@
1
+
2
+ == 0.2.1
3
+
4
+ * fixed frozen string problem as noticed on heroku
5
+
1
6
  == 0.2.0
2
7
 
3
8
  * support for subdomains
data/lib/rack/url.rb CHANGED
@@ -31,10 +31,12 @@ module Rack
31
31
  # if this is not the current path, redirect to current path
32
32
  r = Rack::Response.new
33
33
  # NOTE: assuming redirection is always to non-subdomain-path
34
- new_path = env["rack.url_scheme"]
34
+
35
+ new_path = env["rack.url_scheme"].dup
35
36
  new_path << "://"
36
- new_path << env["HTTP_HOST"].sub(/^#{subdomain.chomp(':')}\./, '')
37
+ new_path << env["HTTP_HOST"].dup.sub(/^#{subdomain.chomp(':')}\./, '')
37
38
  new_path << current_path
39
+
38
40
  r.redirect(new_path, 301)
39
41
  a = r.finish
40
42
  puts a.inspect
@@ -1,3 +1,3 @@
1
1
  module Rewritten
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rewritten
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kai Rubarth