pakyow-core 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pakyow-core/CHANGELOG.md +7 -0
- data/pakyow-core/lib/core/app.rb +7 -9
- data/pakyow-core/lib/core/app_context.rb +1 -1
- data/pakyow-core/lib/core/route_eval.rb +5 -5
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50ae18ead2f40115c95fd5d0cd06c1d33168aef5
|
4
|
+
data.tar.gz: ba3af0e47bd3f344b0a3d6f0c694dda4ac7d2cfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99379ff43be348f4ebae46c630c8592f718b4b4659f3fd0bbc486f23182b968b3de9af1e17b81d899ccfb0e006c48e4efe01c82291a786e4443c9d2a626b8210
|
7
|
+
data.tar.gz: 72be27310400fb3da72d759efd71fc3ff5f926b01475df112e8d6b2af19ddf767d9940658fe9c277dce24ed935f7e9a410838ecbaf586cdcf4f92400b36e2564
|
data/pakyow-core/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# 0.10.2 / 2015-11-15
|
2
|
+
|
3
|
+
* Fixes issues presenting error views from gem
|
4
|
+
* Fixes a bug causing routes to inherit hooks from previously defined routes
|
5
|
+
* No longer resets the working context when redirecting or sending a file
|
6
|
+
* Uses Rack's delete_cookie method rather than unset_cookie
|
7
|
+
|
1
8
|
# 0.10.0 / 2015-10-19
|
2
9
|
|
3
10
|
* Adds nested route groups / namespaces inherit hooks
|
data/pakyow-core/lib/core/app.rb
CHANGED
@@ -352,7 +352,7 @@ module Pakyow
|
|
352
352
|
headers["Content-Type"] = type if type
|
353
353
|
headers["Content-disposition"] = "attachment; filename=#{send_as}" if send_as
|
354
354
|
|
355
|
-
self.context =
|
355
|
+
self.context.response = Response.new(data, response.status, response.header.merge(headers))
|
356
356
|
halt
|
357
357
|
end
|
358
358
|
|
@@ -364,7 +364,7 @@ module Pakyow
|
|
364
364
|
headers = response ? response.header : {}
|
365
365
|
headers = headers.merge({'Location' => location})
|
366
366
|
|
367
|
-
self.context =
|
367
|
+
self.context.response = Response.new('', status_code, headers)
|
368
368
|
halt
|
369
369
|
end
|
370
370
|
|
@@ -413,7 +413,7 @@ module Pakyow
|
|
413
413
|
|
414
414
|
def set_cookies
|
415
415
|
request.cookies.each_pair {|k, v|
|
416
|
-
response.
|
416
|
+
response.delete_cookie(k) if v.nil?
|
417
417
|
|
418
418
|
# cookie is already set with value, ignore
|
419
419
|
next if @initial_cookies.include?(k.to_s) && @initial_cookies[k.to_s] == v
|
@@ -456,12 +456,10 @@ module Pakyow
|
|
456
456
|
def content_for_code(code)
|
457
457
|
File.open(
|
458
458
|
File.join(
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
code.to_s + '.html'
|
464
|
-
)
|
459
|
+
'views',
|
460
|
+
'errors',
|
461
|
+
code.to_s + '.html'
|
462
|
+
)
|
465
463
|
).read
|
466
464
|
end
|
467
465
|
|
@@ -67,7 +67,7 @@ module Pakyow
|
|
67
67
|
#
|
68
68
|
def handler(*args, &block)
|
69
69
|
args = Aargv.normalize(args, name: Symbol, code: Integer, fn: Proc, hooks: Hash)
|
70
|
-
|
70
|
+
|
71
71
|
fns = []
|
72
72
|
# add the passed proc
|
73
73
|
fns << args[:fn] unless args[:fn].nil?
|
@@ -113,7 +113,7 @@ module Pakyow
|
|
113
113
|
evaluator.direct_path = path
|
114
114
|
evaluator.set_template(g_name, template)
|
115
115
|
evaluator.eval(&block)
|
116
|
-
|
116
|
+
|
117
117
|
merge(evaluator)
|
118
118
|
end
|
119
119
|
|
@@ -144,10 +144,10 @@ module Pakyow
|
|
144
144
|
|
145
145
|
def build_route(method, *args, &block)
|
146
146
|
args = Aargv.normalize(args, path: String, regex_path: Regexp, name: Symbol, fn: Proc, fns: Array, hooks: Hash)
|
147
|
-
|
147
|
+
|
148
148
|
path = args[:path] || args[:regex_path]
|
149
149
|
name = args[:name]
|
150
|
-
|
150
|
+
|
151
151
|
fns = args[:fns] || []
|
152
152
|
# add passed fn
|
153
153
|
fns << args[:fn] unless args[:fn].nil?
|
@@ -155,7 +155,7 @@ module Pakyow
|
|
155
155
|
fns << block if block_given?
|
156
156
|
|
157
157
|
# merge route hooks with scoped hooks
|
158
|
-
hooks = merge_hooks(@hooks, args[:hooks] || {})
|
158
|
+
hooks = merge_hooks(@hooks.dup, args[:hooks] || {})
|
159
159
|
|
160
160
|
# build the final list of fns
|
161
161
|
fns = build_fns(fns, hooks)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pakyow-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Powell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-11-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pakyow-support
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.10.
|
20
|
+
version: 0.10.2
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.10.
|
27
|
+
version: 0.10.2
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rack
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,3 +130,4 @@ signing_key:
|
|
130
130
|
specification_version: 4
|
131
131
|
summary: Pakyow Core
|
132
132
|
test_files: []
|
133
|
+
has_rdoc:
|