directory_listing 0.3.1 → 0.3.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/README.md +10 -3
- data/lib/sinatra/directory_listing/version.rb +2 -2
- data/lib/sinatra/directory_listing.rb +11 -4
- metadata +2 -2
data/README.md
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
### directory_listing: easy, CSS-styled, Apache-like directory listings for Sinatra.
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### Install:
|
|
4
|
+
|
|
5
|
+
For regular use:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
(sudo) gem install directory_listing
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or from source:
|
|
4
12
|
|
|
5
13
|
```bash
|
|
6
|
-
|
|
7
|
-
sudo gem install ./directory_listing-x.x.x.gem
|
|
14
|
+
rake install
|
|
8
15
|
```
|
|
9
16
|
|
|
10
17
|
### Usage:
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module Directory_listing
|
|
2
|
-
VERSION = '0.3.
|
|
3
|
-
end
|
|
2
|
+
VERSION = '0.3.2'
|
|
3
|
+
end
|
|
@@ -7,11 +7,18 @@ require 'erb'
|
|
|
7
7
|
|
|
8
8
|
# ### directory_listing: easy, CSS-styled, Apache-like directory listings for Sinatra.
|
|
9
9
|
#
|
|
10
|
-
# ###
|
|
10
|
+
# ### Install:
|
|
11
|
+
#
|
|
12
|
+
# For regular use:
|
|
13
|
+
#
|
|
14
|
+
# ```bash
|
|
15
|
+
# (sudo) gem install directory_listing
|
|
16
|
+
# ```
|
|
17
|
+
#
|
|
18
|
+
# Or from source:
|
|
11
19
|
#
|
|
12
20
|
# ```bash
|
|
13
|
-
#
|
|
14
|
-
# sudo gem install ./directory_listing-x.x.x.gem
|
|
21
|
+
# rake install
|
|
15
22
|
# ```
|
|
16
23
|
#
|
|
17
24
|
# ### Usage:
|
|
@@ -136,7 +143,7 @@ module Sinatra
|
|
|
136
143
|
# Append the sorting information if the current directory is sorted.
|
|
137
144
|
|
|
138
145
|
if URI.unescape(request.path) != "/"
|
|
139
|
-
back_link = Pathname.new(
|
|
146
|
+
back_link = Pathname.new(request.path).parent
|
|
140
147
|
if $request_params["sortby"] && $request_params["direction"]
|
|
141
148
|
back_link = back_link.to_s + "?sortby=" + $request_params["sortby"] + "&direction=" + $request_params["direction"]
|
|
142
149
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: directory_listing
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-09-
|
|
12
|
+
date: 2013-09-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: filesize
|