swagger_ui_engine_rails7 1.2.1 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/Rakefile +1 -1
- data/app/controllers/{swagger_ui_engine → swagger_ui_engine_rails7}/application_controller.rb +2 -2
- data/app/controllers/{swagger_ui_engine → swagger_ui_engine_rails7}/swagger_docs_controller.rb +7 -7
- data/app/helpers/{swagger_ui_engine → swagger_ui_engine_rails7}/auth_config_parser.rb +2 -2
- data/app/helpers/{swagger_ui_engine → swagger_ui_engine_rails7}/config_parser.rb +4 -4
- data/app/helpers/{swagger_ui_engine → swagger_ui_engine_rails7}/oauth_config_parser.rb +2 -2
- data/app/helpers/{swagger_ui_engine → swagger_ui_engine_rails7}/translation_helper.rb +2 -2
- data/lib/swagger_ui_engine_rails7/version.rb +1 -1
- metadata +12 -12
- /data/app/views/{swagger_ui_engine → swagger_ui_engine_rails7}/layouts/swagger.html.erb +0 -0
- /data/app/views/{swagger_ui_engine → swagger_ui_engine_rails7}/swagger_docs/index.html.erb +0 -0
- /data/app/views/{swagger_ui_engine → swagger_ui_engine_rails7}/swagger_docs/oauth2.html.erb +0 -0
- /data/app/views/{swagger_ui_engine → swagger_ui_engine_rails7}/swagger_docs/show.html.erb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ec2ee5dfda643dd0dbe5439dd074b7a56e8fa82915f99b669bb9c4113cf4bc5
|
4
|
+
data.tar.gz: b7e18286171da341ab5a729c6f0585edf4b275d624b0e7103006453d7c002773
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e02a810a9974992b7230147b6513e48f64355cb51070022a282152b197ab83410ef6b2dc620c773e3ead37c558c51be198a42deeeb3b3885b7d59d1852405bd
|
7
|
+
data.tar.gz: 2ddb921f695f29296c5e5c95b5051850ccfdeec44c5f47caa621b9c5052a7dd174dccb34af13d40345895808492fde75a4173a87e871550ca42632d064064765
|
data/CHANGELOG.md
CHANGED
data/Rakefile
CHANGED
@@ -19,7 +19,7 @@ end
|
|
19
19
|
|
20
20
|
RDoc::Task.new(:rdoc) do |rdoc|
|
21
21
|
rdoc.rdoc_dir = 'rdoc'
|
22
|
-
rdoc.title = '
|
22
|
+
rdoc.title = 'SwaggerUiEngineRails7'
|
23
23
|
rdoc.options << '--line-numbers'
|
24
24
|
rdoc.rdoc_files.include('README.rdoc')
|
25
25
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
data/app/controllers/{swagger_ui_engine → swagger_ui_engine_rails7}/swagger_docs_controller.rb
RENAMED
@@ -1,9 +1,9 @@
|
|
1
|
-
module
|
2
|
-
class SwaggerDocsController <
|
3
|
-
include
|
4
|
-
include
|
1
|
+
module SwaggerUiEngineRails7
|
2
|
+
class SwaggerDocsController < SwaggerUiEngineRails7::ApplicationController
|
3
|
+
include SwaggerUiEngineRails7::ConfigParser
|
4
|
+
include SwaggerUiEngineRails7::OauthConfigParser
|
5
5
|
|
6
|
-
helper
|
6
|
+
helper SwaggerUiEngineRails7::TranslationHelper
|
7
7
|
layout 'swagger_ui_engine/layouts/swagger', except: %w(oauth2)
|
8
8
|
|
9
9
|
before_action :set_configs, :set_oauth_configs
|
@@ -29,13 +29,13 @@ module SwaggerUiEngine
|
|
29
29
|
private
|
30
30
|
|
31
31
|
def set_configs
|
32
|
-
|
32
|
+
SwaggerUiEngineRails7::DEFAULTS.keys.each do |key|
|
33
33
|
instance_variable_set("@#{key}", self.send("set_#{key}"))
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
37
|
def set_oauth_configs
|
38
|
-
|
38
|
+
SwaggerUiEngineRails7::OAUTH2_DEFAULTS.keys.each do |key|
|
39
39
|
instance_variable_set("@#{key}", self.send("set_#{key}"))
|
40
40
|
end
|
41
41
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module SwaggerUiEngineRails7
|
2
2
|
module AuthConfigParser
|
3
3
|
def admin_username
|
4
4
|
configuration.admin_username
|
@@ -13,7 +13,7 @@ module SwaggerUiEngine
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def configuration
|
16
|
-
|
16
|
+
SwaggerUiEngineRails7.configuration
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
module
|
1
|
+
module SwaggerUiEngineRails7
|
2
2
|
module ConfigParser
|
3
|
-
|
3
|
+
SwaggerUiEngineRails7::DEFAULTS.each do |default|
|
4
4
|
next if default.first.to_s.eql?('validator_url')
|
5
5
|
|
6
6
|
define_method("set_#{default.first}") do
|
@@ -12,7 +12,7 @@ module SwaggerUiEngine
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def set_validator_url
|
15
|
-
validator_enabled? ?
|
15
|
+
validator_enabled? ? SwaggerUiEngineRails7::DEFAULTS[:validator_url] : 'null'
|
16
16
|
end
|
17
17
|
|
18
18
|
def validator_enabled?
|
@@ -20,7 +20,7 @@ module SwaggerUiEngine
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def configuration
|
23
|
-
|
23
|
+
SwaggerUiEngineRails7.configuration
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
module
|
1
|
+
module SwaggerUiEngineRails7
|
2
2
|
module OauthConfigParser
|
3
|
-
|
3
|
+
SwaggerUiEngineRails7::OAUTH2_DEFAULTS.each do |default|
|
4
4
|
define_method("set_#{default.first}") do
|
5
5
|
# set_oauth_app_name set_oauth_client_id
|
6
6
|
# set_oauth_client_secret set_oauth_realm
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module SwaggerUiEngineRails7
|
2
2
|
module TranslationHelper
|
3
3
|
def load_translation_file
|
4
4
|
return unless translator_enabled?
|
@@ -10,7 +10,7 @@ module SwaggerUiEngine
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def translator_enabled?
|
13
|
-
|
13
|
+
SwaggerUiEngineRails7.configuration.translator_enabled
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swagger_ui_engine_rails7
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- negabaro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -105,16 +105,16 @@ files:
|
|
105
105
|
- app/assets/stylesheets/swagger_ui_engine/lib/style.css
|
106
106
|
- app/assets/stylesheets/swagger_ui_engine/lib/typography.css.erb
|
107
107
|
- app/assets/stylesheets/swagger_ui_engine/print.css
|
108
|
-
- app/controllers/
|
109
|
-
- app/controllers/
|
110
|
-
- app/helpers/
|
111
|
-
- app/helpers/
|
112
|
-
- app/helpers/
|
113
|
-
- app/helpers/
|
114
|
-
- app/views/
|
115
|
-
- app/views/
|
116
|
-
- app/views/
|
117
|
-
- app/views/
|
108
|
+
- app/controllers/swagger_ui_engine_rails7/application_controller.rb
|
109
|
+
- app/controllers/swagger_ui_engine_rails7/swagger_docs_controller.rb
|
110
|
+
- app/helpers/swagger_ui_engine_rails7/auth_config_parser.rb
|
111
|
+
- app/helpers/swagger_ui_engine_rails7/config_parser.rb
|
112
|
+
- app/helpers/swagger_ui_engine_rails7/oauth_config_parser.rb
|
113
|
+
- app/helpers/swagger_ui_engine_rails7/translation_helper.rb
|
114
|
+
- app/views/swagger_ui_engine_rails7/layouts/swagger.html.erb
|
115
|
+
- app/views/swagger_ui_engine_rails7/swagger_docs/index.html.erb
|
116
|
+
- app/views/swagger_ui_engine_rails7/swagger_docs/oauth2.html.erb
|
117
|
+
- app/views/swagger_ui_engine_rails7/swagger_docs/show.html.erb
|
118
118
|
- config/routes.rb
|
119
119
|
- lib/swagger_ui_engine_rails7.rb
|
120
120
|
- lib/swagger_ui_engine_rails7/configuration.rb
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|