rails_app_generator 0.0.13 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92848a2f101d1eacb68fced1c5f1a3ab28b4c8314a24d34b2cf7bec51212bce6
4
- data.tar.gz: 1028fb8c5a896879cdca537b6efd4d631504ddeddc2faa5dcd02e0fabbefcf43
3
+ metadata.gz: 7cfde02d61ec2b1c82f6e6f41fc1f2e2ce9b1c8cc9574e35cd979c0c5c1af461
4
+ data.tar.gz: b75d287d8ff8478b380a61eca203733273172c85e2f2e4d92151ddacd2349294
5
5
  SHA512:
6
- metadata.gz: 9617e90e25bef8a51ea05bfac6baac98561a7e376c8d25b78ad941a12349eb38063114f79b42824a776ee5b6eb7fb6a66d1b3248bacb82232890811379e41805
7
- data.tar.gz: 5df793375d8f32e1cf33628e0370405f3ade92c6c5596277aea6062f3c4d8819d41e4ecf34e88de2e3e43d89983e315905c2119fd9ae5f138ffa9e59c34d91ee
6
+ metadata.gz: 2f919095f76dfd58d779f8016cbd0d68b204b86556b31f8880961b1888b4890b0749dac2edccfc5178b82c7bbd642ca63eb7f1c6f4f32e5a9dcef533e8f78eb5
7
+ data.tar.gz: 31315631468f7b3bf3e0be1cbadbc7000db39cc5bfb74f89f022ff9a4836505b06e3b33505fe64564ef464e5b2e8e745b1342c65b0768e9a10f5514ac7a8ce8e
@@ -5,36 +5,30 @@ 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: 'add diff tool open in vscode option')
10
+
14
11
  end
15
12
  .page('To Do', theme: :style_02, margin_left: 0, margin_top: 0) do
16
13
 
17
- # h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
18
- # p(x: 350, y: 40, w: 400, h: 80, title: 'Project plan')
14
+ grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
19
15
 
20
- todo(title: 'cli support for diff')
21
- todo(title: 'cli support for profile')
16
+ todo(title: 'cli help support for diff')
22
17
  todo(title: 'cli support for rails new (rag new should work like rails new) - buggy, need to work through')
23
18
  todo(title: 'need an option for deleting target project path') # FileUtils.rm_rf(instance.target_path)
24
19
 
25
- grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
26
-
27
20
  end
28
21
  .page('Done', theme: :style_06, margin_left: 0, margin_top: 0) do
29
22
 
30
- # h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
31
- # p(x: 350, y: 40, w: 400, h: 80, title: 'Done')
23
+ grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
32
24
 
25
+ todo(title: 'cli support for profile')
26
+ todo(title: 'separate CLI methods into include modules')
27
+ todo(title: 'cli support for diff')
28
+ todo(title: 'add diff tool - open in editor')
33
29
  todo(title: 'add diff tool supporting lhs only, rhs only, same and different')
34
30
  todo(title: 'add project plan to do list')
35
31
 
36
- grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
37
-
38
32
  end
39
33
  .cd(:docs)
40
34
  .save('project-plan/project.drawio')
data/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## [0.0.15](https://github.com/klueless-io/rails_app_generator/compare/v0.0.14...v0.0.15) (2022-07-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update project plan documentation ([7ed1728](https://github.com/klueless-io/rails_app_generator/commit/7ed1728e081149e56eb4292f37825169a5f21690))
7
+
8
+ ## [0.0.14](https://github.com/klueless-io/rails_app_generator/compare/v0.0.13...v0.0.14) (2022-07-26)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * cli support for diff ([90f6a2f](https://github.com/klueless-io/rails_app_generator/commit/90f6a2f03c31f8b78d6f2b140a173bc73f08c48c))
14
+
15
+ ## [0.0.13](https://github.com/klueless-io/rails_app_generator/compare/v0.0.12...v0.0.13) (2022-07-25)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * better attribute names ([9cdc5dc](https://github.com/klueless-io/rails_app_generator/commit/9cdc5dc24a4d2402efed68ddbf71e461ee870bbe))
21
+
1
22
  ## [0.0.12](https://github.com/klueless-io/rails_app_generator/compare/v0.0.11...v0.0.12) (2022-07-25)
