rails_app_generator 0.0.9 → 0.0.10

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: eb8e4527b8ed4718b6e87844e6bf5f531b3747fd98e4ea0d6b9a00a362a6e690
4
- data.tar.gz: 5ce9f0b4ca298a820ab8bdfd4cff8947163230fb2548b40a2e6432506fe43fd4
3
+ metadata.gz: c4e7b665a771ac6d07152880cd0597dce56b9a7e091f0179e0465a5994325b1d
4
+ data.tar.gz: 1a7b85ae46aa8c7854081a9f72abe9a60a43baca3ef51a6f5568a8d1dbb97404
5
5
  SHA512:
6
- metadata.gz: 32689a628daeebed93c2e415d71fe9ed68adcce3737c55a55ad2966a378125dd22dc948f1c46325aa992c0f2bb7ba1fc37d0560f47dd385e094dbe5e2f63d9e2
7
- data.tar.gz: c3094d0c0384107b80ffe00b766a51e6c72b43135bdf298b3c0b3b524aa9aff3729cfe9a1b9d38886d5542a8a090ca7ce0708be0d3f03d09d5a7968a53e407e1
6
+ metadata.gz: d29a0cd85a4b9baecacaa2ef850e0c063f2b1a05f0dd8965e1f7867b00ee82c6ae2ffbd47fbeac4c875290f176cf3460537dd4a69f419d9d81f1fe6c6247f5f6
7
+ data.tar.gz: bc86c4078b49fc1b73c68ab15858249d2de186c9af7b5999f290f18ba476499f5017f4d6f6b1162013e0f85270ba1cd745ffe4940afdf0b0be756068eb633a66
@@ -10,20 +10,22 @@ 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: '')
13
+ todo(title: 'add diff tool supporting lhs only, rhs only, same and different')
14
14
  end
15
15
  .page('To Do', theme: :style_02, margin_left: 0, margin_top: 0) do
16
16
 
17
17
  # h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
18
18
  # p(x: 350, y: 40, w: 400, h: 80, title: 'Project plan')
19
19
 
20
+ todo(title: 'cli support for diff')
21
+ todo(title: 'cli support for profile')
22
+ todo(title: 'add diff tool with support')
20
23
  todo(title: 'add diff tool with support')
21
24
  todo(title: 'add diff tool left hand side only option')
22
25
  todo(title: 'add diff tool right hand side only option')
23
- todo(title: 'add diff tool lhs/rhs differences')
24
26
  todo(title: 'add diff tool open in vscode option')
25
- todo(title: 'rag new should work like rails new')
26
- todo(title: 'rag profile is the default option')
27
+ todo(title: 'cli support for rails new (rag new should work like rails new) - buggy, need to work through')
28
+ todo(title: 'need an option for deleting target project path') # FileUtils.rm_rf(instance.target_path)
27
29
 
28
30
  grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
