documentation-zero 0.0.11 → 0.0.12
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/{.documentation_api → .api}/README.md +0 -0
- data/{.documentation_api → .api}/sections/posts.md +0 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/documentation_zero/version.rb +1 -1
- data/lib/generators/documentation/readme/readme_generator.rb +3 -1
- data/lib/generators/documentation/scaffold/scaffold_generator.rb +2 -1
- data/lib/generators/documentation/scaffold/templates/resource.md.tt +1 -3
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b62c9f05259ec220fa355a9ae8e9f3a389866cdcdc503a4c2010d917cbbdf0ee
|
|
4
|
+
data.tar.gz: 1c461ff6f9cb65d5a2a05e5247ef44e214db96055ddf4ca607629c7c60de7a7d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d6df1ef4f4ab2f39edb8f649ac9cd3058a961369ae8184e437348bbe026ce49dd1e1889daf7c38618a5262d8d6c1b4057a87c53b1616d38126888590dc9f59d
|
|
7
|
+
data.tar.gz: cd0436401778e7407177d623016e5c6a536a78898f10a060fbb970c47b3dc0db43f5018518e8c54ce4afe2166e01f76e891212688c7881f35074a62e520d8a27
|
|
File without changes
|
|
File without changes
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@ The purpose of documentation zero is to generate a scaffold for rails api docume
|
|
|
4
4
|
|
|
5
5
|
## Example
|
|
6
6
|
|
|
7
|
-
You can see an example of the generated documentation [here](.
|
|
7
|
+
You can see an example of the generated documentation [here](.api/README.md).
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -3,8 +3,10 @@ module Documentation
|
|
|
3
3
|
class ReadmeGenerator < Rails::Generators::Base
|
|
4
4
|
source_root File.expand_path("templates", __dir__)
|
|
5
5
|
|
|
6
|
+
class_option :directory, type: :string, default: ".api"
|
|
7
|
+
|
|
6
8
|
def copy_files
|
|
7
|
-
template "README.md", ".
|
|
9
|
+
template "README.md", "#{options.directory}/README.md"
|
|
8
10
|
end
|
|
9
11
|
|
|
10
12
|
private
|
|
@@ -3,12 +3,13 @@ module Documentation
|
|
|
3
3
|
class ScaffoldGenerator < Rails::Generators::NamedBase
|
|
4
4
|
argument :attributes, type: :array, default: [], banner: "field:type field:type"
|
|
5
5
|
|
|
6
|
+
class_option :directory, type: :string, default: ".api"
|
|
6
7
|
class_option :timestamps, type: :boolean, default: true
|
|
7
8
|
|
|
8
9
|
source_root File.expand_path("templates", __dir__)
|
|
9
10
|
|
|
10
11
|
def copy_files
|
|
11
|
-
template "resource.md", ".
|
|
12
|
+
template "resource.md", "#{options.directory}/sections/#{plural_file_name}.md"
|
|
12
13
|
end
|
|
13
14
|
end
|
|
14
15
|
end
|
|
@@ -65,11 +65,9 @@ This endpoint will return `200 OK` with the current JSON representation of the <
|
|
|
65
65
|
|
|
66
66
|
This endpoint will return `204 No Content` if successful. No parameters are required.
|
|
67
67
|
|
|
68
|
-
---
|
|
69
|
-
|
|
70
68
|
## Models
|
|
71
69
|
|
|
72
|
-
|
|
70
|
+
### <%= class_name %> model
|
|
73
71
|
|
|
74
72
|
```json
|
|
75
73
|
{
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: documentation-zero
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nixon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-04-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|
|
@@ -17,8 +17,8 @@ executables: []
|
|
|
17
17
|
extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
|
19
19
|
files:
|
|
20
|
-
- ".
|
|
21
|
-
- ".
|
|
20
|
+
- ".api/README.md"
|
|
21
|
+
- ".api/sections/posts.md"
|
|
22
22
|
- CHANGELOG.md
|
|
23
23
|
- CODE_OF_CONDUCT.md
|
|
24
24
|
- Gemfile
|