vectory 0.8.0 → 0.8.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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/docs.yml +59 -0
  3. data/.github/workflows/links.yml +99 -0
  4. data/.github/workflows/rake.yml +5 -1
  5. data/.github/workflows/release.yml +7 -3
  6. data/.gitignore +5 -0
  7. data/.rubocop.yml +11 -3
  8. data/.rubocop_todo.yml +252 -0
  9. data/Gemfile +4 -2
  10. data/README.adoc +23 -1
  11. data/Rakefile +13 -0
  12. data/docs/Gemfile +18 -0
  13. data/docs/_config.yml +179 -0
  14. data/docs/features/conversion.adoc +205 -0
  15. data/docs/features/external-dependencies.adoc +305 -0
  16. data/docs/features/format-detection.adoc +173 -0
  17. data/docs/features/index.adoc +205 -0
  18. data/docs/getting-started/core-concepts.adoc +214 -0
  19. data/docs/getting-started/index.adoc +37 -0
  20. data/docs/getting-started/installation.adoc +318 -0
  21. data/docs/getting-started/quick-start.adoc +160 -0
  22. data/docs/guides/error-handling.adoc +400 -0
  23. data/docs/guides/index.adoc +197 -0
  24. data/docs/index.adoc +146 -0
  25. data/docs/lychee.toml +25 -0
  26. data/docs/reference/api.adoc +355 -0
  27. data/docs/reference/index.adoc +189 -0
  28. data/docs/understanding/architecture.adoc +277 -0
  29. data/docs/understanding/index.adoc +148 -0
  30. data/docs/understanding/inkscape-wrapper.adoc +270 -0
  31. data/lib/vectory/capture.rb +165 -37
  32. data/lib/vectory/cli.rb +2 -0
  33. data/lib/vectory/configuration.rb +177 -0
  34. data/lib/vectory/conversion/ghostscript_strategy.rb +77 -0
  35. data/lib/vectory/conversion/inkscape_strategy.rb +124 -0
  36. data/lib/vectory/conversion/strategy.rb +58 -0
  37. data/lib/vectory/conversion.rb +104 -0
  38. data/lib/vectory/datauri.rb +1 -1
  39. data/lib/vectory/emf.rb +17 -5
  40. data/lib/vectory/eps.rb +45 -3
  41. data/lib/vectory/errors.rb +25 -0
  42. data/lib/vectory/file_magic.rb +2 -2
  43. data/lib/vectory/ghostscript_wrapper.rb +160 -0
  44. data/lib/vectory/image_resize.rb +2 -2
  45. data/lib/vectory/inkscape_wrapper.rb +205 -0
  46. data/lib/vectory/pdf.rb +76 -0
  47. data/lib/vectory/platform.rb +105 -0
  48. data/lib/vectory/ps.rb +47 -3
  49. data/lib/vectory/svg.rb +46 -3
  50. data/lib/vectory/svg_document.rb +40 -24
  51. data/lib/vectory/system_call.rb +36 -9
  52. data/lib/vectory/vector.rb +3 -23
  53. data/lib/vectory/version.rb +1 -1
  54. data/lib/vectory.rb +16 -11
  55. metadata +34 -3
  56. data/lib/vectory/inkscape_converter.rb +0 -141
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7ebbb9e4146780f1f9d42e0dee106494c251eb27b7d3f52d69f172da0a0d2e7
4
- data.tar.gz: 132e451c7c1e9298f305f67a7103f8da8b7d5af3df371f5705e8a2eb95b59991
3
+ metadata.gz: 29078da81dfd3def401e196f9c13654a5b2ccc4eefed851c261796cca0e8e9d2
4
+ data.tar.gz: 602ba638f3ff426687d778c87d4f93bde391cd7aaaa565902374bede727e0bd5
5
5
  SHA512:
