rails_app_generator 0.0.10 → 0.0.11

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: c4e7b665a771ac6d07152880cd0597dce56b9a7e091f0179e0465a5994325b1d
4
- data.tar.gz: 1a7b85ae46aa8c7854081a9f72abe9a60a43baca3ef51a6f5568a8d1dbb97404
3
+ metadata.gz: 41a84055790db563fd9b1ea21dc26deb01da792e5a9e120c5170a3aefaf8364b
4
+ data.tar.gz: b2b0244b7b5cc66a0cfdc7b9719ba4846869a49cf57fac40cf94f4c3369cd844
5
5
  SHA512:
6
- metadata.gz: d29a0cd85a4b9baecacaa2ef850e0c063f2b1a05f0dd8965e1f7867b00ee82c6ae2ffbd47fbeac4c875290f176cf3460537dd4a69f419d9d81f1fe6c6247f5f6
7
- data.tar.gz: bc86c4078b49fc1b73c68ab15858249d2de186c9af7b5999f290f18ba476499f5017f4d6f6b1162013e0f85270ba1cd745ffe4940afdf0b0be756068eb633a66
6
+ metadata.gz: 92ee6c983495db38ba71ea1ef5c74d4185dff934d216fcd345bacec453349cfd45f355b188945ab348528c3a9181a4ceb5243896bd2655005e8bce708e96060d
7
+ data.tar.gz: 83d283c3c0dbf92f0eb20f807a11e9ae6dda055a86e20be5a9466ce159262897cfe7bc98a273fad2139fe692de09e18d1ce313b077af58df6f61d5e61d622ee9
@@ -10,7 +10,7 @@ KManager.action :project_plan do
10
10
 
