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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66048b167e117a0e35891d812844488310535da8
4
- data.tar.gz: ad48d4adaf70d9353ff78c7229d0b72e079bb861
3
+ metadata.gz: 6dbc5a8880088d5b4e2f801186d577aeea706fed
4
+ data.tar.gz: 83c80d45fd7f12cca9832410af722dc7255e216e
5
5
  SHA512:
6
- metadata.gz: a548b5e37b99b24c77a75753f576b383d51a651ec7279cd5097bf007305e23a0e85ff987a8c113507e6012c88ad6c7f6d6136b4dacc3c0bff28bbeef09dbf306
7
- data.tar.gz: bf61ee7c9d5a82e684d81025a4936b95c00a4c128d887a355a13ca35fada8c164c668c5711fc8fe99fa369b13de9eea6fe8d82b5035fee23e8fd4d0217f993a6
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
 
@@ -7,12 +7,11 @@ module Tzispa
7
7
  class Context
8
8
  extend Forwardable
9
9
 
10
- attr_reader :env, :repository
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
 
@@ -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
@@ -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
- _load_session_middleware
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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tzispa
4
- VERSION = '0.4.13'
4
+ VERSION = '0.4.14'
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.4.13
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-05-24 00:00:00.000000000 Z
11
+ date: 2016-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack