graphql-docs 3.0.1 → 5.0.0

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
2
  SHA256:
3
- metadata.gz: 99086c3e1811e349aa9ea5cec00715e8d4809ed3645a7b4ca6867a945958ad9b
4
- data.tar.gz: e46166af01f325dd73dd6f328c070c8d23437fc6e4e8734b22d4607462b9eea6
3
+ metadata.gz: cbf28a678c378ebc2d54f6e5b7b24a05bd3eb577f144b9042fe11c4e7f34bd13
4
+ data.tar.gz: 993ad8805892c0544128baabec9dfd4f5bfb1cf16fccbe5cc43c3373036fcbbd
5
5
  SHA512:
6
- metadata.gz: c464e56c73fc3ffdd31a89a1793e3c3fdb3014766f05d6ea4d95bcf158302a0a506b2278fd36f4994660b92f38dd8769cc1901c343ddda5bddb41714a593ad56
7
- data.tar.gz: 3ca5e79abb61fa954695ea37c4368bbcfcf43ca5a3269bd800ea3595abcbde686a4006978393d192a9d862a9dfd72a25e320a818433c77fdfcbb04483d0d21ac
6
+ metadata.gz: 94e80febfa9d2c367182afd21b6a0d3e1206ec3d076a6b774ecfb96308648e4e582e818d1ac4f0b0734aaad514e46edac8a50f9ecb6baddf1370790e5eee7f38
7
+ data.tar.gz: 549077a6761dd67e983ab2c6bb402d5d67cfecafde214ddc57a7580439012eeb6a68ae6f0ff2091076d56eb64449aae9c055d87dc6e8a9da3fec081f51806d76
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Do x
16
+ 2. Do y
17
+
18
+ **Expected behavior**
19
+ A clear and concise description of what you expected to happen.
20
+
21
+ **Screenshots**
22
+ If applicable, add screenshots to help explain your problem.
23
+
24
+ **Additional context**
25
+ Add any other context about the problem here.
26
+
27
+ Examples:
28
+
29
+ - Source code
30
+ - Version of gem being used
31
+ - Ruby version
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -1,6 +1,6 @@
1
1
  name: Ruby
2
2
 
3
- on: [push,pull_request]
3
+ on: [push, pull_request]
4
4
 
5
5
  jobs:
6
6
  test:
@@ -8,14 +8,14 @@ jobs:
8
8
 
9
9
  strategy:
10
10
  matrix:
11
- ruby-version: [3.1.2, 3.0.4, 2.7.6, 2.6.10, 2.5.9]
11
+ ruby-version: [3.3, 3.2, 3.1]
12
12
 
13
13
  steps:
14
- - uses: actions/checkout@v2
15
- - name: Set up Ruby ${{ matrix.ruby-version }}
16
- uses: ruby/setup-ruby@v1
17
- with:
18
- ruby-version: ${{ matrix.ruby-version }}
19
- bundler-cache: true
20
- - name: Run the test suite
21
- run: bundle exec rake
14
+ - uses: actions/checkout@v2
15
+ - name: Set up Ruby ${{ matrix.ruby-version }}
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby-version }}
19
+ bundler-cache: true
20
+ - name: Run the test suite
21
+ run: bundle exec rake
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  /.sass-cache/
13
13
  /output/
14
14
  .byebug_history
15
+ *.gem
data/.rubocop.yml CHANGED
@@ -1,6 +1,4 @@
1
- inherit_gem:
2
- rubocop-standard:
3
- - config/default.yml
1
+ require: rubocop-performance
4
2
 
5
3
  Style/StringLiterals:
6
4
  Enabled: true
data/CHANGELOG.md CHANGED
@@ -2,11 +2,33 @@
2
2
 
3
3
  A concise overview of the public-facing changes to the gem from version to version. Does not include internal changes to the dev experience for the gem.
4
4
 
5
- ## v3.0.1
5
+ ## Unreleased
6
+
7
+ ## v5.0.0 - 2024-07-03
8
+
9
+ - **breaking**: The graphql gem 2.2.0+ breaks some of the parsing and displaying of comments from a GraphQL schema file
10
+ - **breaking**: Ruby 2.6, 2.7, 3.0 are no longer supported as they are End of Life (EOL)
11
+ - feat: CLI version flag: `graphql-docs --version` / `graphql-docs -v`
12
+ - fix: CLI now works outside of a Bundler project
13
+ - fix: test suite
14
+ - chore: switch to sess-embedded gem for more maintained dependency
15
+
16
+ ## v4.0.0 - 2023-01-26
17
+
18
+ - **Breaking change**: drop support for Ruby 2.5 and earlier
19
+ - CLI with limited options, e.g. `graphql-docs schema.graphql`
20
+ - Dart Sass replaces Ruby Sass because Ruby Sass is deprecated
21
+ - Fixes:
22
+ - Upgrade commonmarker to latest ver to address security vulnerabilities
23
+ - commonmarker pinned to version without security vulnerability
24
+ - Chores:
25
+ - Dev env refresh
26
+
27
+ ## v3.0.1 - 2022-10-14
6
28
 
7
29
  - fix: Relieves `EscapeUtils.escape_html is deprecated. Use GCI.escapeHTML instead, it's faster` deprecation warning until it gets released in an downstream dependency
