hanami 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/hanami/static.rb +8 -2
- data/lib/hanami/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cda1a54a84b8301f94a0bf94c46028cf0523908
|
4
|
+
data.tar.gz: c5e4356f43e5f5d3a51e1dca770e9f0382450d76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51e192587e0b3df1144b7aea2400d01e8c032cb4a7a2a3b168610aedb81be9102024572c20b31b2f35bac4395d9342743806bd3705bbc7dec9027595b6bdd883
|
7
|
+
data.tar.gz: 2f2e9af512a21f40550873d270c03f612b124a59e2ae7f5091aaa30483e307ec7e38afb7e5ddcd156973689730f8b83f88643cd347440ca9c067985ef0d73269
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Hanami
|
2
2
|
The web, with simplicity.
|
3
3
|
|
4
|
+
## v0.7.2 - 2016-02-09
|
5
|
+
### Fixed
|
6
|
+
- [Alfonso Uceda Pompa] Fixed routing issue when static assets server tried to hijiack paths that are matching directories in public directory
|
7
|
+
|
4
8
|
## v0.7.1 - 2016-02-05
|
5
9
|
### Fixed
|
6
10
|
- [Anton Davydov] Fixed routing issue when static assets server tried to hijiack requests belonging to dynamic endpoints
|
data/lib/hanami/static.rb
CHANGED
@@ -36,13 +36,19 @@ module Hanami
|
|
36
36
|
|
37
37
|
def can_serve(path, original = nil)
|
38
38
|
file_path = path.gsub(URL_SEPARATOR, ::File::SEPARATOR)
|
39
|
-
destination =
|
40
|
-
|
39
|
+
destination = find_asset do |asset|
|
40
|
+
asset.end_with?(file_path)
|
41
41
|
end
|
42
42
|
|
43
43
|
(super(path) || !!destination) && _fresh?(original, destination)
|
44
44
|
end
|
45
45
|
|
46
|
+
def find_asset
|
47
|
+
Dir[PUBLIC_DIRECTORY].find do |asset|
|
48
|
+
yield asset unless ::File.directory?(asset)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
46
52
|
def _fresh?(original, destination)
|
47
53
|
# At this point we're sure that destination exist.
|
48
54
|
#
|
data/lib/hanami/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-02-
|
13
|
+
date: 2016-02-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: hanami-utils
|