graphql-docs 1.3.1 → 1.3.2
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/lib/graphql-docs/generator.rb +8 -12
- data/lib/graphql-docs/helpers.rb +1 -1
- data/lib/graphql-docs/layouts/default.html +1 -1
- data/lib/graphql-docs/layouts/includes/arguments.html +1 -1
- data/lib/graphql-docs/layouts/includes/connections.html +1 -1
- data/lib/graphql-docs/layouts/includes/fields.html +1 -1
- data/lib/graphql-docs/layouts/includes/input_fields.html +1 -1
- data/lib/graphql-docs/layouts/includes/values.html +1 -1
- data/lib/graphql-docs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32e7dc48eae7a31c1e21898bbd36d3f48e396d6e
|
|
4
|
+
data.tar.gz: cfc7ecedfd2a2328965fc4d96a84cd8ca9d68701
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6e05552c45fb38032bda7575f625ad94d78dffa835eb7e36d975f22b27694e006b80d1156623387b936ef6a6794b5571be454b9a1cd625293613add82ea0b5f8
|
|
7
|
+
data.tar.gz: 92b76f1af8fc7a33652ec515e1b39aceabd3fece43e417d23fce0d445bb86a85deab78c41ba6a372afba7e43ceafd14f92303af24ca300ba79678a5f7dd6017f
|
|
@@ -13,14 +13,14 @@ module GraphQLDocs
|
|
|
13
13
|
|
|
14
14
|
@renderer = @options[:renderer].new(@parsed_schema, @options)
|
|
15
15
|
|
|
16
|
-
@graphql_operation_template = ERB.new(File.read(@options[:templates][:operations]))
|
|
17
|
-
@graphql_object_template = ERB.new(File.read(@options[:templates][:objects]))
|
|
18
|
-
@graphql_mutations_template = ERB.new(File.read(@options[:templates][:mutations]))
|
|
19
|
-
@graphql_interfaces_template = ERB.new(File.read(@options[:templates][:interfaces]))
|
|
20
|
-
@graphql_enums_template = ERB.new(File.read(@options[:templates][:enums]))
|
|
21
|
-
@graphql_unions_template = ERB.new(File.read(@options[:templates][:unions]))
|
|
22
|
-
@graphql_input_objects_template = ERB.new(File.read(@options[:templates][:input_objects]))
|
|
23
|
-
@graphql_scalars_template = ERB.new(File.read(@options[:templates][:scalars]))
|
|
16
|
+
@graphql_operation_template = ERB.new(File.read(@options[:templates][:operations]), nil, '<>')
|
|
17
|
+
@graphql_object_template = ERB.new(File.read(@options[:templates][:objects]), nil, '<>')
|
|
18
|
+
@graphql_mutations_template = ERB.new(File.read(@options[:templates][:mutations]), nil, '<>')
|
|
19
|
+
@graphql_interfaces_template = ERB.new(File.read(@options[:templates][:interfaces]), nil, '<>')
|
|
20
|
+
@graphql_enums_template = ERB.new(File.read(@options[:templates][:enums]), nil, '<>')
|
|
21
|
+
@graphql_unions_template = ERB.new(File.read(@options[:templates][:unions]), nil, '<>')
|
|
22
|
+
@graphql_input_objects_template = ERB.new(File.read(@options[:templates][:input_objects]), nil, '<>')
|
|
23
|
+
@graphql_scalars_template = ERB.new(File.read(@options[:templates][:scalars]), nil, '<>')
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def generate
|
|
@@ -191,10 +191,6 @@ module GraphQLDocs
|
|
|
191
191
|
@options = @options.merge(meta)
|
|
192
192
|
end
|
|
193
193
|
|
|
194
|
-
# normalize spacing so that CommonMarker doesn't treat it as `pre`
|
|
195
|
-
contents.gsub!(/^\s*$/, '')
|
|
196
|
-
contents.gsub!(/^\s{4}/m, ' ')
|
|
197
|
-
|
|
198
194
|
contents = @renderer.render(contents, type: type, name: name)
|
|
199
195
|
File.write(File.join(path, 'index.html'), contents) unless contents.nil?
|
|
200
196
|
end
|
data/lib/graphql-docs/helpers.rb
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<tbody>
|
|
10
10
|
<% arguments.each do |argument| %>
|
|
11
11
|
<tr>
|
|
12
|
-
<td><code><%= argument[:name] %></code></td>
|
|
12
|
+
<td><code class="anchored"><%= argument[:name] %></code></td>
|
|
13
13
|
<td>
|
|
14
14
|
<code><a href="<%= base_url %>/<%= argument[:type][:path]%>"><%= argument[:type][:info] %></a></code>
|
|
15
15
|
</td>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<% connections.each do |connection| %>
|
|
2
2
|
|
|
3
3
|
<div class="field-entry <%= classes[:field_entry] %>">
|
|
4
|
-
<span id="<%= slugify.(connection[:name]) %>" class="field-name connection-name"><%= connection[:name] %> (<code><a href="<%= base_url %>/<%= connection[:type][:path] %>"><%= connection[:type][:info] %></a></code>)</span>
|
|
4
|
+
<span id="<%= slugify.(connection[:name]) %>" class="field-name connection-name anchored"><%= connection[:name] %> (<code><a href="<%= base_url %>/<%= connection[:type][:path] %>"><%= connection[:type][:info] %></a></code>)</span>
|
|
5
5
|
|
|
6
6
|
<div class="description-wrapper">
|
|
7
7
|
<%= include.('notices.html', notices: connection[:notices]) %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<% fields.each do |field| %>
|
|
2
2
|
|
|
3
3
|
<div class="field-entry <%= classes[:field_entry] %>">
|
|
4
|
-
<span id="<%= slugify.(field[:name]) %>" class="field-name"><%= field[:name] %> (<code><a href="<%= base_url %>/<%= field[:type][:path] %>"><%= field[:type][:info] %></a></code>)</span>
|
|
4
|
+
<span id="<%= slugify.(field[:name]) %>" class="field-name anchored"><%= field[:name] %> (<code><a href="<%= base_url %>/<%= field[:type][:path] %>"><%= field[:type][:info] %></a></code>)</span>
|
|
5
5
|
|
|
6
6
|
<div class="description-wrapper">
|
|
7
7
|
<% if field[:is_deprecated] %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<% input_fields.each do |field| %>
|
|
2
2
|
|
|
3
3
|
<div class="field-entry <%= classes[:field_entry] %>">
|
|
4
|
-
<span id="<%= slugify.(field[:name]) %>" class="field-name"><%= field[:name] %> (<code><a href="<%= base_url %>/<%= field[:type][:path] %>"><%= field[:type][:info] %></a></code>)</span>
|
|
4
|
+
<span id="<%= slugify.(field[:name]) %>" class="field-name anchored"><%= field[:name] %> (<code><a href="<%= base_url %>/<%= field[:type][:path] %>"><%= field[:type][:info] %></a></code>)</span>
|
|
5
5
|
|
|
6
6
|
<div class="description-wrapper">
|
|
7
7
|
<%= include.('notices.html', notices: field[:notices]) %>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<% values.each do |value| %>
|
|
4
4
|
|
|
5
|
-
<h4 id="<%= slugify.(value[:name]) %>" class="name"><%= value[:name] %></h4>
|
|
5
|
+
<h4 id="<%= slugify.(value[:name]) %>" class="name anchored"><%= value[:name] %></h4>
|
|
6
6
|
|
|
7
7
|
<div class="description-wrapper">
|
|
8
8
|
<%= include.('notices.html', notices: value[:notices]) %>
|
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.3.
|
|
4
|
+
version: 1.3.2
|
|
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-03-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: graphql
|