29
31
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.0.9](https://github.com/klueless-io/rails_app_generator/compare/v0.0.8...v0.0.9) (2022-07-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add project plan ([1c47e0f](https://github.com/klueless-io/rails_app_generator/commit/1c47e0fa82b7b184d63fab8c2363416587d4c66d))
7
+
1
8
  ## [0.0.8](https://github.com/klueless-io/rails_app_generator/compare/v0.0.7...v0.0.8) (2022-07-24)
2
9
 
3
10
 
@@ -1,53 +1,59 @@
1
- <mxfile host="aLZ">
2
- <diagram id="pvH" name="In progress">
1
+ <mxfile host="TYq">
2
+ <diagram id="Oaa" 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_pvH" parent="pvH"/>
6
- <mxCell id="node_root_pvH" parent="page_root_pvH"/>
7
- <mxCell id="pvH-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_pvH">
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">
8
8
  <mxGeometry x="300" y="0" width="400" height="80" as="geometry"/>
9
9
  </mxCell>
10
- <mxCell id="pvH-3" value="" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#333333" vertex="1" parent="node_root_pvH">
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">
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>
13
19
  </root>
14
20
  </mxGraphModel>
15
21
  </diagram>
16
- <diagram id="U3w" name="To Do">
22
+ <diagram id="CBi" name="To Do">
17
23
  <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
24
  <root>
19
- <mxCell id="page_root_U3w" parent="U3w"/>
20
- <mxCell id="node_root_U3w" parent="page_root_U3w"/>
21
- <mxCell id="U3w-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_U3w">
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">
22
28
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
23
29
  </mxCell>
24
- <mxCell id="U3w-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_U3w">
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">
25
31
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
26
32
  </mxCell>
27
- <mxCell id="U3w-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_U3w">
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">
28
34
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
29
35
  </mxCell>
30
- <mxCell id="U3w-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_U3w">
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">
31
37
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
32
38
  </mxCell>
33
- <mxCell id="U3w-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_U3w">
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">
34
40
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
35
41
  </mxCell>
36
- <mxCell id="U3w-6" value="rag new should work like rails new" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_U3w">
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">
37
43
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
38
44
  </mxCell>
39
- <mxCell id="U3w-7" value="rag profile is the default option" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#333333" vertex="1" parent="node_root_U3w">
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">
40
46
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
41
47
  </mxCell>
42
48
  </root>
43
49
  </mxGraphModel>
44
50
  </diagram>
45
- <diagram id="CMT" name="Done">
51
+ <diagram id="TEp" name="Done">
46
52
  <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">
47
53
  <root>
48
- <mxCell id="page_root_CMT" parent="CMT"/>
49
- <mxCell id="node_root_CMT" parent="page_root_CMT"/>
50
- <mxCell id="CMT-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_CMT">
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">
51
57
  <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
52
58
  </mxCell>
53
59
  </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="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><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="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>
@@ -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;">rag new should work like rails new</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">rag new should work like rails new</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;">rag profile is the default option</div></div></div></foreignObject><text x="150" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">rag profile is the default 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>
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>
data/exe/rag CHANGED
@@ -19,23 +19,52 @@ elsif %w[-v --version].include? ARGV[0]
19
19
  exit 0
20
20
  end
21
21
 
22
- profile_path = File.expand_path("#{Pathname.new(__FILE__).dirname}/../profiles")
23
- profile_name = ARGV[0]
24
- profile_name += '.json' unless profile_name.end_with?('.json')
25
- profile_file = File.join(profile_path, profile_name)
26
-
27
- if File.exist?(profile_file)
28
- puts "Using profile #{profile_file}"
29
-
30
- profile = JSON.parse(File.read(profile_file), symbolize_names: true)
31
- args = profile[:args]
32
- opts = profile[:opts]
33
- rails_options = RailsAppGenerator::RailsOptions.new(opts)
34
-
35
- instance = RailsAppGenerator::Starter.new(args)
36
- FileUtils.rm_rf(instance.target_path)
37
- instance.start(rails_options)
38
- else
39
- puts "Profile #{profile_file} not found"
40
- exit 1
41
- end
22
+ RailsAppGenerator::Cli.start(ARGV)
23
+
24
+ exit 0
25
+
26
+ # # Use RAG with in the same way as the Rails generator (the following commands should be equivalent)
27
+ # # rails new args
28
+ # # rag new args
29
+ # if ARGV.first == 'new'
30
+ # # NOTE: This is not yet working
31
+ # RailsAppGenerator::Cli::Standard.start ARGV[1..]
32
+ # exit 0
33
+ # elsif ARGV.first == 'diff'
34
+ # # args, opts = Thor::Arguments.split(ARGV[1..])
35
+ # RailsAppGenerator::Cli::Diff.start(ARGV[1..]) # , { lhs: true, rhs: true, compare: true } )
36
+ # exit 0
37
+ # elsif ARGV.first == 'diff_lhs'
38
+ # RailsAppGenerator::Cli::Diff.start(ARGV[1..], { lhs: true })
39
+ # exit 0
40
+ # elsif ARGV.first == 'diff_rhs'
41
+ # RailsAppGenerator::Cli::Diff.start(ARGV[1..], { rhs: true })
42
+ # exit 0
43
+ # elsif ARGV.first == 'diff_compare'
44
+ # RailsAppGenerator::Cli::Diff.start(ARGV[1..], { compare: true })
45
+ # exit 0
46
+ # elsif !ARGV.first.nil?
47
+ # profile_path = File.expand_path("#{Pathname.new(__FILE__).dirname}/../profiles")
48
+ # profile_name = ARGV[0]
49
+ # profile_name += '.json' unless profile_name.end_with?('.json')
50
+ # profile_file = File.join(profile_path, profile_name)
51
+
52
+ # RailsAppGenerator::Cli::Profile.start(profile_file)
53
+
54
+ # exit 0
55
+ # end
56
+
57
+ # if File.exist?(profile_file)
58
+ # puts "Using profile #{profile_file}"
59
+
60
+ # profile = JSON.parse(File.read(profile_file), symbolize_names: true)
61
+ # args = profile[:args]
62
+ # opts = profile[:opts]
63
+ # rails_options = RailsAppGenerator::RailsOptions.new(opts)
64
+
65
+ # instance = RailsAppGenerator::Starter.new(args)
66
+ # FileUtils.rm_rf(instance.target_path)
67
+ # instance.start(rails_options)
68
+ # else
69
+ # puts "Profile #{profile_file} not found"
70
+ # exit 1
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ # Thor CLI
5
+ class Cli < Thor
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
+
11
+ def diff(lhs_folder, rhs_folder)
12
+ # puts "Diffing #{lhs_folder} and #{rhs_folder}"
13
+ # puts JSON.pretty_generate(options)
14
+ processor = RailsAppGenerator::Diff::Processor.new(lhs_folder, rhs_folder)
15
+ compare_info = processor.compare
16
+
17
+ compare_info.debug
18
+
19
+ # report = RailsAppGenerator::Diff::Report.new(compare_info)
20
+ # report.display
21
+ end
22
+
23
+ # def initialize(profile_file)
24
+ # @profile_file = profile_file
25
+ # end
26
+
27
+ # def run
28
+ # puts "Using profile #{profile_file}"
29
+
30
+ # profile = JSON.parse(File.read(profile_file), symbolize_names: true)
31
+ # args = profile[:args]
32
+ # opts = profile[:opts]
33
+ # rails_options = RailsAppGenerator::RailsOptions.new(opts)
34
+
35
+ # instance = RailsAppGenerator::Starter.new(args)
36
+ # FileUtils.rm_rf(instance.target_path)
37
+ # instance.start(rails_options)
38
+ # end
39
+ end
40
+ end
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ module Diff
5
+ # CompareInfo information
6
+ class CompareInfo
7
+ attr_reader :lhs_path
8
+ attr_reader :lhs_files
9
+ attr_reader :lhs_only
10
+
11
+ attr_reader :rhs_path
12
+ attr_reader :rhs_files
13
+ attr_reader :rhs_only
14
+
15
+ attr_reader :diff_list
16
+ attr_reader :same_list
17
+
18
+ def initialize(lhs_path, lhs_files, rhs_path, rhs_files)
19
+ @lhs_path = lhs_path
20
+ @lhs_files = lhs_files
21
+ @lhs_only = []
22
+
23
+ @rhs_path = rhs_path
24
+ @rhs_files = rhs_files
25
+ @rhs_only = []
26
+
27
+ @diff_list = []
28
+ @same_list = []
29
+
30
+ separate_files(lhs_path, lhs_files, rhs_path, rhs_files)
31
+ end
32
+
33
+ def debug
34
+ 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)
39
+ end
40
+
41
+ private
42
+
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
+
47
+ matching_files = lhs_files & rhs_files
48
+
49
+ matching_files.each do |file|
50
+ if FileUtils.compare_file(File.join(lhs_path, file), File.join(rhs_path, file))
51
+ @same_list << file
52
+ else
53
+ @diff_list << file
54
+ end
55
+ end
56
+ end
57
+
58
+ # rubocop:disable Metrics/AbcSize
59
+ def debug_stats
60
+ Util.kv('left path' , lhs_path)
61
+ Util.kv('right path' , rhs_path)
62
+
63
+ Util.kv('file count - left' , lhs_files.count)
64
+ Util.kv('file count - right' , rhs_files.count)
65
+
66
+ Util.kv('file count - left only' , lhs_only.count)
67
+ Util.kv('file count - right only' , rhs_only.count)
68
+
69
+ Util.kv('file count - same' , same_list.count)
70
+ Util.kv('file count - different' , diff_list.count)
71
+ end
72
+ # rubocop:enable Metrics/AbcSize
73
+
74
+ def debug_files(heading, files)
75
+ Util.line(heading)
76
+ puts files.any? ? files : 'NO FILES'
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ module Diff
5
+ # Diff Processor
6
+ class Processor
7
+ attr_reader :lhs_path
8
+ attr_reader :rhs_path
9
+
10
+ DEFAULT_EXCLUSION = lambda do |_file, relative_file|
11
+ relative_file.start_with?('tmp') || relative_file.start_with?('node_modules')
12
+ end
13
+
14
+ def initialize(lhs_path, rhs_path)
15
+ @lhs_path = lhs_path
16
+ @rhs_path = rhs_path
17
+ end
18
+
19
+ attr_writer :exclusion_handler
20
+
21
+ def compare
22
+ @info ||= RailsAppGenerator::Diff::CompareInfo.new(
23
+ lhs_path, file_list(lhs_path),
24
+ rhs_path, file_list(rhs_path)
25
+ )
26
+ end
27
+
28
+ def debug
29
+ compare.debug
30
+ end
31
+
32
+ private
33
+
34
+ def exclusion_handler
35
+ @exclusion_handler ||= DEFAULT_EXCLUSION
36
+ end
37
+
38
+ def file_list(path)
39
+ prefix_path = path.end_with?('/') ? path : "#{path}/"
40
+
41
+ Dir.glob("#{path}/**/*")
42
+ .reject { |file| File.directory?(file) || exclusion_handler.call(file, file.delete_prefix(prefix_path)) }
43
+ .map { |file| file.delete_prefix(prefix_path) }
44
+ end
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
+ # def diff_exclusions(file)
55
+ # file.include?('config/credentials.yml.enc') ||
56
+ # file.include?('master.key')
57
+ # end
58
+ end
59
+ end
60
+ end
@@ -4,17 +4,6 @@ require 'rails'
4
4
 