6
- metadata.gz: 33a7acbdacd776a6627d30a2641123743d325b3c5f89b3f1f40a244556b4f363c1c2a4b49458d2260014c53004a2d06a9c8d7f617e732f82457c30576e9c6085
7
- data.tar.gz: 4a243d964fcda1b2d7e8dab7ef9bea706265c646d168d70df847bc6fd4d4e6c9f3453334adf4b0824670a59c029e4fa8a5812d4aecb4714298dfaa3425e1010a
6
+ metadata.gz: 32c32817c07c2578914427b923f82f97cbfd71249d11d10c07dcab6ad051d647679bd7cffdcaf6b104a6bd928dc8fe71bba32e686ebb00d1fa2c2b3758b93cd0
7
+ data.tar.gz: 3636e536af14c71d4efd99136c0408528412a20b7e50e12efd33147d8c7e5bea1bb70128c35af71b9b439febd2ab3636c29a58984e04b49ecb146c292891180e
@@ -0,0 +1,59 @@
1
+ name: docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ repository_dispatch:
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+ pages: write
13
+ id-token: write
14
+
15
+ concurrency:
16
+ group: ${{ github.workflow }}-${{ github.ref }}
17
+ cancel-in-progress: false
18
+
19
+ jobs:
20
+ build:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - name: Checkout
24
+ uses: actions/checkout@v4
25
+
26
+ - name: Setup Ruby
27
+ uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: '3.3'
30
+ bundler-cache: true
31
+ cache-version: 0
32
+ working-directory: docs
33
+
34
+ - name: Setup Pages
35
+ id: pages
36
+ uses: actions/configure-pages@v5
37
+
38
+ - name: Build with Jekyll
39
+ run: bundle exec jekyll build --verbose --trace --baseurl "${{ steps.pages.outputs.base_path }}"
40
+ working-directory: docs
41
+ env:
42
+ JEKYLL_ENV: production
43
+
44
+ - name: Upload artifact
45
+ uses: actions/upload-pages-artifact@v4
46
+ with:
47
+ path: docs/_site
48
+
49
+ deploy:
50
+ environment:
51
+ name: github-pages
52
+ url: ${{ steps.deployment.outputs.page_url }}
53
+ if: ${{ github.ref == 'refs/heads/main' }}
54
+ runs-on: ubuntu-latest
55
+ needs: build
56
+ steps:
57
+ - name: Deploy to GitHub Pages
58
+ id: deployment
59
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,99 @@
1
+ name: links
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - 'docs/**'
9
+ pull_request:
10
+ paths:
11
+ - 'docs/**'
12
+
13
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14
+ permissions:
15
+ contents: read
16
+ pull-requests: write
17
+
18
+ jobs:
19
+ link_checker:
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+
24
+ - uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: '3.4'
27
+ bundler-cache: true
28
+ working-directory: docs
29
+
30
+ - name: Build site
31
+ env:
32
+ JEKYLL_ENV: production
33
+ run: bundle exec jekyll build --trace
34
+ working-directory: docs
35
+
36
+ - name: Restore lychee cache
37
+ uses: actions/cache@v4
38
+ with:
39
+ path: .lycheecache
40
+ key: cache-lychee-${{ github.sha }}
41
+ restore-keys: cache-lychee-
42
+
43
+ - name: Check if site was built
44
+ run: |
45
+ if [ ! -d "_site" ]; then
46
+ echo "Error: _site directory not created"
47
+ exit 1
48
+ fi
49
+ echo "Site built successfully"
50
+ ls -la _site/
51
+ working-directory: docs
52
+
53
+ - name: Link Checker (Built Site)
54
+ uses: lycheeverse/lychee-action@v2
55
+ with:
56
+ # Check the built HTML site for rendered links
57
+ # Only check https and http schemes, exclude file:// due to path resolution issues
58
+ args: >-
59
+ --verbose
60
+ --no-progress
61
+ --config lychee.toml
62
+ --root-dir "$(pwd)/_site"
63
+ --scheme https,http
64
+ '_site/**/*.html'
65
+ fail: true
66
+ output: link-check-results.md
67
+ format: markdown
68
+ workingDirectory: docs
69
+
70
+ - name: Upload link check results
71
+ if: always()
72
+ uses: actions/upload-artifact@v4
73
+ with:
74
+ name: link-check-results
75
+ path: |
76
+ docs/link-check-results.md
77
+ retention-days: 30
78
+
79
+ - name: Comment PR with results
80
+ if: "${{ failure() && github.event_name == 'pull_request' }}"
81
+ uses: actions/github-script@v7
82
+ with:
83
+ script: |
84
+ const fs = require('fs');
85
+ let comment = '## 🔗 Link Check Failed\n\n';
86
+
87
+ if (fs.existsSync('docs/link-check-results.md')) {
88
+ const results = fs.readFileSync('docs/link-check-results.md', 'utf8');
89
+ comment += '### Built Site Results\n\n' + results + '\n\n';
90
+ }
91
+
92
+ comment += '\n---\n\n*Please fix the broken links and push a new commit.*';
93
+
94
+ github.rest.issues.createComment({
95
+ issue_number: context.issue.number,
96
+ owner: context.repo.owner,
97
+ repo: context.repo.repo,
98
+ body: comment
99
+ });
@@ -8,8 +8,12 @@ on:
8
8
  tags: [ v* ]
