flame 3.3.4 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flame/application.rb +4 -23
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e91ac518b94afb516a97c8ed22a63c7e6381dc0e
|
4
|
+
data.tar.gz: 187942692b4872a65869011f43153275e6faff36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21d8513b6c528d7b3b576f7cab5aedfe51ddd66c8b18cf451a0f6049ca7ef5b974c4668732c46c29e9c42c7a14c8b18943908c2f9493cfedb273071aa0ad5f61
|
7
|
+
data.tar.gz: b78b9c72ba68ad431d27877776814261c4b74fd9b1e5b5c14d75a055c5f96c02ce2652e317b5d4b9fc70df0f76ffd68d8223b6f2e63692c5381e97d3309918e5
|
data/lib/flame/application.rb
CHANGED
@@ -23,41 +23,22 @@ module Flame
|
|
23
23
|
environment: ENV['RACK_ENV'] || 'development'
|
24
24
|
)
|
25
25
|
)
|
26
|
-
# app.use Rack::Session::Pool
|
27
26
|
end
|
28
27
|
|
29
|
-
def
|
30
|
-
app
|
31
|
-
@
|
32
|
-
app.class.middlewares.each do |m|
|
33
|
-
use m[:class], *m[:args], &m[:block]
|
34
|
-
end
|
35
|
-
run app
|
36
|
-
end
|
28
|
+
def self.call(env)
|
29
|
+
@app ||= new
|
30
|
+
@app.call env
|
37
31
|
end
|
38
32
|
|
39
33
|
## Init function
|
40
34
|
def call(env)
|
41
|
-
|
42
|
-
Flame::Dispatcher.new(self, env).run!
|
43
|
-
else
|
44
|
-
env[:FLAME_CALL] = true
|
45
|
-
@builder.call env
|
46
|
-
end
|
35
|
+
Flame::Dispatcher.new(self, env).run!
|
47
36
|
end
|
48
37
|
|
49
38
|
def self.mount(ctrl, path = nil, &block)
|
50
39
|
router.add_controller(ctrl, path, block)
|
51
40
|
end
|
52
41
|
|
53
|
-
def self.middlewares
|
54
|
-
@middlewares ||= []
|
55
|
-
end
|
56
|
-
|
57
|
-
def self.use(middleware, *args, &block)
|
58
|
-
middlewares << { class: middleware, args: args, block: block }
|
59
|
-
end
|
60
|
-
|
61
42
|
def self.helpers(*modules)
|
62
43
|
modules.empty? ? (@helpers ||= []) : @helpers = modules
|
63
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flame
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Popov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.
|
106
|
+
rubygems_version: 2.5.1
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Web-framework, based on MVC-pattern
|