Giter Club home page Giter Club logo

xumlidot's People

Contributors

leoarnold avatar ned-pcs avatar os6sense avatar sinecode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

xumlidot's Issues

Internal class problem

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:

uml.pdf

I'm available to work on this issue because I really like this tool.

Missing runtime dependency?

In .gemspec there is a development dependency on pry, however, in parsers.rb the pry is required in production.

Either side is wrong...

Dot output need to escape < and > in labels

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.

directory_tree (LoadError)

[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)

Will not install due to ruby specific version dependencies that block upgrade paths.

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?

Yes, I most likely know.

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.

Assignment of an array in class/module body creates superclass

# 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.

test

(bin/xumlidot spec/app/lib/version.rb | dot -Tpng -o test.png && xdg-open test.png)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.