9
9
  pull_request:
10
10
 
11
+ permissions:
12
+ contents: write
13
+ packages: read
14
+
11
15
  jobs:
12
16
  rake:
13
17
  uses: metanorma/ci/.github/workflows/inkscape-rake.yml@main
14
18
  secrets:
15
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
19
+ pat_token: ${{ secrets.CLARICLE_CI_PAT_TOKEN }}
@@ -13,12 +13,16 @@ on:
13
13
  push:
14
14
  tags: [ v* ]
15
15
 
16
+ permissions:
17
+ contents: write
18
+ packages: write
19
+ id-token: write
20
+
16
21
  jobs:
17
22
  release:
18
23
  uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
19
24
  with:
20
25
  next_version: ${{ github.event.inputs.next_version }}
21
26
  secrets:
22
- rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
23
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
24
-
27
+ rubygems-api-key: ${{ secrets.CLARICLE_CI_RUBYGEMS_API_KEY }}
28
+ pat_token: ${{ secrets.CLARICLE_CI_PAT_TOKEN }}
data/.gitignore CHANGED
@@ -2,3 +2,8 @@
2
2
  Gemfile.lock
3
3
  .rspec_status
4
4
  .rubocop-*
5
+
6
+ .sass-cache
7
+ _site
8
+ CLAUDE.md
9
+ .kilocode
data/.rubocop.yml CHANGED
@@ -1,11 +1,19 @@
1
1
  # Auto-generated by Cimas: Do not edit it manually!
2
2
  # See https://github.com/metanorma/cimas
3
3
  inherit_from:
4
- - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
4
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
5
+ - .rubocop_todo.yml
6
+
7
+ inherit_mode:
8
+ merge:
9
+ - Exclude
5
10
 
6
11
  # local repo-specific modifications
7
12
  # ...
13
+ plugins:
14
+ - rubocop-rspec
15
+ - rubocop-performance
16
+ - rubocop-rake
8
17
 
9
18
  AllCops:
