Skip to content

Commit 890a0c2

Browse files
authored
Merge pull request #39 from leoarnold/ruby-3
Add support for Ruby 3. Fixes #36
2 parents ae5ec96 + 097efb9 commit 890a0c2

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

.github/workflows/rspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
ruby: [ '2.6.6', '2.7.2' ]
16+
ruby: [ '2.6.6', '2.7.2', '3.0.3', '3.1.1' ]
1717
env:
1818
RAILS_ENV: test
1919
steps:

lib/xumlidot/diagram/dot.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def draw # rubocop:disable Metrics/AbcSize
2121
end
2222

2323
@stack.traverse do |klass|
24-
# Check - i shouldnt need to extend twice
24+
# Check - i shouldn't need to extend twice
2525
klass.extend(::Xumlidot::Diagram::Dot::Klass)
2626

2727
if ::Xumlidot::Options.inheritance

lib/xumlidot/loader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def load
3030
# we will create a dummy class.
3131
#
3232
# if a class is inherited from, we want to find it using the constant lookup
33-
# rules definind in the resolver
33+
# rules defining in the resolver
3434
#
3535
# and what ... we want to add a reference too it?
3636
#

lib/xumlidot/parsers/args.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def initialize(exp)
1515

1616
@arguments = ::Xumlidot::Types::Arguments.new
1717

18-
process(exp)
18+
process(Sexp.new.concat(exp))
1919
rescue StandardError => _e
2020
warn " ** bug: unable to process args #{exp} "
2121
end

lib/xumlidot/parsers/generic.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def process_class(exp,
4848
type: Xumlidot::Types::Klass)
4949

5050
Scope.set_visibility
51-
definition = definition_parser.new(exp.dup[0..2], @class_stack).definition
51+
definition = definition_parser.new(Sexp.new.concat(exp[0..2]), @class_stack).definition
5252

5353
warn definition.to_s if ::Xumlidot::Options.debug == true
5454
super(exp) do

spec/integration/lib_version/lib_version_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
describe 'Output of lib/version.rb' do
66
let(:directory) { 'spec/app/lib/version' }
7-
# let(:expect_xmi) { File.open('spec/integration/lib_version/lib_version.xmi lib_version.xmi').read }
7+
# let(:expect_xmi) { File.read('spec/integration/lib_version/lib_version.xmi lib_version.xmi') }
88
let(:expect_dot) { File.read('spec/integration/lib_version/lib_version.dot') }
99

1010
specify { expect { generate_dot(directory) }.to output(expect_dot).to_stdout }
1111

12-
# TODO: Make xmi output id repeatble ...
12+
# TODO: Make xmi output id repeatable ...
1313
# specify { expect { generate_xmi(directory) }.to output(expect_xmi).to_stdout }
1414
end

xumlidot.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
66
s.email = ['[email protected]']
77
s.executables = ['xumlidot']
88
s.homepage = 'http://github.com/os6sense/xumlidot'
9-
s.required_ruby_version = '>= 2.6', '< 3'
9+
s.required_ruby_version = '>= 2.6', '< 4'
1010
s.license = 'MIT'
1111
s.name = 'xumlidot'
1212
s.summary = %(Generates DOT and XMI for Ruby and Rails UML Class Diagrams. )
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
2121

2222
s.version = '0.1.1'
2323

24+
s.add_dependency 'rexml'
2425
s.add_dependency 'ruby_parser'
2526
s.add_dependency 'sexp_processor'
2627

0 commit comments

Comments
 (0)