tzispa 0.4.13 → 0.4.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/tzispa/context.rb +2 -3
- data/lib/tzispa/http/context.rb +2 -1
- data/lib/tzispa/middleware.rb +1 -16
- data/lib/tzispa/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: 6dbc5a8880088d5b4e2f801186d577aeea706fed
|
4
|
+
data.tar.gz: 83c80d45fd7f12cca9832410af722dc7255e216e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 190fa40ab88227a0e00a42d0dc2cd5b9bfcb667245aa357e283d6ff9c7fc49bdfaf19fc73afad72f48cacaefbf9cdac4d9e46b6f8ecd6bee1b09beff9730ab54
|
7
|
+
data.tar.gz: ef6d2b834082dae6fc230b3fe21225faf76cafd085c45996ad712eb63cce9753221e69046bf3a1b55952f0f7a677d410de39aa575c5ce41d6a77fd08ff012e7e
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@ Tzispa
|
|
2
2
|
|
3
3
|
General purpose web framework
|
4
4
|
|
5
|
+
## v0.4.14
|
6
|
+
- remove moneta session in middleware: now use session goes in App class definition
|
7
|
+
- remove repository dup in context because isn't required without the respository.use method
|
8
|
+
- add missing require securerandom for session_id in http/context
|
9
|
+
|
5
10
|
## v0.4.13
|
6
11
|
- Set router default app to http_error 404
|
7
12
|
|
data/lib/tzispa/context.rb
CHANGED
@@ -7,12 +7,11 @@ module Tzispa
|
|
7
7
|
class Context
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
attr_reader :env
|
11
|
-
def_delegators :app, :config, :logger, :domain
|
10
|
+
attr_reader :env
|
11
|
+
def_delegators :app, :config, :logger, :domain, :repository
|
12
12
|
|
13
13
|
def initialize(environment)
|
14
14
|
@env = environment
|
15
|
-
@repository = app.repository.dup if app.repository
|
16
15
|
I18n.locale = config.locales.default.to_sym if config.respond_to?(:locales)
|
17
16
|
end
|
18
17
|
|
data/lib/tzispa/http/context.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'forwardable'
|
2
|
+
require 'securerandom'
|
2
3
|
require 'tzispa/context'
|
3
4
|
require 'tzispa/http/response'
|
4
5
|
require 'tzispa/http/request'
|
@@ -70,7 +71,7 @@ module Tzispa
|
|
70
71
|
500.tap { |code|
|
71
72
|
response.body = str if str
|
72
73
|
}
|
73
|
-
end
|
74
|
+
end
|
74
75
|
|
75
76
|
def path(path_id, params={})
|
76
77
|
app.class.routes.path path_id, params
|
data/lib/tzispa/middleware.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'moneta'
|
4
|
-
require 'rack/session/moneta'
|
5
|
-
|
6
3
|
module Tzispa
|
7
4
|
class Middleware
|
8
5
|
|
@@ -48,23 +45,11 @@ module Tzispa
|
|
48
45
|
|
49
46
|
def load_default_stack
|
50
47
|
@default_stack_loaded ||= begin
|
51
|
-
|
52
|
-
use Rack::MethodOverride
|
48
|
+
#use Rack::MethodOverride
|
53
49
|
true
|
54
50
|
end
|
55
51
|
end
|
56
52
|
|
57
|
-
def _load_session_middleware
|
58
|
-
if @application.config.sessions.enabled
|
59
|
-
use Rack::Session::Moneta,
|
60
|
-
store: Moneta.new(:HashFile, dir: @application.config.sessions.store_path, expires: true, threadsafe: true),
|
61
|
-
key: "_#{@application.config.id}__",
|
62
|
-
domain: @application.config.host_name,
|
63
|
-
path: '/',
|
64
|
-
expire_after: @application.config.sessions.timeout,
|
65
|
-
secret: @application.config.sessions.secret
|
66
|
-
end
|
67
|
-
end
|
68
53
|
|
69
54
|
end
|
70
55
|
end
|
data/lib/tzispa/version.rb
CHANGED
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.4.
|
4
|
+
version: 0.4.14
|
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-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|