2
23
 
3
24
 
data/README.md CHANGED
@@ -22,6 +22,15 @@ Or install it yourself as:
22
22
  gem install rails_app_generator
23
23
  ```
24
24
 
25
+ Use the Gem
26
+
27
+ ```
28
+ rag rag-simple
29
+ rag rag-tailwind
30
+ rag rag-bootstrap
31
+ ```
32
+
33
+
25
34
  ## Notes
26
35
 
27
36
  You can use rails_app_generator to create Rails 7 applications
@@ -37,7 +46,7 @@ Templates for rails are separated from templates for addons
37
46
 
38
47
  As a Developer, I want to create new Rails application with flexible opinions so that I can build different rails proof of concepts
39
48
 
40
- See all [stories](./STORIES.md)
49
+ [Project Plan](./docs/project-plan.md)
41
50
 
42
51
 
43
52
  ## Usage
@@ -1,48 +1,51 @@
1
- <mxfile host="x0A">
2
- <diagram id="Oq8" name="In progress">
1
+ <mxfile host="NQB">
2
+ <diagram id="LFr" 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_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
- <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">
11
- <mxGeometry x="10" y="10" width="300" height="60" as="geometry"/>
12
- </mxCell>
5
+ <mxCell id="page_root_LFr" parent="LFr"/>
6
+ <mxCell id="node_root_LFr" parent="page_root_LFr"/>
13
7
  </root>
14
8
  </mxGraphModel>
15
9
  </diagram>
16
- <diagram id="Ip4" name="To Do">
10
+ <diagram id="OEp" name="To Do">
17
11
  <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
12
  <root>
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">
22
- <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
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"/>
13
+ <mxCell id="page_root_OEp" parent="OEp"/>
14
+ <mxCell id="node_root_OEp" parent="page_root_OEp"/>
15
+ <mxCell id="OEp-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_OEp">
16
+ <mxGeometry x="10" y="10" width="300" height="60" as="geometry"/>
26
17
  </mxCell>
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">
28
- <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
18
+ <mxCell id="OEp-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_OEp">
19
+ <mxGeometry x="330" y="10" width="300" height="60" as="geometry"/>
29
20
  </mxCell>
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">
31
- <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
21
+ <mxCell id="OEp-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_OEp">
22
+ <mxGeometry x="650" y="10" width="300" height="60" as="geometry"/>
32
23
  </mxCell>
33
24
  </root>
34
25
  </mxGraphModel>
35
26
  </diagram>
36
- <diagram id="YZE" name="Done">
27
+ <diagram id="esj" name="Done">
37
28
  <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
29
  <root>
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"/>
30
+ <mxCell id="page_root_esj" parent="esj"/>
31
+ <mxCell id="node_root_esj" parent="page_root_esj"/>
32
+ <mxCell id="esj-2" value="cli support for profile" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#333333" vertex="1" parent="node_root_esj">
33
+ <mxGeometry x="10" y="10" width="300" height="60" as="geometry"/>
34
+ </mxCell>
35
+ <mxCell id="esj-3" value="separate CLI methods into include modules" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#333333" vertex="1" parent="node_root_esj">
36
+ <mxGeometry x="330" y="10" width="300" height="60" as="geometry"/>
37
+ </mxCell>
38
+ <mxCell id="esj-4" 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_esj">
39
+ <mxGeometry x="650" y="10" width="300" height="60" as="geometry"/>
40
+ </mxCell>
41
+ <mxCell id="esj-5" 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_esj">
42
+ <mxGeometry x="10" y="90" width="300" height="60" as="geometry"/>
43
+ </mxCell>
44
+ <mxCell id="esj-6" 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_esj">
45
+ <mxGeometry x="330" y="90" width="300" height="60" as="geometry"/>
43
46
  </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">
45
- <mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
47
+ <mxCell id="esj-7" 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_esj">
48
+ <mxGeometry x="650" y="90" width="300" height="60" as="geometry"/>
46
49
  </mxCell>
47
50
  </root>
48
51
  </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="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>
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 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="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;">separate CLI methods into include modules</div></div></div></foreignObject><text x="470" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">separate CLI methods into include modules</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;">cli support for diff</div></div></div></foreignObject><text x="790" y="34" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">cli support for diff</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 diff tool - open in editor</div></div></div></foreignObject><text x="150" y="114" fill="#333333" font-family="Helvetica" font-size="12px" text-anchor="middle">add diff tool - open in editor</text></switch></g><rect x="320" y="80" width="300" height="60" rx="9" ry="9" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><path d="M 330.15 79 Q 319 79 319 90.15 L 319 104 Q 470 122 621 104 L 621 90.15 Q 621 79 609.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: 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 supporting lhs only, rhs only, same and different</div></div></div></foreignObject><text x="470" y="114" 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="640" y="80" width="300" height="60" rx="9" ry="9" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><path d="M 650.15 79 Q 639 79 639 90.15 L 639 104 Q 790 122 941 104 L 941 90.15 Q 941 79 929.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: 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 project plan to do list</div></div></div></foreignObject><text x="790" 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="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>
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="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>
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>
data/exe/rag CHANGED
@@ -9,62 +9,34 @@ $LOAD_PATH << source_path
9
9
 
10
10
  require 'rails_app_generator'
11
11
 
12
+ first = ARGV.first
13
+
12
14
  if ARGV.empty?
13
15
  puts 'Please provide a profile for the new application'
14
16
  puts
15
17
  puts 'See --help for more info'
16
- exit 0
17
- elsif %w[-v --version].include? ARGV[0]
18
+ elsif %w[-v --version].include?(first)
18
19
  puts RailsAppGenerator::VERSION
19
- exit 0
20
+ elsif first == 'diff'
21
+ RailsAppGenerator::Cli::Diff.start(ARGV)
22
+ elsif first == 'new'
23
+ puts 'TODO: NEW'
24
+
25
+ # # Use RAG with in the same way as the Rails generator (the following commands should be equivalent)
26
+ # # rails new args
27
+ # # rag new args
28
+ # if ARGV.first == 'new'
29
+ # # NOTE: This is not yet working
30
+ # RailsAppGenerator::Cli::Standard.start ARGV[1..]
31
+ # exit 0
32
+ # elsif !ARGV.first.nil?
33
+ # end
34
+
35
+ else
36
+ fallback_profile_path = File.expand_path("#{Pathname.new(__FILE__).dirname}/../profiles")
37
+ args = ['profile'] + ARGV + ["--fallback-profile-path=#{fallback_profile_path}"]
38
+
39
+ RailsAppGenerator::Cli::Profile.start(args)
20
40
  end
21
41
 
22
- RailsAppGenerator::Cli.start(ARGV)
23
-
24
42
  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,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ module Cli
5
+ # Folder Diff
6
+ class Diff < Thor
7
+ desc 'diff lhs_folder rhs_folder [options]', 'Diff two different rails folders'
8
+
9
+ # Run report to console for following options
10
+ option :show_left_only , type: :boolean
11
+ option :show_right_only , type: :boolean
12
+ option :show_same , type: :boolean
13
+ option :show_different , type: :boolean
14
+
15
+ # Open files in VSCode for for following options
16
+ option :open_left_only , type: :boolean
17
+ option :open_right_only , type: :boolean
18
+ option :open_same , type: :boolean
19
+ option :open_different , type: :boolean
20
+
21
+ # rubocop:disable Metrics/AbcSize
22
+ def diff(lhs_folder, rhs_folder)
23
+ # puts "Diffing #{lhs_folder} and #{rhs_folder}"
24
+ # puts JSON.pretty_generate(options)
25
+ processor = RailsAppGenerator::Diff::Processor.new(lhs_folder, rhs_folder)
26
+ compare_info = processor.compare
27
+
28
+ report = RailsAppGenerator::Diff::Report.new(
29
+ compare_info,
30
+ show_left_only: options[:show_left_only],
31
+ show_right_only: options[:show_right_only],
32
+ show_same: options[:show_same],
33
+ show_different: options[:show_different]
34
+ )
35
+ report.display
36
+
37
+ vscode = RailsAppGenerator::Diff::OpenInEditor.new(
38
+ compare_info,
39
+ open_left_only: options[:open_left_only],
40
+ open_right_only: options[:open_right_only],
41
+ open_same: options[:open_same],
42
+ open_different: options[:show_different]
43
+ )
44
+ vscode.open
45
+ end
46
+ # rubocop:enable Metrics/AbcSize
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ module Cli
5
+ # Folder Diff
6
+ class Profile < Thor
7
+ desc 'xxx [options]', 'Create a new rails app based on a RAG profile'
8
+
9
+ option :profile_path , type: :string
10
+ option :fallback_profile_path , type: :string
11
+
12
+ # rubocop:disable Metrics/AbcSize
13
+ def profile(name)
14
+ path = options[:profile_path] || options[:fallback_profile_path]
15
+ profile_name = name.end_with?('.json') ? name : "#{name}.json"
16
+ profile_file = File.join(path, profile_name)
17
+
18
+ unless File.exist?(profile_file)
19
+ puts "Profile [#{profile_file}] not found"
20
+ exit 1
21
+ end
22
+
23
+ puts "Using profile #{profile_file}"
24
+
25
+ profile = JSON.parse(File.read(profile_file), symbolize_names: true)
26
+ args = profile[:args]
27
+ opts = RailsAppGenerator::RailsOptions.new(profile[:opts])
28
+
29
+ starter = RailsAppGenerator::Starter.new(args)
30
+
31
+ starter.delete_target_folder
32
+ starter.start(opts)
33
+ end
34
+ # rubocop:enable Metrics/AbcSize
35
+ end
36
+ end
37
+ end
@@ -88,7 +88,7 @@ module RailsAppGenerator
88
88
 
89
89
  def debug_files(heading, files)
90
90
  Util.line(heading)
91
- puts files.any? ? files : 'NO FILES'
91
+ puts files.any? ? files.map(&:file) : 'NO FILES'
92
92
  end
93
93
  end
94
94
  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? ? 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]
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.any? ? files.map(&:file) : 'NO FILES'
36
+ puts files.map(&:file)
35
37
  end
36
38
  end
37
39
  end
@@ -56,6 +56,10 @@ module RailsAppGenerator
56
56
  end
57
57
  end
58
58
 
59
+ def delete_target_folder
60
+ FileUtils.rm_rf(target_path)
61
+ end
62
+
59
63
  private
60
64
 
61
65
  def capture_console
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAppGenerator
4
- VERSION = '0.0.13'
4
+ VERSION = '0.1.0'
5
5
  end
@@ -8,7 +8,8 @@ require 'rails/generators/rails/app/app_generator'
8
8
  require 'bundler'
9
9
 
10
10
  require 'rails_app_generator/version'
11
- require 'rails_app_generator/cli'
11
+ require 'rails_app_generator/cli/diff'
12
+ require 'rails_app_generator/cli/profile'
12
13
  require 'rails_app_generator/util'
13
14
  require 'rails_app_generator/diff/file_pair'
14
15
  require 'rails_app_generator/diff/compare_info'
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.0.13",
3
+ "version": "0.1.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "rails_app_generator",
9
- "version": "0.0.13",
9
+ "version": "0.1.0",
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.13",
3
+ "version": "0.1.0",
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.13
4
+ version: 0.1.0
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-25 00:00:00.000000000 Z
11
+ date: 2022-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootsnap
@@ -207,7 +207,8 @@ 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
+ - lib/rails_app_generator/cli/diff.rb
211
+ - lib/rails_app_generator/cli/profile.rb
211
212
  - lib/rails_app_generator/context.rb
212
213
  - lib/rails_app_generator/dependencies.rb
213
214
  - lib/rails_app_generator/diff/compare_info.rb
@@ -1,40 +0,0 @@
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