10
- TargetRubyVersion: 2.5
11
- SuggestExtensions: false
19
+ TargetRubyVersion: 3.0
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,252 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2026-01-20 11:39:21 UTC using RuboCop version 1.82.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ Gemspec/RequiredRubyVersion:
11
+ Exclude:
12
+ - 'vectory.gemspec'
13
+
14
+ # Offense count: 5
15
+ # This cop supports safe autocorrection (--autocorrect).
16
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
17
+ # SupportedStyles: with_first_argument, with_fixed_indentation
18
+ Layout/ArgumentAlignment:
19
+ Exclude:
20
+ - 'lib/vectory/configuration.rb'
21
+ - 'lib/vectory/conversion/ghostscript_strategy.rb'
22
+
23
+ # Offense count: 1
24
+ # This cop supports safe autocorrection (--autocorrect).
25
+ # Configuration parameters: EnforcedStyleAlignWith.
26
+ # SupportedStylesAlignWith: either, start_of_block, start_of_line
27
+ Layout/BlockAlignment:
28
+ Exclude:
29
+ - 'lib/vectory/conversion.rb'
30
+
31
+ # Offense count: 1
32
+ # This cop supports safe autocorrection (--autocorrect).
33
+ Layout/BlockEndNewline:
34
+ Exclude:
35
+ - 'lib/vectory/conversion.rb'
36
+
37
+ # Offense count: 1
38
+ # This cop supports safe autocorrection (--autocorrect).
39
+ Layout/EmptyLineAfterGuardClause:
40
+ Exclude:
41
+ - 'lib/vectory/platform.rb'
42
+
43
+ # Offense count: 1
44
+ # This cop supports safe autocorrection (--autocorrect).
45
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
46
+ # SupportedHashRocketStyles: key, separator, table
47
+ # SupportedColonStyles: key, separator, table
48
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
49
+ Layout/HashAlignment:
50
+ Exclude:
51
+ - 'lib/vectory/conversion.rb'
52
+
53
+ # Offense count: 2
54
+ # This cop supports safe autocorrection (--autocorrect).
55
+ # Configuration parameters: Width, AllowedPatterns.
56
+ Layout/IndentationWidth:
57
+ Exclude:
58
+ - 'lib/vectory/conversion.rb'
59
+
60
+ # Offense count: 76
61
+ # This cop supports safe autocorrection (--autocorrect).
62
+ # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
63
+ # URISchemes: http, https
64
+ Layout/LineLength:
65
+ Enabled: false
66
+
67
+ # Offense count: 6
68
+ # This cop supports safe autocorrection (--autocorrect).
69
+ # Configuration parameters: AllowInHeredoc.
70
+ Layout/TrailingWhitespace:
71
+ Exclude:
72
+ - 'lib/vectory/configuration.rb'
73
+ - 'lib/vectory/conversion.rb'
74
+ - 'lib/vectory/conversion/ghostscript_strategy.rb'
75
+
76
+ # Offense count: 11
77
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
78
+ Metrics/AbcSize:
79
+ Exclude:
80
+ - 'lib/vectory/capture.rb'
81
+ - 'lib/vectory/cli.rb'
82
+ - 'lib/vectory/configuration.rb'
83
+ - 'lib/vectory/ghostscript_wrapper.rb'
84
+ - 'lib/vectory/image_resize.rb'
85
+ - 'lib/vectory/inkscape_wrapper.rb'
86
+ - 'lib/vectory/system_call.rb'
87
+ - 'spec/support/text_matcher.rb'
88
+
89
+ # Offense count: 1
90
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
91
+ # AllowedMethods: refine
92
+ Metrics/BlockLength:
93
+ Max: 32
94
+
95
+ # Offense count: 3
96
+ # Configuration parameters: CountBlocks, CountModifierForms.
97
+ Metrics/BlockNesting:
98
+ Max: 4
99
+
100
+ # Offense count: 10
101
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
102
+ Metrics/CyclomaticComplexity:
103
+ Exclude:
104
+ - 'lib/vectory/capture.rb'
105
+ - 'lib/vectory/configuration.rb'
106
+ - 'lib/vectory/ghostscript_wrapper.rb'
107
+ - 'lib/vectory/image_resize.rb'
108
+ - 'lib/vectory/inkscape_wrapper.rb'
109
+
110
+ # Offense count: 25
111
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
112
+ Metrics/MethodLength:
113
+ Max: 174
114
+
115
+ # Offense count: 9
116
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
117
+ Metrics/PerceivedComplexity:
118
+ Exclude:
119
+ - 'lib/vectory/capture.rb'
120
+ - 'lib/vectory/configuration.rb'
121
+ - 'lib/vectory/ghostscript_wrapper.rb'
122
+ - 'lib/vectory/image_resize.rb'
123
+ - 'lib/vectory/inkscape_wrapper.rb'
124
+
125
+ # Offense count: 1
126
+ # This cop supports unsafe autocorrection (--autocorrect-all).
127
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
128
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
129
+ Naming/MemoizedInstanceVariableName:
130
+ Exclude:
131
+ - 'lib/vectory/platform.rb'
132
+
133
+ # Offense count: 1
134
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
135
+ # SupportedStyles: snake_case, normalcase, non_integer
136
+ # AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
137
+ Naming/VariableNumber:
138
+ Exclude:
139
+ - 'spec/vectory/image_resize_spec.rb'
140
+
141
+ # Offense count: 2
142
+ # This cop supports unsafe autocorrection (--autocorrect-all).
143
+ Performance/StringInclude:
144
+ Exclude:
145
+ - 'lib/vectory/platform.rb'
146
+
147
+ # Offense count: 1
148
+ RSpec/AnyInstance:
149
+ Exclude:
150
+ - 'spec/vectory/cli_spec.rb'
151
+
152
+ # Offense count: 56
153
+ # Configuration parameters: Prefixes, AllowedPatterns.
154
+ # Prefixes: when, with, without
155
+ RSpec/ContextWording:
156
+ Exclude:
157
+ - 'spec/vectory/capture_spec.rb'
158
+ - 'spec/vectory/cli_spec.rb'
159
+ - 'spec/vectory/datauri_spec.rb'
160
+ - 'spec/vectory/eps_spec.rb'
161
+ - 'spec/vectory/inkscape_wrapper_spec.rb'
162
+ - 'spec/vectory/svg_document_spec.rb'
163
+ - 'spec/vectory/svg_mapping_spec.rb'
164
+ - 'spec/vectory/svg_spec.rb'
165
+ - 'spec/vectory/system_call_spec.rb'
166
+ - 'spec/vectory/utils_spec.rb'
167
+ - 'spec/vectory/vector_spec.rb'
168
+
169
+ # Offense count: 43
170
+ # Configuration parameters: CountAsOne.
171
+ RSpec/ExampleLength:
172
+ Max: 38
173
+
174
+ # Offense count: 8
175
+ # Configuration parameters: .
176
+ # SupportedStyles: have_received, receive
177
+ RSpec/MessageSpies:
178
+ EnforcedStyle: receive
179
+
180
+ # Offense count: 45
181
+ RSpec/MultipleExpectations:
182
+ Max: 10
183
+
184
+ # Offense count: 2
185
+ # Configuration parameters: AllowedPatterns.
186
+ # AllowedPatterns: ^expect_, ^assert_
187
+ RSpec/NoExpectationExample:
188
+ Exclude:
189
+ - 'spec/vectory/image_resize_spec.rb'
190
+
191
+ # Offense count: 2
192
+ RSpec/RepeatedExampleGroupBody:
193
+ Exclude:
194
+ - 'spec/vectory/vector_spec.rb'
195
+
196
+ # Offense count: 5
197
+ RSpec/StubbedMock:
198
+ Exclude:
199
+ - 'spec/vectory/cli_spec.rb'
200
+ - 'spec/vectory/inkscape_wrapper_spec.rb'
201
+
202
+ # Offense count: 3
203
+ # This cop supports safe autocorrection (--autocorrect).
204
+ # Configuration parameters: EnforcedStyle.
205
+ # SupportedStyles: separated, grouped
206
+ Style/AccessorGrouping:
207
+ Exclude:
208
+ - 'lib/vectory/configuration.rb'
209
+
210
+ # Offense count: 1
211
+ # This cop supports safe autocorrection (--autocorrect).
212
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
213
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
214
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
215
+ # FunctionalMethods: let, let!, subject, watch
216
+ # AllowedMethods: lambda, proc, it
217
+ Style/BlockDelimiters:
218
+ Exclude:
219
+ - 'lib/vectory/conversion.rb'
220
+
221
+ # Offense count: 1
222
+ # This cop supports unsafe autocorrection (--autocorrect-all).
223
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
224
+ # SupportedStyles: predicate, comparison
225
+ Style/NumericPredicate:
226
+ Exclude:
227
+ - 'lib/vectory/configuration.rb'
228
+
229
+ # Offense count: 1
230
+ # This cop supports unsafe autocorrection (--autocorrect-all).
231
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
232
+ # AllowedMethods: present?, blank?, presence, try, try!
233
+ Style/SafeNavigation:
234
+ Exclude:
235
+ - 'lib/vectory/configuration.rb'
236
+
237
+ # Offense count: 15
238
+ # This cop supports safe autocorrection (--autocorrect).
239
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
240
+ # SupportedStyles: single_quotes, double_quotes
241
+ Style/StringLiterals:
242
+ Exclude:
243
+ - 'lib/vectory/conversion/strategy.rb'
244
+ - 'lib/vectory/platform.rb'
245
+
246
+ # Offense count: 13
247
+ # This cop supports safe autocorrection (--autocorrect).
248
+ # Configuration parameters: .
249
+ # SupportedStyles: percent, brackets
250
+ Style/SymbolArray:
251
+ EnforcedStyle: percent
252
+ MinSize: 3
data/Gemfile CHANGED
@@ -5,9 +5,11 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in vectory.gemspec
6
6
  gemspec
