llm-docs-builder 0.12.0 → 1.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac257dad79f49ed6993f784f8a28ee1e996e735fef4581449ad521ea9414a5d4
4
- data.tar.gz: 29e1d2d578d57ea6f17aafca070c61b6161b6313d6614f0e4f798933ceae082d
3
+ metadata.gz: a1d023947b940a99bfa254d72ff79e47eef15f378eeb2e46ca2f04859b5da6dd
4
+ data.tar.gz: 85448c820f8fce92e9a26c094a9dd8cd485619ac45eb72ad45ed5b058ff2dc69
5
5
  SHA512:
6
- metadata.gz: f82216cca621e942c0e6ad3d92aba5d099159cc9c0d10c1d010a85e2a740511103cebd0198c0056195775064853e749472dcb7f0939b8d3fda7753d291a5b0da
7
- data.tar.gz: 31aa5737e215439b11a2e79d793dabb9ff342206b660a2ecd846920bc2f6501c3d5910da4cdc52ecfcfa9f7b9acef14213b17936edd23d86808c0bcb2f391952
6
+ metadata.gz: 9b345c53110799db9429b5185c1f773ae7ed99bdfa4da73f038cacad8cd319aa378f483f928a76d7f73533da08201f930f74b98e28a0246042e85d5269dc0d24
7
+ data.tar.gz: 6f876f2ec8b9e41a8daf1626b87e0cfb610fe164ff47231587ab3cbb78d2ea1ed699d06a24ea2927426ea7a227996828fbdc82c3a4abbc3e37883bee3277923d
@@ -23,19 +23,19 @@ jobs:
23
23
  fail-fast: false
24
24
  matrix:
25
25
  ruby:
26
+ - '4.0'
26
27
  - '3.4'
27
28
  - '3.3'
28
- - '3.2'
29
29
  include:
30
- - ruby: '3.4'
30
+ - ruby: '4.0'
31
31
  coverage: 'true'
32
32
  steps:
33
- - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
33
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
34
34
  with:
35
35
  fetch-depth: 0
36
36
 
37
37
  - name: Set up Ruby
38
- uses: ruby/setup-ruby@v1
38
+ uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
39
39
  with:
40
40
  ruby-version: ${{ matrix.ruby }}
41
41
  bundler-cache: true
@@ -58,15 +58,32 @@ jobs:
58
58
  timeout-minutes: 5
59
59
  runs-on: ubuntu-latest
60
60
  steps:
61
- - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
61
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
62
62
  - name: Set up Ruby
63
- uses: ruby/setup-ruby@v1
63
+ uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
64
64
  with:
65
- ruby-version: '3.4.7'
65
+ ruby-version: '4.0.6'
66
66
  bundler-cache: true
67
67
  - name: Run yard-lint
68
68
  run: bundle exec yard-lint lib/
69
69
 
70
+ lostconf:
71
+ timeout-minutes: 5
72
+ runs-on: ubuntu-latest
73
+ steps:
74
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
75
+ with:
76
+ fetch-depth: 0
77
+ - name: Set up Node.js
78
+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
79
+ with:
80
+ node-version: '20'
81
+ cache: 'npm'
82
+ - name: Install dependencies
83
+ run: npm ci
84
+ - name: Run lostconf
85
+ run: npx lostconf --fail-on-stale
86
+
70
87
  ci-success:
71
88
  name: CI Success
72
89
  runs-on: ubuntu-latest
@@ -74,6 +91,7 @@ jobs:
74
91
  needs:
75
92
  - specs
76
93
  - yard-lint
94
+ - lostconf
77
95
  steps:
78
96
  - name: Check all jobs passed
79
97
  if: |
@@ -25,13 +25,13 @@ jobs:
25
25
  id-token: write
26
26
  steps:
27
27
  - name: Checkout
28
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
28
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
29
29
  with:
30
30
  fetch-depth: 0
31
31
 
32
32
  - name: Docker meta
33
33
  id: meta
34
- uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5
34
+ uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6
35
35
  with:
36
36
  images: |
37
37
  mensfeld/llm-docs-builder
@@ -45,28 +45,28 @@ jobs:
45
45
  type=raw,value=latest,enable={{is_default_branch}}
46
46
 
47
47
  - name: Set up QEMU