8
30
  - meta: Maintainership change from [gjtorikian](https://github.com/gjtorikian) to [brettchalupa](https://github.com/brettchalupa)
9
31
 
10
- ## v3.0.0
32
+ ## v3.0.0 - 2022-03-23
11
33
 
12
34
  - Upgrades `graphql` gem to the 2.x series
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at brettchalupa@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,18 @@
1
+ # Contribuing Guide
2
+
3
+ Contributions to this project are welcome. If you have an idea for a bigger change, [open an issue first](https://github.com/brettchalupa/graphql-docs/issues/new/choose) and we can discuss it.
4
+
5
+ For fixes and small additions, follow the steps below to get developing and contributing:
6
+
7
+ 1. Fork & clone the repository in GitHub
8
+ 2. Run the `bin/setup` script to install development dependencies
9
+ 3. Work on a branch
10
+ 4. Make changes
11
+ 5. Ensure tests pass by running `bin/rake`
12
+ 6. Commit your changes, this project follows [the Conventional Commits spec](https://www.conventionalcommits.org/en/v1.0.0/)
13
+ 7. Open up a pull request
14
+
15
+ ## Finding Issues
16
+
17
+ - Good First Issue — If you're new to the project or Ruby, check out the ["good first issue" tag](https://github.com/brettchalupa/graphql-docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). They're smaller, approachable issues if you're just getting started.
18
+ - Web — tasks that don't require much Ruby knowledge but require HTML and CSS have the ["web" tag](https://github.com/brettchalupa/graphql-docs/issues?q=is%3Aopen+is%3Aissue+label%3A%22web%22+)
data/README.md CHANGED
@@ -1,28 +1,28 @@
1
1
  # GraphQLDocs
2
2
 
3
- Easily generate beautiful documentation from your GraphQL schema.
3
+ Ruby library and CLI for easily generating beautiful documentation from your GraphQL schema.
4
4
 
5
5
  ![sample](https://cloud.githubusercontent.com/assets/64050/23438604/6a23add0-fdc7-11e6-8852-ef41e8451033.png)
6
6
 
7
7
  ## Installation
8
8
 
9
- Add this line to your application's Gemfile:
9
+ Add the gem to your project with this command:
10
10
 
11
- ```ruby
12
- gem 'graphql-docs'
11
+ ```console
12
+ bundle add graphql-docs
13
13
  ```
14
14
 
15
- And then execute:
16
-
17
- $ bundle
18
-
19
15
  Or install it yourself as:
20
16
 
21
- $ gem install graphql-docs
17
+ ```console
18
+ gem install graphql-docs
19
+ ```
22
20
 
23
21
  ## Usage
24
22
 
25
- ``` ruby
23
+ GraphQLDocs can be used as a Ruby library to build the documentation website. Using it as a Ruby library allows for more control and using every supported option. Here's an example:
24
+
25
+ ```ruby
26
26
  # pass in a filename
27
27
  GraphQLDocs.build(filename: filename)
28
28
 
@@ -36,18 +36,32 @@ end
36
36
  GraphQLDocs.build(schema: schema)
37
37
  ```
38
38
 
39
+ GraphQLDocs also has a simplified CLI (`graphql-docs`) that gets installed with the gem:
40
+
41
+ ```console
42
+ graphql-docs schema.graphql
43
+ ```
44
+
45
+ That will generate the output in the `output` dir.
46
+
47
+ See all of the supported CLI options with:
48
+
49
+ ```console
50
+ graphql-docs -h
51
+ ```
52
+
39
53
  ## Breakdown
40
54
 
41
55
  There are several phases going on the single `GraphQLDocs.build` call:
42
56
 
43
- * The GraphQL IDL file is read (if you passed `filename`) through `GraphQL::Client` (or simply read if you passed a string through `schema`).
44
- * `GraphQL::Parser` manipulates the IDL into a slightly saner format.
45
- * `GraphQL::Generator` takes that saner format and begins the process of applying items to the HTML templates.
46
- * `GraphQL::Renderer` technically runs as part of the generation phase. It passes the contents of each page and converts it into HTML.
57
+ - The GraphQL IDL file is read (if you passed `filename`) through `GraphQL::Client` (or simply read if you passed a string through `schema`).
58
+ - `GraphQL::Parser` manipulates the IDL into a slightly saner format.
59
+ - `GraphQL::Generator` takes that saner format and begins the process of applying items to the HTML templates.
60
+ - `GraphQL::Renderer` technically runs as part of the generation phase. It passes the contents of each page and converts it into HTML.
47
61
 
48
62
  If you wanted to, you could break these calls up individually. For example:
49
63
 
50
- ``` ruby
64
+ ```ruby
51
65
  options = {}
52
66
  options[:filename] = "#{File.dirname(__FILE__)}/../data/graphql/schema.idl"
53
67
  options[:renderer] = MySuperCoolRenderer
@@ -66,14 +80,14 @@ generator.generate
66
80
 
67
81
  ## Generating output
68
82
 
69
- By default, the HTML generation process uses ERB to layout the content. There are a bunch of default options provided for you, but feel free to override any of these. The *Configuration* section below has more information on what you can change.
83
+ By default, the HTML generation process uses ERB to layout the content. There are a bunch of default options provided for you, but feel free to override any of these. The _Configuration_ section below has more information on what you can change.
70
84
 
71
85
  It also uses [html-pipeline](https://github.com/jch/html-pipeline) to perform the rendering by default. You can override this by providing a custom rendering class.You must implement two methods:
72
86
 
73
- * `initialize` - Takes two arguments, the parsed `schema` and the configuration `options`.
74
- * `render` Takes the contents of a template page. It also takes two optional kwargs, the GraphQL `type` and its `name`. For example:
87
+ - `initialize` - Takes two arguments, the parsed `schema` and the configuration `options`.
88
+ - `render` Takes the contents of a template page. It also takes two optional kwargs, the GraphQL `type` and its `name`. For example:
75
89
 
76
- ``` ruby
90
+ ```ruby
77
91
  class CustomRenderer
78
92
  def initialize(parsed_schema, options)
79
93
  @parsed_schema = parsed_schema
@@ -106,10 +120,10 @@ If you want to add additional variables for your landing pages, you can add defi
106
120
 
107
121
  In your ERB layouts, there are several helper methods you can use. The helper methods are:
108
122
 
109
- * `slugify(str)` - This slugifies the given string.
110
- * `include(filename, opts)` - This embeds a template from your `includes` folder, passing along the local options provided.
111
- * `markdownify(string)` - This converts a string into HTML via CommonMarker.
112
- * `graphql_operation_types`, `graphql_mutation_types`, `graphql_object_types`, `graphql_interface_types`, `graphql_enum_types`, `graphql_union_types`, `graphql_input_object_types`, `graphql_scalar_types`, `graphql_directive_types` - Collections of the various GraphQL types.
123
+ - `slugify(str)` - This slugifies the given string.
124
+ - `include(filename, opts)` - This embeds a template from your `includes` folder, passing along the local options provided.
125
+ - `markdownify(string)` - This converts a string into HTML via CommonMarker.
126
+ - `graphql_operation_types`, `graphql_mutation_types`, `graphql_object_types`, `graphql_interface_types`, `graphql_enum_types`, `graphql_union_types`, `graphql_input_object_types`, `graphql_scalar_types`, `graphql_directive_types` - Collections of the various GraphQL types.
113
127
 
114
128
  To call these methods within templates, you must use the dot notation, such as `<%= slugify.(text) %>`.
115
129
 
@@ -117,20 +131,20 @@ To call these methods within templates, you must use the dot notation, such as `
117
131
 
118
132
  The following options are available:
119
133
 
120
- | Option | Description | Default |
121
- | :----- | :---------- | :------ |
122
- | `filename` | The location of your schema's IDL file. | `nil` |
123
- | `schema` | A string representing a schema IDL file. | `nil` |
124
- | `output_dir` | The location of the output HTML. | `./output/` |
125
- | `use_default_styles` | Indicates if you want to use the default styles. | `true` |
126
- | `base_url` | Indicates the base URL to prepend for assets and links. | `""` |
127
- | `delete_output` | Deletes `output_dir` before generating content. | `false` |
128
- | `pipeline_config` | Defines two sub-keys, `pipeline` and `context`, which are used by `html-pipeline` when rendering your output. | `pipeline` has `ExtendedMarkdownFilter`, `EmojiFilter`, and `TableOfContentsFilter`. `context` has `gfm: false` and `asset_root` set to GitHub's CDN. |
129
- | `renderer` | The rendering class to use. | `GraphQLDocs::Renderer`
130
- | `templates` | The templates to use when generating HTML. You may override any of the following keys: `default`, `includes`, `operations`, `objects`, `mutations`, `interfaces`, `enums`, `unions`, `input_objects`, `scalars`, `directives`. | The defaults are found in _lib/graphql-docs/layouts/_.
131
- | `landing_pages` | The landing page to use when generating HTML for each type. You may override any of the following keys: `index`, `query`, `object`, `mutation`, `interface`, `enum`, `union`, `input_object`, `scalar`, `directive`. | The defaults are found in _lib/graphql-docs/landing\_pages/_.
132
- | `classes` | Additional class names you can provide to certain elements. | The full list is available in _lib/graphql-docs/configuration.rb_.
133
- | `notices` | A proc used to add notices to schema members. See *Customizing Notices* section below. | `nil` |
134
+ | Option | Description | Default |
135
+ | :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
136
+ | `filename` | The location of your schema's IDL file. | `nil` |
137
+ | `schema` | A string representing a schema IDL file. | `nil` |
138
+ | `output_dir` | The location of the output HTML. | `./output/` |
139
+ | `use_default_styles` | Indicates if you want to use the default styles. | `true` |
140
+ | `base_url` | Indicates the base URL to prepend for assets and links. | `""` |
141
+ | `delete_output` | Deletes `output_dir` before generating content. | `false` |
142
+ | `pipeline_config` | Defines two sub-keys, `pipeline` and `context`, which are used by `html-pipeline` when rendering your output. | `pipeline` has `ExtendedMarkdownFilter`, `EmojiFilter`, and `TableOfContentsFilter`. `context` has `gfm: false` and `asset_root` set to GitHub's CDN. |
143
+ | `renderer` | The rendering class to use. | `GraphQLDocs::Renderer` |
144
+ | `templates` | The templates to use when generating HTML. You may override any of the following keys: `default`, `includes`, `operations`, `objects`, `mutations`, `interfaces`, `enums`, `unions`, `input_objects`, `scalars`, `directives`. | The defaults are found in _lib/graphql-docs/layouts/_. |
145
+ | `landing_pages` | The landing page to use when generating HTML for each type. You may override any of the following keys: `index`, `query`, `object`, `mutation`, `interface`, `enum`, `union`, `input_object`, `scalar`, `directive`. | The defaults are found in _lib/graphql-docs/landing_pages/_. |
146
+ | `classes` | Additional class names you can provide to certain elements. | The full list is available in _lib/graphql-docs/configuration.rb_. |
147
+ | `notices` | A proc used to add notices to schema members. See _Customizing Notices_ section below. | `nil` |
134
148
 
135
149
  ### Customizing Notices
136
150
 
@@ -143,11 +157,11 @@ The proc will be called for each schema member and needs to return an array of n
143
157
 
144
158
  A `notice` has the following options:
145
159
 
146
- | Option | Description |
147
- | :----- | :---------- |
148
- | `body` | CommonMark body of the notice |
149
- | `title` | Optional title of the notice |
150
- | `class` | Optional CSS class for the wrapper `<div>` of the notice |
160
+ | Option | Description |
161
+ | :------------ | :-------------------------------------------------------- |
162
+ | `body` | CommonMark body of the notice |
163
+ | `title` | Optional title of the notice |
164
+ | `class` | Optional CSS class for the wrapper `<div>` of the notice |
151
165
  | `title_class` | Optional CSS class for the `<span>` of the notice's title |
152
166
 
153
167
  Example of a `notices` proc that adds a notice to the `TeamDiscussion` type:
@@ -181,19 +195,48 @@ The format of `schema_member_path` is a dot delimited path to the schema member.
181
195
  "Mutation.addLike" # a mutation
182
196
  ```
183
197
 
198
+ ## Supported Ruby Versions
199
+
200
+ The gem officially supports **Ruby 3.1 and newer**.
201
+
202
+ Any dropping of Ruby version support is considered a breaking change and means a major release for the gem.
203
+
204
+ ## Upgrading
205
+
206
+ This project aims to strictly follow [Semantic Versioning](https://semver.org/).
207
+ Minor and patch level updates can be done with pretty high confidence that your usage won't break.
208
+
209
+ Review the
210
+ [Changelog](https://github.com/brettchalupa/graphql-docs/blob/main/CHANGELOG.md)
211
+ for detailed changes for each release. The intent is to make upgrading as
212
+ painless as possible.
213
+
214
+ ## Roadmap
215
+
216
+ Upcoming work for the project is organized publicly via [GitHub
217
+ Projects](https://github.com/users/brettchalupa/projects/7/views/1).
218
+
184
219
  ## Development
185
220
 
186
- After checking out the repo, run `script/bootstrap` to install dependencies. Then, run `rake test` to run the tests. You can also run `bundle exec rake console` for an interactive prompt that will allow you to experiment.
221
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
222
+ `bin/rake test` to run the tests. You can also run `bin/console` for
223
+ an interactive prompt that will allow you to experiment.
187
224
 
188
- ## Sample site
225
+ ## Sample Site
189
226
 
190
227
  Clone this repository and run:
191
228
 
192
229
  ```
193
- bundle exec rake sample
230
+ bin/rake sample:generate
194
231
  ```
195
232
 
196
- to see some sample output.
233
+ to see some sample output in the `output` dir.
234
+
235
+ Boot up a server to view it:
236
+
237
+ ```
238
+ bin/rake sample:serve
239
+ ```
197
240
 
198
241
  ## Credits
199
242
 
data/Rakefile CHANGED
@@ -28,7 +28,6 @@ end
28
28
 
29
29
  desc 'Set up a console'
30
30
  task :console do
31
- require 'pry'
32
31
  require 'graphql-docs'
33
32
 
34
33
  def reload!
@@ -36,33 +35,36 @@ task :console do
36
35
  files.each { |file| load file }
37
36
  end
38
37
 
38
+ require 'irb'
39
39
  ARGV.clear
40
- Pry.start
40
+ IRB.start
41
41
  end
42
42
 
43
- desc 'Generate the documentation'
44
- task :generate_sample do
45
- require 'pry'
46
- require 'graphql-docs'
47
-
48
- options = {}
49
- options[:delete_output] = true
50
- options[:base_url] = ENV.fetch('GQL_DOCS_BASE_URL', '')
51
- options[:filename] = File.join(File.dirname(__FILE__), 'test', 'graphql-docs', 'fixtures', 'gh-schema.graphql')
52
-
53
- GraphQLDocs.build(options)
54
- end
43
+ namespace :sample do
44
+ desc 'Generate the sample documentation'
45
+ task :generate do
46
+ require 'graphql-docs'
55
47
 
56
- desc 'Generate the documentation and run a web server'
57
- task sample: [:generate_sample] do
58
- require 'webrick'
48
+ options = {}
49
+ options[:delete_output] = true
50
+ options[:base_url] = ENV.fetch('GQL_DOCS_BASE_URL', '')
51
+ options[:filename] = File.join(File.dirname(__FILE__), 'test', 'graphql-docs', 'fixtures', 'gh-schema.graphql')
59
52
 
60
- puts 'Navigate to http://localhost:3000 to see the sample docs'
53
+ puts "Generating sample docs"
54
+ GraphQLDocs.build(options)
55
+ end
61
56
 
62
- server = WEBrick::HTTPServer.new Port: 3000
63
- server.mount '/', WEBrick::HTTPServlet::FileHandler, 'output'
64
- trap('INT') { server.stop }
65
- server.start
57
+ desc 'Generate the documentation and run a web server'
58
+ task serve: [:generate] do
59
+ require 'webrick'
60
+ PORT = "5050"
61
+ puts "Navigate to http://localhost:#{PORT} to view the sample docs"
62
+ server = WEBrick::HTTPServer.new Port: PORT
63
+ server.mount '/', WEBrick::HTTPServlet::FileHandler, 'output'
64
+ trap('INT') { server.stop }
65
+ server.start
66
+ end
67
+ task server: :serve
66
68
  end
67
69
 
68
70
  desc 'Generate and publish docs to gh-pages'
@@ -2,10 +2,8 @@
2
2
 
3
3
  set -e
4
4
 
5
- dir=`pwd`
6
-
7
5
  echo "===> Bundling..."
8
- script/bootstrap --quiet
6
+ bin/setup --quiet
9
7
 
10
8
  echo "===> Launching..."
11
- bundle exec rake console
9
+ bin/rake console
data/bin/rake ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rake' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
+
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require "rubygems"
25
+ require "bundler/setup"
26
+
27
+ load Gem.bin_path("rake", "rake")
data/bin/setup ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install "$@"
data/exe/graphql-docs ADDED
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "graphql-docs"
4
+ require "optparse"
5
+
6
+ NAME = "graphql-docs".freeze
7
+
8
+ opts = {}
9
+ OptionParser.new do |parser|
10
+ parser.program_name = NAME
11
+ parser.banner = <<~EOS
12
+
13
+ Generate GraphQL docs from the passed in schema file.
14
+
15
+ Usage: graphql-docs SCHEMA
16
+
17
+ The only required argument is the path to the schema file to generate the site from.
18
+
19
+ Examples:
20
+ $ graphql-docs schema.graphql
21
+ $ graphql-docs schema.graphql -o _docs
22
+
23
+ Options:
24
+ EOS
25
+
26
+ parser.version = GraphQLDocs::VERSION
27
+
28
+ parser.on("-o", "--output-dir DIR", "Where the site is generated to, defaults to ./output")
29
+ parser.on("-d", "--delete-output", "Delete the output-dir before generating, defaults to false")
30
+ parser.on("-b", "--base-url URL", "URL to preprend for assets and links, defaults to \"\"")
31
+ parser.on("-v", "--version", "Show the version")
32
+ parser.on("--verbose", "Run in verbose mode")
33
+ end.parse!(into: opts)
34
+
35
+ if opts[:version]
36
+ puts("v#{GraphQLDocs::VERSION}")
37
+ exit
38
+ end
39
+
40
+ def err(msg)
41
+ abort("#{NAME}: Error: #{msg}")
42
+ end
43
+
44
+ schema = ARGV[0]
45
+ if schema.nil?
46
+ err("schema must be specified")
47
+ end
48
+ opts[:filename] = schema
49
+
50
+ verbose = opts.delete(:verbose)
51
+
52
+ puts("Generating site with the following options: #{opts}") if verbose
53
+
54
+ opts.transform_keys! { |k| k.to_s.gsub("-", "_").to_sym }
55
+ GraphQLDocs.build(opts)
56
+
57
+ puts("Site successfully generated in: #{opts[:output_dir] || 'output' }") if verbose
data/graphql-docs.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
 
13
13
  spec.summary = 'Easily generate beautiful documentation from your GraphQL schema.'
14
14
  spec.description = <<-EOF
15
- GraphQLDocs is a library for generating HTML from a GraphQL API's schema
15
+ Library and CLI for generating a website from a GraphQL API's schema
16
16
  definition. With ERB templating support and a plethora of configuration
17
17
  options, you can customize the output to your needs. The library easily
18
18
  integrates with your Ruby deployment toolchain to ensure the docs for your
@@ -29,29 +29,28 @@ Gem::Specification.new do |spec|
29
29
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
30
30
  f.match(%r{^(test|spec|features)/})
31
31
  end
32
- spec.bindir = 'bin'
33
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
32
+ spec.bindir = 'exe'
33
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
34
34
  spec.require_paths = ['lib']
35
35
 
36
+ spec.required_ruby_version = '>= 3.1'
37
+
36
38
  spec.add_dependency 'graphql', '~> 2.0'
37
39
 
38
40
  # rendering
39
- spec.add_dependency 'commonmarker', '~> 0.16'
40
- spec.add_dependency 'escape_utils', '~> 1.2.2'
41
+ spec.add_dependency 'commonmarker', '>= 0.23.6', '~> 0.23'
42
+ spec.add_dependency 'escape_utils', '~> 1.2'
41
43
  spec.add_dependency 'extended-markdown-filter', '~> 0.4'
42
44
  spec.add_dependency 'gemoji', '~> 3.0'
43
- spec.add_dependency 'html-pipeline', '~> 2.9'
44
- spec.add_dependency 'sass', '~> 3.4'
45
+ spec.add_dependency 'html-pipeline', '>= 2.14.3', '~> 2.14'
46
+ spec.add_dependency 'sass-embedded', '~> 1.58'
45
47
 
46
- spec.add_development_dependency 'awesome_print'
47
48
  spec.add_development_dependency 'html-proofer', '~> 3.4'
48
49
  spec.add_development_dependency 'minitest', '~> 5.0'
49
50
  spec.add_development_dependency 'minitest-focus', '~> 1.1'
50
- spec.add_development_dependency 'pry-byebug', '~> 3.6'
51
- spec.add_development_dependency 'rake'
52
- spec.add_development_dependency 'rubocop'
53
- spec.add_development_dependency 'rubocop-performance'
54
- spec.add_development_dependency 'rubocop-standard'
51
+ spec.add_development_dependency 'rake', '~> 13.0'
52
+ spec.add_development_dependency 'rubocop', '~> 1.37'
53
+ spec.add_development_dependency 'rubocop-performance', '~> 1.15'
55
54
  spec.add_development_dependency 'webmock', '~> 2.3'
56
55
  spec.add_development_dependency 'webrick', '~> 1.7'
57
56
  end
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'erb'
4
- require 'sass'
4
+ require 'fileutils'
5
+ require 'sass-embedded'
6
+ require 'ostruct'
5
7
 
6
8
  module GraphQLDocs
7
9
  class Generator
@@ -84,8 +86,8 @@ module GraphQLDocs
84
86
  assets_dir = File.join(File.dirname(__FILE__), 'layouts', 'assets')
85
87
  FileUtils.mkdir_p(File.join(@options[:output_dir], 'assets'))
86
88
 
87
- sass = File.join(assets_dir, 'css', 'screen.scss')
88
- system `sass --sourcemap=none #{sass}:#{@options[:output_dir]}/assets/style.css`
89
+ css = Sass.compile(File.join(assets_dir, 'css', 'screen.scss')).css
90
+ File.write(File.join(@options[:output_dir], 'assets', 'style.css'), css)
89
91
 
90
92
  FileUtils.cp_r(File.join(assets_dir, 'images'), File.join(@options[:output_dir], 'assets'))
91
93
  FileUtils.cp_r(File.join(assets_dir, 'webfonts'), File.join(@options[:output_dir], 'assets'))
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'commonmarker'
4
+ require 'ostruct'
4
5
 
5
6
  module GraphQLDocs
6
7
  module Helpers
@@ -6,4 +6,4 @@ title: Enums
6
6
 
7
7
  Enums represent a possible set of values for a field. For example, the `Issue` object has a field called `state`. The state of an issue may be `OPEN` or `CLOSED`.
8
8
 
9
- For more information, see [the GraphQL spec](https://facebook.github.io/graphql/#sec-Enums).
9
+ For more information, see [the GraphQL spec](http://spec.graphql.org/draft/#sec-Enums).
@@ -6,4 +6,4 @@ title: Input Objects
6
6
 
7
7
  Input objects are best described as "composable objects" in that they contain a set of input fields that define a particular object. For example, the `AuthorInput` takes a field called `emails`. Providing a value for `emails` will transform the `AuthorInput` into a list of `User` objects which contain that email address/
8
8
 
9
- For more information, see [the GraphQL spec](https://facebook.github.io/graphql/#sec-Input-Objects).
9
+ For more information, see [the GraphQL spec](http://spec.graphql.org/draft/#sec-Input-Objects).
@@ -6,4 +6,4 @@ title: Interfaces
6
6
 
7
7
  GraphQL Interfaces are a sort of "parent object" from which other objects can "inherit" from. For example, `Stars` is considered an interface, because both `Repository` and `Gist` can be starred. An interface has its own list of named fields that are shared by implementing objects.
8
8
 
9
- For more information, see [the GraphQL spec](https://facebook.github.io/graphql/#sec-Interfaces).
9
+ For more information, see [the GraphQL spec](http://spec.graphql.org/draft/#sec-Interfaces).
@@ -8,4 +8,4 @@ Every GraphQL schema has a root type for both queries and mutations.
8
8
 
9
9
  The mutation type defines how GraphQL operations change data. It is analogous to performing HTTP verbs such as `POST`, `PATCH`, and `DELETE`.
10
10
 
11
- For more information, see [the GraphQL spec](https://facebook.github.io/graphql/#sec-Type-System).
11
+ For more information, see [the GraphQL spec](http://spec.graphql.org/draft/#sec-Type-System).
@@ -5,4 +5,4 @@ title: Objects
5
5
 
6
6
  Objects in GraphQL represent the resources that you can access. Objects can contain a list of fields, which are specifically typed. For example, the `Repository` object has a field called `name`, which is a `String`.
7
7
 
8
- For more information, see [the GraphQL spec](https://facebook.github.io/graphql/#sec-Objects).
8
+ For more information, see [the GraphQL spec](http://spec.graphql.org/draft/#sec-Objects).
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  title: Queries
3
3
  ---
4
- Every GraphQL schema has a root type for both queries and mutations. The [query type](https://facebook.github.io/graphql/#sec-Type-System) defines GraphQL operations that retrieve data from the server.
4
+ Every GraphQL schema has a root type for both queries and mutations. The [query type](http://spec.graphql.org/draft/#sec-Type-System) defines GraphQL operations that retrieve data from the server.
@@ -6,4 +6,4 @@ title: Scalars
6
6
 
7
7
  Scalars are primitive values such as `Int` or `String`.
8
8
 
9
- For more information, see [the GraphQL spec](https://facebook.github.io/graphql/#sec-Scalars).
9
+ For more information, see [the GraphQL spec](http://spec.graphql.org/draft/#sec-Scalars).
@@ -6,4 +6,4 @@ title: Unions
6
6
 
7
7
  A union is a type of object that can represent one of many kinds of objects. For example, a field marked as a `ReactableUnion` could be a `CommitComment`, an `Issue`, an `IssueComment`, or a `PullRequestReviewComment`, because each of those objects can be reacted on.
8
8
 
9
- For more information, see [the GraphQL spec](https://facebook.github.io/graphql/#sec-Unions).
9
+ For more information, see [the GraphQL spec](http://spec.graphql.org/draft/#sec-Unions).
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="description" content="<%= name %> GraphQL documentation">
6
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
7
  <title><%= title || name %></title>
8
8
  <link rel="stylesheet" href="<%= base_url %>/assets/style.css">
9
9
  <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.2.2/anchor.min.js"></script>
@@ -177,6 +177,10 @@ module GraphQLDocs
177
177
  h[:description] = arg.description
178
178
  h[:type] = generate_type(arg.type)
179
179
  h[:default_value] = arg.default_value if arg.default_value?
180
+ if arg.respond_to?(:deprecation_reason) && arg.deprecation_reason
181
+ h[:is_deprecated] = true
182
+ h[:deprecation_reason] = arg.deprecation_reason
183
+ end
180
184
  hash[:arguments] << h
181
185
  end
182
186
  end
@@ -3,6 +3,7 @@
3
3
  require 'html/pipeline'
4
4
  require 'yaml'
5
5
  require 'extended-markdown-filter'
6
+ require 'ostruct'
6
7
 
7
8
  module GraphQLDocs
8
9
  class Renderer
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GraphQLDocs
4
- VERSION = '3.0.1'
4
+ VERSION = '5.0.0'
5
5
  end
data/lib/graphql-docs.rb CHANGED
@@ -7,10 +7,6 @@ require 'graphql-docs/generator'
7
7
  require 'graphql-docs/parser'
8
8
  require 'graphql-docs/version'
9
9
 
10
- begin
11
- require 'awesome_print'
12
- require 'pry'
13
- rescue LoadError; end # rubocop:disable Lint/SuppressedException
14
10
  module GraphQLDocs
15
11
  class << self
16
12
  def build(options)
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Chalupa
8
8
  - Garen Torikian
9
9
  autorequire:
10
- bindir: bin
10
+ bindir: exe
11
11
  cert_chain: []
12
- date: 2022-10-14 00:00:00.000000000 Z
12
+ date: 2024-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql
@@ -29,30 +29,36 @@ dependencies:
29
29
  name: commonmarker
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: 0.23.6
32
35
  - - "~>"
33
36
  - !ruby/object:Gem::Version
34
- version: '0.16'
37
+ version: '0.23'
35
38
  type: :runtime
36
39
  prerelease: false
37
40
  version_requirements: !ruby/object:Gem::Requirement
38
41
  requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 0.23.6
39
45
  - - "~>"
40
46
  - !ruby/object:Gem::Version
41
- version: '0.16'
47
+ version: '0.23'
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: escape_utils
44
50
  requirement: !ruby/object:Gem::Requirement
45
51
  requirements:
46
52
  - - "~>"
47
53
  - !ruby/object:Gem::Version
48
- version: 1.2.2
54
+ version: '1.2'
49
55
  type: :runtime
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
52
58
  requirements:
53
59
  - - "~>"
54
60
  - !ruby/object:Gem::Version
55
- version: 1.2.2
61
+ version: '1.2'
56
62
  - !ruby/object:Gem::Dependency
57
63
  name: extended-markdown-filter
58
64
  requirement: !ruby/object:Gem::Requirement
@@ -85,44 +91,36 @@ dependencies:
85
91
  name: html-pipeline
86
92
  requirement: !ruby/object:Gem::Requirement
87
93
  requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 2.14.3
88
97
  - - "~>"
89
98
  - !ruby/object:Gem::Version
90
- version: '2.9'
99
+ version: '2.14'
91
100
  type: :runtime
92
101
  prerelease: false
93
102
  version_requirements: !ruby/object:Gem::Requirement
94
103
  requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: 2.14.3
95
107
  - - "~>"
96
108
  - !ruby/object:Gem::Version
97
- version: '2.9'
109
+ version: '2.14'
98
110
  - !ruby/object:Gem::Dependency
99
- name: sass
111
+ name: sass-embedded
100
112
  requirement: !ruby/object:Gem::Requirement
101
113
  requirements:
102
114
  - - "~>"
103
115
  - !ruby/object:Gem::Version
104
- version: '3.4'
116
+ version: '1.58'
105
117
  type: :runtime
106
118
  prerelease: false
107
119
  version_requirements: !ruby/object:Gem::Requirement
108
120
  requirements:
109
121
  - - "~>"
110
122
  - !ruby/object:Gem::Version
111
- version: '3.4'
112
- - !ruby/object:Gem::Dependency
113
- name: awesome_print
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - ">="
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- version: '0'
123
+ version: '1.58'
126
124
  - !ruby/object:Gem::Dependency
127
125
  name: html-proofer
128
126
  requirement: !ruby/object:Gem::Requirement
@@ -166,75 +164,47 @@ dependencies:
166
164
  - !ruby/object:Gem::Version
167
165
  version: '1.1'
168
166
  - !ruby/object:Gem::Dependency
169
- name: pry-byebug
167
+ name: rake
170
168
  requirement: !ruby/object:Gem::Requirement
171
169
  requirements:
172
170
  - - "~>"
173
171
  - !ruby/object:Gem::Version
174
- version: '3.6'
172
+ version: '13.0'
175
173
  type: :development
176
174
  prerelease: false
177
175
  version_requirements: !ruby/object:Gem::Requirement
178
176
  requirements:
179
177
  - - "~>"
180
178
  - !ruby/object:Gem::Version
181
- version: '3.6'
182
- - !ruby/object:Gem::Dependency
183
- name: rake
184
- requirement: !ruby/object:Gem::Requirement
185
- requirements:
186
- - - ">="
187
- - !ruby/object:Gem::Version
188
- version: '0'
189
- type: :development
190
- prerelease: false
191
- version_requirements: !ruby/object:Gem::Requirement
192
- requirements:
193
- - - ">="
194
- - !ruby/object:Gem::Version
195
- version: '0'
179
+ version: '13.0'
196
180
  - !ruby/object:Gem::Dependency
197
181
  name: rubocop
198
182
  requirement: !ruby/object:Gem::Requirement
199
183
  requirements:
200
- - - ">="
184
+ - - "~>"
201
185
  - !ruby/object:Gem::Version
202
- version: '0'
186
+ version: '1.37'
203
187
  type: :development
204
188
  prerelease: false
205
189
  version_requirements: !ruby/object:Gem::Requirement
206
190
  requirements:
207
- - - ">="
191
+ - - "~>"
208
192
  - !ruby/object:Gem::Version
209
- version: '0'
193
+ version: '1.37'
210
194
  - !ruby/object:Gem::Dependency
211
195
  name: rubocop-performance
212
196
  requirement: !ruby/object:Gem::Requirement
213
197
  requirements:
214
- - - ">="
215
- - !ruby/object:Gem::Version
216
- version: '0'
217
- type: :development
218
- prerelease: false
219
- version_requirements: !ruby/object:Gem::Requirement
220
- requirements:
221
- - - ">="
222
- - !ruby/object:Gem::Version
223
- version: '0'
224
- - !ruby/object:Gem::Dependency
225
- name: rubocop-standard
226
- requirement: !ruby/object:Gem::Requirement
227
- requirements:
228
- - - ">="
198
+ - - "~>"
229
199
  - !ruby/object:Gem::Version
230
- version: '0'
200
+ version: '1.15'
231
201
  type: :development
232
202
  prerelease: false
233
203
  version_requirements: !ruby/object:Gem::Requirement
234
204
  requirements:
235
- - - ">="
205
+ - - "~>"
236
206
  - !ruby/object:Gem::Version
237
- version: '0'
207
+ version: '1.15'
238
208
  - !ruby/object:Gem::Dependency
239
209
  name: webmock
240
210
  requirement: !ruby/object:Gem::Requirement
@@ -264,25 +234,34 @@ dependencies:
264
234
  - !ruby/object:Gem::Version
265
235
  version: '1.7'
266
236
  description: |2
267
- GraphQLDocs is a library for generating HTML from a GraphQL API's schema
237
+ Library and CLI for generating a website from a GraphQL API's schema
268
238
  definition. With ERB templating support and a plethora of configuration
269
239
  options, you can customize the output to your needs. The library easily
270
240
  integrates with your Ruby deployment toolchain to ensure the docs for your
271
241
  API are up to date.
272
242
  email:
273
243
  - brettchalupa@gmail.com
274
- executables: []
244
+ executables:
245
+ - graphql-docs
275
246
  extensions: []
276
247
  extra_rdoc_files: []
277
248
  files:
249
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
250
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
278
251
  - ".github/workflows/tests.yml"
279
252
  - ".gitignore"
280
253
  - ".rubocop.yml"
281
254
  - CHANGELOG.md
255
+ - CODE_OF_CONDUCT.md
256
+ - CONTRIBUTING.md
282
257
  - Gemfile
283
258
  - LICENSE.txt
284
259
  - README.md
285
260
  - Rakefile
261
+ - bin/console
262
+ - bin/rake
263
+ - bin/setup
264
+ - exe/graphql-docs
286
265
  - graphql-docs.gemspec
287
266
  - lib/graphql-docs.rb
288
267
  - lib/graphql-docs/configuration.rb
@@ -354,8 +333,6 @@ files:
354
333
  - lib/graphql-docs/parser.rb
355
334
  - lib/graphql-docs/renderer.rb
356
335
  - lib/graphql-docs/version.rb
357
- - script/bootstrap
358
- - script/console
359
336
  homepage: https://github.com/brettchalupa/graphql-docs
360
337
  licenses:
361
338
  - MIT
@@ -371,14 +348,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
371
348
  requirements:
372
349
  - - ">="
373
350
  - !ruby/object:Gem::Version
374
- version: '0'
351
+ version: '3.1'
375
352
  required_rubygems_version: !ruby/object:Gem::Requirement
376
353
  requirements:
377
354
  - - ">="
378
355
  - !ruby/object:Gem::Version
379
356
  version: '0'
380
357
  requirements: []
381
- rubygems_version: 3.3.22
358
+ rubygems_version: 3.5.7
382
359
  signing_key:
383
360
  specification_version: 4
384
361
  summary: Easily generate beautiful documentation from your GraphQL schema.
data/script/bootstrap DELETED
@@ -1,5 +0,0 @@
1
- #!/bin/sh
2
-
3
- set -e
4
-
5
- bundle install "$@"