rails_app_generator 0.0.12 → 0.0.15
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 +4 -4
- data/.builders/generators/project-plan.rb +7 -14
- data/CHANGELOG.md +21 -0
- data/docs/project-plan/project.drawio +27 -27
- data/docs/project-plan/project_done.svg +1 -1
- data/docs/project-plan/project_in_progress.svg +1 -1
- data/docs/project-plan/project_todo.svg +1 -1
- data/lib/rails_app_generator/cli.rb +30 -6
- data/lib/rails_app_generator/diff/compare_info.rb +5 -31
- data/lib/rails_app_generator/diff/file_pair.rb +6 -6
- data/lib/rails_app_generator/diff/open_in_editor.rb +1 -1
- data/lib/rails_app_generator/diff/report.rb +7 -5
- data/lib/rails_app_generator/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cca2f1e34648c7901ae0a96f9b0f672aea90cf56c39454cdf8588df622df2597
|
|
4
|
+
data.tar.gz: 3bf462300806d73a340fab47476c4f0b5999c26163ba82ef2253ffa8df99fd47
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 26df78c51a7e7d73da6f6de478d0612c0244dc9ae36255486177ad0516332314de9dee46b5a82c3c572f71a26f47cb10015a62a23b39ca7ed113d6e509ab8d9e
|
|
7
|
+
data.tar.gz: 719cd5df268fdcfe048f9c8002037192120d29792155d4bf53f5c76d5cb8e5fe2313a87bb8a3735dae52ec702205759d5f319916b8a65e90a37534fcdaf3b9f0
|
|
@@ -5,36 +5,29 @@ KManager.action :project_plan do
|
|
|
5
5
|
.init(k_builder, on_exist: :write, on_action: :execute)
|
|
6
6
|
.diagram(rounded: 1, glass: 1)
|
|
7
7
|
.page('In progress', theme: :style_03, margin_left: 0, margin_top: 0) do
|
|
8
|
-
h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
|
|
9
|
-
# p(x: 350, y: 40, w: 400, h: 80, title: 'Project plan - In progress')
|
|
10
|
-
|
|
11
8
|
grid_layout(y: 90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
|
12
9
|
|
|
13
|
-
todo(title: '
|
|
10
|
+
todo(title: 'cli support for profile')
|
|
11
|
+
|
|
14
12
|
end
|
|
15
13
|
.page('To Do', theme: :style_02, margin_left: 0, margin_top: 0) do
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
# p(x: 350, y: 40, w: 400, h: 80, title: 'Project plan')
|
|
15
|
+
grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
|
19
16
|
|
|
20
|
-
todo(title: 'cli support for diff')
|
|
21
|
-
todo(title: 'cli support for profile')
|
|
17
|
+
todo(title: 'cli help support for diff')
|
|
22
18
|
todo(title: 'cli support for rails new (rag new should work like rails new) - buggy, need to work through')
|
|
23
19
|
todo(title: 'need an option for deleting target project path') # FileUtils.rm_rf(instance.target_path)
|
|
24
20
|
|
|
25
|
-
grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
|
26
|
-
|
|
27
21
|
end
|
|
28
22
|
.page('Done', theme: :style_06, margin_left: 0, margin_top: 0) do
|
|
29
23
|
|
|
30
|
-
|
|
31
|
-
# p(x: 350, y: 40, w: 400, h: 80, title: 'Done')
|
|
24
|
+
grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
|
32
25
|
|
|
26
|
+
todo(title: 'cli support for diff')
|
|
27
|
+
todo(title: 'add diff tool - open in editor')
|
|
33
28
|
todo(title: 'add diff tool supporting lhs only, rhs only, same and different')
|
|
34
29
|
todo(title: 'add project plan to do list')
|
|
35
30
|
|
|
36
|
-
grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
|
37
|
-
|
|
38
31
|
end
|
|
39
32
|
.cd(:docs)
|
|
40
33
|
.save('project-plan/project.drawio')
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [0.0.14](https://github.com/klueless-io/rails_app_generator/compare/v0.0.13...v0.0.14) (2022-07-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* cli support for diff ([90f6a2f](https://github.com/klueless-io/rails_app_generator/commit/90f6a2f03c31f8b78d6f2b140a173bc73f08c48c))
|
|
7
|
+
|
|
8
|
+
## [0.0.13](https://github.com/klueless-io/rails_app_generator/compare/v0.0.12...v0.0.13) (2022-07-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* better attribute names ([9cdc5dc](https://github.com/klueless-io/rails_app_generator/commit/9cdc5dc24a4d2402efed68ddbf71e461ee870bbe))
|
|
14
|
+
|
|
15
|
+
## [0.0.12](https://github.com/klueless-io/rails_app_generator/compare/v0.0.11...v0.0.12) (2022-07-25)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* add support for open in editor in diff tool ([9d94e26](https://github.com/klueless-io/rails_app_generator/commit/9d94e261c6bac8d17c65da00d6d7d8e2907422ae))
|
|
21
|
+
|
|
1
22
|
## [0.0.11](https://github.com/klueless-io/rails_app_generator/compare/v0.0.10...v0.0.11) (2022-07-25)
|
|
2
23
|
|
|
3
24
|
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
<mxfile host="
|
|
2
|
-
<diagram id="
|
|
1
|
+
<mxfile host="3Xt">
|
|
2
|
+
<diagram id="avE" 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="
|
|
6
|
-
<mxCell id="
|
|
7
|
-
<mxCell id="
|
|
8
|
-
<mxGeometry x="300" y="0" width="400" height="80" as="geometry"/>
|
|
9
|
-
</mxCell>
|
|
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">
|
|
5
|
+
<mxCell id="page_root_avE" parent="avE"/>
|
|
6
|
+
<mxCell id="node_root_avE" parent="page_root_avE"/>
|
|
7
|
+
<mxCell id="avE-2" 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_avE">
|
|
11
8
|
<mxGeometry x="10" y="10" width="300" height="60" as="geometry"/>
|
|
12
9
|
</mxCell>
|
|
13
10
|
</root>
|
|
14
11
|
</mxGraphModel>
|
|
15
12
|
</diagram>
|
|
16
|
-
<diagram id="
|
|
13
|
+
<diagram id="uOE" name="To Do">
|
|
17
14
|
<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">
|
|
18
15
|
<root>
|
|
19
|
-
<mxCell id="
|
|
20
|
-
<mxCell id="
|
|
21
|
-
<mxCell id="
|
|
22
|
-
<mxGeometry x="
|
|
23
|
-
</mxCell>
|
|
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">
|
|
25
|
-
<mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
|
|
16
|
+
<mxCell id="page_root_uOE" parent="uOE"/>
|
|
17
|
+
<mxCell id="node_root_uOE" parent="page_root_uOE"/>
|
|
18
|
+
<mxCell id="uOE-2" value="cli help support for diff" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_uOE">
|
|
19
|
+
<mxGeometry x="10" y="10" width="300" height="60" as="geometry"/>
|
|
26
20
|
</mxCell>
|
|
27
|
-
<mxCell id="
|
|
28
|
-
<mxGeometry x="
|
|
21
|
+
<mxCell id="uOE-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_uOE">
|
|
22
|
+
<mxGeometry x="330" y="10" width="300" height="60" as="geometry"/>
|
|
29
23
|
</mxCell>
|
|
30
|
-
<mxCell id="
|
|
31
|
-
<mxGeometry x="
|
|
24
|
+
<mxCell id="uOE-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_uOE">
|
|
25
|
+
<mxGeometry x="650" y="10" width="300" height="60" as="geometry"/>
|
|
32
26
|
</mxCell>
|
|
33
27
|
</root>
|
|
34
28
|
</mxGraphModel>
|
|
35
29
|
</diagram>
|
|
36
|
-
<diagram id="
|
|
30
|
+
<diagram id="Oa0" name="Done">
|
|
37
31
|
<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">
|
|
38
32
|
<root>
|
|
39
|
-
<mxCell id="
|
|
40
|
-
<mxCell id="
|
|
41
|
-
<mxCell id="
|
|
42
|
-
<mxGeometry x="
|
|
33
|
+
<mxCell id="page_root_Oa0" parent="Oa0"/>
|
|
34
|
+
<mxCell id="node_root_Oa0" parent="page_root_Oa0"/>
|
|
35
|
+
<mxCell id="Oa0-2" value="cli support for diff" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#333333" vertex="1" parent="node_root_Oa0">
|
|
36
|
+
<mxGeometry x="10" y="10" width="300" height="60" as="geometry"/>
|
|
37
|
+
</mxCell>
|
|
38
|
+
<mxCell id="Oa0-3" value="add diff tool - open in editor" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#333333" vertex="1" parent="node_root_Oa0">
|
|
39
|
+
<mxGeometry x="330" y="10" width="300" height="60" as="geometry"/>
|
|
40
|
+
</mxCell>
|
|
41
|
+
<mxCell id="Oa0-4" 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_Oa0">
|
|
42
|
+
<mxGeometry x="650" y="10" width="300" height="60" as="geometry"/>
|
|
43
43
|
</mxCell>
|
|
44
|
-
<mxCell id="
|
|
45
|
-
<mxGeometry x="
|
|
44
|
+
<mxCell id="Oa0-5" 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_Oa0">
|
|
45
|
+
<mxGeometry x="10" y="90" width="300" height="60" as="geometry"/>
|
|
46
46
|
</mxCell>
|
|
47
47
|
</root>
|
|
48
48
|
</mxGraphModel>
|
|
@@ -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="
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="942px" height="142px" viewBox="-0.5 -0.5 942 142"><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;">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="320" y="0" width="300" height="60" rx="9" ry="9" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><path d="M 330.15 -1 Q 319 -1 319 10.15 L 319 24 Q 470 42 621 24 L 621 10.15 Q 621 -1 609.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: 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;">add diff tool - open in editor</div></div></div></foreignObject><text x="470" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add diff tool - open in editor</text></switch></g><rect x="640" y="0" width="300" height="60" rx="9" ry="9" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><path d="M 650.15 -1 Q 639 -1 639 10.15 L 639 24 Q 790 42 941 24 L 941 10.15 Q 941 -1 929.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: 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 supporting lhs only, rhs only, same and different</div></div></div></foreignObject><text x="790" 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="80" width="300" height="60" rx="9" ry="9" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><path d="M 10.15 79 Q -1 79 -1 90.15 L -1 104 Q 150 122 301 104 L 301 90.15 Q 301 79 289.85 79 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: 110px; 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="114" 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="
|
|
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="#d5e8d4" stroke="#82b366" 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></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="
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="942px" height="62px" viewBox="-0.5 -0.5 942 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 help support for diff</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">cli help support for diff</text></switch></g><rect x="320" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 330.15 -1 Q 319 -1 319 10.15 L 319 24 Q 470 42 621 24 L 621 10.15 Q 621 -1 609.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: 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 rails new (rag new should work like rails new) - buggy, need to work through</div></div></div></foreignObject><text x="470" 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="640" y="0" width="300" height="60" rx="9" ry="9" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><path d="M 650.15 -1 Q 639 -1 639 10.15 L 639 24 Q 790 42 941 24 L 941 10.15 Q 941 -1 929.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: 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;">need an option for deleting target project path</div></div></div></foreignObject><text x="790" 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>
|
|
@@ -4,21 +4,45 @@ module RailsAppGenerator
|
|
|
4
4
|
# Thor CLI
|
|
5
5
|
class Cli < Thor
|
|
6
6
|
desc 'diff lhs_folder rhs_folder [options]', 'Diff two different rails folders'
|
|
7
|
-
option :lhs , type: :boolean
|
|
8
|
-
option :rhs , type: :boolean
|
|
9
|
-
option :compare , type: :boolean
|
|
10
7
|
|
|
8
|
+
# Run report to console for following options
|
|
9
|
+
option :show_left_only , type: :boolean
|
|
10
|
+
option :show_right_only , type: :boolean
|
|
11
|
+
option :show_same , type: :boolean
|
|
12
|
+
option :show_different , type: :boolean
|
|
13
|
+
|
|
14
|
+
# Open files in VSCode for for following options
|
|
15
|
+
option :open_left_only , type: :boolean
|
|
16
|
+
option :open_right_only , type: :boolean
|
|
17
|
+
option :open_same , type: :boolean
|
|
18
|
+
option :open_different , type: :boolean
|
|
19
|
+
|
|
20
|
+
# rubocop:disable Metrics/AbcSize
|
|
11
21
|
def diff(lhs_folder, rhs_folder)
|
|
12
22
|
# puts "Diffing #{lhs_folder} and #{rhs_folder}"
|
|
13
23
|
# puts JSON.pretty_generate(options)
|
|
14
24
|
processor = RailsAppGenerator::Diff::Processor.new(lhs_folder, rhs_folder)
|
|
15
25
|
compare_info = processor.compare
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
report = RailsAppGenerator::Diff::Report.new(
|
|
28
|
+
compare_info,
|
|
29
|
+
show_left_only: options[:show_left_only],
|
|
30
|
+
show_right_only: options[:show_right_only],
|
|
31
|
+
show_same: options[:show_same],
|
|
32
|
+
show_different: options[:show_different]
|
|
33
|
+
)
|
|
34
|
+
report.display
|
|
18
35
|
|
|
19
|
-
|
|
20
|
-
|
|
36
|
+
vscode = RailsAppGenerator::Diff::OpenInEditor.new(
|
|
37
|
+
compare_info,
|
|
38
|
+
open_left_only: options[:open_left_only],
|
|
39
|
+
open_right_only: options[:open_right_only],
|
|
40
|
+
open_same: options[:open_same],
|
|
41
|
+
open_different: options[:show_different]
|
|
42
|
+
)
|
|
43
|
+
vscode.open
|
|
21
44
|
end
|
|
45
|
+
# rubocop:enable Metrics/AbcSize
|
|
22
46
|
|
|
23
47
|
# def initialize(profile_file)
|
|
24
48
|
# @profile_file = profile_file
|
|
@@ -31,32 +31,6 @@ module RailsAppGenerator
|
|
|
31
31
|
segment_files(lhs_path, lhs_files, rhs_path, rhs_files)
|
|
32
32
|
end
|
|
33
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
|
|
58
|
-
end
|
|
59
|
-
|
|
60
34
|
def debug
|
|
61
35
|
debug_stats
|
|
62
36
|
debug_files('left only' , lhs_only)
|
|
@@ -73,14 +47,14 @@ module RailsAppGenerator
|
|
|
73
47
|
rhs_only = rhs_files - lhs_files
|
|
74
48
|
matching_files = lhs_files & rhs_files
|
|
75
49
|
|
|
76
|
-
@lhs_only = lhs_only.map { |file| FilePair.new(file,
|
|
77
|
-
@rhs_only = rhs_only.map { |file| FilePair.new(file,
|
|
50
|
+
@lhs_only = lhs_only.map { |file| FilePair.new(file, lhs_file: File.join(lhs_path, file)) }
|
|
51
|
+
@rhs_only = rhs_only.map { |file| FilePair.new(file, rhs_file: File.join(rhs_path, file)) }
|
|
78
52
|
|
|
79
53
|
matching_files.each do |file|
|
|
80
54
|
file_pair = FilePair.new(
|
|
81
55
|
file,
|
|
82
|
-
|
|
83
|
-
|
|
56
|
+
lhs_file: File.join(lhs_path, file),
|
|
57
|
+
rhs_file: File.join(rhs_path, file)
|
|
84
58
|
)
|
|
85
59
|
|
|
86
60
|
if FileUtils.compare_file(File.join(lhs_path, file), File.join(rhs_path, file))
|
|
@@ -114,7 +88,7 @@ module RailsAppGenerator
|
|
|
114
88
|
|
|
115
89
|
def debug_files(heading, files)
|
|
116
90
|
Util.line(heading)
|
|
117
|
-
puts files.any? ? files : 'NO FILES'
|
|
91
|
+
puts files.any? ? files.map(&:file) : 'NO FILES'
|
|
118
92
|
end
|
|
119
93
|
end
|
|
120
94
|
end
|
|
@@ -4,14 +4,14 @@ module RailsAppGenerator
|
|
|
4
4
|
module Diff
|
|
5
5
|
# FilePair stores the relative file path, plus the absolute file for both Left and Right site
|
|
6
6
|
class FilePair
|
|
7
|
-
attr_reader :file
|
|
8
|
-
attr_reader :
|
|
9
|
-
attr_reader :
|
|
7
|
+
attr_reader :file # relative file
|
|
8
|
+
attr_reader :lhs_file # absolute file for left hand side
|
|
9
|
+
attr_reader :rhs_file # absolute file for right hand side
|
|
10
10
|
|
|
11
|
-
def initialize(file,
|
|
11
|
+
def initialize(file, lhs_file: nil, rhs_file: nil)
|
|
12
12
|
@file = file
|
|
13
|
-
@
|
|
14
|
-
@
|
|
13
|
+
@lhs_file = lhs_file
|
|
14
|
+
@rhs_file = rhs_file
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -14,10 +14,10 @@ module RailsAppGenerator
|
|
|
14
14
|
def initialize(compare_info, **opts)
|
|
15
15
|
@info = compare_info
|
|
16
16
|
|
|
17
|
-
@show_left_only = opts[:show_left_only].nil?
|
|
18
|
-
@show_right_only = opts[:show_right_only].nil?
|
|
19
|
-
@show_same = opts[:show_same].nil?
|
|
20
|
-
@show_different = opts[:show_different].nil?
|
|
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
21
|
end
|
|
22
22
|
|
|
23
23
|
def display
|
|
@@ -30,8 +30,10 @@ module RailsAppGenerator
|
|
|
30
30
|
private
|
|
31
31
|
|
|
32
32
|
def display_files(heading, files)
|
|
33
|
+
return if files.empty?
|
|
34
|
+
|
|
33
35
|
Util.line(heading)
|
|
34
|
-
puts files.
|
|
36
|
+
puts files.map(&:file)
|
|
35
37
|
end
|
|
36
38
|
end
|
|
37
39
|
end
|
data/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rails_app_generator",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "rails_app_generator",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.15",
|
|
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
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_app_generator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Cruwys
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-07-
|
|
11
|
+
date: 2022-07-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bootsnap
|