sleeping_king_studios-docs 0.1.0 → 0.2.1
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/CHANGELOG.md +17 -0
- data/lib/sleeping_king_studios/docs/data/see_tags/class_method_tag.rb +1 -1
- data/lib/sleeping_king_studios/docs/data/see_tags/constant_tag.rb +1 -1
- data/lib/sleeping_king_studios/docs/data/see_tags/definition_tag.rb +1 -1
- data/lib/sleeping_king_studios/docs/data/see_tags/instance_method_tag.rb +1 -1
- data/lib/sleeping_king_studios/docs/data/see_tags/reference_tag.rb +3 -3
- data/lib/sleeping_king_studios/docs/data/types/parser.rb +5 -5
- data/lib/sleeping_king_studios/docs/jekyll/plugins/liquid/filters/anchorize_slug.rb +27 -0
- data/lib/sleeping_king_studios/docs/jekyll/plugins/liquid/filters.rb +11 -0
- data/lib/sleeping_king_studios/docs/jekyll/plugins/liquid.rb +11 -0
- data/lib/sleeping_king_studios/docs/jekyll/plugins/required.rb +10 -0
- data/lib/sleeping_king_studios/docs/jekyll/plugins.rb +11 -0
- data/lib/sleeping_king_studios/docs/jekyll.rb +10 -0
- data/lib/sleeping_king_studios/docs/templates/config.yml.erb +2 -0
- data/lib/sleeping_king_studios/docs/templates/includes/reference/attribute.md +1 -1
- data/lib/sleeping_king_studios/docs/templates/includes/reference/definitions/table-of-contents/class_attributes.md +1 -1
- data/lib/sleeping_king_studios/docs/templates/includes/reference/definitions/table-of-contents/class_methods.md +1 -1
- data/lib/sleeping_king_studios/docs/templates/includes/reference/definitions/table-of-contents/instance_attributes.md +1 -1
- data/lib/sleeping_king_studios/docs/templates/includes/reference/definitions/table-of-contents/instance_methods.md +1 -1
- data/lib/sleeping_king_studios/docs/templates/includes/reference/method.md +1 -1
- data/lib/sleeping_king_studios/docs/version.rb +2 -2
- metadata +27 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 187804266272946364341348fd3889893752cc218af1049326fa56856c7f8751
|
|
4
|
+
data.tar.gz: 2eed4cc2aea0b359d1487b0c94b5c1ab860334021093546cb8748352dac5cc44
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7908bf7a9412828c78783ca387450ef9ea5029d35495dcb3575e5eff7b4c99090c98b00d1cba7f0754f996bca9e11dde4361b2c9a47ac47a15764eafe72b4a79
|
|
7
|
+
data.tar.gz: 186ec6c0d7a9a711579d6b4d0f4d444c9e03bf3f3be28ec7072df90e64de1827fe99ce4923811d2127a30319afc90a08c2bc094dbe2dcd30f43f1e5e0b4da5ff
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# 0.2.1
|
|
4
|
+
|
|
5
|
+
Added support for Ruby 4.0.
|
|
6
|
+
|
|
7
|
+
# 0.2.0
|
|
8
|
+
|
|
9
|
+
> **Upgrade Notes**
|
|
10
|
+
>
|
|
11
|
+
> Add the following to your `_config.yml` files:
|
|
12
|
+
>
|
|
13
|
+
> ```markdown
|
|
14
|
+
> plugins:
|
|
15
|
+
> - sleeping_king_studios/docs/jekyll/plugins/required
|
|
16
|
+
> ```
|
|
17
|
+
|
|
18
|
+
- Improved handling of method names with characters that are not valid for HTML anchors, such as `[]`, `=`, and `?`.
|
|
19
|
+
|
|
3
20
|
# 0.1.0
|
|
4
21
|
|
|
5
22
|
Initial development release.
|
|
@@ -51,10 +51,10 @@ module SleepingKingStudios::Docs::Data::SeeTags
|
|
|
51
51
|
def absolute_path?
|
|
52
52
|
return @absolute_path unless @absolute_path.nil?
|
|
53
53
|
|
|
54
|
-
@absolute_path =
|
|
54
|
+
@absolute_path = registry_item_exists?(reference)
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
def
|
|
57
|
+
def registry_item_exists?(_)
|
|
58
58
|
false
|
|
59
59
|
end
|
|
60
60
|
|
|
@@ -78,7 +78,7 @@ module SleepingKingStudios::Docs::Data::SeeTags
|
|
|
78
78
|
|
|
79
79
|
return @relative_path = false if parent.root?
|
|
80
80
|
|
|
81
|
-
@relative_path =
|
|
81
|
+
@relative_path = registry_item_exists?(qualified_path)
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
def slugify_path(path)
|
|
@@ -74,12 +74,12 @@ module SleepingKingStudios::Docs::Data::Types
|
|
|
74
74
|
.select { |const_name| const_name.to_s.end_with?('0') }
|
|
75
75
|
.sort
|
|
76
76
|
.to_h \
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
do |const_name|
|
|
78
|
+
ext = TypesSpecifierList.const_get(const_name)
|
|
79
|
+
value = tools.string_tools.underscore(const_name.to_s[0...-1]).intern
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
[ext, value]
|
|
82
|
+
end
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
def handle_key_value_type(node)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'sleeping_king_studios/docs/jekyll/plugins/liquid/filters'
|
|
4
|
+
|
|
5
|
+
module SleepingKingStudios::Docs::Jekyll::Plugins::Liquid::Filters
|
|
6
|
+
# Liquid filter for converting a reference slug to a safe HTML anchor.
|
|
7
|
+
module AnchorizeSlug
|
|
8
|
+
# Converts the slug to a string usable as an HTML anchor.
|
|
9
|
+
#
|
|
10
|
+
# Certain characters are valid Ruby identifiers but cause issues when used
|
|
11
|
+
# as HTML anchors, such as equals signs, hashes, question marks, and square
|
|
12
|
+
# brackets. This method replaces each with a placeholder value.
|
|
13
|
+
#
|
|
14
|
+
# @param slug [String] the slug to convert.
|
|
15
|
+
#
|
|
16
|
+
# @return [String] the converted slug.
|
|
17
|
+
def anchorize_slug(slug)
|
|
18
|
+
slug
|
|
19
|
+
.to_s
|
|
20
|
+
.gsub('=', '--equals')
|
|
21
|
+
.gsub('?', '--predicate')
|
|
22
|
+
.gsub('[]', '--brackets')
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
::Liquid::Template.register_filter(self) if defined?(::Liquid::Template)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'sleeping_king_studios/docs/jekyll/plugins/liquid'
|
|
4
|
+
|
|
5
|
+
module SleepingKingStudios::Docs::Jekyll::Plugins::Liquid
|
|
6
|
+
# Filters for extending Liquid template functionality.
|
|
7
|
+
module Filters
|
|
8
|
+
autoload :AnchorizeSlug,
|
|
9
|
+
'sleeping_king_studios/docs/jekyll/plugins/liquid/filters/anchorize_slug'
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'sleeping_king_studios/docs/jekyll/plugins'
|
|
4
|
+
|
|
5
|
+
module SleepingKingStudios::Docs::Jekyll::Plugins
|
|
6
|
+
# Plugins for extending Liquid template functionality.
|
|
7
|
+
module Liquid
|
|
8
|
+
autoload :Filters,
|
|
9
|
+
'sleeping_king_studios/docs/jekyll/plugins/liquid/filters'
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'sleeping_king_studios/docs/jekyll/plugins'
|
|
4
|
+
|
|
5
|
+
module SleepingKingStudios::Docs::Jekyll::Plugins
|
|
6
|
+
# Helper module for loading all required Jekyll plugins.
|
|
7
|
+
module Required
|
|
8
|
+
include Liquid::Filters::AnchorizeSlug
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'sleeping_king_studios/docs/jekyll'
|
|
4
|
+
|
|
5
|
+
module SleepingKingStudios::Docs::Jekyll
|
|
6
|
+
# Plugins for extending Jekyll functionality.
|
|
7
|
+
module Plugins
|
|
8
|
+
autoload :Liquid, 'sleeping_king_studios/docs/jekyll/plugins/liquid'
|
|
9
|
+
autoload :Required, 'sleeping_king_studios/docs/jekyll/plugins/required'
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'sleeping_king_studios/docs'
|
|
4
|
+
|
|
5
|
+
module SleepingKingStudios::Docs
|
|
6
|
+
# Namespace for working with Jekyll-specific functionality.
|
|
7
|
+
module Jekyll
|
|
8
|
+
autoload :Plugins, 'sleeping_king_studios/docs/jekyll/plugins'
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{% assign method = site.methods | where: "data_path", include.attribute.path | where: "version", page.version | first %}
|
|
2
2
|
{% capture prefix %}{{ include.type }}-attribute{% endcapture %}
|
|
3
|
-
{% capture heading_id %}{{ prefix }}-{{ method.slug |
|
|
3
|
+
{% capture heading_id %}{{ prefix }}-{{ method.slug | anchorize_slug }}{% endcapture %}
|
|
4
4
|
|
|
5
5
|
{% include reference/attributes/heading.md attribute=include.attribute heading_id=heading_id method=method type=include.type %}
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<a href="#class-attributes">Class Attributes</a>
|
|
4
4
|
<ul style="margin-bottom: 0px;">
|
|
5
5
|
{% for attribute in include.definition.class_attributes %}
|
|
6
|
-
<li><a href="#class-attribute-{{ attribute.slug |
|
|
6
|
+
<li><a href="#class-attribute-{{ attribute.slug | anchorize_slug }}">{{ attribute.name }}</a></li>
|
|
7
7
|
{% endfor %}
|
|
8
8
|
</ul>
|
|
9
9
|
</li>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<a href="#class-methods">Class Methods</a>
|
|
4
4
|
<ul style="margin-bottom: 0px;">
|
|
5
5
|
{% for method in include.definition.class_methods %}
|
|
6
|
-
<li><a href="#class-method-{{ method.slug |
|
|
6
|
+
<li><a href="#class-method-{{ method.slug | anchorize_slug }}">{{ method.name }}</a></li>
|
|
7
7
|
{% endfor %}
|
|
8
8
|
</ul>
|
|
9
9
|
</li>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<a href="#instance-attributes">Instance Attributes</a>
|
|
4
4
|
<ul style="margin-bottom: 0px;">
|
|
5
5
|
{% for attribute in include.definition.instance_attributes %}
|
|
6
|
-
<li><a href="#instance-attribute-{{ attribute.slug |
|
|
6
|
+
<li><a href="#instance-attribute-{{ attribute.slug | anchorize_slug }}">{{ attribute.name }}</a></li>
|
|
7
7
|
{% endfor %}
|
|
8
8
|
</ul>
|
|
9
9
|
</li>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<a href="#instance-methods">Instance Methods</a>
|
|
4
4
|
<ul style="margin-bottom: 0px;">
|
|
5
5
|
{% for method in include.definition.instance_methods %}
|
|
6
|
-
<li><a href="#instance-method-{{ method.slug |
|
|
6
|
+
<li><a href="#instance-method-{{ method.slug | anchorize_slug }}">{{ method.name }}</a></li>
|
|
7
7
|
{% endfor %}
|
|
8
8
|
</ul>
|
|
9
9
|
</li>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% assign method = site.methods | where: "data_path", include.path | where: "version", page.version | first %}
|
|
2
2
|
{% if method %}
|
|
3
3
|
{% capture prefix %}{{ include.type }}-method{% endcapture %}
|
|
4
|
-
{% capture heading_id %}{{ prefix }}-{{ method.slug |
|
|
4
|
+
{% capture heading_id %}{{ prefix }}-{{ method.slug | anchorize_slug }}{% endcapture %}
|
|
5
5
|
|
|
6
6
|
{% include reference/methods/heading.md heading_id=heading_id method=method type=include.type %}
|
|
7
7
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sleeping_king_studios-docs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rob "Merlin" Smith
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: cuprum
|
|
@@ -15,14 +15,20 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '1.
|
|
18
|
+
version: '1.3'
|
|
19
|
+
- - ">="
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 1.3.1
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
25
|
requirements:
|
|
23
26
|
- - "~>"
|
|
24
27
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '1.
|
|
28
|
+
version: '1.3'
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: 1.3.1
|
|
26
32
|
- !ruby/object:Gem::Dependency
|
|
27
33
|
name: erubi
|
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -44,6 +50,9 @@ dependencies:
|
|
|
44
50
|
- - "~>"
|
|
45
51
|
- !ruby/object:Gem::Version
|
|
46
52
|
version: '1.2'
|
|
53
|
+
- - ">="
|
|
54
|
+
- !ruby/object:Gem::Version
|
|
55
|
+
version: 1.2.1
|
|
47
56
|
type: :runtime
|
|
48
57
|
prerelease: false
|
|
49
58
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -51,6 +60,9 @@ dependencies:
|
|
|
51
60
|
- - "~>"
|
|
52
61
|
- !ruby/object:Gem::Version
|
|
53
62
|
version: '1.2'
|
|
63
|
+
- - ">="
|
|
64
|
+
- !ruby/object:Gem::Version
|
|
65
|
+
version: 1.2.1
|
|
54
66
|
- !ruby/object:Gem::Dependency
|
|
55
67
|
name: thor
|
|
56
68
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -151,6 +163,12 @@ files:
|
|
|
151
163
|
- lib/sleeping_king_studios/docs/errors/file_not_found.rb
|
|
152
164
|
- lib/sleeping_king_studios/docs/errors/invalid_directory.rb
|
|
153
165
|
- lib/sleeping_king_studios/docs/errors/invalid_file.rb
|
|
166
|
+
- lib/sleeping_king_studios/docs/jekyll.rb
|
|
167
|
+
- lib/sleeping_king_studios/docs/jekyll/plugins.rb
|
|
168
|
+
- lib/sleeping_king_studios/docs/jekyll/plugins/liquid.rb
|
|
169
|
+
- lib/sleeping_king_studios/docs/jekyll/plugins/liquid/filters.rb
|
|
170
|
+
- lib/sleeping_king_studios/docs/jekyll/plugins/liquid/filters/anchorize_slug.rb
|
|
171
|
+
- lib/sleeping_king_studios/docs/jekyll/plugins/required.rb
|
|
154
172
|
- lib/sleeping_king_studios/docs/registry.rb
|
|
155
173
|
- lib/sleeping_king_studios/docs/registry_query.rb
|
|
156
174
|
- lib/sleeping_king_studios/docs/tasks.rb
|
|
@@ -228,16 +246,19 @@ require_paths:
|
|
|
228
246
|
- lib
|
|
229
247
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
230
248
|
requirements:
|
|
231
|
-
- - "
|
|
249
|
+
- - ">="
|
|
232
250
|
- !ruby/object:Gem::Version
|
|
233
251
|
version: '3.1'
|
|
252
|
+
- - "<"
|
|
253
|
+
- !ruby/object:Gem::Version
|
|
254
|
+
version: '5'
|
|
234
255
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
256
|
requirements:
|
|
236
257
|
- - ">="
|
|
237
258
|
- !ruby/object:Gem::Version
|
|
238
259
|
version: '0'
|
|
239
260
|
requirements: []
|
|
240
|
-
rubygems_version:
|
|
261
|
+
rubygems_version: 4.0.2
|
|
241
262
|
specification_version: 4
|
|
242
263
|
summary: Tools for generating a versioned documentation site from YARD docs.
|
|
243
264
|
test_files: []
|