rewritten 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.rdoc +5 -0
- data/lib/rack/url.rb +4 -2
- data/lib/rewritten/version.rb +1 -1
- metadata +3 -3
data/HISTORY.rdoc
CHANGED
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
|
-
|
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
|
data/lib/rewritten/version.rb
CHANGED
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:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kai Rubarth
|