graphql-docs 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/graphql-docs.gemspec +1 -1
- data/lib/graphql-docs/client.rb +2 -1
- data/lib/graphql-docs/configuration.rb +1 -0
- data/lib/graphql-docs/helpers.rb +2 -1
- data/lib/graphql-docs/layouts/includes/sidebar.html +6 -18
- data/lib/graphql-docs/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0fd963b6afd32780ffcd9f1a3dae77cd4d6697f
|
4
|
+
data.tar.gz: e41b12fda08e07d88e1eb24cdff91c0f70bca83c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e271aabf4871fc6f6d64f373c82fca51e24aba426f411aa702e91a434cf897ee3b82b049162365ac90fdd41681fc4892f7b3f4e98ee6a124798f96a700fe0c2
|
7
|
+
data.tar.gz: f85df4c97ce95419aff00d8d1653f83a334dcaac0fcc250254e7bf58d67a3f70de6a5d1df4dff767ec9e028f9f754bbb79ce6915a30c1f1b470b1957add3aea8
|
data/README.md
CHANGED
@@ -124,6 +124,7 @@ The following options are available:
|
|
124
124
|
| Option | Description | Default |
|
125
125
|
| :----- | :---------- | :------ |
|
126
126
|
| `access_token` | Uses this token while making requests through `GraphQLDocs::Client`. | `nil` |
|
127
|
+
| `headers` | Uses these headers while making requests through `GraphQLDocs::Client`. | `{}` |
|
127
128
|
| `login` | Uses this login while making requests through `GraphQLDocs::Client`. | `nil` |
|
128
129
|
| `password` | Uses this password while making requests through `GraphQLDocs::Client`. | `nil` |
|
129
130
|
| `path` | `GraphQLDocs::Client` loads a JSON file found at this location, representing the response from an introspection query. | `nil` |
|
data/graphql-docs.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
# rendering
|
27
27
|
spec.add_dependency 'html-pipeline', '~> 2.2'
|
28
|
-
spec.add_dependency '
|
28
|
+
spec.add_dependency 'commonmarker', '~> 0.16'
|
29
29
|
spec.add_dependency 'extended-markdown-filter', '~> 0.4'
|
30
30
|
spec.add_dependency 'gemoji', '2.1.0'
|
31
31
|
spec.add_dependency 'sass', '~> 3.4'
|
data/lib/graphql-docs/client.rb
CHANGED
@@ -20,7 +20,8 @@ module GraphQLDocs
|
|
20
20
|
@access_token = options[:access_token]
|
21
21
|
|
22
22
|
@url = options[:url]
|
23
|
-
@
|
23
|
+
@headers = options[:headers]
|
24
|
+
@faraday = Faraday.new(url: @url, headers: @headers)
|
24
25
|
|
25
26
|
if @login && @password
|
26
27
|
@faraday.basic_auth(@login, @password)
|
data/lib/graphql-docs/helpers.rb
CHANGED
@@ -28,24 +28,16 @@
|
|
28
28
|
<% graphql_object_types.().each do |type| %>
|
29
29
|
<% @name = type["name"] %>
|
30
30
|
<!-- skip connection stuff -->
|
31
|
-
<% if @name.end_with?("Connection") || @name.end_with?("Edge") %>
|
32
|
-
<% next %>
|
33
|
-
<% end %>
|
31
|
+
<% next if @name.end_with?("Connection") || @name.end_with?("Edge") %>
|
34
32
|
|
35
33
|
<!-- skip mutation stuff -->
|
36
|
-
<% if @name == "Mutation" || @name.end_with?("Payload") %>
|
37
|
-
<% next %>
|
38
|
-
<% end %>
|
34
|
+
<% next if @name == "Mutation" || @name.end_with?("Payload") %>
|
39
35
|
|
40
36
|
<!-- skip metadata stuff -->
|
41
|
-
<% if @name.start_with?("__") %>
|
42
|
-
<% next %>
|
43
|
-
<% end %>
|
37
|
+
<% next if @name.start_with?("__") %>
|
44
38
|
|
45
39
|
<!-- skip root query stuff -->
|
46
|
-
<% if @name == "Query" %>
|
47
|
-
<% next %>
|
48
|
-
<% end %>
|
40
|
+
<% next if @name == "Query" %>
|
49
41
|
|
50
42
|
<li>
|
51
43
|
<a href="<%= base_url %>/object/<%= @name.downcase %>/" class="sidebar-link<% if title == @name %> current<% end %>">
|
@@ -62,9 +54,7 @@
|
|
62
54
|
<% graphql_mutation_types.().each do |type| %>
|
63
55
|
<% @name = type["name"] %>
|
64
56
|
<!-- skip metadata stuff -->
|
65
|
-
<% if @name.start_with?("__") %>
|
66
|
-
<% next %>
|
67
|
-
<% end %>
|
57
|
+
<% next if @name.start_with?("__") %>
|
68
58
|
<li>
|
69
59
|
<a href="<%= base_url %>/mutation/<%= @name.downcase %>/" class="sidebar-link<% if title == @name %> current<% end %>">
|
70
60
|
<%= @name %>
|
@@ -94,9 +84,7 @@
|
|
94
84
|
<% graphql_enum_types.().each do |type| %>
|
95
85
|
<% @name = type["name"] %>
|
96
86
|
<!-- skip metadata stuff -->
|
97
|
-
<% if @name.start_with?("__") %>
|
98
|
-
<% next %>
|
99
|
-
<% end %>
|
87
|
+
<% next if @name.start_with?("__") %>
|
100
88
|
<li>
|
101
89
|
<a href="<%= base_url %>/enum/<%= @name.downcase %>/" class="sidebar-link<% if title == @name %> current<% end %>">
|
102
90
|
<%= @name %>
|
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: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -53,19 +53,19 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: commonmarker
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: '0.16'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: '0.16'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: extended-markdown-filter
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|