7
7
 
8
- gem "equivalent-xml"
8
+ gem "canon", "~> 0.1.7"
9
+ gem "openssl", "~> 3.0"
9
10
  gem "rake"
10
11
  gem "rspec"
11
12
  gem "rubocop"
12
13
  gem "rubocop-performance"
13
- gem "rexml"
14
+ gem "rubocop-rake"
15
+ gem "rubocop-rspec"
data/README.adoc CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  image:https://img.shields.io/gem/v/vectory.svg["Gem Version", link="https://rubygems.org/gems/vectory"]
4
4
  image:https://github.com/metanorma/vectory/actions/workflows/rake.yml/badge.svg["rake", link="https://github.com/metanorma/vectory/actions/workflows/rake.yml"]
5
- image:https://codeclimate.com/github/metanorma/vectory/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/vectory"]
5
+ // image:https://codeclimate.com/github/metanorma/vectory/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/vectory"]
6
6
  image:https://img.shields.io/github/issues-pr-raw/metanorma/vectory.svg["Pull Requests", link="https://github.com/metanorma/vectory/pulls"]
7
7
  image:https://img.shields.io/github/commits-since/metanorma/vectory/latest.svg["Commits since latest",link="https://github.com/metanorma/vectory/releases"]
8
8
 
@@ -355,6 +355,28 @@ Vector#width
355
355
 
356
356
  == Development
357
357
 
358
+ === Regenerating Test Fixtures
359
+
360
+ Some test fixtures are generated by external tools (Ghostscript, Inkscape, cairo).
361
+ When these tools are updated, the reference files may need to be regenerated.
362
+
363
+ To regenerate all test fixtures:
364
+
365
+ [source,sh]
366
+ ----
367
+ bundle exec rake regenerate_fixtures
368
+
369
+ ----
370
+
371
+ This will update the following files:
372
+
373
+ * `spec/examples/ps2eps/ref.eps` - PS to EPS conversion reference
374
+ * `spec/examples/ps2svg/ref.svg` - PS to SVG conversion reference
375
+ * `spec/examples/svg/doc2-ref.xml` - SVG mapping reference
376
+
377
+ NOTE: After regenerating fixtures, review the changes to ensure they are expected
378
+ before committing.
379
+
358
380
  === Releasing
359
381
 
360
382
  Releasing is done automatically with GitHub Actions. Just bump and tag with
data/Rakefile CHANGED
@@ -12,3 +12,16 @@ task default: :spec
12
12
  # RuboCop::RakeTask.new
13
13
 
14
14
  # task default: %i[spec rubocop]
15
+
16
+ desc "Regenerate test fixture reference files"
17
+ task :regenerate_fixtures do
18
+ require "fileutils"
19
+ require_relative "spec/support/fixture_generator"
20
+
21
+ puts "Regenerating test fixtures..."
22
+ FixtureGenerator.generate_all
23
+ puts "Fixtures regenerated successfully!"
24
+ rescue LoadError => e
25
+ abort "Error: #{e.message}\n" \
26
+ "Make sure all dependencies are installed: bundle install"
27
+ end
data/docs/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Jekyll plugins
4
+ gem "jekyll", "~> 3.0"
5
+ gem "just-the-docs", "~> 0.7"
6
+
7
+ # Markdown and AsciiDoc processing
8
+ gem "asciidoctor", "~> 2.0"
9
+ gem "jekyll-asciidoc", "~> 3.0"
10
+ gem "kramdown-parser-gfm"
11
+
12
+ # SEO and metadata
13
+ gem "jekyll-seo-tag", "~> 2.0"
14
+ gem "jekyll-sitemap", "~> 1.0"
15
+
16
+ # Windows compatibility
17
+ gem "jekyll-watch", "~> 2.0", platforms: %i[mingw x64_mingw]
18
+ gem "wdm", "~> 0.1", platforms: %i[mingw x64_mingw]