rails_app_generator 0.0.8 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.builders/boot.rb +1 -0
- data/.builders/generators/project-plan.rb +45 -0
- data/CHANGELOG.md +24 -0
- data/after_templates/rag_tailwind/component-cta.html +17 -0
- data/after_templates/rag_tailwind/component-faq.html +151 -0
- data/after_templates/rag_tailwind/component-footer.html +73 -0
- data/after_templates/rag_tailwind/component-hero.html +25 -0
- data/after_templates/rag_tailwind/component-nav.html +101 -0
- data/after_templates/rag_tailwind/component-section-begin.html +0 -0
- data/after_templates/rag_tailwind/component-section-end.html +0 -0
- data/after_templates/rag_tailwind.rb +15 -13
- data/docs/project-plan/project.drawio +50 -0
- data/docs/project-plan/project_done.svg +3 -0
- data/docs/project-plan/project_in_progress.svg +3 -0
- data/docs/project-plan/project_todo.svg +3 -0
- data/docs/project-plan.md +24 -0
- data/exe/rag +49 -20
- data/lib/rails_app_generator/cli.rb +40 -0
- data/lib/rails_app_generator/diff/compare_info.rb +121 -0
- data/lib/rails_app_generator/diff/file_pair.rb +18 -0
- data/lib/rails_app_generator/diff/open_in_editor.rb +44 -0
- data/lib/rails_app_generator/diff/processor.rb +52 -0
- data/lib/rails_app_generator/diff/report.rb +38 -0
- data/lib/rails_app_generator/notes/a2.txt +14 -0
- data/lib/rails_app_generator/starter.rb +0 -11
- data/lib/rails_app_generator/util.rb +26 -0
- data/lib/rails_app_generator/version.rb +1 -1
- data/lib/rails_app_generator.rb +7 -8
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +22 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41a84055790db563fd9b1ea21dc26deb01da792e5a9e120c5170a3aefaf8364b
|
4
|
+
data.tar.gz: b2b0244b7b5cc66a0cfdc7b9719ba4846869a49cf57fac40cf94f4c3369cd844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92ee6c983495db38ba71ea1ef5c74d4185dff934d216fcd345bacec453349cfd45f355b188945ab348528c3a9181a4ceb5243896bd2655005e8bce708e96060d
|
7
|
+
data.tar.gz: 83d283c3c0dbf92f0eb20f807a11e9ae6dda055a86e20be5a9466ce159262897cfe7bc98a273fad2139fe692de09e18d1ce313b077af58df6f61d5e61d622ee9
|
data/.builders/boot.rb
CHANGED
@@ -23,6 +23,7 @@ KConfig.configure(CONFIG_KEY) do |config|
|
|
23
23
|
config.template_folders.add(:template , File.expand_path('.templates', Dir.pwd))
|
24
24
|
|
25
25
|
config.target_folders.add(:app , base_folder)
|
26
|
+
config.target_folders.add(:docs , :app, 'docs')
|
26
27
|
config.target_folders.add(:builder , builder_folder)
|
27
28
|
end
|
28
29
|
|
@@ -0,0 +1,45 @@
|
|
1
|
+
KManager.action :project_plan do
|
2
|
+
action do
|
3
|
+
|
4
|
+
DrawioDsl::Drawio
|
5
|
+
.init(k_builder, on_exist: :write, on_action: :execute)
|
6
|
+
.diagram(rounded: 1, glass: 1)
|
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
|
+
grid_layout(y: 90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
12
|
+
|
13
|
+
todo(title: 'add diff tool open in vscode option')
|
14
|
+
end
|
15
|
+
.page('To Do', theme: :style_02, margin_left: 0, margin_top: 0) do
|
16
|
+
|
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')
|
19
|
+
|
20
|
+
todo(title: 'cli support for diff')
|
21
|
+
todo(title: 'cli support for profile')
|
22
|
+
todo(title: 'cli support for rails new (rag new should work like rails new) - buggy, need to work through')
|
23
|
+
todo(title: 'need an option for deleting target project path') # FileUtils.rm_rf(instance.target_path)
|
24
|
+
|
25
|
+
grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
26
|
+
|
27
|
+
end
|
28
|
+
.page('Done', theme: :style_06, margin_left: 0, margin_top: 0) do
|
29
|
+
|
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')
|
32
|
+
|
33
|
+
todo(title: 'add diff tool supporting lhs only, rhs only, same and different')
|
34
|
+
todo(title: 'add project plan to do list')
|
35
|
+
|
36
|
+
grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
37
|
+
|
38
|
+
end
|
39
|
+
.cd(:docs)
|
40
|
+
.save('project-plan/project.drawio')
|
41
|
+
.export_svg('project-plan/project_in_progress', page: 1)
|
42
|
+
.export_svg('project-plan/project_todo' , page: 2)
|
43
|
+
.export_svg('project-plan/project_done' , page: 3)
|
44
|
+
end
|
45
|
+
end
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1
|
+
## [0.0.10](https://github.com/klueless-io/rails_app_generator/compare/v0.0.9...v0.0.10) (2022-07-25)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* add diff processor ([edd86a3](https://github.com/klueless-io/rails_app_generator/commit/edd86a3657ec83c566f84cd965820d780a2a1c43))
|
7
|
+
* fix gha specs ([6ae95de](https://github.com/klueless-io/rails_app_generator/commit/6ae95de2e53e77590375c3a9863a78744b38fa30))
|
8
|
+
* fix gha specs ([c7504f9](https://github.com/klueless-io/rails_app_generator/commit/c7504f97ddf25011a887b7b6ec4b0235e6dbd16d))
|
9
|
+
|
10
|
+
## [0.0.9](https://github.com/klueless-io/rails_app_generator/compare/v0.0.8...v0.0.9) (2022-07-24)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* add project plan ([1c47e0f](https://github.com/klueless-io/rails_app_generator/commit/1c47e0fa82b7b184d63fab8c2363416587d4c66d))
|
16
|
+
|
17
|
+
## [0.0.8](https://github.com/klueless-io/rails_app_generator/compare/v0.0.7...v0.0.8) (2022-07-24)
|
18
|
+
|
19
|
+
|
20
|
+
### Bug Fixes
|
21
|
+
|
22
|
+
* add support for bootstrap profile ([f70d17d](https://github.com/klueless-io/rails_app_generator/commit/f70d17d28cae3f7758c62360bd3d97ca27bf06b5))
|
23
|
+
* add support for bootstrap profile ([a114339](https://github.com/klueless-io/rails_app_generator/commit/a1143391166c10fc802800e2e1236f69aeda9091))
|
24
|
+
|
1
25
|
## [0.0.7](https://github.com/klueless-io/rails_app_generator/compare/v0.0.6...v0.0.7) (2022-07-22)
|
2
26
|
|
3
27
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!-- This example requires Tailwind CSS v2.0+ -->
|
2
|
+
<div class="bg-gray-50">
|
3
|
+
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8 lg:flex lg:items-center lg:justify-between">
|
4
|
+
<h2 class="text-3xl font-extrabold tracking-tight text-gray-900 sm:text-4xl">
|
5
|
+
<span class="block">Ready to dive in?</span>
|
6
|
+
<span class="block text-indigo-600">Start your free trial today.</span>
|
7
|
+
</h2>
|
8
|
+
<div class="mt-8 flex lg:mt-0 lg:flex-shrink-0">
|
9
|
+
<div class="inline-flex rounded-md shadow">
|
10
|
+
<a href="#" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700"> Get started </a>
|
11
|
+
</div>
|
12
|
+
<div class="ml-3 inline-flex rounded-md shadow">
|
13
|
+
<a href="#" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-indigo-600 bg-white hover:bg-indigo-50"> Learn more </a>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</div>
|
@@ -0,0 +1,151 @@
|
|
1
|
+
<section class="bg-white dark:bg-gray-900">
|
2
|
+
<div class="container px-6 py-12 mx-auto">
|
3
|
+
<h1 class="text-2xl font-semibold text-gray-800 lg:text-4xl dark:text-white">Frequently asked questions.</h1>
|
4
|
+
|
5
|
+
<div class="grid grid-cols-1 gap-8 mt-8 lg:mt-16 md:grid-cols-2 xl:grid-cols-3">
|
6
|
+
<div>
|
7
|
+
<div class="inline-block p-3 text-white bg-blue-600 rounded-lg">
|
8
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
9
|
+
<path
|
10
|
+
stroke-linecap="round"
|
11
|
+
stroke-linejoin="round"
|
12
|
+
stroke-width="2"
|
13
|
+
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
14
|
+
/>
|
15
|
+
</svg>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div>
|
19
|
+
<h1 class="text-xl font-semibold text-gray-700 dark:text-white">
|
20
|
+
What can i expect at my first consultation?
|
21
|
+
</h1>
|
22
|
+
|
23
|
+
<p class="mt-2 text-sm text-gray-500 dark:text-gray-300">
|
24
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Provident placeat, consequatur eveniet veritatis
|
25
|
+
quos dignissimos beatae dolores exercitationem laboriosam officia magnam atque blanditiis illum doloremque
|
26
|
+
magni ex corrupti tempora quis.
|
27
|
+
</p>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div>
|
32
|
+
<div class="inline-block p-3 text-white bg-blue-600 rounded-lg">
|
33
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
34
|
+
<path
|
35
|
+
stroke-linecap="round"
|
36
|
+
stroke-linejoin="round"
|
37
|
+
stroke-width="2"
|
38
|
+
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
39
|
+
/>
|
40
|
+
</svg>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div>
|
44
|
+
<h1 class="text-xl font-semibold text-gray-700 dark:text-white">What are your opening house?</h1>
|
45
|
+
|
46
|
+
<p class="mt-2 text-sm text-gray-500 dark:text-gray-300">
|
47
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Provident placeat, consequatur eveniet veritatis
|
48
|
+
quos dignissimos beatae dolores exercitationem laboriosam officia magnam atque blanditiis illum doloremque
|
49
|
+
magni ex corrupti tempora quis.
|
50
|
+
</p>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<div>
|
55
|
+
<div class="inline-block p-3 text-white bg-blue-600 rounded-lg">
|
56
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
57
|
+
<path
|
58
|
+
stroke-linecap="round"
|
59
|
+
stroke-linejoin="round"
|
60
|
+
stroke-width="2"
|
61
|
+
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
62
|
+
/>
|
63
|
+
</svg>
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<div>
|
67
|
+
<h1 class="text-xl font-semibold text-gray-700 dark:text-white">Do i need a referral?</h1>
|
68
|
+
|
69
|
+
<p class="mt-2 text-sm text-gray-500 dark:text-gray-300">
|
70
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Provident placeat, consequatur eveniet veritatis
|
71
|
+
quos dignissimos beatae dolores exercitationem laboriosam officia magnam atque blanditiis illum doloremque
|
72
|
+
magni ex corrupti tempora quis.
|
73
|
+
</p>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<div>
|
78
|
+
<div class="inline-block p-3 text-white bg-blue-600 rounded-lg">
|
79
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
80
|
+
<path
|
81
|
+
stroke-linecap="round"
|
82
|
+
stroke-linejoin="round"
|
83
|
+
stroke-width="2"
|
84
|
+
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
85
|
+
/>
|
86
|
+
</svg>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
<div>
|
90
|
+
<h1 class="text-xl font-semibold text-gray-700 dark:text-white">
|
91
|
+
Is the cost of the appoinment covered by private health insurance?
|
92
|
+
</h1>
|
93
|
+
|
94
|
+
<p class="mt-2 text-sm text-gray-500 dark:text-gray-300">
|
95
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Provident placeat, consequatur eveniet veritatis
|
96
|
+
quos dignissimos beatae dolores exercitationem laboriosam officia magnam atque blanditiis illum doloremque
|
97
|
+
magni ex corrupti tempora quis.
|
98
|
+
</p>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<div>
|
103
|
+
<div class="inline-block p-3 text-white bg-blue-600 rounded-lg">
|
104
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
105
|
+
<path
|
106
|
+
stroke-linecap="round"
|
107
|
+
stroke-linejoin="round"
|
108
|
+
stroke-width="2"
|
109
|
+
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
110
|
+
/>
|
111
|
+
</svg>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<div>
|
115
|
+
<h1 class="text-xl font-semibold text-gray-700 dark:text-white">What is your cancellation policy?</h1>
|
116
|
+
|
117
|
+
<p class="mt-2 text-sm text-gray-500 dark:text-gray-300">
|
118
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Provident placeat, consequatur eveniet veritatis
|
119
|
+
quos dignissimos beatae dolores exercitationem laboriosam officia magnam atque blanditiis illum doloremque
|
120
|
+
magni ex corrupti tempora quis.
|
121
|
+
</p>
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<div>
|
126
|
+
<div class="inline-block p-3 text-white bg-blue-600 rounded-lg">
|
127
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
128
|
+
<path
|
129
|
+
stroke-linecap="round"
|
130
|
+
stroke-linejoin="round"
|
131
|
+
stroke-width="2"
|
132
|
+
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
133
|
+
/>
|
134
|
+
</svg>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div>
|
138
|
+
<h1 class="text-xl font-semibold text-gray-700 dark:text-white">
|
139
|
+
What are the parking and public transport options?
|
140
|
+
</h1>
|
141
|
+
|
142
|
+
<p class="mt-2 text-sm text-gray-500 dark:text-gray-300">
|
143
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Provident placeat, consequatur eveniet veritatis
|
144
|
+
quos dignissimos beatae dolores exercitationem laboriosam officia magnam atque blanditiis illum doloremque
|
145
|
+
magni ex corrupti tempora quis.
|
146
|
+
</p>
|
147
|
+
</div>
|
148
|
+
</div>
|
149
|
+
</div>
|
150
|
+
</div>
|
151
|
+
</section>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
|
2
|
+
<footer class="p-4 bg-white sm:p-6 dark:bg-gray-900">
|
3
|
+
<div class="md:flex md:justify-between">
|
4
|
+
<div class="mb-6 md:mb-0">
|
5
|
+
<a href="https://flowbite.com/" class="flex items-center">
|
6
|
+
<img src="https://flowbite.com/docs/images/logo.svg" class="mr-3 h-8" alt="FlowBite Logo">
|
7
|
+
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">Flowbite</span>
|
8
|
+
</a>
|
9
|
+
</div>
|
10
|
+
<div class="grid grid-cols-2 gap-8 sm:gap-6 sm:grid-cols-3">
|
11
|
+
<div>
|
12
|
+
<h2 class="mb-6 text-sm font-semibold text-gray-900 uppercase dark:text-white">Resources</h2>
|
13
|
+
<ul class="text-gray-600 dark:text-gray-400">
|
14
|
+
<li class="mb-4">
|
15
|
+
<a href="https://flowbite.com/" class="hover:underline">Flowbite</a>
|
16
|
+
</li>
|
17
|
+
<li>
|
18
|
+
<a href="https://tailwindcss.com/" class="hover:underline">Tailwind CSS</a>
|
19
|
+
</li>
|
20
|
+
</ul>
|
21
|
+
</div>
|
22
|
+
<div>
|
23
|
+
<h2 class="mb-6 text-sm font-semibold text-gray-900 uppercase dark:text-white">Follow us</h2>
|
24
|
+
<ul class="text-gray-600 dark:text-gray-400">
|
25
|
+
<li class="mb-4">
|
26
|
+
<a href="https://github.com/themesberg/flowbite" class="hover:underline ">Github</a>
|
27
|
+
</li>
|
28
|
+
<li>
|
29
|
+
<a href="https://discord.gg/4eeurUVvTy" class="hover:underline">Discord</a>
|
30
|
+
</li>
|
31
|
+
</ul>
|
32
|
+
</div>
|
33
|
+
<div>
|
34
|
+
<h2 class="mb-6 text-sm font-semibold text-gray-900 uppercase dark:text-white">Legal</h2>
|
35
|
+
<ul class="text-gray-600 dark:text-gray-400">
|
36
|
+
<li class="mb-4">
|
37
|
+
<a href="#" class="hover:underline">Privacy Policy</a>
|
38
|
+
</li>
|
39
|
+
<li>
|
40
|
+
<a href="#" class="hover:underline">Terms & Conditions</a>
|
41
|
+
</li>
|
42
|
+
</ul>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
<hr class="my-6 border-gray-200 sm:mx-auto dark:border-gray-700 lg:my-8">
|
47
|
+
<div class="sm:flex sm:items-center sm:justify-between">
|
48
|
+
<span class="text-sm text-gray-500 sm:text-center dark:text-gray-400">© 2022 <a href="https://flowbite.com/" class="hover:underline">Flowbite™</a>. All Rights Reserved.
|
49
|
+
</span>
|
50
|
+
<div class="flex mt-4 space-x-6 sm:justify-center sm:mt-0">
|
51
|
+
<a href="#" class="text-gray-500 hover:text-gray-900 dark:hover:text-white">
|
52
|
+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z" clip-rule="evenodd"></path></svg>
|
53
|
+
<span class="sr-only">Facebook page</span>
|
54
|
+
</a>
|
55
|
+
<a href="#" class="text-gray-500 hover:text-gray-900 dark:hover:text-white">
|
56
|
+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z" clip-rule="evenodd"></path></svg>
|
57
|
+
<span class="sr-only">Instagram page</span>
|
58
|
+
</a>
|
59
|
+
<a href="#" class="text-gray-500 hover:text-gray-900 dark:hover:text-white">
|
60
|
+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"></path></svg>
|
61
|
+
<span class="sr-only">Twitter page</span>
|
62
|
+
</a>
|
63
|
+
<a href="#" class="text-gray-500 hover:text-gray-900 dark:hover:text-white">
|
64
|
+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd"></path></svg>
|
65
|
+
<span class="sr-only">GitHub account</span>
|
66
|
+
</a>
|
67
|
+
<a href="#" class="text-gray-500 hover:text-gray-900 dark:hover:text-white">
|
68
|
+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c5.51 0 10-4.48 10-10S17.51 2 12 2zm6.605 4.61a8.502 8.502 0 011.93 5.314c-.281-.054-3.101-.629-5.943-.271-.065-.141-.12-.293-.184-.445a25.416 25.416 0 00-.564-1.236c3.145-1.28 4.577-3.124 4.761-3.362zM12 3.475c2.17 0 4.154.813 5.662 2.148-.152.216-1.443 1.941-4.48 3.08-1.399-2.57-2.95-4.675-3.189-5A8.687 8.687 0 0112 3.475zm-3.633.803a53.896 53.896 0 013.167 4.935c-3.992 1.063-7.517 1.04-7.896 1.04a8.581 8.581 0 014.729-5.975zM3.453 12.01v-.26c.37.01 4.512.065 8.775-1.215.25.477.477.965.694 1.453-.109.033-.228.065-.336.098-4.404 1.42-6.747 5.303-6.942 5.629a8.522 8.522 0 01-2.19-5.705zM12 20.547a8.482 8.482 0 01-5.239-1.8c.152-.315 1.888-3.656 6.703-5.337.022-.01.033-.01.054-.022a35.318 35.318 0 011.823 6.475 8.4 8.4 0 01-3.341.684zm4.761-1.465c-.086-.52-.542-3.015-1.659-6.084 2.679-.423 5.022.271 5.314.369a8.468 8.468 0 01-3.655 5.715z" clip-rule="evenodd"></path></svg>
|
69
|
+
<span class="sr-only">Dribbbel account</span>
|
70
|
+
</a>
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
</footer>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<section class="text-gray-700 body-font">
|
2
|
+
<div class="container px-8 pt-48 pb-24 mx-auto lg:px-4">
|
3
|
+
<div class="flex flex-col w-full mb-12 text-left lg:text-center">
|
4
|
+
<h2
|
5
|
+
class="mb-1 text-xs font-semibold tracking-widest text-blue-600 uppercase title-font">
|
6
|
+
a great
|
7
|
+
header right here
|
8
|
+
</h2>
|
9
|
+
<h1
|
10
|
+
class="mb-6 text-2xl font-semibold tracking-tighter sm:text-5xl title-font bg-clip-text text-transparent bg-gradient-to-r from-green-400 to-blue-500">
|
11
|
+
A centered medium lenght display headline.
|
12
|
+
</h1>
|
13
|
+
<p
|
14
|
+
class="mx-auto text-base font-medium leading-relaxed text-gray-700 lg:w-2/3">
|
15
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
16
|
+
eiusmod tempor incididunt ut labore et incididunt ut labore et
|
17
|
+
incididunt ut labore et dolore magna aliqua.
|
18
|
+
</p>
|
19
|
+
</div>
|
20
|
+
<div class="flex lg:justify-center">
|
21
|
+
<button
|
22
|
+
class="inline-flex px-4 py-2 font-semibold text-white transition duration-500 ease-in-out transform rounded-lg shadow-xl bg-gradient-to-r from-blue-700 hover:from-blue-600 to-blue-600 hover:to-blue-700 focus:shadow-outline focus:outline-none">Button</button>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</section>
|
@@ -0,0 +1,101 @@
|
|
1
|
+
<!-- This example requires Tailwind CSS v2.0+ -->
|
2
|
+
<nav class="bg-gray-800">
|
3
|
+
<div class="max-w-7xl mx-auto px-2 sm:px-6 lg:px-8">
|
4
|
+
<div class="relative flex items-center justify-between h-16">
|
5
|
+
<div class="absolute inset-y-0 left-0 flex items-center sm:hidden">
|
6
|
+
<!-- Mobile menu button-->
|
7
|
+
<button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white" aria-controls="mobile-menu" aria-expanded="false">
|
8
|
+
<span class="sr-only">Open main menu</span>
|
9
|
+
<!--
|
10
|
+
Icon when menu is closed.
|
11
|
+
|
12
|
+
Heroicon name: outline/menu
|
13
|
+
|
14
|
+
Menu open: "hidden", Menu closed: "block"
|
15
|
+
-->
|
16
|
+
<svg class="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true">
|
17
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" />
|
18
|
+
</svg>
|
19
|
+
<!--
|
20
|
+
Icon when menu is open.
|
21
|
+
|
22
|
+
Heroicon name: outline/x
|
23
|
+
|
24
|
+
Menu open: "block", Menu closed: "hidden"
|
25
|
+
-->
|
26
|
+
<svg class="hidden h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true">
|
27
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
28
|
+
</svg>
|
29
|
+
</button>
|
30
|
+
</div>
|
31
|
+
<div class="flex-1 flex items-center justify-center sm:items-stretch sm:justify-start">
|
32
|
+
<div class="flex-shrink-0 flex items-center">
|
33
|
+
<img class="block lg:hidden h-8 w-auto" src="https://tailwindui.com/img/logos/workflow-mark-indigo-500.svg" alt="Workflow">
|
34
|
+
<img class="hidden lg:block h-8 w-auto" src="https://tailwindui.com/img/logos/workflow-logo-indigo-500-mark-white-text.svg" alt="Workflow">
|
35
|
+
</div>
|
36
|
+
<div class="hidden sm:block sm:ml-6">
|
37
|
+
<div class="flex space-x-4">
|
38
|
+
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
|
39
|
+
<a href="#" class="bg-gray-900 text-white px-3 py-2 rounded-md text-sm font-medium" aria-current="page">Dashboard</a>
|
40
|
+
|
41
|
+
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Team</a>
|
42
|
+
|
43
|
+
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Projects</a>
|
44
|
+
|
45
|
+
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Calendar</a>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
<div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">
|
50
|
+
<button type="button" class="bg-gray-800 p-1 rounded-full text-gray-400 hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white">
|
51
|
+
<span class="sr-only">View notifications</span>
|
52
|
+
<!-- Heroicon name: outline/bell -->
|
53
|
+
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true">
|
54
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
|
55
|
+
</svg>
|
56
|
+
</button>
|
57
|
+
|
58
|
+
<!-- Profile dropdown -->
|
59
|
+
<div class="ml-3 relative">
|
60
|
+
<div>
|
61
|
+
<button type="button" class="bg-gray-800 flex text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
|
62
|
+
<span class="sr-only">Open user menu</span>
|
63
|
+
<img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
|
64
|
+
</button>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<!--
|
68
|
+
Dropdown menu, show/hide based on menu state.
|
69
|
+
|
70
|
+
Entering: "transition ease-out duration-100"
|
71
|
+
From: "transform opacity-0 scale-95"
|
72
|
+
To: "transform opacity-100 scale-100"
|
73
|
+
Leaving: "transition ease-in duration-75"
|
74
|
+
From: "transform opacity-100 scale-100"
|
75
|
+
To: "transform opacity-0 scale-95"
|
76
|
+
-->
|
77
|
+
<div class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1">
|
78
|
+
<!-- Active: "bg-gray-100", Not Active: "" -->
|
79
|
+
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-0">Your Profile</a>
|
80
|
+
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-1">Settings</a>
|
81
|
+
<a href="#" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1" id="user-menu-item-2">Sign out</a>
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<!-- Mobile menu, show/hide based on menu state. -->
|
89
|
+
<div class="sm:hidden" id="mobile-menu">
|
90
|
+
<div class="px-2 pt-2 pb-3 space-y-1">
|
91
|
+
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
|
92
|
+
<a href="#" class="bg-gray-900 text-white block px-3 py-2 rounded-md text-base font-medium" aria-current="page">Dashboard</a>
|
93
|
+
|
94
|
+
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">Team</a>
|
95
|
+
|
96
|
+
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">Projects</a>
|
97
|
+
|
98
|
+
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium">Calendar</a>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
</nav>
|
File without changes
|
File without changes
|
@@ -8,23 +8,26 @@
|
|
8
8
|
|
9
9
|
require 'pry'
|
10
10
|
|
11
|
-
self.local_template_path = File.join(File.dirname(__FILE__), '
|
11
|
+
self.local_template_path = File.join(File.dirname(__FILE__), 'rag_tailwind')
|
12
12
|
|
13
13
|
gac 'base rails 7 image created'
|
14
14
|
|
15
15
|
add_controller('home', 'index', 'about')
|
16
16
|
route("root 'home#index'")
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
18
|
+
index_content = join_templates(
|
19
|
+
'component-section-begin.html',
|
20
|
+
'component-nav.html',
|
21
|
+
'component-hero.html',
|
22
|
+
'component-cta.html',
|
23
|
+
'component-faq.html',
|
24
|
+
'component-cta.html',
|
25
|
+
'component-footer.html',
|
26
|
+
'component-section-end.html'
|
27
|
+
)
|
28
|
+
# join: "</section>\n\n<section>\n"
|
29
|
+
|
30
|
+
create_file 'app/views/home/index.html.erb', index_content, force: true
|
28
31
|
|
29
32
|
# move the nav bar into
|
30
33
|
# 'app/views/shared/_navbar.html.erb'
|
@@ -32,11 +35,10 @@ route("root 'home#index'")
|
|
32
35
|
# 'app/views/layouts/application.html.erb'
|
33
36
|
# <%= render partial: 'shared/navbar' %>
|
34
37
|
|
35
|
-
# create_file 'app/views/home/index.html.erb', index_content, force: true
|
36
|
-
|
37
38
|
# gem 'sassc-rails'
|
38
39
|
|
39
40
|
after_bundle do
|
41
|
+
gsub_file 'app/views/layouts/application.html.erb', %(container mx-auto mt-28 px-5 flex), 'container mx-auto px-5'
|
40
42
|
# add_css_customizations
|
41
43
|
|
42
44
|
# add_crud_people
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<mxfile host="x0A">
|
2
|
+
<diagram id="Oq8" name="In progress">
|
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
|
+
<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>
|
13
|
+
</root>
|
14
|
+
</mxGraphModel>
|
15
|
+
</diagram>
|
16
|
+
<diagram id="Ip4" name="To Do">
|
17
|
+
<mxGraphModel dx="0" dy="0" background="#FFFAFA" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
|
18
|
+
<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"/>
|
26
|
+
</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"/>
|
29
|
+
</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"/>
|
32
|
+
</mxCell>
|
33
|
+
</root>
|
34
|
+
</mxGraphModel>
|
35
|
+
</diagram>
|
36
|
+
<diagram id="YZE" name="Done">
|
37
|
+
<mxGraphModel dx="0" dy="0" background="#FFFAFA" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
|
38
|
+
<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"/>
|
43
|
+
</mxCell>
|
44
|
+
<mxCell id="YZE-2" value="add project plan to do list" style="whiteSpace=wrap;html=1;rounded=1;glass=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#333333" vertex="1" parent="node_root_YZE">
|
45
|
+
<mxGeometry x="0" y="0" width="300" height="60" as="geometry"/>
|
46
|
+
</mxCell>
|
47
|
+
</root>
|
48
|
+
</mxGraphModel>
|
49
|
+
</diagram>
|
50
|
+
</mxfile>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
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>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
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>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
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>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Drawio Dsl - Project Plan
|
2
|
+
|
3
|
+
## In Progress
|
4
|
+
|
5
|
+
The next ticket to work on
|
6
|
+
|
7
|
+
![](project-plan/project_in_progress.svg)
|
8
|
+
|
9
|
+
## To Do
|
10
|
+
|
11
|
+
List of tickets to do
|
12
|
+
|
13
|
+
![](project-plan/project_todo.svg)
|
14
|
+
|
15
|
+
## Complete
|
16
|
+
|
17
|
+
List of completed tickets
|
18
|
+
|
19
|
+
![](project-plan/project_done.svg)
|
20
|
+
|
21
|
+
|
22
|
+
## Copyright
|
23
|
+
|
24
|
+
Copyright (c) David Cruwys. See [MIT License](LICENSE.txt) for further details.
|
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
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
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,121 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsAppGenerator
|
4
|
+
module Diff
|
5
|
+
# CompareInfo stores LHS and RHS file information in segments
|
6
|
+
class CompareInfo
|
7
|
+
attr_reader :lhs_path
|
8
|
+
attr_reader :lhs_files
|
9
|
+
|
10
|
+
attr_reader :rhs_path
|
11
|
+
attr_reader :rhs_files
|
12
|
+
|
13
|
+
# File segments
|
14
|
+
attr_reader :lhs_only
|
15
|
+
attr_reader :rhs_only
|
16
|
+
attr_reader :diff
|
17
|
+
attr_reader :same
|
18
|
+
|
19
|
+
def initialize(lhs_path, lhs_files, rhs_path, rhs_files)
|
20
|
+
@lhs_path = lhs_path
|
21
|
+
@lhs_files = lhs_files
|
22
|
+
|
23
|
+
@rhs_path = rhs_path
|
24
|
+
@rhs_files = rhs_files
|
25
|
+
|
26
|
+
@lhs_only = []
|
27
|
+
@rhs_only = []
|
28
|
+
@diff = []
|
29
|
+
@same = []
|
30
|
+
|
31
|
+
segment_files(lhs_path, lhs_files, rhs_path, rhs_files)
|
32
|
+
end
|
33
|
+
|
34
|
+
def lhs_file_info(type)
|
35
|
+
case type
|
36
|
+
when :lhs_only
|
37
|
+
rel_abs_file(lhs_path, lhs_only)
|
38
|
+
when :rhs_only
|
39
|
+
[] # there should be no right hand side files for the left hand path
|
40
|
+
when :same
|
41
|
+
rel_abs_file(lhs_path, same)
|
42
|
+
when :diff
|
43
|
+
rel_abs_file(lhs_path, diff)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def rhs_file_info(type)
|
48
|
+
case type
|
49
|
+
when :lhs_only
|
50
|
+
[] # there should be no left hand side files for the right hand path
|
51
|
+
when :rhs_only
|
52
|
+
rel_abs_file(rhs_path, rhs_only)
|
53
|
+
when :same
|
54
|
+
rel_abs_file(rhs_path, same)
|
55
|
+
when :diff
|
56
|
+
rel_abs_file(rhs_path, diff)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def debug
|
61
|
+
debug_stats
|
62
|
+
debug_files('left only' , lhs_only)
|
63
|
+
debug_files('right only' , rhs_only)
|
64
|
+
debug_files('same' , same)
|
65
|
+
debug_files('diff' , diff)
|
66
|
+
end
|
67
|
+
|
68
|
+
private
|
69
|
+
|
70
|
+
# rubocop:disable Metrics/AbcSize
|
71
|
+
def segment_files(lhs_path, lhs_files, rhs_path, rhs_files)
|
72
|
+
lhs_only = lhs_files - rhs_files
|
73
|
+
rhs_only = rhs_files - lhs_files
|
74
|
+
matching_files = lhs_files & rhs_files
|
75
|
+
|
76
|
+
@lhs_only = lhs_only.map { |file| FilePair.new(file, lhs_absolute_file: File.join(lhs_path, file)) }
|
77
|
+
@rhs_only = rhs_only.map { |file| FilePair.new(file, rhs_absolute_file: File.join(rhs_path, file)) }
|
78
|
+
|
79
|
+
matching_files.each do |file|
|
80
|
+
file_pair = FilePair.new(
|
81
|
+
file,
|
82
|
+
lhs_absolute_file: File.join(lhs_path, file),
|
83
|
+
rhs_absolute_file: File.join(rhs_path, file)
|
84
|
+
)
|
85
|
+
|
86
|
+
if FileUtils.compare_file(File.join(lhs_path, file), File.join(rhs_path, file))
|
87
|
+
@same << file_pair
|
88
|
+
else
|
89
|
+
@diff << file_pair
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
# rubocop:enable Metrics/AbcSize
|
94
|
+
|
95
|
+
def rel_abs_file(path, files)
|
96
|
+
files.map { |file| FilePair.new(file, File.join(path, file)) }
|
97
|
+
end
|
98
|
+
|
99
|
+
# rubocop:disable Metrics/AbcSize
|
100
|
+
def debug_stats
|
101
|
+
Util.kv('left path' , lhs_path)
|
102
|
+
Util.kv('right path' , rhs_path)
|
103
|
+
|
104
|
+
Util.kv('file count - left' , lhs_files.count)
|
105
|
+
Util.kv('file count - right' , rhs_files.count)
|
106
|
+
|
107
|
+
Util.kv('file count - left only' , lhs_only.count)
|
108
|
+
Util.kv('file count - right only' , rhs_only.count)
|
109
|
+
|
110
|
+
Util.kv('file count - same' , same.count)
|
111
|
+
Util.kv('file count - different' , diff.count)
|
112
|
+
end
|
113
|
+
# rubocop:enable Metrics/AbcSize
|
114
|
+
|
115
|
+
def debug_files(heading, files)
|
116
|
+
Util.line(heading)
|
117
|
+
puts files.any? ? files : 'NO FILES'
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsAppGenerator
|
4
|
+
module Diff
|
5
|
+
# FilePair stores the relative file path, plus the absolute file for both Left and Right site
|
6
|
+
class FilePair
|
7
|
+
attr_reader :file
|
8
|
+
attr_reader :lhs_absolute_file
|
9
|
+
attr_reader :rhs_absolute_file
|
10
|
+
|
11
|
+
def initialize(file, lhs_absolute_file: nil, rhs_absolute_file: nil)
|
12
|
+
@file = file
|
13
|
+
@lhs_absolute_file = lhs_absolute_file
|
14
|
+
@rhs_absolute_file = rhs_absolute_file
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# module RailsAppGenerator
|
4
|
+
# module Diff
|
5
|
+
# # Diff Report
|
6
|
+
# class OpenInEditor
|
7
|
+
# attr_reader :info
|
8
|
+
|
9
|
+
# attr_reader :open_left_only
|
10
|
+
# attr_reader :open_right_only
|
11
|
+
# attr_reader :open_same
|
12
|
+
# attr_reader :open_different
|
13
|
+
|
14
|
+
# def initialize(compare_info, **opts)
|
15
|
+
# @info = compare_info
|
16
|
+
|
17
|
+
# @open_left_only = opts[:open_left_only].nil? ? false : opts[:open_left_only]
|
18
|
+
# @open_right_only = opts[:open_right_only].nil? ? true : opts[:open_right_only]
|
19
|
+
# @open_same = opts[:open_same].nil? ? false : opts[:open_same]
|
20
|
+
# @open_different = opts[:open_different].nil? ? true : opts[:open_different]
|
21
|
+
# end
|
22
|
+
|
23
|
+
# def open
|
24
|
+
# open_files('Files only in source folder' , info.lhs_only) if open_left_only
|
25
|
+
# open_files('Files only in target folder' , info.rhs_only) if open_right_only
|
26
|
+
# open_files('Files in both folders' , info.same_list) if open_same
|
27
|
+
# open_files('Files that are different' , info.diff_list) if open_different
|
28
|
+
# end
|
29
|
+
|
30
|
+
# private
|
31
|
+
|
32
|
+
# def open_files(heading, files)
|
33
|
+
# puts files.any? ? files.map { |f| f } : 'NO FILES'
|
34
|
+
# end
|
35
|
+
|
36
|
+
# def vscode_compare_files
|
37
|
+
# files_that_are_different.map do |file|
|
38
|
+
# system("code --diff #{File.join(lhs_path, file)} #{File.join(rhs_path, file)}")
|
39
|
+
# end
|
40
|
+
# end
|
41
|
+
|
42
|
+
# end
|
43
|
+
# end
|
44
|
+
# end
|
@@ -0,0 +1,52 @@
|
|
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 diff_exclusions(file)
|
47
|
+
# file.include?('config/credentials.yml.enc') ||
|
48
|
+
# file.include?('master.key')
|
49
|
+
# end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsAppGenerator
|
4
|
+
module Diff
|
5
|
+
# Diff Report
|
6
|
+
class Report
|
7
|
+
attr_reader :info
|
8
|
+
|
9
|
+
attr_reader :show_left_only
|
10
|
+
attr_reader :show_right_only
|
11
|
+
attr_reader :show_same
|
12
|
+
attr_reader :show_different
|
13
|
+
|
14
|
+
def initialize(compare_info, **opts)
|
15
|
+
@info = compare_info
|
16
|
+
|
17
|
+
@show_left_only = opts[:show_left_only].nil? ? false : opts[:show_left_only]
|
18
|
+
@show_right_only = opts[:show_right_only].nil? ? true : opts[:show_right_only]
|
19
|
+
@show_same = opts[:show_same].nil? ? false : opts[:show_same]
|
20
|
+
@show_different = opts[:show_different].nil? ? true : opts[:show_different]
|
21
|
+
end
|
22
|
+
|
23
|
+
def display
|
24
|
+
display_files('Files only in source folder' , info.lhs_only) if show_left_only
|
25
|
+
display_files('Files only in target folder' , info.rhs_only) if show_right_only
|
26
|
+
display_files('Files in both folders' , info.same) if show_same
|
27
|
+
display_files('Files that are different' , info.diff) if show_different
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def display_files(heading, files)
|
33
|
+
Util.line(heading)
|
34
|
+
puts files.any? ? files.map(&:file) : 'NO FILES'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -74,6 +74,20 @@ create tmp/cache
|
|
74
74
|
create tmp/cache/assets
|
75
75
|
create vendor
|
76
76
|
create vendor/.keep
|
77
|
+
create test/fixtures/files
|
78
|
+
create test/fixtures/files/.keep
|
79
|
+
create test/controllers
|
80
|
+
create test/controllers/.keep
|
81
|
+
create test/mailers
|
82
|
+
create test/mailers/.keep
|
83
|
+
create test/models
|
84
|
+
create test/models/.keep
|
85
|
+
create test/helpers
|
86
|
+
create test/helpers/.keep
|
87
|
+
create test/integration
|
88
|
+
create test/integration/.keep
|
89
|
+
create test/channels/application_cable/connection_test.rb
|
90
|
+
create test/test_helper.rb
|
77
91
|
create test/system
|
78
92
|
create test/system/.keep
|
79
93
|
create test/application_system_test_case.rb
|
@@ -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
|
data/lib/rails_app_generator.rb
CHANGED
@@ -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,13 @@ 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/file_pair'
|
14
|
+
require 'rails_app_generator/diff/compare_info'
|
15
|
+
require 'rails_app_generator/diff/processor'
|
16
|
+
require 'rails_app_generator/diff/report'
|
17
|
+
require 'rails_app_generator/diff/open_in_editor'
|
13
18
|
require 'rails_app_generator/options/base_map_option'
|
14
19
|
require 'rails_app_generator/options/map_option_ignore'
|
15
20
|
require 'rails_app_generator/options/map_option_string'
|
@@ -25,15 +30,9 @@ require 'rails_app_generator/app_builder'
|
|
25
30
|
require 'rails_app_generator/app_generator'
|
26
31
|
require 'rails_app_generator/starter'
|
27
32
|
|
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
33
|
module RailsAppGenerator
|
33
34
|
# raise RailsAppGenerator::Error, 'Sample message'
|
34
35
|
Error = Class.new(StandardError)
|
35
|
-
|
36
|
-
# Your code goes here...
|
37
36
|
end
|
38
37
|
|
39
38
|
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.
|
3
|
+
"version": "0.0.11",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "rails_app_generator",
|
9
|
-
"version": "0.0.
|
9
|
+
"version": "0.0.11",
|
10
10
|
"devDependencies": {
|
11
11
|
"@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
|
12
12
|
"@semantic-release/changelog": "^6.0.1",
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_app_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootsnap
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- ".builders/_.rb"
|
134
134
|
- ".builders/boot.rb"
|
135
135
|
- ".builders/generators/01-bootstrap.rb"
|
136
|
+
- ".builders/generators/project-plan.rb"
|
136
137
|
- ".releaserc.json"
|
137
138
|
- ".rspec"
|
138
139
|
- ".rubocop.yml"
|
@@ -164,8 +165,20 @@ files:
|
|
164
165
|
- after_templates/rag_bootstrap/manifest.js
|
165
166
|
- after_templates/rag_simple.rb
|
166
167
|
- after_templates/rag_tailwind.rb
|
168
|
+
- after_templates/rag_tailwind/component-cta.html
|
169
|
+
- after_templates/rag_tailwind/component-faq.html
|
170
|
+
- after_templates/rag_tailwind/component-footer.html
|
171
|
+
- after_templates/rag_tailwind/component-hero.html
|
172
|
+
- after_templates/rag_tailwind/component-nav.html
|
173
|
+
- after_templates/rag_tailwind/component-section-begin.html
|
174
|
+
- after_templates/rag_tailwind/component-section-end.html
|
167
175
|
- bin/console
|
168
176
|
- bin/setup
|
177
|
+
- docs/project-plan.md
|
178
|
+
- docs/project-plan/project.drawio
|
179
|
+
- docs/project-plan/project_done.svg
|
180
|
+
- docs/project-plan/project_in_progress.svg
|
181
|
+
- docs/project-plan/project_todo.svg
|
169
182
|
- exe/rag
|
170
183
|
- lib/rails_app_generator.rb
|
171
184
|
- lib/rails_app_generator/add_on.rb
|
@@ -194,8 +207,14 @@ files:
|
|
194
207
|
- lib/rails_app_generator/addons/views.rb
|
195
208
|
- lib/rails_app_generator/app_builder.rb
|
196
209
|
- lib/rails_app_generator/app_generator.rb
|
210
|
+
- lib/rails_app_generator/cli.rb
|
197
211
|
- lib/rails_app_generator/context.rb
|
198
212
|
- lib/rails_app_generator/dependencies.rb
|
213
|
+
- lib/rails_app_generator/diff/compare_info.rb
|
214
|
+
- lib/rails_app_generator/diff/file_pair.rb
|
215
|
+
- lib/rails_app_generator/diff/open_in_editor.rb
|
216
|
+
- lib/rails_app_generator/diff/processor.rb
|
217
|
+
- lib/rails_app_generator/diff/report.rb
|
199
218
|
- lib/rails_app_generator/generators/advisories_generator.rb
|
200
219
|
- lib/rails_app_generator/generators/base.rb
|
201
220
|
- lib/rails_app_generator/generators/foo_generator.rb
|
@@ -218,6 +237,7 @@ files:
|
|
218
237
|
- lib/rails_app_generator/options/options_builder.rb
|
219
238
|
- lib/rails_app_generator/options/rails_options.rb
|
220
239
|
- lib/rails_app_generator/starter.rb
|
240
|
+
- lib/rails_app_generator/util.rb
|
221
241
|
- lib/rails_app_generator/version.rb
|
222
242
|
- package-lock.json
|
223
243
|
- package.json
|