11
11
  grid_layout(y: 90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
12
12
 
13
- todo(title: 'add diff tool supporting lhs only, rhs only, same and different')
13
+ todo(title: 'add diff tool open in vscode option')
14
14
  end
15
15
  .page('To Do', theme: :style_02, margin_left: 0, margin_top: 0) do
16
16
 
@@ -19,11 +19,6 @@ KManager.action :project_plan do
19
19
 
20
20
  todo(title: 'cli support for diff')
21
21
  todo(title: 'cli support for profile')
22
- todo(title: 'add diff tool with support')
23
- todo(title: 'add diff tool with support')
24
- todo(title: 'add diff tool left hand side only option')
25
- todo(title: 'add diff tool right hand side only option')
26
- todo(title: 'add diff tool open in vscode option')
27
22
  todo(title: 'cli support for rails new (rag new should work like rails new) - buggy, need to work through')
28
23
  todo(title: 'need an option for deleting target project path') # FileUtils.rm_rf(instance.target_path)
29
24
 
@@ -35,6 +30,7 @@ KManager.action :project_plan do
35
30
  # h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
36
31
  # p(x: 350, y: 40, w: 400, h: 80, title: 'Done')
37
32
 
33
+ todo(title: 'add diff tool supporting lhs only, rhs only, same and different')
38
34
  todo(title: 'add project plan to do list')
39
35
 
40
36
  grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [0.0.10](https://github.com/klueless-io/rails_app_generator/compare/v0.0.9...v0.0.10) (2022-07-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add diff processor ([edd86a3](https://github.com/klueless-io/rails_app_generator/commit/edd86a3657ec83c566f84cd965820d780a2a1c43))
7
+ * fix gha specs ([6ae95de](https://github.com/klueless-io/rails_app_generator/commit/6ae95de2e53e77590375c3a9863a78744b38fa30))
8
+ * fix gha specs ([c7504f9](https://github.com/klueless-io/rails_app_generator/commit/c7504f97ddf25011a887b7b6ec4b0235e6dbd16d))
9
+
1
10
  ## [0.0.9](https://github.com/klueless-io/rails_app_generator/compare/v0.0.8...v0.0.9) (2022-07-24)
2
11
 
3
12
 
@@ -1,59 +1,47 @@
1
- <mxfile host="TYq">
2
- <diagram id="Oaa" name="In progress">
1
+ <mxfile host="x0A">
2
+ <diagram id="Oq8" name="In progress">
3
3
  <mxGraphModel dx="0" dy="0" background="#FFFAFA" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
4
4
  <root>
5
- <mxCell id="page_root_Oaa" parent="Oaa"/>
6
- <mxCell id="node_root_Oaa" parent="page_root_Oaa"/>
7
- <mxCell id="Oaa-1" value="DrawIO DSL" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fontColor=#1F2D3D;text;fontSize=28;fontStyle=1;fillColor=none" vertex="1" parent="node_root_Oaa">
5
+ <mxCell id="page_root_Oq8" parent="Oq8"/>
6
+ <mxCell id="node_root_Oq8" parent="page_root_Oq8"/>
7
+ <mxCell id="Oq8-1" value="DrawIO DSL" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fontColor=#1F2D3D;text;fontSize=28;fontStyle=1;fillColor=none" vertex="1" parent="node_root_Oq8">
8
8
  <mxGeometry x="300" y="0" width="400" height="80" as="geometry"/>
9
9
  </mxCell>
10
- <mxCell id="Oaa-3" value="cli support for diff" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#333333" vertex="1" parent="node_root_Oaa">
10
+ <mxCell id="Oq8-3" value="add diff tool open in vscode option" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#333333" vertex="1" parent="node_root_Oq8">
11
11
  <mxGeometry x="10" y="10" width="300" height="60" as="geometry"/>
12
12
  </mxCell>
13
- <mxCell id="Oaa-4" value="cli support for profile" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#333333" vertex="1" parent="node_root_Oaa">
14
- <mxGeometry x="330" y="10" width="300" height="60" as="geometry"/>
15
- </mxCell>
16
- <mxCell id="Oaa-5" value="add diff tool with support" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#333333" vertex="1" parent="node_root_Oaa">
17
- <mxGeometry x="650" y="10" width="300" height="60" as="geometry"/>
18
- </mxCell>
19
13
  </root>
20
14
  </mxGraphModel>
21
15
  </diagram>
22
- <diagram id="CBi" name="To Do">
16
+ <diagram id="Ip4" name="To Do">
23
17
  <mxGraphModel dx="0" dy="0" background="#FFFAFA" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
24
18
  <root>
25
- <mxCell id="page_root_CBi" parent="CBi"/>
26
- <mxCell id="node_root_CBi" parent="page_root_CBi"/>
27
- <mxCell id="CBi-1" value="add diff tool with support" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_CBi">
28
- <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
29
- </mxCell>
30
- <mxCell id="CBi-2" value="add diff tool left hand side only option" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_CBi">
31
- <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
32
- </mxCell>
33
- <mxCell id="CBi-3" value="add diff tool right hand side only option" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_CBi">
34
- <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
35
- </mxCell>
36
- <mxCell id="CBi-4" value="add diff tool lhs/rhs differences" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_CBi">
19
+ <mxCell id="page_root_Ip4" parent="Ip4"/>
20
+ <mxCell id="node_root_Ip4" parent="page_root_Ip4"/>
21
+ <mxCell id="Ip4-1" value="cli support for diff" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_Ip4">
37
22
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
38
23
  </mxCell>
39
- <mxCell id="CBi-5" value="add diff tool open in vscode option" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_CBi">
24
+ <mxCell id="Ip4-2" value="cli support for profile" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_Ip4">
40
25
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
41
26
  </mxCell>
42
- <mxCell id="CBi-6" value="cli support for rails new (rag new should work like rails new) - buggy, need to work through" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_CBi">
27
+ <mxCell id="Ip4-3" value="cli support for rails new (rag new should work like rails new) - buggy, need to work through" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_Ip4">
43
28
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
44
29
  </mxCell>
45
- <mxCell id="CBi-7" value="need an option for deleting target project path" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_CBi">
30
+ <mxCell id="Ip4-4" value="need an option for deleting target project path" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_Ip4">
46
31
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
47
32
  </mxCell>
48
33
  </root>
49
34
  </mxGraphModel>
50
35
  </diagram>
51
- <diagram id="TEp" name="Done">
36
+ <diagram id="YZE" name="Done">
52
37
  <mxGraphModel dx="0" dy="0" background="#FFFAFA" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
53
38
  <root>
54
- <mxCell id="page_root_TEp" parent="TEp"/>
55
- <mxCell id="node_root_TEp" parent="page_root_TEp"/>
56
- <mxCell id="TEp-1" value="add project plan to do list" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#333333" vertex="1" parent="node_root_TEp">
39
+ <mxCell id="page_root_YZE" parent="YZE"/>
40
+ <mxCell id="node_root_YZE" parent="page_root_YZE"/>
41
+ <mxCell id="YZE-1" value="add diff tool supporting lhs only, rhs only, same and different" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#333333" vertex="1" parent="node_root_YZE">
42
+ <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
43
+ </mxCell>
44
+ <mxCell id="YZE-2" value="add project plan to do list" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#333333" vertex="1" parent="node_root_YZE">
57
45
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
58
46
  </mxCell>
59
47
  </root>
@@ -1,3 +1,3 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="302px" height="62px" viewBox="-0.5 -0.5 302 62"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-0.9-ffffff-0.1-s-0"><stop offset="0%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.9;"/><stop offset="100%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"/></linearGradient></defs><g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add project plan to do list</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add project plan to do list</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
3
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="302px" height="62px" viewBox="-0.5 -0.5 302 62"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-0.9-ffffff-0.1-s-0"><stop offset="0%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.9;"/><stop offset="100%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"/></linearGradient></defs><g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add diff tool supporting lhs only, rhs only, same and different</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add diff tool supporting lhs only, rhs only, same...</text></switch></g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add project plan to do list</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add project plan to do list</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
@@ -1,3 +1,3 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="942px" height="82px" viewBox="-0.5 -0.5 942 82"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-0.9-ffffff-0.1-s-0"><stop offset="0%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.9;"/><stop offset="100%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"/></linearGradient></defs><g><rect x="290" y="0" width="400" height="80" rx="12" ry="12" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 398px; height: 1px; padding-top: 7px; margin-left: 292px;"><div data-drawio-colors="color: #1F2D3D; " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 28px; font-family: Helvetica; color: rgb(31, 45, 61); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">DrawIO DSL</div></div></div></foreignObject><text x="292" y="35" fill="#1F2D3D" font-family="Helvetica" font-size="28px" font-weight="bold">DrawIO DSL</text></switch></g><rect x="0" y="10" width="300" height="60" rx="9" ry="9" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><path d="M 10.15 9 Q -1 9 -1 20.15 L -1 34 Q 150 52 301 34 L 301 20.15 Q 301 9 289.85 9 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 40px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">cli support for diff</div></div></div></foreignObject><text x="150" y="44" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">cli support for diff</text></switch></g><rect x="320" y="10" width="300" height="60" rx="9" ry="9" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><path d="M 330.15 9 Q 319 9 319 20.15 L 319 34 Q 470 52 621 34 L 621 20.15 Q 621 9 609.85 9 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 40px; margin-left: 321px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">cli support for profile</div></div></div></foreignObject><text x="470" y="44" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">cli support for profile</text></switch></g><rect x="640" y="10" width="300" height="60" rx="9" ry="9" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><path d="M 650.15 9 Q 639 9 639 20.15 L 639 34 Q 790 52 941 34 L 941 20.15 Q 941 9 929.85 9 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 40px; margin-left: 641px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add diff tool with support</div></div></div></foreignObject><text x="790" y="44" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add diff tool with support</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
3
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="692px" height="82px" viewBox="-0.5 -0.5 692 82"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-0.9-ffffff-0.1-s-0"><stop offset="0%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.9;"/><stop offset="100%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"/></linearGradient></defs><g><rect x="290" y="0" width="400" height="80" rx="12" ry="12" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 398px; height: 1px; padding-top: 7px; margin-left: 292px;"><div data-drawio-colors="color: #1F2D3D; " style="box-sizing: border-box; font-size: 0px; text-align: left;"><div style="display: inline-block; font-size: 28px; font-family: Helvetica; color: rgb(31, 45, 61); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">DrawIO DSL</div></div></div></foreignObject><text x="292" y="35" fill="#1F2D3D" font-family="Helvetica" font-size="28px" font-weight="bold">DrawIO DSL</text></switch></g><rect x="0" y="10" width="300" height="60" rx="9" ry="9" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><path d="M 10.15 9 Q -1 9 -1 20.15 L -1 34 Q 150 52 301 34 L 301 20.15 Q 301 9 289.85 9 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 40px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add diff tool open in vscode option</div></div></div></foreignObject><text x="150" y="44" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add diff tool open in vscode option</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
@@ -1,3 +1,3 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="302px" height="62px" viewBox="-0.5 -0.5 302 62"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-0.9-ffffff-0.1-s-0"><stop offset="0%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.9;"/><stop offset="100%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"/></linearGradient></defs><g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add diff tool with support</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add diff tool with support</text></switch></g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add diff tool left hand side only option</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add diff tool left hand side only option</text></switch></g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add diff tool right hand side only option</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add diff tool right hand side only option</text></switch></g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add diff tool lhs/rhs differences</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add diff tool lhs/rhs differences</text></switch></g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">add diff tool open in vscode option</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add diff tool open in vscode option</text></switch></g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">cli support for rails new (rag new should work like rails new) - buggy, need to work through</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">cli support for rails new (rag new should work lik...</text></switch></g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">need an option for deleting target project path</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">need an option for deleting target project path</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
3
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="302px" height="62px" viewBox="-0.5 -0.5 302 62"><defs><linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="mx-gradient-ffffff-0.9-ffffff-0.1-s-0"><stop offset="0%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.9;"/><stop offset="100%" style="stop-color: rgb(255, 255, 255); stop-opacity: 0.1;"/></linearGradient></defs><g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">cli support for diff</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">cli support for diff</text></switch></g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">cli support for profile</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">cli support for profile</text></switch></g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">cli support for rails new (rag new should work like rails new) - buggy, need to work through</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">cli support for rails new (rag new should work lik...</text></switch></g><rect x="0" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 10.15 -1 Q -1 -1 -1 10.15 L -1 24 Q 150 42 301 24 L 301 10.15 Q 301 -1 289.85 -1 Z" fill="url(#mx-gradient-ffffff-0.9-ffffff-0.1-s-0)" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 298px; height: 1px; padding-top: 30px; margin-left: 1px;"><div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">need an option for deleting target project path</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">need an option for deleting target project path</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
@@ -2,58 +2,99 @@
2
2
 
3
3
  module RailsAppGenerator
4
4
  module Diff
5
- # CompareInfo information
5
+ # CompareInfo stores LHS and RHS file information in segments
6
6
  class CompareInfo
7
7
  attr_reader :lhs_path
8
8
  attr_reader :lhs_files
9
- attr_reader :lhs_only
10
9
 
11
10
  attr_reader :rhs_path
12
11
  attr_reader :rhs_files
13
- attr_reader :rhs_only
14
12
 
15
- attr_reader :diff_list
16
- attr_reader :same_list
13
+ # File segments
14
+ attr_reader :lhs_only
15
+ attr_reader :rhs_only
16
+ attr_reader :diff
17
+ attr_reader :same
17
18
 
18
19
  def initialize(lhs_path, lhs_files, rhs_path, rhs_files)
19
- @lhs_path = lhs_path
20
- @lhs_files = lhs_files
21
- @lhs_only = []
20
+ @lhs_path = lhs_path
21
+ @lhs_files = lhs_files
22
22
 
23
- @rhs_path = rhs_path
24
- @rhs_files = rhs_files
25
- @rhs_only = []
23
+ @rhs_path = rhs_path
24
+ @rhs_files = rhs_files
26
25
 
27
- @diff_list = []
28
- @same_list = []
26
+ @lhs_only = []
27
+ @rhs_only = []
28
+ @diff = []
29
+ @same = []
29
30
 
30
- separate_files(lhs_path, lhs_files, rhs_path, rhs_files)
31
+ segment_files(lhs_path, lhs_files, rhs_path, rhs_files)
32
+ end
33
+
34
+ def lhs_file_info(type)
35
+ case type
36
+ when :lhs_only
37
+ rel_abs_file(lhs_path, lhs_only)
38
+ when :rhs_only
39
+ [] # there should be no right hand side files for the left hand path
40
+ when :same
41
+ rel_abs_file(lhs_path, same)
42
+ when :diff
43
+ rel_abs_file(lhs_path, diff)
44
+ end
45
+ end
46
+
47
+ def rhs_file_info(type)
48
+ case type
49
+ when :lhs_only
50
+ [] # there should be no left hand side files for the right hand path
51
+ when :rhs_only
52
+ rel_abs_file(rhs_path, rhs_only)
53
+ when :same
54
+ rel_abs_file(rhs_path, same)
55
+ when :diff
56
+ rel_abs_file(rhs_path, diff)
57
+ end
31
58
  end
32
59
 
33
60
  def debug
34
61
  debug_stats
35
- debug_files('left only', lhs_only)
36
- debug_files('right only', rhs_only)
37
- debug_files('same', same_list)
38
- debug_files('diff', diff_list)
62
+ debug_files('left only' , lhs_only)
63
+ debug_files('right only' , rhs_only)
64
+ debug_files('same' , same)
65
+ debug_files('diff' , diff)
39
66
  end
40
67
 
41
68
  private
42
69
 
43
- def separate_files(lhs_path, lhs_files, rhs_path, rhs_files)
44
- @lhs_only = lhs_files - rhs_files
45
- @rhs_only = rhs_files - lhs_files
46
-
70
+ # rubocop:disable Metrics/AbcSize
71
+ def segment_files(lhs_path, lhs_files, rhs_path, rhs_files)
72
+ lhs_only = lhs_files - rhs_files
73
+ rhs_only = rhs_files - lhs_files
47
74
  matching_files = lhs_files & rhs_files
48
75
 
76
+ @lhs_only = lhs_only.map { |file| FilePair.new(file, lhs_absolute_file: File.join(lhs_path, file)) }
77
+ @rhs_only = rhs_only.map { |file| FilePair.new(file, rhs_absolute_file: File.join(rhs_path, file)) }
78
+
49
79
  matching_files.each do |file|
80
+ file_pair = FilePair.new(
81
+ file,
82
+ lhs_absolute_file: File.join(lhs_path, file),
83
+ rhs_absolute_file: File.join(rhs_path, file)
84
+ )
85
+
50
86
  if FileUtils.compare_file(File.join(lhs_path, file), File.join(rhs_path, file))
51
- @same_list << file
87
+ @same << file_pair
52
88
  else
53
- @diff_list << file
89
+ @diff << file_pair
54
90
  end
55
91
  end
56
92
  end
93
+ # rubocop:enable Metrics/AbcSize
94
+
95
+ def rel_abs_file(path, files)
96
+ files.map { |file| FilePair.new(file, File.join(path, file)) }
97
+ end
57
98
 
58
99
  # rubocop:disable Metrics/AbcSize
59
100
  def debug_stats
@@ -66,8 +107,8 @@ module RailsAppGenerator
66
107
  Util.kv('file count - left only' , lhs_only.count)
67
108
  Util.kv('file count - right only' , rhs_only.count)
68
109
 
69
- Util.kv('file count - same' , same_list.count)
70
- Util.kv('file count - different' , diff_list.count)
110
+ Util.kv('file count - same' , same.count)
111
+ Util.kv('file count - different' , diff.count)
71
112
  end
72
113
  # rubocop:enable Metrics/AbcSize
73
114
 
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ module Diff
5
+ # FilePair stores the relative file path, plus the absolute file for both Left and Right site
6
+ class FilePair
7
+ attr_reader :file
8
+ attr_reader :lhs_absolute_file
9
+ attr_reader :rhs_absolute_file
10
+
11
+ def initialize(file, lhs_absolute_file: nil, rhs_absolute_file: nil)
12
+ @file = file
13
+ @lhs_absolute_file = lhs_absolute_file
14
+ @rhs_absolute_file = rhs_absolute_file
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ # module RailsAppGenerator
4
+ # module Diff
5
+ # # Diff Report
6
+ # class OpenInEditor
7
+ # attr_reader :info
8
+
9
+ # attr_reader :open_left_only
10
+ # attr_reader :open_right_only
11
+ # attr_reader :open_same
12
+ # attr_reader :open_different
13
+
14
+ # def initialize(compare_info, **opts)
15
+ # @info = compare_info
16
+
17
+ # @open_left_only = opts[:open_left_only].nil? ? false : opts[:open_left_only]
18
+ # @open_right_only = opts[:open_right_only].nil? ? true : opts[:open_right_only]
19
+ # @open_same = opts[:open_same].nil? ? false : opts[:open_same]
20
+ # @open_different = opts[:open_different].nil? ? true : opts[:open_different]
21
+ # end
22
+
23
+ # def open
24
+ # open_files('Files only in source folder' , info.lhs_only) if open_left_only
25
+ # open_files('Files only in target folder' , info.rhs_only) if open_right_only
26
+ # open_files('Files in both folders' , info.same_list) if open_same
27
+ # open_files('Files that are different' , info.diff_list) if open_different
28
+ # end
29
+
30
+ # private
31
+
32
+ # def open_files(heading, files)
33
+ # puts files.any? ? files.map { |f| f } : 'NO FILES'
34
+ # end
35
+
36
+ # def vscode_compare_files
37
+ # files_that_are_different.map do |file|
38
+ # system("code --diff #{File.join(lhs_path, file)} #{File.join(rhs_path, file)}")
39
+ # end
40
+ # end
41
+
42
+ # end
43
+ # end
44
+ # end
@@ -43,14 +43,6 @@ module RailsAppGenerator
43
43
  .map { |file| file.delete_prefix(prefix_path) }
44
44
  end
45
45
 
46
- # def vscode_compare_files
47
- # files_that_are_different.map do |file|
48
- # system("code --diff #{File.join(lhs_path, file)} #{File.join(rhs_path, file)}")
49
- # end
50
- # end
51
-
52
- # private
53
-
54
46
  # def diff_exclusions(file)
55
47
  # file.include?('config/credentials.yml.enc') ||
56
48
  # file.include?('master.key')
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ module Diff
5
+ # Diff Report
6
+ class Report
7
+ attr_reader :info
8
+
9
+ attr_reader :show_left_only
10
+ attr_reader :show_right_only
11
+ attr_reader :show_same
12
+ attr_reader :show_different
13
+
14
+ def initialize(compare_info, **opts)
15
+ @info = compare_info
16
+
17
+ @show_left_only = opts[:show_left_only].nil? ? false : opts[:show_left_only]
18
+ @show_right_only = opts[:show_right_only].nil? ? true : opts[:show_right_only]
19
+ @show_same = opts[:show_same].nil? ? false : opts[:show_same]
20
+ @show_different = opts[:show_different].nil? ? true : opts[:show_different]
21
+ end
22
+
23
+ def display
24
+ display_files('Files only in source folder' , info.lhs_only) if show_left_only
25
+ display_files('Files only in target folder' , info.rhs_only) if show_right_only
26
+ display_files('Files in both folders' , info.same) if show_same
27
+ display_files('Files that are different' , info.diff) if show_different
28
+ end
29
+
30
+ private
31
+
32
+ def display_files(heading, files)
33
+ Util.line(heading)
34
+ puts files.any? ? files.map(&:file) : 'NO FILES'
35
+ end
36
+ end
37
+ end
38
+ end
@@ -18,7 +18,7 @@ module RailsAppGenerator
18
18
  end
19
19
 
20
20
  def line(heading, len = 80)
21
- heading = "- [#{heading}]"
21
+ heading = "- [ #{heading} ]"
22
22
  puts heading.length > len ? heading : heading.ljust(len, '-')
23
23
  end
24
24
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAppGenerator
4
- VERSION = '0.0.10'
4
+ VERSION = '0.0.11'
5
5
  end
@@ -10,8 +10,11 @@ require 'bundler'
10
10
  require 'rails_app_generator/version'
11
11
  require 'rails_app_generator/cli'
12
12
  require 'rails_app_generator/util'
13
+ require 'rails_app_generator/diff/file_pair'
13
14
  require 'rails_app_generator/diff/compare_info'
14
15
  require 'rails_app_generator/diff/processor'
16
+ require 'rails_app_generator/diff/report'
17
+ require 'rails_app_generator/diff/open_in_editor'
15
18
  require 'rails_app_generator/options/base_map_option'
16
19
  require 'rails_app_generator/options/map_option_ignore'
17
20
  require 'rails_app_generator/options/map_option_string'
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "rails_app_generator",
9
- "version": "0.0.10",
9
+ "version": "0.0.11",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.1",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Create new Rails Application with custom opinions",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_app_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
@@ -211,7 +211,10 @@ files:
211
211
  - lib/rails_app_generator/context.rb
212
212
  - lib/rails_app_generator/dependencies.rb
213
213
  - lib/rails_app_generator/diff/compare_info.rb
214
+ - lib/rails_app_generator/diff/file_pair.rb
215
+ - lib/rails_app_generator/diff/open_in_editor.rb
214
216
  - lib/rails_app_generator/diff/processor.rb
217
+ - lib/rails_app_generator/diff/report.rb
215
218
  - lib/rails_app_generator/generators/advisories_generator.rb
216
219
  - lib/rails_app_generator/generators/base.rb
217
220
  - lib/rails_app_generator/generators/foo_generator.rb