48
- uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
48
+ uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4
49
49
 
50
50
  - name: Set up Docker Buildx
51
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
51
+ uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4
52
52
 
53
53
  - name: Login to Docker Hub
54
54
  if: github.event_name != 'pull_request'
55
- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
55
+ uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
56
56
  with:
57
57
  username: ${{ secrets.DOCKERHUB_USERNAME }}
58
58
  password: ${{ secrets.DOCKERHUB_TOKEN }}
59
59
 
60
60
  - name: Login to GitHub Container Registry
61
61
  if: github.event_name != 'pull_request'
62
- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
62
+ uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
63
63
  with:
64
64
  registry: ghcr.io
65
65
  username: ${{ github.actor }}
66
66
  password: ${{ secrets.GITHUB_TOKEN }}
67
67
 
68
68
  - name: Build and push
69
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
69
+ uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
70
70
  with:
71
71
  context: .
72
72
  platforms: linux/amd64,linux/arm64
@@ -19,12 +19,12 @@ jobs:
19
19
  id-token: write
20
20
 
21
21
  steps:
22
- - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
22
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
23
23
  with:
24
24
  fetch-depth: 0
25
25
 
26
26
  - name: Set up Ruby
27
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
27
+ uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
28
28
  with:
29
29
  bundler-cache: false
30
30
 
@@ -32,4 +32,4 @@ jobs:
32
32
  run: |
33
33
  bundle install --jobs 4 --retry 3
34
34
 
35
- - uses: rubygems/release-gem@1c162a739e8b4cb21a676e97b087e8268d8fc40b # v1.1.2
35
+ - uses: rubygems/release-gem@052cc82692552de3ef2b81fd670e41d13cba8092 # v1.4.0
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 3.2
2
+ TargetRubyVersion: 3.3
3
3
  NewCops: enable
4
4
  SuggestExtensions: false
5
5
 
@@ -11,38 +11,25 @@ Style/StringLiterals:
11
11
 
12
12
  Layout/LineLength:
13
13
  Max: 120
14
- Exclude:
15
- - 'lib/llms_txt/cli.rb'
16
14
 
17
15
  Metrics/ClassLength:
18
16
  Max: 200
19
- Exclude:
20
- - 'lib/llms_txt/cli.rb'
21
17
 
22
18
  Metrics/MethodLength:
23
19
  Max: 35
24
- Exclude:
25
- - 'lib/llms_txt/cli.rb'
26
20
 
27
21
  Metrics/AbcSize:
28
22
  Max: 40
29
- Exclude:
30
- - 'lib/llms_txt/cli.rb'
31
23
 
32
24
  Metrics/CyclomaticComplexity:
33
25
  Max: 15
34
- Exclude:
35
- - 'lib/llms_txt/config.rb'
36
26
 
37
27
  Metrics/PerceivedComplexity:
38
28
  Max: 15
39
- Exclude:
40
- - 'lib/llms_txt/config.rb'
41
29
 
42
30
  Metrics/BlockLength:
43
31
  Exclude:
44
32
  - 'spec/**/*'
45
- - 'lib/llms_txt/cli.rb'
46
33
  - '*.gemspec'
47
34
 
48
35
  Style/FrozenStringLiteralComment:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.7
