CppUmlClass 0.2.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7f0347e68b39b11f5e5b6c00d5bba5c8b713de6e8af5a2dd90f78c944763667
4
- data.tar.gz: ef8248ea3089eae00731fd50054a70d8dd65e67f9f16050c35052f976b4eda57
3
+ metadata.gz: 941afc4bab5da001aad461d35a85b02d00bc8ca19c5c59d300635af5b46b5fba
4
+ data.tar.gz: bf6b1fc41d09adeec89b83b2284fb5bbee4ca2fb3d0ea770cc409d7f3d59f370
5
5
  SHA512:
6
- metadata.gz: 218c35e46d77a15e77f6377595d9d5667a5bc71618a3f48b9adff2eed2f86da763d62216041ce1d7cb6c51103846ad4266ac1f5bf817c7d8cd26260980f8fac1
7
- data.tar.gz: 45eab9d076867651ef67c850d56738fa4c91248c0e480f2c6ed8369ffc1a7d94d607a837fd83848bb7c99a322dd3cc18acb3e1128511c67eeafc4a8faeaaf382
6
+ metadata.gz: ffde1a9637f8e25f835632bfdefa0d1e622ab3cbb403a1fee480d788f2f0d3e41008d5cd677fa5fa55cd89b7c49793c9592359e3c0ec76d762db3ff7b7b67c7d
7
+ data.tar.gz: 41ca57e7d68425eac35beb2f8be2450048acf02e391c6555f97aa8bc911bbbeba40a01a0771d6fe14148e0a77acd7a9c6a78175363cc1cda8bda73683d1e4a30
data/README.md CHANGED
@@ -4,8 +4,13 @@ CppUmlClass creates a C++ class diagram.
4
4
  PlantUML and rufo commands are used to create class diagrams.
5
5
  The created class diagram is displayed on the browser screen.
6
6
 
7
- ## Setup
7
+ ## ruby setup
8
8
  for ubuntu
9
+ $ sudo apt install ruby ruby-all-dev
10
+
11
+ ## CppUmlClass Setup
12
+ for ubuntu
13
+ $ sudo apt install chromium-browser
9
14
  $ sudo apt install plantuml
10
15
  $ sudo apt install clang-format
11
16
  $ sudo apt install gcc
@@ -14,11 +19,11 @@ The created class diagram is displayed on the browser screen.
14
19
 
15
20
  Install the gem and add to the application's Gemfile by executing:
16
21
 
17
- $ bundle add cpp_uml_class
22
+ $ bundle add CppUmlClass
18
23
 
19
24
  If bundler is not being used to manage dependencies, install the gem by executing:
20
25
 
21
- $ gem install cpp_uml_class
26
+ $ sudo gem install CppUmlClass
22
27
 
23
28
  ## Usage
24
29
 
@@ -32,7 +37,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
37
 
33
38
  ## Contributing
34
39
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/kuwayama1971/RubyUmlClass.
40
+ Bug reports and pull requests are welcome on GitHub at https://github.com/kuwayama1971/CppUmlClass.
36
41
 
37
42
  ## License
38
43
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CppUmlClass
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
@@ -194,8 +194,8 @@ def composition_list_create(in_dir, out_list)
194
194
  next if line =~ /;$/
195
195
  work = line.gsub(/(class|struct)/, "")
196
196
  class_name = work.split(" : ")[0].to_s.chomp.match(/ [A-Za-z0-9_:]+/).to_s.split(" ")[0]
197
- base_name = work.split(" : ")[1].to_s.split(" ")[1].to_s.gsub(/<.*>/, "")
198
- puts "start class #{class_name}"
197
+ #base_name = work.split(" : ")[1].to_s.split(" ")[1].to_s.gsub(/<.*>/, "")
198
+ #puts "start class #{class_name}"
199
199
  cstruct_list.push CStruct.new(:class_end, class_name, block_count, [], [], [], [])
200
200
  end
201
201
 
@@ -301,7 +301,10 @@ def create_uml_class(in_dir, out_file)
301
301
  next if line =~ /;$/
302
302
  work = line.gsub(/(class|struct)/, "")
303
303
  class_name = work.split(" : ")[0].to_s.chomp.match(/ [A-Za-z0-9_:]+/).to_s.split(" ")[0]
304
- base_name = work.split(" : ")[1].to_s.gsub(/(public |private |protected )/, "").to_s.gsub(/<.*>/, "").split(" ")[0]
304
+ base_name = []
305
+ work.split(" : ")[1].to_s.gsub(/(public |private |protected )/, "").to_s.gsub(/<.*>/, "").split(" ").each do |name|
306
+ base_name.push name if name =~ /\w+/
307
+ end
305
308
  puts "start class [#{class_name}]"
306
309
  if class_name == ""
307
310
  puts file
@@ -316,10 +319,10 @@ def create_uml_class(in_dir, out_file)
316
319
  cstruct_list.push CStruct.new(:class_end, class_name, block_count, [], [], [], [])
317
320
  #end
318
321
  #pp line if class_name == ""
319
- if base_name.to_s != ""
320
- #base_name.gsub!(/::/, ".")
321
- puts "base_name=#{base_name}"
322
- cstruct_list[-1].inherit_list.push base_name
322
+ base_name.each do |name|
323
+ name.gsub!(/,/, "")
324
+ puts "base_name=#{name}"
325
+ cstruct_list[-1].inherit_list.push name
323
326
  end
324
327
  end
325
328
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: CppUmlClass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masataka Kuwayama
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-03 00:00:00.000000000 Z
11
+ date: 2025-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_app_base