directory_listing 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/sinatra/directory_listing.rb +3 -1
- data/lib/sinatra/directory_listing/layout.rb +1 -0
- data/lib/sinatra/directory_listing/page.rb +1 -0
- data/lib/sinatra/directory_listing/version.rb +1 -1
- data/test/public/favicon/favicon.ico +0 -0
- data/test/test_directory_listing_app.rb +6 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9692a7377e281b36851d6caf01896f1980307217
|
4
|
+
data.tar.gz: abd645f08b3adf7bbd2d22c24cebec1650166388
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6154b4696475e4a01c0e6c12e9901b3e2d46b784c9aa167f9b7c82358c14788909d05f473de298862ad6a6ff96d3f0816228d2eb2c20332129d5d2c5c21cfdf8
|
7
|
+
data.tar.gz: 61e7353073d51b3a2ddfe36a195f190324344f1e5e8e4eaa27df44648fde8051064a20933613946f174a28f1c40b47e399fd86f8c1c6c2510c37fe1ccdc3ef12
|
data/README.md
CHANGED
@@ -65,6 +65,7 @@ Available options:
|
|
65
65
|
|
66
66
|
- ```stylesheet``` - a stylesheet to style the generated directory listing with, relative to your ```public_folder```
|
67
67
|
- ```readme``` - an HTML string that will be appended at the footer of the generated directory listing
|
68
|
+
- ```favicon``` - URL to a favicon
|
68
69
|
- ```should_list_invisibles``` - whether the directory listing should include invisibles (dotfiles) - true or false, defaults to false
|
69
70
|
- ```should_show_file_exts``` - whether the directory listing should show file extensions - true or false, defaults to true
|
70
71
|
- ```smart_sort``` - whether sorting should ignore "[Tt]he " at the beginning of filenames - true or false, defaults to true
|
@@ -28,6 +28,7 @@ module Sinatra
|
|
28
28
|
:last_modified_format => "%Y-%m-%d %H:%M:%S",
|
29
29
|
:filename_truncate_length => 40,
|
30
30
|
:stylesheet => "",
|
31
|
+
:favicon => "",
|
31
32
|
:readme => ""
|
32
33
|
}.merge(o)
|
33
34
|
|
@@ -46,9 +47,10 @@ module Sinatra
|
|
46
47
|
page.current_page = URI.unescape(request.path)
|
47
48
|
|
48
49
|
##
|
49
|
-
# Set the readme and
|
50
|
+
# Set the readme, stylesheet, and favicon
|
50
51
|
|
51
52
|
page.readme = options[:readme] if options[:readme]
|
53
|
+
page.favicon = options[:favicon] if options[:favicon]
|
52
54
|
if options[:stylesheet]
|
53
55
|
page.stylesheet = "<link rel='stylesheet' type='text/css' href='/#{options[:stylesheet].sub(/^[\/]*/,"")}'>"
|
54
56
|
end
|
@@ -6,6 +6,7 @@ module Sinatra
|
|
6
6
|
<head>
|
7
7
|
<title>Index of <%= page.current_page %>, sorted <%= page.sort_item_display %> <%= page.sort_direction_display %></title>
|
8
8
|
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
|
9
|
+
<link rel='shortcut icon' href='<%= page.favicon %>'>
|
9
10
|
<%= page.stylesheet %>
|
10
11
|
</head>
|
11
12
|
<body>
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: directory_listing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Myers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -128,6 +128,7 @@ files:
|
|
128
128
|
- lib/sinatra/directory_listing/resource.rb
|
129
129
|
- lib/sinatra/directory_listing/version.rb
|
130
130
|
- test/public/1234.txt
|
131
|
+
- test/public/favicon/favicon.ico
|
131
132
|
- test/public/level1/level2/level3/level 4/test
|
132
133
|
- test/public/level1/level2/level3/test
|
133
134
|
- test/public/level1/level2/test
|
@@ -167,6 +168,7 @@ specification_version: 4
|
|
167
168
|
summary: Easy, CSS-styled, Apache-like directory listings for Sinatra.
|
168
169
|
test_files:
|
169
170
|
- test/public/1234.txt
|
171
|
+
- test/public/favicon/favicon.ico
|
170
172
|
- test/public/level1/level2/level3/level 4/test
|
171
173
|
- test/public/level1/level2/level3/test
|
172
174
|
- test/public/level1/level2/test
|