5
5
  require 'rails/generators'
6
6
  require 'rails/generators/rails/app/app_generator'
7
- # require 'active_model/railtie'
8
- # active_record/railtie
9
- # active_storage/engine
10
- # action_controller/railtie
11
- # action_view/railtie
12
- # action_mailer/railtie
13
- # active_job/railtie
14
- # action_cable/engine
15
- # action_mailbox/engine
16
- # action_text/engine
17
- # rails/test_unit/railtie
18
7
 
19
8
  module RailsAppGenerator
20
9
  # Starter is a wrapper for Rails::AppGenerator
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ # Utility methods
5
+ class Util
6
+ class << self
7
+ # Log KeyValue pair
8
+ #
9
+ # @example
10
+ # Util.kv(:key, :value)
11
+ def kv(label, value, len = 35)
12
+ return ' ' * len if label.nil?
13
+
14
+ label = label.to_s if label.is_a?(Symbol)
15
+ label = label.length > len ? label.slice(0..len) : label.ljust(len, ' ')
16
+
17
+ puts "#{label}: #{value}"
18
+ end
19
+
20
+ def line(heading, len = 80)
21
+ heading = "- [#{heading}]"
22
+ puts heading.length > len ? heading : heading.ljust(len, '-')
23
+ end
24
+ end
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAppGenerator
4
- VERSION = '0.0.9'
4
+ VERSION = '0.0.10'
5
5
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # require 'k_log'
4
-
5
3
  require 'rails/command/base'
