interactors_mindmap 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +7 -2
- data/CHANGELOG.md +8 -1
- data/README.md +6 -2
- data/lib/interactors_mindmap/cli.rb +5 -4
- data/lib/interactors_mindmap/doc_files_generator.rb +3 -3
- data/lib/interactors_mindmap/interactors_names_parser.rb +2 -2
- data/lib/interactors_mindmap/tree_node.rb +7 -7
- data/lib/interactors_mindmap/version.rb +1 -1
- data/lib/interactors_mindmap.rb +2 -2
- metadata +9 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b15988c44b13a91546f35bda045c3901a3006bfa5cecc372b5095d7501ceadf
|
4
|
+
data.tar.gz: 5dfc8d53eb016885d4bcb44402c1cf7ff46ea5128458765114797a6cfb911469
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4f0904a4f901e999badd5f56b041fbc7793e864618adf8322f16a7aba61f893fd782ce55fae5671f5b11f12d023d2f400712c005c262afeacbcf88acd220434
|
7
|
+
data.tar.gz: e4849e9137f4243d52314021ffbe87009b7f36a4d8e5396a80df6690981119417a8bc14574a6b17bf92755c74c0c4477b7009ee4b1bd48aa99901fbb256e0444
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion:
|
2
|
+
TargetRubyVersion: 3.3.6
|
3
|
+
NewCops: enable
|
4
|
+
SuggestExtensions: false
|
3
5
|
|
4
6
|
Style/StringLiterals:
|
5
7
|
Enabled: true
|
@@ -21,4 +23,7 @@ Metrics/MethodLength:
|
|
21
23
|
|
22
24
|
Metrics/BlockLength:
|
23
25
|
Enabled: true
|
24
|
-
Max: 30
|
26
|
+
Max: 30
|
27
|
+
|
28
|
+
Lint/DuplicateBranch:
|
29
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# InteractorsMindmap
|
2
2
|
|
3
|
-
[![Tests](https://github.com/martinnicolas/interactors_mindmap/actions/workflows/main.yml/badge.svg)](https://github.com/martinnicolas/interactors_mindmap/actions/workflows/main.yml)
|
3
|
+
[![Tests](https://github.com/martinnicolas/interactors_mindmap/actions/workflows/main.yml/badge.svg)](https://github.com/martinnicolas/interactors_mindmap/actions/workflows/main.yml)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/interactors_mindmap.svg)](https://badge.fury.io/rb/interactors_mindmap)
|
5
|
+
[![Gem Total Downloads](https://img.shields.io/gem/dt/interactors_mindmap)](https://rubygems.org/gems/interactors_mindmap)
|
6
|
+
[![Wercker](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/MIT)
|
7
|
+
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)
|
4
8
|
|
5
|
-
This gem generates a mindmap chart to document your interactors flow on your Ruby on Rails application.
|
9
|
+
This gem generates a mindmap chart to document your [interactors](https://github.com/collectiveidea/interactor) flow on your Ruby on Rails application.
|
6
10
|
|
7
11
|
![example](https://raw.githubusercontent.com/martinnicolas/interactors_mindmap/master/spec/fixtures/assets/test.png)
|
8
12
|
|
@@ -8,10 +8,11 @@ module InteractorsMindmap
|
|
8
8
|
Usage:
|
9
9
|
interactors_mindmap [options]
|
10
10
|
Options:
|
11
|
-
--all
|
12
|
-
--md
|
13
|
-
--html
|
14
|
-
--
|
11
|
+
--all # Generate md and html file
|
12
|
+
--md # Generate md file
|
13
|
+
--html # Generate html file
|
14
|
+
--version # Show gem version
|
15
|
+
--help # Show this message
|
15
16
|
HELP_TEXT
|
16
17
|
|
17
18
|
attr_reader :argv
|
@@ -14,11 +14,11 @@ module InteractorsMindmap
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.generate_md_file(interactor_names:)
|
17
|
-
new(interactor_names:
|
17
|
+
new(interactor_names:).generate_md_file
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.generate_html_file(interactor_names:)
|
21
|
-
new(interactor_names:
|
21
|
+
new(interactor_names:).generate_html_file
|
22
22
|
end
|
23
23
|
|
24
24
|
def generate_md_file
|
@@ -75,7 +75,7 @@ module InteractorsMindmap
|
|
75
75
|
</html>
|
76
76
|
HTML
|
77
77
|
|
78
|
-
File.
|
78
|
+
File.write(HTML_FILE_NAME, page)
|
79
79
|
end
|
80
80
|
end
|
81
81
|
end
|
@@ -12,13 +12,13 @@ module InteractorsMindmap
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.perform(files_path:)
|
15
|
-
new(files_path:
|
15
|
+
new(files_path:).perform
|
16
16
|
end
|
17
17
|
|
18
18
|
def perform
|
19
19
|
tree_node = InteractorsMindmap::TreeNode.new(root_data: "Interactors")
|
20
20
|
|
21
|
-
Dir[files_path].
|
21
|
+
Dir[files_path].each do |file|
|
22
22
|
processed_interactors_tree_node = process_interactors_file(file)
|
23
23
|
|
24
24
|
tree_node.add_node_child(node: processed_interactors_tree_node.root)
|
@@ -12,22 +12,22 @@ module InteractorsMindmap
|
|
12
12
|
|
13
13
|
def add_child(child_data:, parent: nil)
|
14
14
|
if parent.nil?
|
15
|
-
root.add_child(child_data:
|
15
|
+
root.add_child(child_data:)
|
16
16
|
else
|
17
|
-
parent.add_child(child_data:
|
17
|
+
parent.add_child(child_data:)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
def add_node_child(node:, parent: nil)
|
22
22
|
if parent.nil?
|
23
|
-
root.add_node_child(node:
|
23
|
+
root.add_node_child(node:)
|
24
24
|
else
|
25
|
-
parent.add_node_child(node:
|
25
|
+
parent.add_node_child(node:)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
def search_node(data:)
|
30
|
-
root.search_node(data:
|
30
|
+
root.search_node(data:)
|
31
31
|
end
|
32
32
|
|
33
33
|
def reorder_with_recursion!
|
@@ -98,7 +98,7 @@ module InteractorsMindmap
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def replace_with(node:)
|
101
|
-
"Cant replace root_node" if root?
|
101
|
+
return "Cant replace root_node" if root?
|
102
102
|
|
103
103
|
index = parent.children.find_index(self)
|
104
104
|
clon = node.clone_node
|
@@ -120,7 +120,7 @@ module InteractorsMindmap
|
|
120
120
|
|
121
121
|
if children.any?
|
122
122
|
children.each do |child|
|
123
|
-
nodes << child.search_node(data:
|
123
|
+
nodes << child.search_node(data:)
|
124
124
|
end
|
125
125
|
elsif self.data == data
|
126
126
|
nodes << self
|
data/lib/interactors_mindmap.rb
CHANGED
@@ -34,7 +34,7 @@ module InteractorsMindmap
|
|
34
34
|
return
|
35
35
|
end
|
36
36
|
|
37
|
-
InteractorsMindmap::DocFilesGenerator.generate_md_file(interactor_names:
|
37
|
+
InteractorsMindmap::DocFilesGenerator.generate_md_file(interactor_names:)
|
38
38
|
|
39
39
|
puts MD_FILE_GENERATED_MESSAGE
|
40
40
|
end
|
@@ -45,7 +45,7 @@ module InteractorsMindmap
|
|
45
45
|
return
|
46
46
|
end
|
47
47
|
|
48
|
-
InteractorsMindmap::DocFilesGenerator.generate_html_file(interactor_names:
|
48
|
+
InteractorsMindmap::DocFilesGenerator.generate_html_file(interactor_names:)
|
49
49
|
|
50
50
|
puts HTML_FILE_GENERATED_MESSAGE
|
51
51
|
end
|
metadata
CHANGED
@@ -1,30 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: interactors_mindmap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- martinnicolas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
name: simplecov
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
description: Generate mindmap chart for Interactors.
|
11
|
+
date: 2024-11-28 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Mindmap chart for Interactors.
|
28
14
|
email:
|
29
15
|
- ttincho77@gmail.com
|
30
16
|
executables:
|
@@ -54,24 +40,25 @@ metadata:
|
|
54
40
|
allowed_push_host: https://rubygems.org
|
55
41
|
homepage_uri: https://github.com/martinnicolas/interactors_mindmap
|
56
42
|
source_code_uri: https://github.com/martinnicolas/interactors_mindmap
|
57
|
-
changelog_uri: https://github.com/martinnicolas/interactors_mindmap/CHANGELOG.md
|
43
|
+
changelog_uri: https://github.com/martinnicolas/interactors_mindmap/blob/master/CHANGELOG.md
|
58
44
|
bug_tracker_uri: https://github.com/martinnicolas/interactors_mindmap/issues
|
45
|
+
rubygems_mfa_required: 'true'
|
59
46
|
post_install_message:
|
60
47
|
rdoc_options: []
|
61
48
|
require_paths:
|
62
49
|
- lib
|
63
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
64
51
|
requirements:
|
65
|
-
- - "
|
52
|
+
- - "~>"
|
66
53
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
54
|
+
version: 3.3.6
|
68
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
56
|
requirements:
|
70
57
|
- - ">="
|
71
58
|
- !ruby/object:Gem::Version
|
72
59
|
version: '0'
|
73
60
|
requirements: []
|
74
|
-
rubygems_version: 3.5.
|
61
|
+
rubygems_version: 3.5.22
|
75
62
|
signing_key:
|
76
63
|
specification_version: 4
|
77
64
|
summary: Mindmap chart for Interactors.
|