directory_listing 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 241d7e83370def28838e157f7a2f2649b7b8148d
4
- data.tar.gz: f856b6f389aff56ec50e61544116f1fb2913765a
3
+ metadata.gz: f273c4b80ea336f44632a3f25a2ed1ea8bb637c4
4
+ data.tar.gz: 471796a8cd211916903cb52aa5c5bdf290c172cb
5
5
  SHA512:
6
- metadata.gz: 18d7c48f75f5d69d93d977ae1825c03546a2a9a0b6a47877021609f17bdac30b4e8dbb95a1f1b22ddd967692c7ddc427269e3e590681ecd4b3c924b21b5304f0
7
- data.tar.gz: 174a66908985f434a410344315a5cb57bb225c9d428227456608f7b56e0dc48a9ab1be660875fe5cb3dee90075476de4eae8e1fe5d53a837cefd568f21c5d1b7
6
+ metadata.gz: a5f606775d8a5e6d7d26068484124f9e04e20ae81cba4e4e4e848aaabbe7107599730c58bd5852bad9dc80689d34a60ee7f0eba4ef0e59f3c18b8d0696f19286
7
+ data.tar.gz: b762239df947a1c087827fd7753891d9cab9d1a07b612168404fa29fb75677a9a3ac0c29bbb8e88e4667b5e896fd7b51dccd48ca5f36621a905f176844e83f00
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- directory_listing (0.6.2)
4
+ directory_listing (0.6.3)
5
5
  filesize (>= 0.0.2)
6
6
  sinatra (>= 1.4.5)
7
7
  truncate (>= 0.0.4)
@@ -130,7 +130,7 @@ module Sinatra
130
130
  if !page.embed_in.empty?
131
131
  path = File.join(settings.public_folder, page.embed_in)
132
132
  if File.exists?(path)
133
- erb = ERB.new(IO.read(path))
133
+ erb = ERB.new(IO.read(path).force_encoding("utf-8"))
134
134
  else
135
135
  erb = ERB.new(LAYOUT)
136
136
  end
@@ -60,7 +60,7 @@ class Resource
60
60
  # Remove the extension if neccesary and truncate it.
61
61
  # URI.unescape seems to work best to decode uris.
62
62
 
63
- file = URI.unescape(file)
63
+ file = URI.unescape(file).force_encoding("utf-8")
64
64
  file_noext = file.gsub(File.extname(file), "") if @page.should_show_file_exts == false
65
65
  if file_noext
66
66
  file_truncated = file_noext.truncate(@page.filename_truncate_length, '...')
@@ -1,3 +1,3 @@
1
1
  module Directory_listing
2
- VERSION = '0.6.3'
2
+ VERSION = '0.6.4'
3
3
  end
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.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Myers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-12 00:00:00.000000000 Z
11
+ date: 2015-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra