odex 0.0.2 → 0.0.3

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: 0a0b1756fdacdecd4720c2ec2b0acc73d8b15db8
4
- data.tar.gz: f97240efbd38228c1d2b79b8d4b8186ca51f002b
3
+ metadata.gz: 6748dbaefe7b3235ebfe47fe615bb014561b9f35
4
+ data.tar.gz: ff31c7626ca8da51a575ef63fcd5623e5c1b6322
5
5
  SHA512:
6
- metadata.gz: 5db6752c18f1de36e6559e4083363edef9c447a51dbc570beea5d08d26b54df3b24071b89268bbe9494f0b19ce9c02aa9d6ea9c222f6e220033cbb4fb5d5e014
7
- data.tar.gz: 0e1e9dcd4d8bce82488de035da8a52e0966040203497629557b7c2d2da97962e5712e19f4580c1a149e13643106d4dcff04327b346eccec193012adb370b165d
6
+ metadata.gz: c188136281ce91054a451c3efd529162d9055cace644584c1b70f253f4597be50c097579db520e7be9631c908c9fa293149aabfc026a6700a866341c214822b1
7
+ data.tar.gz: 352f4e64ae43dd5fe973f3b00992fe3eca99a033fa9b0ee7ff293a88b365383f0d2067812a7e5d9020ba058327c03bc27d84079e13a28742ff46360f0e523292
data/lib/odex/app.rb CHANGED
@@ -152,7 +152,8 @@ module Odex
152
152
  class Base
153
153
  include Odex::Init
154
154
  METHODS = [:options, :patch, :post, :put, :trace, :delete, :get, :head]
155
-
155
+
156
+ inheritable :builder, Odex::OdexBuilder.new
156
157
  init_methods :c, Class.new(Req)
157
158
  init_methods :route_defs, []
158
159
  init_methods :hook_before, []
@@ -215,6 +216,10 @@ module Odex
215
216
  hook_after << Proc.new(&block)
216
217
  end
217
218
 
219
+ def use middleware, *args, &block
220
+ builder.use middleware, *args, &block
221
+ end
222
+
218
223
  def ext(*extensions)
219
224
  extensions.each do |ext|
220
225
  extend ext
data/lib/odex/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Odex
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sedat ÇİFTÇİ