rack-rewrite 1.0.1 → 1.0.2
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 +4 -0
- data/lib/rack/rewrite/rule.rb +1 -1
- data/rack-rewrite.gemspec +2 -7
- data/test/rule_test.rb +2 -2
- metadata +4 -4
data/History.rdoc
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
=== 1.0.2 / 2010-10-01
|
2
|
+
* Maintenance
|
3
|
+
* :send_file rules return content in an Array for Ruby 1.9.2 compatibility
|
4
|
+
|
1
5
|
=== 1.0.1 / 2010-09-17
|
2
6
|
* Maintenance
|
3
7
|
* Set Content-Type based on file extension of file/location being redirected to. Addresses GitHub Issue #8.
|
data/lib/rack/rewrite/rule.rb
CHANGED
@@ -105,7 +105,7 @@ module Rack
|
|
105
105
|
[200, {
|
106
106
|
'Content-Length' => ::File.size(interpreted_to).to_s,
|
107
107
|
'Content-Type' => Rack::Mime.mime_type(::File.extname(interpreted_to))
|
108
|
-
}, ::File.read(interpreted_to)]
|
108
|
+
}, [::File.read(interpreted_to)]]
|
109
109
|
when :x_send_file
|
110
110
|
[200, {
|
111
111
|
'X-Sendfile' => interpreted_to,
|
data/rack-rewrite.gemspec
CHANGED
@@ -1,15 +1,10 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
1
|
Gem::Specification.new do |s|
|
7
2
|
s.name = %q{rack-rewrite}
|
8
|
-
s.version = "1.0.
|
3
|
+
s.version = "1.0.2"
|
9
4
|
|
10
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
6
|
s.authors = ["John Trupiano"]
|
12
|
-
s.date = %q{2010-
|
7
|
+
s.date = %q{2010-10-01}
|
13
8
|
s.description = %q{A rack middleware for enforcing rewrite rules. In many cases you can get away with rack-rewrite instead of writing Apache mod_rewrite rules.}
|
14
9
|
s.email = %q{jtrupiano@gmail.com}
|
15
10
|
s.extra_rdoc_files = [
|
data/test/rule_test.rb
CHANGED
@@ -139,8 +139,8 @@ class RuleTest < Test::Unit::TestCase
|
|
139
139
|
assert_equal File.size(@file).to_s, @response[1]['Content-Length']
|
140
140
|
end
|
141
141
|
|
142
|
-
should 'return the contents of geminstaller.yml' do
|
143
|
-
assert_equal File.read(@file), @response[2]
|
142
|
+
should 'return the contents of geminstaller.yml in an array for Ruby 1.9.2 compatibility' do
|
143
|
+
assert_equal [File.read(@file)], @response[2]
|
144
144
|
end
|
145
145
|
end
|
146
146
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-rewrite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Trupiano
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-01 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|