circulator 2.0.2 → 2.1.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 +4 -4
- data/CHANGELOG.md +2 -6
- data/exe/circulator-diagram +10 -6
- data/lib/circulator/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a33499a72d0661bf32e27e39213e4b0193f292eef8537c1946f0eb139e751a91
|
4
|
+
data.tar.gz: 6c3fa67b66bef192886a17cc9d756cb491bce6509127b43b87e7f5ca74347ef4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3755e25bcb3a1b34ba3768e8e3b501489dd7827ad9c1695b7365c2ffee9cbf9160181e2bd7226ba49e5c76d1763811e425beef4a0250a28811f22e57f970df98
|
7
|
+
data.tar.gz: 0c970bbeca86d6835911ae4ec7369585a14a9815ff6fc4fcdf28886ae556f0fc3b3d1be97fc301a45799bb5cc3b702681b3160f0072489a5eb96cfdb222fd225
|
data/CHANGELOG.md
CHANGED
@@ -5,12 +5,8 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
-
## [2.0
|
8
|
+
## [2.1.0] - 2025-10-02
|
9
9
|
|
10
10
|
### Added
|
11
11
|
|
12
|
-
-
|
13
|
-
|
14
|
-
### Changed
|
15
|
-
|
16
|
-
- Implement diagrams through a standard base class to coordinate implementation.
|
12
|
+
- Configure directory for generating diagrams, defaulting to "docs"
|
data/exe/circulator-diagram
CHANGED
@@ -8,7 +8,7 @@ require_relative "../lib/circulator/dot"
|
|
8
8
|
require_relative "../lib/circulator/plantuml"
|
9
9
|
|
10
10
|
# Parse command-line options
|
11
|
-
options = {format: "dot", require: nil}
|
11
|
+
options = {format: "dot", require: nil, directory: "docs"}
|
12
12
|
parser = OptionParser.new do |opts|
|
13
13
|
opts.banner = "Usage: circulator-diagram MODEL_NAME [options]"
|
14
14
|
opts.separator ""
|
@@ -23,6 +23,10 @@ parser = OptionParser.new do |opts|
|
|
23
23
|
options[:format] = format
|
24
24
|
end
|
25
25
|
|
26
|
+
opts.on("-d", "--directory DIRECTORY", "Output directory. Default: docs") do |directory|
|
27
|
+
options[:directory] = directory
|
28
|
+
end
|
29
|
+
|
26
30
|
opts.on("-r", "--require FILE", "Require a file before loading the model (e.g., config/environment)") do |file|
|
27
31
|
options[:require] = file
|
28
32
|
end
|
@@ -102,11 +106,11 @@ begin
|
|
102
106
|
|
103
107
|
if options[:format] == "plantuml"
|
104
108
|
# Use model class name for PlantUML files
|
105
|
-
output_file = "#{base_name}.puml"
|
109
|
+
output_file = File.join(options[:directory], "#{base_name}.puml")
|
106
110
|
|
107
111
|
# Create directory if needed
|
108
112
|
dir = File.dirname(output_file)
|
109
|
-
FileUtils.mkdir_p(dir) unless
|
113
|
+
FileUtils.mkdir_p(dir) unless File.exist?(dir)
|
110
114
|
|
111
115
|
File.write(output_file, content)
|
112
116
|
puts "Generated PlantUML file: #{output_file}"
|
@@ -114,16 +118,16 @@ begin
|
|
114
118
|
puts " plantuml #{output_file}"
|
115
119
|
else
|
116
120
|
# Use model class name for DOT files
|
117
|
-
output_file = "#{base_name}.dot"
|
121
|
+
output_file = File.join(options[:directory], "#{base_name}.dot")
|
118
122
|
|
119
123
|
# Create directory if needed
|
120
124
|
dir = File.dirname(output_file)
|
121
|
-
FileUtils.mkdir_p(dir) unless
|
125
|
+
FileUtils.mkdir_p(dir) unless File.exist?(dir)
|
122
126
|
|
123
127
|
File.write(output_file, content)
|
124
128
|
puts "Generated DOT file: #{output_file}"
|
125
129
|
puts "To create an image, run:"
|
126
|
-
puts " dot -Tpng #{output_file} -o #{base_name}.png"
|
130
|
+
puts " dot -Tpng #{output_file} -o #{File.join(options[:directory], base_name)}.png"
|
127
131
|
end
|
128
132
|
|
129
133
|
exit 0
|
data/lib/circulator/version.rb
CHANGED