Last active
July 7, 2020 22:12
-
-
Save Morozzzko/f0b7796e69eadbb9997dc57a2b3d4e05 to your computer and use it in GitHub Desktop.
Tag related methods do not exist. Download both files and execute `reproduce.sh`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| mvn dependency:get -Dartifact=commons-logging:commons-logging:1.2 -Ddest=. | |
| mvn dependency:get -Dartifact=com.structurizr:structurizr-core:1.4.7 -Ddest=. | |
| jruby test_method.rb | |
| echo "Inspecting methods from Java::ComStructurizrModel::ModelItem's jar" | |
| javap -classpath structurizr-core-1.4.7.jar -p "com.structurizr.model.ModelItem" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| require 'java' | |
| require_relative 'commons-logging-1.2.jar' | |
| require_relative 'structurizr-core-1.4.7.jar' | |
| workspace = ::Java::ComStructurizr::Workspace.new('Workspace', 'TestWorkspace') | |
| model = workspace.get_model | |
| system = model.add_software_system('Some Software System', 'Description') | |
| begin | |
| system.addTags('hello') | |
| rescue StandardError => e | |
| puts e.message | |
| end | |
| puts 'Methods related to tags' | |
| puts system.methods.grep(/tag/i) | |
| puts '' | |
| puts 'Ancestry: ' | |
| puts system.class.ancestors | |
| puts '' | |
| puts 'Java::ComStructurizrModel::ModelItem instance methods:' | |
| puts Java::ComStructurizrModel::ModelItem.instance_methods - Object.methods |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment