tzispa 0.5.1 → 0.5.2

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: 894d9aa7667fefcfa69c76eff750c199591e0ef9
4
- data.tar.gz: dda3f0712b977878773d7a036b285d0dfb23c856
3
+ metadata.gz: 4d78240cf37311944ed49b7ddda2d5aa8d51001a
4
+ data.tar.gz: 104801e65d22dc5d76345003f0111d2a6a1d5a23
5
5
  SHA512:
6
- metadata.gz: e364cd1714699a89d1ab2a8fd7e9f2e7e05637b7d3ddf81c699f0e49ce25c69680c6d4cff1765ce915d9b4f6e02fa594bc616149a04da2f7b75b8555ea5da237
7
- data.tar.gz: a2db16df3d8d02498227ac359d6c542104bbad2dcde768ce4f95dd8a19e9fe6d32e788a566a393e81022bd9bf522bd342f6dc3f440fc1692699b66fec287e08d
6
+ metadata.gz: 2856238cca15d665edacf4e0b51a521183dbe3c327c3717b91423bb17fa5c39671b5eae45e3dd00415fdb3ef9f1ff44f9ac4a649dcab6575bcb79c6d09229f29
7
+ data.tar.gz: 33c353d4fece24681e7280f0d2ae45e42c8262f4fea8ef45cbd99dfa561eaeb2e89b710a35b1634494defd087b5b430aa708d1a990e6377b1e91c3bb94097f22
data/CHANGELOG.md CHANGED
@@ -2,10 +2,13 @@ Tzispa
2
2
 
3
3
  General purpose web framework
4
4
 
5
+ ## v0.5.2
6
+ - Api download data[:path] must contain full path to the file
7
+
5
8
  ## v0.5.1
6
9
  - Add result_json facility in Api::Handler
7
10
  - Rack update requirement to 2.0
8
- - Fix http_router not poulating env with rack 2.0
11
+ - Fix http_router not populating env with rack 2.0
9
12
  - Code optimizations in middlaware management
10
13
 
11
14
  ## v0.5.0
@@ -44,12 +44,12 @@ module Tzispa
44
44
  @predicate = context.router_params[:predicate]
45
45
  @hnd = handler_class.new(context)
46
46
  @predicate ? hnd.send(@verb, @predicate) : hnd.send(@verb)
47
+ context.flash << hnd.message
47
48
  send hnd.response_verb if hnd.response_verb
48
49
  response.finish
49
50
  end
50
51
 
51
52
  def redirect
52
- context.flash << hnd.message
53
53
  url = if hnd.data && !hnd.data.strip.empty?
54
54
  hnd.data.start_with?('#') ? "#{request.referer}#{hnd.data}" : hnd.data
55
55
  else
@@ -59,7 +59,6 @@ module Tzispa
59
59
  end
60
60
 
61
61
  def html
62
- context.flash << hnd.message
63
62
  response.body << hnd.data
64
63
  content_type :htm
65
64
  set_action_headers
@@ -79,17 +78,13 @@ module Tzispa
79
78
  end
80
79
 
81
80
  def text
82
- context.flash << hnd.message
83
81
  response.body << hnd.data
84
82
  content_type :text
85
83
  set_action_headers
86
84
  end
87
85
 
88
86
  def download
89
- context.flash << hnd.message
90
- data = hnd.data
91
- path = "#{Dir.pwd}/#{data[:path]}"
92
- send_file path, data
87
+ send_file hnd.data[:path], hnd.data
93
88
  end
94
89
 
95
90
  def handler_class_name
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tzispa
4
- VERSION = '0.5.1'
4
+ VERSION = '0.5.2'
5
5
  FRAMEWORK_NAME = 'Tzispa'
6
6
  GEM_NAME = 'tzispa'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tzispa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
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-08-12 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: rack