jetra 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b57cb07162126a3b98c207192feb0d11aa99d2a9
4
- data.tar.gz: c49c37e2682d0d3c4dd44df5caed680ea555574e
3
+ metadata.gz: aa7e4e2588d06014573fb36f1d28716444f274c5
4
+ data.tar.gz: a32c028e4476b946805f17a912def4d45a0776c9
5
5
  SHA512:
6
- metadata.gz: a6652e95eda371af3a81a84858d3d3672f29243d4f92cc01eb89716fb671eadf5516be3fc05358969d2d6b065497f513207f5b8261eed20c09ffa7acecd6b8d8
7
- data.tar.gz: c0b6d6b7afb037679a2a41a501e8d232680bdb3ceff55da2aa38b8ddc7c3aec5659aa8b8d2e4c396fe20ae9e595425545714e833bd8a91571875aeb580fa3650
6
+ metadata.gz: f050228840fab29f268f6334194f14bc4e7d73d2e89a6fb7ee20428c63193f943e82497657a2c8e65a8e27577cc4b88632d6ee7f06e9ffa5aa0783f39552afbb
7
+ data.tar.gz: 9072e8212803b81db4c373b36c2290ccc2e4c4d51ecdd30c90f8eb4a1da6d7ecc05072d4c43822b4fa1f47a282d42930a75a0f1d766305856dd939ecb1ef4427
@@ -11,11 +11,6 @@ module Jetra
11
11
  def initialize(app, &custom_block)
12
12
  @app = app
13
13
 
14
- @routes = Set.new
15
- @app.routes.each_key do |route|
16
- @routes << route
17
- end
18
-
19
14
  @custom_block = custom_block
20
15
 
21
16
  end
@@ -36,12 +31,7 @@ module Jetra
36
31
 
37
32
  sym_route = route.to_sym
38
33
 
39
- if @routes.include?(sym_route)
40
- res = @app.call(sym_route, params)
41
- else
42
- params[:route] = route
43
- res = @app.call(:not_found, params)
44
- end
34
+ res = @app.call(sym_route, params)
45
35
 
46
36
  result = {}
47
37
  result[:status] = res.status
@@ -15,11 +15,6 @@ module Jetra
15
15
  def initialize(app, &custom_block)
16
16
  @app = app
17
17
 
18
- @routes = Set.new
19
- @app.routes.each_key do |route|
20
- @routes << route
21
- end
22
-
23
18
  @custom_block = custom_block
24
19
 
25
20
  end
@@ -36,12 +31,7 @@ module Jetra
36
31
 
37
32
  sym_route = route.to_sym
38
33
 
39
- if @routes.include?(sym_route)
40
- res = @app.call(sym_route, params)
41
- else
42
- params[:route] = route
43
- res = @app.call(:not_found, params)
44
- end
34
+ res = @app.call(sym_route, params)
45
35
 
46
36
  response = Thrift::Response.new
47
37
  response.status = res.status
@@ -1,5 +1,5 @@
1
1
  module Jetra
2
2
 
3
- Version = "1.0.3"
3
+ Version = "1.0.4"
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jetra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-07 00:00:00.000000000 Z
11
+ date: 2017-12-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: micro DSL
14
14
  email: