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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c7908ea508ee698cac74eea78dc7e724ee9a7abd63cb404c2282f0781afdfb0
4
- data.tar.gz: 1f164ee15df340156205a201a8fe3456ff1f5344f12f4c7a6e69d79383bb48a6
3
+ metadata.gz: 2b15988c44b13a91546f35bda045c3901a3006bfa5cecc372b5095d7501ceadf
4
+ data.tar.gz: 5dfc8d53eb016885d4bcb44402c1cf7ff46ea5128458765114797a6cfb911469
5
5
  SHA512:
6
- metadata.gz: 40a7b0e4c1fd15f02dcad44a5756d4549ade50f1b3f8aaa003c2baaa0438f6bbd35f6b9bd760837230e5f2b610d613c03ca9ea8a7cd4a4a6da29b8adbc1011d3
7
- data.tar.gz: 999dac3e9b958dd441b43beead21fc7864413f72f0dbcc8be4806d0c0a3fb432cee11a32ed69d0ac7f4392ff7abdff91da718cfebc08ef29ab1749e374e6bf65
6
+ metadata.gz: a4f0904a4f901e999badd5f56b041fbc7793e864618adf8322f16a7aba61f893fd782ce55fae5671f5b11f12d023d2f400712c005c262afeacbcf88acd220434
7
+ data.tar.gz: e4849e9137f4243d52314021ffbe87009b7f36a4d8e5396a80df6690981119417a8bc14574a6b17bf92755c74c0c4477b7009ee4b1bd48aa99901fbb256e0444
data/.rubocop.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.6
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
@@ -1,4 +1,11 @@
1
- ## [Unreleased]
1
+ ## [Releases]
2
+
3
+ ## [0.2.0] - 2024-11-28
4
+
5
+ ### Added
6
+ - Support for ruby 3.3.6.
7
+ - Updated dependecies.
8
+ - Minor fixes.
2
9
 
3
10
  ## [0.1.0] - 2024-05-25
4
11
 
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) [![Wercker](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/MIT) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)
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 # Generate md and html file
12
- --md # Generate md file
13
- --html # Generate html file
14
- --help # Show this message
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: interactor_names).generate_md_file
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: interactor_names).generate_html_file
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.open(HTML_FILE_NAME, "w") { |f| f.write page }
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: files_path).perform
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].sort.each do |file|
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: child_data)
15
+ root.add_child(child_data:)
16
16
  else
17
- parent.add_child(child_data: 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: node)
23
+ root.add_node_child(node:)
24
24
  else
25
- parent.add_node_child(node: 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: 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: data)
123
+ nodes << child.search_node(data:)
124
124
  end
125
125
  elsif self.data == data
126
126
  nodes << self
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InteractorsMindmap
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -34,7 +34,7 @@ module InteractorsMindmap
34
34
  return
35
35
  end
36
36
 
37
- InteractorsMindmap::DocFilesGenerator.generate_md_file(interactor_names: 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: 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.1.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-06-16 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
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: 2.6.0
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.3
61
+ rubygems_version: 3.5.22
75
62
  signing_key:
76
63
  specification_version: 4
77
64
  summary: Mindmap chart for Interactors.