1
+ 4.0.6
data/.yard-lint.yml ADDED
@@ -0,0 +1,309 @@
1
+ # YARD-Lint Configuration
2
+ # See https://github.com/mensfeld/yard-lint for documentation
3
+
4
+ # Global settings for all validators
5
+ AllValidators:
6
+ YardOptions:
7
+ - "--private"
8
+ - "--protected"
9
+ Exclude:
10
+ - .git/**/*
11
+ - vendor/**/*
12
+ - node_modules/**/*
13
+ - spec/**/*
14
+ FailOnSeverity: convention
15
+ MinCoverage: 99.0
16
+ DiffMode:
17
+ DefaultBaseRef:
18
+
19
+ # Documentation validators
20
+ Documentation/UndocumentedObjects:
21
+ Description: Checks for classes, modules, and methods without documentation.
22
+ Enabled: true
23
+ Severity: error
24
+ ExcludedMethods:
25
+ - initialize/0
26
+ - "/^_/"
27
+
28
+ Documentation/UndocumentedMethodArguments:
29
+ Description: Checks for method parameters without @param tags.
30
+ Enabled: true
31
+ Severity: error
32
+
33
+ Documentation/UndocumentedBooleanMethods:
34
+ Description: Checks that question mark methods document their boolean return.
35
+ Enabled: true
36
+ Severity: error
37
+
38
+ Documentation/UndocumentedOptions:
39
+ Description: Detects methods with options hash parameters but no @option tags.
40
+ Enabled: true
41
+ Severity: error
42
+
43
+ Documentation/MarkdownSyntax:
44
+ Description: Detects common markdown syntax errors in documentation.
45
+ Enabled: true
46
+ Severity: error
47
+
48
+ Documentation/EmptyCommentLine:
49
+ Description: Detects empty comment lines at the start or end of documentation blocks.
50
+ Enabled: true
51
+ Severity: convention
52
+ EnabledPatterns:
53
+ Leading: true
54
+ Trailing: true
55
+
56
+ Documentation/BlankLineBeforeDefinition:
57
+ Description: Detects blank lines between YARD documentation and method definition.
58
+ Enabled: true
59
+ Severity: convention
60
+ OrphanedSeverity: convention
61
+ EnabledPatterns:
62
+ SingleBlankLine: true
63
+ OrphanedDocs: true
64
+
65
+ Documentation/DuplicateNamespaceComment:
66
+ Description: Detects namespaces documented with a YARD comment in more than one file.
67
+ Enabled: true
68
+ Severity: error
69
+
70
+ Documentation/UnderfilledLines:
71
+ Description: Detects documentation prose that wraps too early and wastes horizontal space.
72
+ Enabled: true
73
+ Severity: error
74
+ # Aligned with RuboCop's Layout/LineLength so documentation prose wraps to the same
75
+ # width as code.
76
+ MaxLength: 120
77
+
78
+ Documentation/LineLength:
79
+ Description: Detects documentation lines that exceed the maximum length.
80
+ Enabled: true
81
+ Severity: error
82
+ # Aligned with RuboCop's Layout/LineLength.
83
+ MaxLength: 120
84
+
85
+ Documentation/TextSubstitution:
86
+ Description: Detects em/en-dashes in documentation and replaces them with hyphens.
87
+ Enabled: true
88
+ Severity: error
89
+ Substitutions:
90
+ "—": "-" # em-dash (U+2014)
91
+ "–": "-" # en-dash (U+2013)
92
+
93
+ # Tags validators
94
+ Tags/Order:
95
+ Description: Enforces consistent ordering of YARD tags.
96
+ Enabled: true
97
+ Severity: error
98
+ EnforcedOrder:
99
+ - param
100
+ - option
101
+ - yield
102
+ - yieldparam
103
+ - yieldreturn
104
+ - return
105
+ - raise
106
+ - see
107
+ - example
108
+ - note
109
+ - todo
110
+
111
+ Tags/InvalidTypes:
112
+ Description: Validates type definitions in @param, @return, @option tags.
113
+ Enabled: true
114
+ Severity: error
115
+ ValidatedTags:
116
+ - param
117
+ - option
118
+ - return
119
+
120
+ Tags/TypeSyntax:
121
+ Description: Validates YARD type syntax using YARD parser.
122
+ Enabled: true
123
+ Severity: error
124
+ ValidatedTags:
125
+ - param
126
+ - option
127
+ - return
128
+ - yieldreturn
129
+
130
+ Tags/MeaninglessTag:
131
+ Description: Detects @param/@option tags on classes, modules, or constants.
132
+ Enabled: true
133
+ Severity: error
134
+ CheckedTags:
135
+ - param
136
+ - option
137
+ InvalidObjectTypes:
138
+ - class
139
+ - module
140
+ - constant
141
+
142
+ Tags/CollectionType:
143
+ Description: Validates Hash collection syntax consistency.
144
+ Enabled: true
145
+ Severity: error
146
+ EnforcedStyle: long
147
+ ValidatedTags:
148
+ - param
149
+ - option
150
+ - return
151
+ - yieldreturn
152
+
153
+ Tags/TagTypePosition:
154
+ Description: Validates type annotation position in tags.
155
+ Enabled: true
156
+ Severity: error
157
+ CheckedTags:
158
+ - param
159
+ - option
160
+ EnforcedStyle: type_after_name
161
+
162
+ Tags/ApiTags:
163
+ Description: Enforces @api tags on public objects.
164
+ Enabled: false
165
+ Severity: error
166
+ AllowedApis:
167
+ - public
168
+ - private
169
+ - internal
170
+
171
+ Tags/OptionTags:
172
+ Description: Requires @option tags for methods with options parameters.
173
+ Enabled: true
174
+ Severity: error
175
+
176
+ Tags/ExampleSyntax:
177
+ Description: Validates Ruby syntax in @example tags.
178
+ Enabled: true
179
+ Severity: error
180
+
181
+ Tags/RedundantParamDescription:
182
+ Description: Detects meaningless parameter descriptions that add no value.
183
+ Enabled: true
184
+ Severity: convention
185
+ CheckedTags:
186
+ - param
187
+ - option
188
+ Articles:
189
+ - The
190
+ - the
191
+ - A
192
+ - a
193
+ - An
194
+ - an
195
+ MaxRedundantWords: 6
196
+ GenericTerms:
197
+ - object
198
+ - instance
199
+ - value
200
+ - data
201
+ - item
202
+ - element
203
+ EnabledPatterns:
204
+ ArticleParam: true
205
+ PossessiveParam: true
206
+ TypeRestatement: true
207
+ ParamToVerb: true
208
+ IdPattern: true
209
+ DirectionalDate: true
210
+ TypeGeneric: true
211
+
212
+ Tags/InformalNotation:
213
+ Description: Detects informal tag notation patterns like "Note:" instead of @note.
214
+ Enabled: true
215
+ Severity: warning
216
+ CaseSensitive: false
217
+ RequireStartOfLine: true
218
+ Patterns:
219
+ Note: "@note"
220
+ Todo: "@todo"
221
+ TODO: "@todo"
222
+ FIXME: "@todo"
223
+ See: "@see"
224
+ See also: "@see"
225
+ Warning: "@deprecated"
226
+ Deprecated: "@deprecated"
227
+ Author: "@author"
228
+ Version: "@version"
229
+ Since: "@since"
230
+ Returns: "@return"
231
+ Raises: "@raise"
232
+ Example: "@example"
233
+
234
+ Tags/NonAsciiType:
235
+ Description: Detects non-ASCII characters in type annotations.
236
+ Enabled: true
237
+ Severity: warning
238
+ ValidatedTags:
239
+ - param
240
+ - option
241
+ - return
242
+ - yieldreturn
243
+ - yieldparam
244
+
245
+ Tags/TagGroupSeparator:
246
+ Description: Enforces blank line separators between different YARD tag groups.
247
+ Enabled: false
248
+ Severity: convention
249
+ TagGroups:
250
+ param:
251
+ - param
252
+ - option
253
+ return:
254
+ - return
255
+ error:
256
+ - raise
257
+ - throws
258
+ example:
259
+ - example
260
+ meta:
261
+ - see
262
+ - note
263
+ - todo
264
+ - deprecated
265
+ - since
266
+ - version
267
+ - api
268
+ yield:
269
+ - yield
270
+ - yieldparam
271
+ - yieldreturn
272
+ RequireAfterDescription: false
273
+
274
+ # Warnings validators - catches YARD parser errors
275
+ Warnings/UnknownTag:
276
+ Description: Detects unknown YARD tags.
277
+ Enabled: true
278
+ Severity: error
279
+
280
+ Warnings/UnknownDirective:
281
+ Description: Detects unknown YARD directives.
282
+ Enabled: true
283
+ Severity: error
284
+
285
+ Warnings/InvalidTagFormat:
286
+ Description: Detects malformed tag syntax.
287
+ Enabled: true
288
+ Severity: error
289
+
290
+ Warnings/InvalidDirectiveFormat:
291
+ Description: Detects malformed directive syntax.
292
+ Enabled: true
293
+ Severity: error
294
+
295
+ Warnings/DuplicatedParameterName:
296
+ Description: Detects duplicate @param tags.
297
+ Enabled: true
298
+ Severity: error
299
+
300
+ Warnings/UnknownParameterName:
301
+ Description: Detects @param tags for non-existent parameters.
302
+ Enabled: true
303
+ Severity: error
304
+
305
+ # Semantic validators
306
+ Semantic/AbstractMethods:
307
+ Description: Ensures @abstract methods do not have real implementations.
308
+ Enabled: true
309
+ Severity: error
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## 1.0.0 (2026-08-24)
6
+ - [Fix] **Link Expansion Corrupts Non-HTTP URI Schemes** — `LinkTransformer#expand_relative_links` no longer rewrites `mailto:`, `tel:`, and `ftp:` links into dead `https://...` URLs when `base_url` is set (#165).
7
+ - Any link whose scheme is in the known absolute-scheme list (`http`, `https`, `mailto`, `ftp`, `tel`) is now left untouched, matching `HtmlToMarkdownConverter`'s `SAFE_URI_SCHEMES`.
8
+ - Relative links (e.g. `./guide.md`) continue to expand as before.
9
+ - [Enhancement] Add Ruby warning category opt-in to test helpers
10
+
11
+ ## 0.13.0 (2026-05-11)
12
+ - [Breaking] Dropped Ruby 3.2 support. Minimum required Ruby version is now 3.3.
13
+ - [Fix] **Heading Nesting in Normalize Mode** — Fixed `normalize_headings` producing incorrect heading levels when same-level headings are nested under a parent.
14
+ - Consecutive same-level headings (e.g., two `##` headings) now correctly adjust the child's markdown level to be deeper than the parent's (e.g., `##` → `###`)
15
+ - Effective level formula: `max(parent_effective_level + 1, original_level)`
16
+ - ATX closing hashes (`## Title ##`) are now stripped from titles before building hierarchical paths
17
+ - [Fix] **HTML-to-Markdown Section Nesting** — Headings inside nested `<section>` elements now receive adjusted markdown levels based on section nesting depth.
18
+ - `<h2>` inside a nested `<section>` under another `<section>` with its own `<h2>` is now correctly rendered as `###` instead of `##`
19
+
3
20
  ## 0.12.0 (2025-11-12)
4
21
  - [Feature] **HTML to Markdown Reverse Converter** — Added support for converting HTML content to markdown format.
5
22
  - Enables processing of HTML documentation sources
data/Dockerfile CHANGED
@@ -4,7 +4,7 @@
4
4
  # Creates a minimal Docker image (~50MB) for running the CLI without Ruby installation
5
5
 
6
6
  # Stage 1: Builder
7
- FROM ruby:3.4-alpine AS builder
7
+ FROM ruby:4.0-alpine AS builder
8
8
 
9
9
  # Install build dependencies
10
10
  RUN apk add --no-cache \
@@ -36,17 +36,24 @@ RUN bundle config set --local without 'development test' && \
36
36
  RUN gem build llm-docs-builder.gemspec
37
37
 
38
38
  # Stage 2: Runtime
39
- FROM ruby:3.4-alpine
39
+ FROM ruby:4.0-alpine
40
40
 
41
- # Install runtime dependencies only
41
+ # Install runtime dependencies and build tools for native extensions
42
42
  RUN apk add --no-cache \
43
43
  ca-certificates \
44
- tzdata
44
+ tzdata \
45
+ libxml2 \
46
+ libxslt
45
47
 
46
- # Copy built gem and install it
48
+ # Copy built gem and install it (needs build tools for nokogiri)
47
49
  COPY --from=builder /gem/llm-docs-builder-*.gem /tmp/
48
- RUN gem install /tmp/llm-docs-builder-*.gem --no-document && \
49
- rm /tmp/llm-docs-builder-*.gem
50
+ RUN apk add --no-cache --virtual .build-deps \
51
+ build-base \
52
+ libxml2-dev \
53
+ libxslt-dev && \
54
+ gem install /tmp/llm-docs-builder-*.gem --no-document && \
55
+ rm /tmp/llm-docs-builder-*.gem && \
56
+ apk del .build-deps
50
57
 
51
58
  # Set working directory for user files
52
59
  WORKDIR /workspace
data/Gemfile CHANGED
@@ -6,9 +6,9 @@ gemspec
6
6
 
7
7
  group :development do
8
8
  gem 'pry'
9
- gem 'pry-byebug'
10
9
  gem 'yard-lint'
11
10
  end
12
11
 
13
12
  group :test do
13
+ gem 'warning'
14
14
  end