6
4
  require 'rails/generators/app_base'
7
5
  require 'rails/generators'
@@ -10,6 +8,10 @@ require 'rails/generators/rails/app/app_generator'
10
8
  require 'bundler'
11
9
 
12
10
  require 'rails_app_generator/version'
11
+ require 'rails_app_generator/cli'
12
+ require 'rails_app_generator/util'
13
+ require 'rails_app_generator/diff/compare_info'
14
+ require 'rails_app_generator/diff/processor'
13
15
  require 'rails_app_generator/options/base_map_option'
14
16
  require 'rails_app_generator/options/map_option_ignore'
15
17
  require 'rails_app_generator/options/map_option_string'
@@ -25,15 +27,9 @@ require 'rails_app_generator/app_builder'
25
27
  require 'rails_app_generator/app_generator'
26
28
  require 'rails_app_generator/starter'
27
29
 
28
- # require "rails_app_generator/generators/base"
29
- # require "rails_app_generator/generators/foo_generator"
30
- # require "rails_app_generator/generators/advisories_generator"
31
-
32
30
  module RailsAppGenerator
33
31
  # raise RailsAppGenerator::Error, 'Sample message'
34
32
  Error = Class.new(StandardError)
35
-
36
- # Your code goes here...
37
33
  end
38
34
 
39
35
  if ENV.fetch('KLUE_DEBUG', 'false').downcase == 'true'
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "rails_app_generator",
9
- "version": "0.0.9",
9
+ "version": "0.0.10",
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.9",
3
+ "version": "0.0.10",
4
4
  "description": "Create new Rails Application with custom opinions",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
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.9
4
+ version: 0.0.10
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-24 00:00:00.000000000 Z
11
+ date: 2022-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootsnap
@@ -207,8 +207,11 @@ files:
207
207
  - lib/rails_app_generator/addons/views.rb
208
208
  - lib/rails_app_generator/app_builder.rb
209
209
  - lib/rails_app_generator/app_generator.rb
210
+ - lib/rails_app_generator/cli.rb
210
211
  - lib/rails_app_generator/context.rb
211
212
  - lib/rails_app_generator/dependencies.rb
213
+ - lib/rails_app_generator/diff/compare_info.rb
214
+ - lib/rails_app_generator/diff/processor.rb
212
215
  - lib/rails_app_generator/generators/advisories_generator.rb
213
216
  - lib/rails_app_generator/generators/base.rb
214
217
  - lib/rails_app_generator/generators/foo_generator.rb
@@ -231,6 +234,7 @@ files:
231
234
  - lib/rails_app_generator/options/options_builder.rb
232
235
  - lib/rails_app_generator/options/rails_options.rb
233
236
  - lib/rails_app_generator/starter.rb
237
+ - lib/rails_app_generator/util.rb
234
238
  - lib/rails_app_generator/version.rb
235
239
  - package-lock.json
236
240
  - package.json