prauga-flexdoc 0.4.4 → 0.4.5
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 +4 -4
- data/README.md +36 -3
- data/assets/flexdoc.standalone.js +52 -52
- data/lib/prauga/flexdoc/config.rb +2 -2
- data/lib/prauga/flexdoc/host.rb +17 -5
- data/lib/prauga/flexdoc/host_execution.rb +462 -0
- data/lib/prauga/flexdoc/rack_app.rb +137 -1
- data/lib/prauga/flexdoc/rails.rb +4 -3
- data/lib/prauga/flexdoc/version.rb +1 -1
- data/lib/prauga/flexdoc.rb +3 -2
- metadata +17 -2
data/lib/prauga/flexdoc/rails.rb
CHANGED
|
@@ -12,9 +12,10 @@ module Prauga
|
|
|
12
12
|
# @param host [Host] configured FlexDoc host
|
|
13
13
|
# @param at [String, nil] mount path; defaults to `host.config.path`
|
|
14
14
|
# @param as [Symbol] Rails mount name
|
|
15
|
+
# @param host_execution_protected [Boolean] explicit acknowledgement that application auth/middleware protects the docs/execute surface
|
|
15
16
|
# @return [Host] the mounted host
|
|
16
|
-
# @raise [ArgumentError] when `at` does not match `host.config.path`
|
|
17
|
-
def mount(mapper, host: Host.new, at: nil, as: :flexdoc)
|
|
17
|
+
# @raise [ArgumentError] when `at` does not match `host.config.path` or enabled host execution lacks protection acknowledgement
|
|
18
|
+
def mount(mapper, host: Host.new, at: nil, as: :flexdoc, host_execution_protected: false)
|
|
18
19
|
mount_path = at || host.config.path
|
|
19
20
|
normalized_mount_path = Config.new(path: mount_path).path
|
|
20
21
|
if normalized_mount_path != host.config.path
|
|
@@ -22,7 +23,7 @@ module Prauga
|
|
|
22
23
|
"Rails mount path #{normalized_mount_path.inspect} must match FlexDoc host path #{host.config.path.inspect}"
|
|
23
24
|
end
|
|
24
25
|
|
|
25
|
-
mapper.mount RackApp.new(host), at: normalized_mount_path, as: as
|
|
26
|
+
mapper.mount RackApp.new(host, host_execution_protected:), at: normalized_mount_path, as: as
|
|
26
27
|
host
|
|
27
28
|
end
|
|
28
29
|
end
|
data/lib/prauga/flexdoc.rb
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Self-hosted FlexDoc integration for Rack and Rails applications.
|
|
4
4
|
#
|
|
5
|
-
# Require this file to load {Prauga::FlexDoc::Host}, {Prauga::FlexDoc::
|
|
6
|
-
# {Prauga::FlexDoc::Config}, and the Rails mount helper.
|
|
5
|
+
# Require this file to load {Prauga::FlexDoc::Host}, {Prauga::FlexDoc::HostExecution},
|
|
6
|
+
# {Prauga::FlexDoc::RackApp}, {Prauga::FlexDoc::Config}, and the Rails mount helper.
|
|
7
7
|
|
|
8
8
|
require_relative "flexdoc/version"
|
|
9
9
|
require_relative "flexdoc/config"
|
|
10
10
|
require_relative "flexdoc/response"
|
|
11
|
+
require_relative "flexdoc/host_execution"
|
|
11
12
|
require_relative "flexdoc/host"
|
|
12
13
|
require_relative "flexdoc/rack_app"
|
|
13
14
|
require_relative "flexdoc/rails"
|
metadata
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prauga-flexdoc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Prauga
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: base64
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 0.2.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 0.2.0
|
|
13
27
|
- !ruby/object:Gem::Dependency
|
|
14
28
|
name: actionpack
|
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -98,6 +112,7 @@ files:
|
|
|
98
112
|
- lib/prauga/flexdoc.rb
|
|
99
113
|
- lib/prauga/flexdoc/config.rb
|
|
100
114
|
- lib/prauga/flexdoc/host.rb
|
|
115
|
+
- lib/prauga/flexdoc/host_execution.rb
|
|
101
116
|
- lib/prauga/flexdoc/rack_app.rb
|
|
102
117
|
- lib/prauga/flexdoc/rails.rb
|
|
103
118
|
- lib/prauga/flexdoc/response.rb
|