em-midori 0.1.5.1 → 0.1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/em-midori/api.rb +5 -4
- data/lib/em-midori/middleware.rb +4 -3
- data/lib/em-midori/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: 4576b9c865261b29c67d63bb243db75aa6f246e9
|
4
|
+
data.tar.gz: aee5b0fe78bace0475a586030a03b09fa3734d56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dae5bf2c56c08035a0015b122311211f76df64bbdc3afed592a030e6c22eb971711544f8d546a91c8178e07fa461814d051bdcde3f96064b6eabf001f6c4cb72
|
7
|
+
data.tar.gz: 68297ac0859c9f1a37b0dbe54ddb10042f550a952f82d21390310b5b4aa1f59c99a788b315fde25be5bfb07a82d8ce38dce59862008223d87e0e5b6d5a7a6f9f
|
data/lib/em-midori/api.rb
CHANGED
@@ -145,22 +145,23 @@ class Midori::API
|
|
145
145
|
# @return [nil] nil
|
146
146
|
def use(middleware, *args)
|
147
147
|
middleware = middleware.new(*args)
|
148
|
-
Midori::CleanRoom.class_exec { middleware.helper }
|
149
148
|
@scope_middlewares << middleware
|
150
149
|
nil
|
151
150
|
end
|
152
151
|
|
153
152
|
def filter(middleware, *args)
|
154
153
|
middleware = middleware.new(*args)
|
155
|
-
Midori::CleanRoom.class_exec { middleware.helper }
|
156
154
|
@temp_middlewares << middleware
|
157
155
|
nil
|
158
156
|
end
|
159
157
|
|
160
158
|
# Helper block for defining methods in APIs
|
159
|
+
# @param [Symbol] name name of the method
|
161
160
|
# @yield define what to run in CleanRoom
|
162
|
-
def helper(&block)
|
163
|
-
Midori::CleanRoom.class_exec
|
161
|
+
def helper(name, &block)
|
162
|
+
Midori::CleanRoom.class_exec do
|
163
|
+
define_method(name, &block)
|
164
|
+
end
|
164
165
|
end
|
165
166
|
|
166
167
|
def inherited(subclass)
|
data/lib/em-midori/middleware.rb
CHANGED
data/lib/em-midori/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: em-midori
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.5.
|
4
|
+
version: 0.1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HeckPsi Lab
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|