rack-app 1.2.2 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rack/app.rb +12 -0
- data/lib/rack/app/utils.rb +0 -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: fca80f5b9ca4da68fe2507408d9bb142e236d2d1
|
4
|
+
data.tar.gz: acf8ab44edd28baea4b8f913f0df04ddec39f002
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1d95e2f3444a0dc75d34a09089aba483c93196231da7356c7de7878321d8c180b2c0417484397da790f97ca8396df023c1c5ff84b6d5cd8010ef86ae1ebd4c5
|
7
|
+
data.tar.gz: 26d7e611e72d96347d522ad5795fa66c67a02bde3a02669662d21a074e30849d96680b7674f3078d11cedb2da874ed8453f83030787dcb0d6fb38d3a84e0a598
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
data/lib/rack/app.rb
CHANGED
@@ -37,6 +37,14 @@ class Rack::App
|
|
37
37
|
|
38
38
|
end
|
39
39
|
|
40
|
+
def on_mounted(&block)
|
41
|
+
@on_mounted ||= []
|
42
|
+
@on_mounted << block unless block.nil?
|
43
|
+
@on_mounted
|
44
|
+
end
|
45
|
+
|
46
|
+
alias while_being_mounted on_mounted
|
47
|
+
|
40
48
|
def on_inheritance(&block)
|
41
49
|
@on_inheritance ||= []
|
42
50
|
@on_inheritance << block unless block.nil?
|
@@ -192,6 +200,10 @@ class Rack::App
|
|
192
200
|
merge_prop = {:namespaces => [@namespaces, mount_prop[:to]].flatten}
|
193
201
|
router.merge_router!(api_class.router, merge_prop)
|
194
202
|
|
203
|
+
api_class.on_mounted.each do |on_mount|
|
204
|
+
on_mount.call(self, mount_prop)
|
205
|
+
end
|
206
|
+
|
195
207
|
return nil
|
196
208
|
end
|
197
209
|
|
data/lib/rack/app/utils.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Luzsi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|