os6sense / xumlidot Goto Github PK
View Code? Open in Web Editor NEWRUBY UML class diagram generator with XMI and DOT output.
License: MIT License
RUBY UML class diagram generator with XMI and DOT output.
License: MIT License
If I define a class inside another class, the methods defined in the outside class are displayed in the internal class.
For example:
class MyClass
class MyInternalClass; end
def a_method; end
def another_method; end
end
I get the following dot diagram:
I'm available to work on this issue because I really like this tool.
In .gemspec there is a development dependency on pry
, however, in parsers.rb
the pry
is required in production.
Either side is wrong...
When operators > and < are overloaded, this has the consequence to have the > and < in the label.
This characters needs escaping because, as stated in label formatting, these are used as field delimiters.
This class
class Version < Array
def initialize s
str = s.gsub(/[\-_]/,".")
super(str.split('.').map { |e| e.to_i })
end
def < x
(self <=> x) < 0
end
def <= x
(self <=> x) <= 0
end
def > x
(self <=> x) > 0
end
def >= x
(self <=> x) >= 0
end
def == x
(self <=> x) == 0
end
end
Produces the following dot:
"Package::Version" [shape=Mrecord, label="{Package::Version|\l|I + initialize(s)\lI + <(x)\lI + <=(x)\lI + >(x)\lI + >=(x)\lI + ==(x)\l}"]
Which produces the following message when converting using dot
Error: bad label format {Metabuild::Version|\l|I + initialize(s)\lI + <(x)\lI + <=(x)\lI + >(x)\lI + >=(x)\lI + ==(x)\l}
Escaping each > and < in the label with a backslash solved the issue.
[sisc@fedora rlws]$ xumlidot app
Traceback (most recent call last):
5: from /home/sisc/.asdf/installs/ruby/2.6.6/bin/xumlidot:23:in `<main>'
4: from /home/sisc/.asdf/installs/ruby/2.6.6/bin/xumlidot:23:in `load'
3: from /home/sisc/.asdf/installs/ruby/2.6.6/lib/ruby/gems/2.6.0/gems/xumlidot-1.0.0.pre/bin/xumlidot:3:in `<top (required)>'
2: from /home/sisc/.asdf/installs/ruby/2.6.6/lib/ruby/gems/2.6.0/gems/xumlidot-1.0.0.pre/bin/xumlidot:3:in `require_relative'
1: from /home/sisc/.asdf/installs/ruby/2.6.6/lib/ruby/gems/2.6.0/gems/xumlidot-1.0.0.pre/lib/xumlidot.rb:3:in `<top (required)>'
/home/sisc/.asdf/installs/ruby/2.6.6/lib/ruby/gems/2.6.0/gems/xumlidot-1.0.0.pre/lib/xumlidot.rb:3:in `require_relative': cannot load such file -- /home/sisc/.asdf/installs/ruby/2.6.6/lib/ruby/gems/2.6.0/gems/xumlidot-1.0.0.pre/lib/xumlidot/directory_tree (LoadError)
I'm trying to map some legacy ruby code in an effort to upgrade out of needing to use its old versions of things - we know the code is legacy, but we have no way to update the version until we can map it and understand what the code actually does so we can put it under test, and then port/update it- and I get the following:
Fetching: xumlidot-0.2.0.gem (100%)
ERROR: Error installing xumlidot:
xumlidot requires Ruby version < 4, >= 2.6.
Thing is, this makes no sense given the data I have as there is no reason you should even be looking for ruby version 4 as it does not exist yet, and the 2.6 version minimal seems very arbitrary and constructive given the publicly stated goals of this project.
Is there a specific version that supports older versions of ruby that is still functional?
Would you please remove these constraints if its supported?
I've tried to flag up that this is a work in progress, probably about 3 months away from being a "v1.0" so if you try it out and want to give feedback, GREAT! but I am more than likely aware of any issues so please don't bug them just yet.
... because the sexp_processor
is broken in ruby 3.
I've made a PR.
# frozen_string_literal: true
module VersionModule
def self.gem_version
Gem::Version.new VERSION::STRING
end
class Version
# bug/missing feature, constants not defined
MAJOR = 0
MINOR = 2
TINY = 0
PRE = 'alpha'
# BUG - this ends up as being a superclass, it should just be a constant called STRING
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
end
The assignment to STRING will result in a superclass being created.
(bin/xumlidot spec/app/lib/version.rb | dot -Tpng -o test.png && xdg-open test.png)
The connection is present but something in the xmi (presumably) isn't right since its coming out as an undeletable NARY connection.
I honestly can't recall if this was a decision I made at the time but plain constants should be members? TBD
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.