tzispa_helpers 0.1.19 → 0.1.20
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.
- checksums.yaml +4 -4
- data/lib/tzispa/helpers/response.rb +4 -7
- data/lib/tzispa/helpers/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: f4236ffaf4f620afe1651f74fd41a45c8499956f
|
|
4
|
+
data.tar.gz: 5da86df23412cf919f002ea8e7f7949efe7edee7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5276b2353644b3f626cc100f15461d164c6bb6261464f1e4fa23ba83a09175439f663eac8712cb295efa5d54131a238c97fd709f51dea6d9469ec5ae8fce139a
|
|
7
|
+
data.tar.gz: 51f47bc40e5b8ad4bf99a1a2e1321b95e28b02e256f942265f41786c30b5938bed3115c57b4a84b378ca588821bfd773e8184789d5ee7b6dce652a7c4a37f450
|
|
@@ -130,7 +130,6 @@ module Tzispa
|
|
|
130
130
|
response['Content-Disposition'] = content_disposition
|
|
131
131
|
end
|
|
132
132
|
|
|
133
|
-
# Use the contents of the file at +path+ as the response body.
|
|
134
133
|
def send_file(path, opts = {})
|
|
135
134
|
begin
|
|
136
135
|
if opts[:type] or not response['Content-Type']
|
|
@@ -145,15 +144,13 @@ module Tzispa
|
|
|
145
144
|
attachment! filename, disposition
|
|
146
145
|
last_modified opts[:last_modified] if opts[:last_modified]
|
|
147
146
|
|
|
148
|
-
file
|
|
149
|
-
file.
|
|
150
|
-
|
|
147
|
+
file = Rack::File.new(Dir.pwd)
|
|
148
|
+
result = file.serving(request, path)
|
|
149
|
+
|
|
151
150
|
result[1].each { |k,v| response.headers[k] ||= v }
|
|
152
151
|
response.headers['Content-Length'] = result[1]['Content-Length']
|
|
153
|
-
#opts[:status] &&= Integer(opts[:status])
|
|
154
|
-
#halt opts[:status] || result[0], result[2]
|
|
155
152
|
response.status = result[0]
|
|
156
|
-
response.body = result[2]
|
|
153
|
+
response.body = result[2]
|
|
157
154
|
rescue
|
|
158
155
|
not_found 'Fichero no encontrado'
|
|
159
156
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tzispa_helpers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.20
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juan Antonio Piñero
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-10-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mail
|