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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e31e86f3501bb3bff81a87d417c44ed7ad429b6
4
- data.tar.gz: bc9e38f49a77a6e9116ba6c3e04be5d44914c78a
3
+ metadata.gz: f4236ffaf4f620afe1651f74fd41a45c8499956f
4
+ data.tar.gz: 5da86df23412cf919f002ea8e7f7949efe7edee7
5
5
  SHA512:
6
- metadata.gz: f0e225a258e455279e3d17b4de1067d8a2e06d43d693c9822e2fd0fd930031edba571868189139c45eae9d27ecf328387e1f61985e9d7059f081f7d246fef0be
7
- data.tar.gz: 71279b21048db0f9182654be07e4dd931f3109a6aab45cedfa9c39ddbe368cfd5e6b9677c95c47b6fb32b3076a75923d68868bcfef5981f54dd42b01b3b1df1c
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 = Rack::File.new nil
149
- file.path = path
150
- result = file.serving context.env
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
@@ -3,7 +3,7 @@
3
3
  module Tzispa
4
4
  module Helpers
5
5
 
6
- VERSION = '0.1.19'
6
+ VERSION = '0.1.20'
7
7
  NAME = 'Tzispa Helpers'
8
8
  GEM_NAME = 'tzispa_helpers'
9
9
 
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.19
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-09-20 00:00:00.000000000 Z
11
+ date: 2016-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail