rubylens 0.1.0.pre.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 +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +67 -0
- data/assets/runtime/report.js +1409 -0
- data/assets/shells/report.html +34 -0
- data/assets/shells/showcase.html +26 -0
- data/assets/styles/report.css +85 -0
- data/assets/styles/showcase.css +15 -0
- data/exe/rubylens +6 -0
- data/lib/rubylens/art_model_builder.rb +94 -0
- data/lib/rubylens/cli.rb +104 -0
- data/lib/rubylens/errors.rb +6 -0
- data/lib/rubylens/generator.rb +56 -0
- data/lib/rubylens/git_repository.rb +106 -0
- data/lib/rubylens/index/manifest.rb +231 -0
- data/lib/rubylens/index/rubydex_adapter.rb +322 -0
- data/lib/rubylens/model/dependency_aggregation.rb +105 -0
- data/lib/rubylens/paths.rb +13 -0
- data/lib/rubylens/report_asset_assembler.rb +38 -0
- data/lib/rubylens/report_writer.rb +61 -0
- data/lib/rubylens/showcase_generator.rb +41 -0
- data/lib/rubylens/showcase_model.rb +41 -0
- data/lib/rubylens/showcase_writer.rb +27 -0
- data/lib/rubylens/version.rb +5 -0
- data/lib/rubylens.rb +33 -0
- metadata +99 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: a68f44779cf227639060ec998c28dca42887c018c1840acb9cb052f11b1fc308
|
|
4
|
+
data.tar.gz: 0aa7d34a9b43f8796052d1a8a4106a424ae074ebd3785ff90abc718734b510e8
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: a58596bc4b75bcff08991750258d18d3deae534fc21d78e505b098091986c32a3226a962a4c102cc9b0eb518efaf0258b131338a065b3845f89ea3a8db9fb01a
|
|
7
|
+
data.tar.gz: cc8321d3b96900926f4d6cfaf7d24b18660eb5f1d597b00056b3b3383f2d02050af5fc8bafd22276cb7063d7ba9633c3bfb8ced2f8a52229291641f0d22789d8
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 RubyLens contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# RubyLens
|
|
2
|
+
|
|
3
|
+
RubyLens turns a Ruby codebase into self-contained stellar HTML. It uses Rubydex internally to map Ruby code, then generates either a private interactive report or a privacy-reduced autonomous Showcase.
|
|
4
|
+
|
|
5
|
+
This is an early local prototype. RubyLens 0.1 supports Ruby 3.2 through 4.0 and pins Rubydex 0.2.9 while its API is pre-1.0.
|
|
6
|
+
|
|
7
|
+
## Generate a report
|
|
8
|
+
|
|
9
|
+
Add RubyLens to the bundle of the project you want to visualize, then run:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
bundle exec rubylens report .
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The default report is `rubylens-report.html` in the project root. It contains fully qualified class, module, and gem names for local hover details, but no source text, comments, or paths. Dependency stars remain anonymous and are summarized at the gem level. RubyLens adds that exact default path to Git's local exclude file and writes the report with owner-only permissions, so it stays out of commits without changing the project's `.gitignore`. The model reveals private codebase structure, so keep it local unless you intend to share it.
|
|
16
|
+
|
|
17
|
+
Ruby API:
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
result = RubyLens.generate_report(path: ".")
|
|
21
|
+
puts result.output_path
|
|
22
|
+
puts result.counts
|
|
23
|
+
puts result.warnings
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Passing `output:` selects a custom path. Custom paths are written exactly where requested and are not added to Git's local excludes, so the caller is responsible for keeping them private.
|
|
27
|
+
|
|
28
|
+
`RubyLens.generate` remains a thin alias for `RubyLens.generate_report`.
|
|
29
|
+
|
|
30
|
+
The report is fully local: it makes no network requests and needs neither Node nor a server to open. Drag to orbit, zoom toward the cursor, Shift-drag or use Pan mode to traverse dense clouds, or use the arrow keys to move the view. Show or focus core code, tests, and gems independently; sidebar highlights fly to a top-down view of the relevant star or system. Double-clicking a gem cloud pauses drift and expands that one existing system for a sharper, more separated view without loading another model.
|
|
31
|
+
|
|
32
|
+
## Generate a Showcase
|
|
33
|
+
|
|
34
|
+
Showcase is a standalone artistic presentation: it opens directly, rotates once per minute, and contains no Explorer controls or interactions.
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
bundle exec rubylens showcase .
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The default output is `rubylens-showcase.html` in the project root. It is self-contained, offline, atomically written with mode `0600`, and locally excludes only that exact default path and its atomic temporary-file pattern. Explicit custom outputs remain unmanaged. RubyLens refuses to replace a tracked default or an unrelated existing file.
|
|
41
|
+
|
|
42
|
+
The Showcase payload intentionally includes the project name, aggregate Ruby statistics, and numeric visual structure. It does not serialize declaration names, gem names, source text, comments, or paths. Its deterministic renderer prioritizes gem hubs and bounds large scenes to 50,000 plotted points, sampling hubs only if they alone exceed that budget. `prefers-reduced-motion` produces one stable frame instead of a continuous orbit.
|
|
43
|
+
|
|
44
|
+
Ruby API:
|
|
45
|
+
|
|
46
|
+
```ruby
|
|
47
|
+
result = RubyLens.generate_showcase(path: ".")
|
|
48
|
+
puts result.output_path
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Showcase generation and viewing need no Chrome, Chromium, Ferrum, FFmpeg, Node, or HTTP server. The HTML discloses enough aggregate structure to characterize a codebase, so review it before sharing.
|
|
52
|
+
|
|
53
|
+
The configurable multi-system design for repositories with many first-class applications or components is documented in [`docs/MONOREPO_BOUNDARIES.md`](docs/MONOREPO_BOUNDARIES.md). Reference-route experiments are paused and preserved in [`docs/REFERENCE_ROUTES_FUTURE.md`](docs/REFERENCE_ROUTES_FUTURE.md).
|
|
54
|
+
|
|
55
|
+
## Development
|
|
56
|
+
|
|
57
|
+
RubyLens supports Ruby 3.2 through 4.0. Contributors can activate the repository's pinned development Ruby before every Ruby command:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
source /opt/homebrew/share/chruby/chruby.sh
|
|
61
|
+
chruby ruby-4.0.5
|
|
62
|
+
bundle install
|
|
63
|
+
bundle exec rake test
|
|
64
|
+
gem build rubylens.gemspec
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The TypeScript/Three.js visual study remains under `prototype/codebase-cosmos`. It is a design lab rather than a runtime dependency of the gem.
|