graphql-docs 1.6.0 → 1.6.1

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
- SHA1:
3
- metadata.gz: 209480e5ab88c1262d0afafa04e3b435705dbe9b
4
- data.tar.gz: cbdf610677b8ff1013dbadada46a5b521782462f
2
+ SHA256:
3
+ metadata.gz: f9927fcaa99294d832438c2e32b14d36e75da6208bbd320c689b323960ddf9e0
4
+ data.tar.gz: 9033c5e6ce19659232675b03b56a18ef33e7bc7d8903913b4858c4e3fa60b93c
5
5
  SHA512:
6
- metadata.gz: d587d8dadf631a40ad65da7e9e7f4bac0b262543b60ba2be0ac2b7e9ed767c19ed94a67acd6444f4606f58403771ccc764ca7ae90876700e2d26840822b18a5d
7
- data.tar.gz: ac03a0a77a0dd1c0a8c963206bc8502eca9bf956560bfc492afc6dd43ae0937edfd7736e56eeacf686698f1489ea4e27c93e1db4cdc2d17635ef762715ee11e0
6
+ metadata.gz: e5a88d674aadea5199215b96ec816ab79512caab5e7d5d1c786a9a537aa5abb806c557d3f8e1552ec305af456050dcdb11eee2f4022fc5a114ed259ca1819f24
7
+ data.tar.gz: 2b8aa52f4fbfa76ff9db32dca0c157ea4989380da1fb5755ef9f4428bf523fd4a09d2afb41cb0573506d5a0e3a10c7957173ea6ca8184add61bde1405e52c67f
@@ -5,3 +5,6 @@ inherit_gem:
5
5
  Style/StringLiterals:
6
6
  Enabled: true
7
7
  EnforcedStyle: single_quotes
8
+
9
+ Naming/FileName:
10
+ Enabled: false
@@ -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.8'
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'
@@ -16,6 +16,7 @@ module GraphQLDocs
16
16
  TableOfContentsFilter),
17
17
  context: {
18
18
  gfm: false,
19
+ unsafe: true, # necessary for layout needs, given that it's all HTML templates
19
20
  asset_root: 'https://a248.e.akamai.net/assets.github.com/images/icons'
20
21
  }
21
22
  },
@@ -22,7 +22,8 @@ module GraphQLDocs
22
22
 
23
23
  def markdownify(string)
24
24
  return '' if string.nil?
25
- ::CommonMarker.render_html(string, :DEFAULT).strip
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 = @pipeline_config[:pipeline].map do |f|
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, @pipeline_config[:context])
39
+ @pipeline = HTML::Pipeline.new(filters, context)
38
40
  end
39
41
 
40
42
  def render(contents, type: nil, name: nil, filename: nil)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQLDocs
3
- VERSION = '1.6.0'.freeze
3
+ VERSION = '1.6.1'.freeze
4
4
  end
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.0
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-07-05 00:00:00.000000000 Z
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.8'
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.8'
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.12
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.