swagui 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: f30d5d4a9a121acdf9f448807f83fad3d09ab387
4
- data.tar.gz: d33ca290fb94b7f41e02dad31844aa81cab9886f
3
+ metadata.gz: 17ed2bd9763980dda2fa4c312a8d2f71d0c4c487
4
+ data.tar.gz: 73e41032b485a0dc82fc50c3e6f51f05524d8d0a
5
5
  SHA512:
6
- metadata.gz: 4f61ee9b2e31f01190edda62a93b775ef16ab181d65b2d7928f91aeb42cc752621d66a17c90025b9e994082d28ee76b44b65a45b2a6e76fd835ad40175ea063f
7
- data.tar.gz: fda0ee29718a4e56c14a0833a6cc20a4c778795c3e797cbdc96ce4779c524cb613767c64a4aade371824d9e85cc0bd7ffe6792e53be5ef26bac98eada988dce8
6
+ metadata.gz: a46f621183573241215acbd6814333e23cf784c52183ca4f19045ebacc73cf042cf54ae196fc53df0d53d07cff547365fa2d65efa91e1cb85d89a91d149b3717
7
+ data.tar.gz: b9751810860da1f9b20e89489593b4022ba6e92bc9d81387d5aa111fae42b9d46b49f2828ce4599ae4f8c57f57fe68d627a0db01ac0c3f5e58b72a87a46806a7
@@ -21,7 +21,10 @@ module Swagui
21
21
  def call(env)
22
22
  path = env["PATH_INFO"].strip
23
23
 
24
- if !(path =~ @url_regex).nil?
24
+ if @assets_url_regex.match(path)
25
+ env["PATH_INFO"] = path.gsub(@assets_url_regex, '')
26
+ @swagger_ui_file_server.call(env)
27
+ elsif @url_regex.match(path)
25
28
  path = path.gsub(@url_regex, '')
26
29
  if path == '' || path == '/'
27
30
  env["PATH_INFO"] = 'index.html'
@@ -30,9 +33,6 @@ module Swagui
30
33
  env["PATH_INFO"] = path
31
34
  @app_file_server.call(env)
32
35
  end
33
- elsif !(path =~ @assets_url_regex).nil?
34
- env["PATH_INFO"] = path.gsub(@assets_url_regex, '')
35
- @swagger_ui_file_server.call(env)
36
36
  else
37
37
  @app.call(env)
38
38
  end
@@ -1,3 +1,3 @@
1
1
  module Swagui
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: swagui
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
  - Jack Xu