sinatra-mapping 1.0.2 → 1.0.3
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/CHANGES +5 -0
- data/VERSION +2 -2
- data/lib/sinatra/mapping.rb +2 -1
- data/test/test_mapping.rb +6 -0
- metadata +2 -2
data/CHANGES
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
= Changes
|
2
2
|
|
3
|
+
[1.0.3 - July 2009]
|
4
|
+
* Error in root path without script name in environment have been fixed.
|
5
|
+
|
3
6
|
[1.0.2 - July 2009]
|
4
7
|
* The method for creates paths with parameters has been fixed.
|
5
8
|
|
9
|
+
* RDoc has been updated.
|
10
|
+
|
6
11
|
[1.0.1 - July 2009]
|
7
12
|
* The method for creates links has been fixed.
|
8
13
|
|
data/VERSION
CHANGED
data/lib/sinatra/mapping.rb
CHANGED
@@ -23,9 +23,10 @@ module Sinatra
|
|
23
23
|
# map :root, "tasks" # => /tasks/
|
24
24
|
# map :changes, "last-changes # => /tasks/last-changes
|
25
25
|
def map(name, path = nil)
|
26
|
+
@env ||= {}
|
26
27
|
@locations ||= {}
|
27
28
|
if name.to_sym == :root
|
28
|
-
@locations[:root] = cleanup_paths("/#{path}/")
|
29
|
+
@locations[:root] = cleanup_paths("/#{@env['SCRIPT_NAME']}/#{path}/")
|
29
30
|
metadef "#{name}_path" do |*paths|
|
30
31
|
@locations[:root]
|
31
32
|
end
|
data/test/test_mapping.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-mapping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hallison Batista
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-27 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|