graphql-docs 1.6.0 → 1.6.1
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 +5 -5
- data/.rubocop.yml +3 -0
- data/graphql-docs.gemspec +1 -1
- data/lib/graphql-docs/configuration.rb +1 -0
- data/lib/graphql-docs/helpers.rb +2 -1
- data/lib/graphql-docs/renderer.rb +5 -3
- data/lib/graphql-docs/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f9927fcaa99294d832438c2e32b14d36e75da6208bbd320c689b323960ddf9e0
|
4
|
+
data.tar.gz: 9033c5e6ce19659232675b03b56a18ef33e7bc7d8903913b4858c4e3fa60b93c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5a88d674aadea5199215b96ec816ab79512caab5e7d5d1c786a9a537aa5abb806c557d3f8e1552ec305af456050dcdb11eee2f4022fc5a114ed259ca1819f24
|
7
|
+
data.tar.gz: 2b8aa52f4fbfa76ff9db32dca0c157ea4989380da1fb5755ef9f4428bf523fd4a09d2afb41cb0573506d5a0e3a10c7957173ea6ca8184add61bde1405e52c67f
|
data/.rubocop.yml
CHANGED
data/graphql-docs.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
# rendering
|
27
27
|
spec.add_dependency 'commonmarker', '~> 0.16'
|
28
|
-
spec.add_dependency 'html-pipeline', '~> 2.
|
28
|
+
spec.add_dependency 'html-pipeline', '~> 2.9'
|
29
29
|
spec.add_dependency 'escape_utils', '~> 1.2'
|
30
30
|
spec.add_dependency 'extended-markdown-filter', '~> 0.4'
|
31
31
|
spec.add_dependency 'gemoji', '~> 3.0'
|
data/lib/graphql-docs/helpers.rb
CHANGED
@@ -22,7 +22,8 @@ module GraphQLDocs
|
|
22
22
|
|
23
23
|
def markdownify(string)
|
24
24
|
return '' if string.nil?
|
25
|
-
|
25
|
+
type = @options[:pipeline_config][:context][:unsafe] ? :UNSAFE : :DEFAULT
|
26
|
+
::CommonMarker.render_html(string, type).strip
|
26
27
|
end
|
27
28
|
|
28
29
|
def graphql_root_types
|
@@ -17,9 +17,11 @@ module GraphQLDocs
|
|
17
17
|
@graphql_default_layout = ERB.new(File.read(@options[:templates][:default]))
|
18
18
|
end
|
19
19
|
|
20
|
-
@pipeline_config = @options[:pipeline_config]
|
20
|
+
@pipeline_config = @options[:pipeline_config] || {}
|
21
|
+
pipeline = @pipeline_config[:pipeline] || {}
|
22
|
+
context = @pipeline_config[:context] || {}
|
21
23
|
|
22
|
-
filters =
|
24
|
+
filters = pipeline.map do |f|
|
23
25
|
if filter?(f)
|
24
26
|
f
|
25
27
|
else
|
@@ -34,7 +36,7 @@ module GraphQLDocs
|
|
34
36
|
end
|
35
37
|
end
|
36
38
|
|
37
|
-
@pipeline = HTML::Pipeline.new(filters,
|
39
|
+
@pipeline = HTML::Pipeline.new(filters, context)
|
38
40
|
end
|
39
41
|
|
40
42
|
def render(contents, type: nil, name: nil, filename: nil)
|
data/lib/graphql-docs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '2.
|
47
|
+
version: '2.9'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '2.
|
54
|
+
version: '2.9'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: escape_utils
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -351,7 +351,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
351
351
|
version: '0'
|
352
352
|
requirements: []
|
353
353
|
rubyforge_project:
|
354
|
-
rubygems_version: 2.6
|
354
|
+
rubygems_version: 2.7.6
|
355
355
|
signing_key:
|
356
356
|
specification_version: 4
|
357
357
|
summary: Easily generate beautiful documentation from your GraphQL schema.
|