rack-http_router 0.0.37 → 0.0.39

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
  SHA256:
3
- metadata.gz: d8116a8bf789a572ba51ac9b1644a88bcf7cffdd5d47533afccea57040d48556
4
- data.tar.gz: 2c8f9d461996645b791e8087921d03d577576f56778669e8851c2cf2c3de9a70
3
+ metadata.gz: 84bf7a53679efa066690c778f74ed7f09b980a7512ac382d339930a00c206a21
4
+ data.tar.gz: 701d40384cbb273ebf0b3b675301d5bf92c464a973aae62b5571aa2d596be9ba
5
5
  SHA512:
6
- metadata.gz: 932d5f2c0b87140b7b0f6f9fb8bdf897af1335fd950af076204449153312013cbd0d866331b3a36dd4dde5563c57ebcbd99c4d213e7fd2f7100ab8729eebc7db
7
- data.tar.gz: 460cf2a15bfb6e3f2837f59470127a77c15cd83abb0df2c264bd9c1c70db13b733351e5534d689dbcbad3285053c1ab2bcd7e5d5159a98b14480ebd352b9a034
6
+ metadata.gz: 15b2ebdc3156bddb6f11315115744ee5eed70f7be22cc2d119c75ccf87156b7cdd714de8da80fdf81e43091cc8be31e98def39710ea96c7f663c632e885ea827
7
+ data.tar.gz: ebe892d75531e7ac4453f8d485d30555a573412d6aef26c14d116e54ef7ada7e9b40f29a756c29980a02f2a690fe46d0733bd5e91b31826f677d63c6b0f133d9
@@ -0,0 +1,23 @@
1
+ module Rack
2
+ class HttpRouter
3
+ module Middleware
4
+ def self.included(base)
5
+ base.class_eval do
6
+ include Rack::HttpRouter::Action
7
+ end
8
+ end
9
+
10
+ def assign(obj, hash)
11
+ Rack::HttpRouter::Middleware.assign(obj, hash)
12
+ end
13
+
14
+ def self.assign(obj, hash)
15
+ hash.each do |k, v|
16
+ obj.define_singleton_method(k) { v }
17
+ end
18
+
19
+ obj
20
+ end
21
+ end
22
+ end
23
+ end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative 'rack-http_router/router'
4
4
  require_relative 'rack-http_router/action'
5
+ require_relative 'rack-http_router/middleware'
5
6
 
6
7
  module Rack
7
8
  class HttpRouter
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-http_router
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.37
4
+ version: 0.0.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrique F. Teixeira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-01 00:00:00.000000000 Z
11
+ date: 2023-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erubi
@@ -66,6 +66,7 @@ extra_rdoc_files: []
66
66
  files:
67
67
  - lib/rack-http_router.rb
68
68
  - lib/rack-http_router/action.rb
69
+ - lib/rack-http_router/middleware.rb
69
70
  - lib/rack-http_router/router.rb
70
71
  - lib/rack-http_router/router/build_request.rb
71
72
  - lib/rack-http_router/router/route.rb