cafe_car 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +682 -8
  3. data/Rakefile +21 -0
  4. data/app/assets/fonts/Lexend.css +7 -0
  5. data/app/assets/fonts/Lexend.ttf +0 -0
  6. data/app/assets/images/noise.svg +16 -0
  7. data/app/assets/stylesheets/actiontext.css +31 -0
  8. data/app/assets/stylesheets/application.css +1 -0
  9. data/app/assets/stylesheets/cafe_car/code/base16-dark.css +89 -0
  10. data/app/assets/stylesheets/cafe_car/code/base16-light.css +90 -0
  11. data/app/assets/stylesheets/cafe_car/pagination.css +5 -0
  12. data/app/assets/stylesheets/cafe_car/themes/cool.css +32 -0
  13. data/app/assets/stylesheets/cafe_car/themes/cool2.css +31 -0
  14. data/app/assets/stylesheets/cafe_car/themes/defaults.css +60 -0
  15. data/app/assets/stylesheets/cafe_car/themes/warm-dark.css +29 -0
  16. data/app/assets/stylesheets/cafe_car/themes/warm.css +24 -0
  17. data/app/assets/stylesheets/cafe_car/tooltips.css +20 -0
  18. data/app/assets/stylesheets/cafe_car/trix.css +56 -0
  19. data/app/assets/stylesheets/cafe_car/utility.css +63 -0
  20. data/app/assets/stylesheets/cafe_car.css +96 -0
  21. data/app/assets/stylesheets/iconoir.css +22 -0
  22. data/app/assets/stylesheets/ui/Alert.css +25 -0
  23. data/app/assets/stylesheets/ui/Article.css +11 -0
  24. data/app/assets/stylesheets/ui/Button.css +42 -0
  25. data/app/assets/stylesheets/ui/Card.css +74 -0
  26. data/app/assets/stylesheets/ui/Chat.css +33 -0
  27. data/app/assets/stylesheets/ui/Close.css +11 -0
  28. data/app/assets/stylesheets/ui/Code.css +4 -0
  29. data/app/assets/stylesheets/ui/Controls.css +16 -0
  30. data/app/assets/stylesheets/ui/Error.css +3 -0
  31. data/app/assets/stylesheets/ui/Example.css +45 -0
  32. data/app/assets/stylesheets/ui/Field.css +31 -0
  33. data/app/assets/stylesheets/ui/Grid.css +6 -0
  34. data/app/assets/stylesheets/ui/Group.css +16 -0
  35. data/app/assets/stylesheets/ui/Icon.css +27 -0
  36. data/app/assets/stylesheets/ui/Image.css +14 -0
  37. data/app/assets/stylesheets/ui/InfoCircle.css +11 -0
  38. data/app/assets/stylesheets/ui/Input.css +36 -0
  39. data/app/assets/stylesheets/ui/Layout.css +100 -0
  40. data/app/assets/stylesheets/ui/Menu.css +38 -0
  41. data/app/assets/stylesheets/ui/Modal.css +26 -0
  42. data/app/assets/stylesheets/ui/Navigation.css +37 -0
  43. data/app/assets/stylesheets/ui/Page.css +105 -0
  44. data/app/assets/stylesheets/ui/Row.css +9 -0
  45. data/app/assets/stylesheets/ui/Table.css +101 -0
  46. data/app/assets/stylesheets/ui/components.css +24 -0
  47. data/app/controllers/cafe_car/application_controller.rb +9 -0
  48. data/app/controllers/cafe_car/examples_controller.rb +22 -0
  49. data/app/controllers/cafe_car/sessions_controller.rb +30 -0
  50. data/app/controllers/concerns/cafe_car/authentication.rb +61 -0
  51. data/app/javascript/application.js +5 -0
  52. data/app/javascript/cafe_car.js +174 -0
  53. data/app/models/cafe_car/session.rb +18 -0
  54. data/app/policies/cafe_car/application_policy.rb +42 -0
  55. data/app/policies/cafe_car/session_policy.rb +19 -0
  56. data/app/presenters/cafe_car/action_text/rich_text_presenter.rb +7 -0
  57. data/app/presenters/cafe_car/active_record/base_presenter.rb +6 -0
  58. data/app/presenters/cafe_car/active_record/relation_presenter.rb +17 -0
  59. data/app/presenters/cafe_car/active_storage/attached/one_presenter.rb +9 -0
  60. data/app/presenters/cafe_car/active_storage/attachment_presenter.rb +18 -0
  61. data/app/presenters/cafe_car/basic_object_presenter.rb +5 -0
  62. data/app/presenters/cafe_car/code_presenter.rb +18 -0
  63. data/app/presenters/cafe_car/currency_presenter.rb +5 -0
  64. data/app/presenters/cafe_car/date_and_time/compatibility_presenter.rb +6 -0
  65. data/app/presenters/cafe_car/date_presenter.rb +5 -0
  66. data/app/presenters/cafe_car/date_time_presenter.rb +11 -0
  67. data/app/presenters/cafe_car/enumerable_presenter.rb +13 -0
  68. data/app/presenters/cafe_car/false_class_presenter.rb +5 -0
  69. data/app/presenters/cafe_car/hash_presenter.rb +6 -0
  70. data/app/presenters/cafe_car/nil_class_presenter.rb +13 -0
  71. data/app/presenters/cafe_car/presenter.rb +157 -0
  72. data/app/presenters/cafe_car/range_presenter.rb +16 -0
  73. data/app/presenters/cafe_car/record_presenter.rb +5 -0
  74. data/app/presenters/cafe_car/string_presenter.rb +20 -0
  75. data/app/presenters/cafe_car/symbol_presenter.rb +5 -0
  76. data/app/presenters/cafe_car/true_class_presenter.rb +5 -0
  77. data/app/ui/cafe_car/ui/button.rb +9 -0
  78. data/app/ui/cafe_car/ui/card.rb +18 -0
  79. data/app/ui/cafe_car/ui/field.rb +11 -0
  80. data/app/ui/cafe_car/ui/grid.rb +30 -0
  81. data/app/ui/cafe_car/ui/layout.rb +7 -0
  82. data/app/ui/cafe_car/ui/page.rb +14 -0
  83. data/app/views/application/_actions.html.haml +1 -0
  84. data/app/views/application/_alerts.html.haml +2 -0
  85. data/app/views/application/_body.html.haml +7 -0
  86. data/app/views/application/_controls.html.haml +12 -0
  87. data/app/views/application/_debug.html.haml +18 -0
  88. data/app/views/application/_empty.html.haml +1 -0
  89. data/app/views/application/_errors.html.haml +4 -0
  90. data/app/views/application/_field.html.haml +5 -0
  91. data/app/views/application/_fields.html.haml +1 -0
  92. data/app/views/application/_filters.html.haml +8 -0
  93. data/app/views/application/_form.html.haml +6 -0
  94. data/app/views/application/_grid.html.haml +3 -0
  95. data/app/views/application/_grid_item.html.haml +1 -0
  96. data/app/views/application/_head.html.haml +17 -0
  97. data/app/views/application/_index.html.haml +8 -0
  98. data/app/views/application/_index_actions.html.haml +7 -0
  99. data/app/views/application/_navigation.html.haml +9 -0
  100. data/app/views/application/_navigation_links.html.haml +5 -0
  101. data/app/views/application/_notes.html.haml +10 -0
  102. data/app/views/application/_popup.html.haml +7 -0
  103. data/app/views/application/_show.html.haml +9 -0
  104. data/app/views/application/_submit.html.haml +1 -0
  105. data/app/views/application/_table.html.haml +6 -0
  106. data/app/views/cafe_car/application/create.turbo_stream.haml +2 -0
  107. data/app/views/cafe_car/application/destroy.turbo_stream.haml +1 -0
  108. data/app/views/cafe_car/application/edit.html.haml +18 -0
  109. data/app/views/cafe_car/application/edit.turbo_stream.haml +7 -0
  110. data/app/views/cafe_car/application/index.html.haml +15 -0
  111. data/app/views/cafe_car/application/new.html.haml +8 -0
  112. data/app/views/cafe_car/application/new.turbo_stream.haml +8 -0
  113. data/app/views/cafe_car/application/show.html.haml +36 -0
  114. data/app/views/cafe_car/application/update.turbo_stream.haml +2 -0
  115. data/app/views/cafe_car/examples/_example.html.haml +12 -0
  116. data/app/views/cafe_car/examples/_index.html.haml +16 -0
  117. data/app/views/cafe_car/examples/_navigation_links.html.haml +2 -0
  118. data/app/views/cafe_car/examples/ui/_alert.html.haml +4 -0
  119. data/app/views/cafe_car/examples/ui/_button.html.haml +3 -0
  120. data/app/views/cafe_car/examples/ui/_card.html.haml +6 -0
  121. data/app/views/cafe_car/examples/ui/_chat.html.haml +3 -0
  122. data/app/views/cafe_car/examples/ui/_controls.html.haml +3 -0
  123. data/app/views/cafe_car/examples/ui/_error.html.haml +1 -0
  124. data/app/views/cafe_car/examples/ui/_field.html.haml +9 -0
  125. data/app/views/cafe_car/examples/ui/_grid.html.haml +11 -0
  126. data/app/views/cafe_car/examples/ui/_group.html.haml +21 -0
  127. data/app/views/cafe_car/examples/ui/_info_circle.html.haml +1 -0
  128. data/app/views/cafe_car/examples/ui/_menu.html.haml +5 -0
  129. data/app/views/cafe_car/examples/ui/_modal.html.haml +4 -0
  130. data/app/views/cafe_car/examples/ui/_navigation.html.haml +4 -0
  131. data/app/views/cafe_car/examples/ui/_page.html.haml +4 -0
  132. data/app/views/cafe_car/examples/ui/_table.html.haml +13 -0
  133. data/app/views/cafe_car/layouts/mailer.html.haml +8 -0
  134. data/app/views/cafe_car/layouts/mailer.text.erb +1 -0
  135. data/app/views/layouts/action_text/contents/_content.html.erb +3 -0
  136. data/app/views/layouts/application.html.haml +4 -0
  137. data/app/views/layouts/mailer.html.erb +13 -0
  138. data/app/views/layouts/mailer.text.erb +1 -0
  139. data/app/views/notes/_fields.html.haml +1 -0
  140. data/app/views/passwords_mailer/reset.html.haml +5 -0
  141. data/app/views/passwords_mailer/reset.text.erb +4 -0
  142. data/app/views/ui/_card.html.haml +8 -0
  143. data/app/views/ui/_field.html.haml +1 -0
  144. data/app/views/ui/_modal_close.html.haml +1 -0
  145. data/app/views/ui/_page.html.haml +7 -0
  146. data/config/brakeman.ignore +77 -0
  147. data/config/importmap.rb +12 -0
  148. data/config/locales/en.yml +63 -0
  149. data/config/routes.rb +9 -0
  150. data/db/migrate/20251005220017_create_slugs.rb +13 -0
  151. data/lib/cafe_car/active_record.rb +21 -0
  152. data/lib/cafe_car/application_responder.rb +17 -0
  153. data/lib/cafe_car/attributes.rb +23 -0
  154. data/lib/cafe_car/auto_resolver.rb +49 -0
  155. data/lib/cafe_car/caching.rb +20 -0
  156. data/lib/cafe_car/component.rb +155 -0
  157. data/lib/cafe_car/context.rb +17 -0
  158. data/lib/cafe_car/controller/filtering.rb +30 -0
  159. data/lib/cafe_car/controller.rb +218 -0
  160. data/lib/cafe_car/core_ext/array.rb +24 -0
  161. data/lib/cafe_car/core_ext/hash.rb +15 -0
  162. data/lib/cafe_car/core_ext/module.rb +15 -0
  163. data/lib/cafe_car/core_ext.rb +5 -0
  164. data/lib/cafe_car/current.rb +9 -0
  165. data/lib/cafe_car/engine.rb +107 -0
  166. data/lib/cafe_car/field_builder.rb +44 -0
  167. data/lib/cafe_car/field_info.rb +144 -0
  168. data/lib/cafe_car/fields.rb +21 -0
  169. data/lib/cafe_car/filter/field_builder.rb +4 -0
  170. data/lib/cafe_car/filter/field_info.rb +22 -0
  171. data/lib/cafe_car/filter/form_builder.rb +21 -0
  172. data/lib/cafe_car/filter.rb +5 -0
  173. data/lib/cafe_car/filter_builder.rb +20 -0
  174. data/lib/cafe_car/form_builder.rb +105 -0
  175. data/lib/cafe_car/generators.rb +30 -0
  176. data/lib/cafe_car/helpers.rb +178 -0
  177. data/lib/cafe_car/href_builder.rb +97 -0
  178. data/lib/cafe_car/informable.rb +9 -0
  179. data/lib/cafe_car/input_builder.rb +25 -0
  180. data/lib/cafe_car/inputs/association_builder.rb +6 -0
  181. data/lib/cafe_car/inputs/base_input.rb +19 -0
  182. data/lib/cafe_car/inputs/belongs_to_builder.rb +6 -0
  183. data/lib/cafe_car/inputs/password_input.rb +7 -0
  184. data/lib/cafe_car/inputs/string_input.rb +7 -0
  185. data/lib/cafe_car/link_builder.rb +65 -0
  186. data/lib/cafe_car/model.rb +23 -0
  187. data/lib/cafe_car/model_info.rb +24 -0
  188. data/lib/cafe_car/name_patch.rb +17 -0
  189. data/lib/cafe_car/navigation.rb +76 -0
  190. data/lib/cafe_car/option_helpers.rb +53 -0
  191. data/lib/cafe_car/param_parser.rb +45 -0
  192. data/lib/cafe_car/pluralization.rb +15 -0
  193. data/lib/cafe_car/policy.rb +77 -0
  194. data/lib/cafe_car/proc_helpers.rb +13 -0
  195. data/lib/cafe_car/query_builder.rb +186 -0
  196. data/lib/cafe_car/queryable.rb +29 -0
  197. data/lib/cafe_car/resolver.rb +27 -0
  198. data/lib/cafe_car/routing.rb +17 -0
  199. data/lib/cafe_car/table/body_builder.rb +12 -0
  200. data/lib/cafe_car/table/builder.rb +52 -0
  201. data/lib/cafe_car/table/foot_builder.rb +14 -0
  202. data/lib/cafe_car/table/head_builder.rb +26 -0
  203. data/lib/cafe_car/table/label_builder.rb +48 -0
  204. data/lib/cafe_car/table/objects_builder.rb +8 -0
  205. data/lib/cafe_car/table/row_builder.rb +39 -0
  206. data/lib/cafe_car/table_builder.rb +13 -0
  207. data/lib/cafe_car/turbo_tag_builder.rb +7 -0
  208. data/lib/cafe_car/ui.rb +11 -0
  209. data/lib/cafe_car/version.rb +1 -1
  210. data/lib/cafe_car/visitors.rb +21 -0
  211. data/lib/cafe_car.rb +25 -168
  212. data/lib/generators/cafe_car/controller/USAGE +11 -0
  213. data/lib/generators/cafe_car/controller/controller_generator.rb +26 -0
  214. data/lib/generators/cafe_car/controller/templates/controller.rb.tt +5 -0
  215. data/lib/generators/cafe_car/install/USAGE +8 -0
  216. data/lib/generators/cafe_car/install/install_generator.rb +46 -0
  217. data/lib/generators/cafe_car/install/templates/application_policy.rb.tt +7 -0
  218. data/lib/generators/cafe_car/notes/USAGE +12 -0
  219. data/lib/generators/cafe_car/notes/notes_generator.rb +13 -0
  220. data/lib/generators/cafe_car/notes/templates/create_notes.rb.tt +12 -0
  221. data/lib/generators/cafe_car/notes/templates/notable.rb.tt +7 -0
  222. data/lib/generators/cafe_car/notes/templates/note.rb.tt +6 -0
  223. data/lib/generators/cafe_car/policy/USAGE +8 -0
  224. data/lib/generators/cafe_car/policy/policy_generator.rb +39 -0
  225. data/lib/generators/cafe_car/policy/templates/policy.rb.tt +20 -0
  226. data/lib/generators/cafe_car/resource/USAGE +13 -0
  227. data/lib/generators/cafe_car/resource/resource_generator.rb +32 -0
  228. data/lib/generators/cafe_car/sessions/USAGE +17 -0
  229. data/lib/generators/cafe_car/sessions/sessions_generator.rb +29 -0
  230. data/lib/generators/cafe_car/sessions/templates/create_sessions.rb.tt +12 -0
  231. data/lib/tasks/holdco_tasks.rake +532 -0
  232. data/lib/tasks/templates/tasks_header.md +37 -0
  233. metadata +444 -21
  234. data/app/views/cafe_car/application/_fields.html.erb +0 -7
  235. data/app/views/cafe_car/application/_filters.html.erb +0 -0
  236. data/app/views/cafe_car/application/_form.html.erb +0 -22
  237. data/lib/cafe_car/railtie.rb +0 -4
  238. /data/app/views/{cafe_car/application/_actions.html.erb → application/_aside.html.haml} +0 -0
  239. /data/app/views/{cafe_car/application/_aside.html.erb → application/_footer.html.haml} +0 -0
  240. /data/app/views/cafe_car/{application/_extra_fields.html.erb → examples/_index_actions.html.haml} +0 -0
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cafe_car
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Peterson
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-24 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -16,15 +15,215 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: 7.1.3.2
18
+ version: '8.0'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: 7.1.3.2
27
- description: Rails UI and admin panels.
25
+ version: '8.0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: responders
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '3.0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '3.0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: activerecord_where_assoc
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '1.3'
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '1.3'
54
+ - !ruby/object:Gem::Dependency
55
+ name: propshaft
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '1.0'
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '1.0'
68
+ - !ruby/object:Gem::Dependency
69
+ name: haml-rails
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '3.0'
75
+ type: :runtime
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '3.0'
82
+ - !ruby/object:Gem::Dependency
83
+ name: image_processing
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '1.13'
89
+ type: :runtime
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '1.13'
96
+ - !ruby/object:Gem::Dependency
97
+ name: importmap-rails
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '2.0'
103
+ type: :runtime
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '2.0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: turbo-rails
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '2.0'
117
+ type: :runtime
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '2.0'
124
+ - !ruby/object:Gem::Dependency
125
+ name: kaminari
126
+ requirement: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '1.2'
131
+ type: :runtime
132
+ prerelease: false
133
+ version_requirements: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '1.2'
138
+ - !ruby/object:Gem::Dependency
139
+ name: potter
140
+ requirement: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ type: :runtime
146
+ prerelease: false
147
+ version_requirements: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ - !ruby/object:Gem::Dependency
153
+ name: pundit
154
+ requirement: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '2.0'
159
+ type: :runtime
160
+ prerelease: false
161
+ version_requirements: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '2.0'
166
+ - !ruby/object:Gem::Dependency
167
+ name: chronic
168
+ requirement: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0.10'
173
+ type: :runtime
174
+ prerelease: false
175
+ version_requirements: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ version: '0.10'
180
+ - !ruby/object:Gem::Dependency
181
+ name: web-console
182
+ requirement: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '4.0'
187
+ type: :runtime
188
+ prerelease: false
189
+ version_requirements: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ version: '4.0'
194
+ - !ruby/object:Gem::Dependency
195
+ name: rouge
196
+ requirement: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - ">="
199
+ - !ruby/object:Gem::Version
200
+ version: '4.0'
201
+ type: :runtime
202
+ prerelease: false
203
+ version_requirements: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '4.0'
208
+ - !ruby/object:Gem::Dependency
209
+ name: faker
210
+ requirement: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - ">="
213
+ - !ruby/object:Gem::Version
214
+ version: '3.0'
215
+ type: :runtime
216
+ prerelease: false
217
+ version_requirements: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ version: '3.0'
222
+ description: CafeCar is a Rails engine that extends the view layer to render complete
223
+ index, show, new, and edit interfaces straight from your models, with no boilerplate
224
+ required. Sensible defaults cover authorization, presenters, filtering, sorting,
225
+ pagination, and Hotwire-ready forms, and every default can be overridden application-wide
226
+ or per model. Batteries included for admin panels, internal tools, and rapid prototyping.
28
227
  email:
29
228
  - jeff@yak.sh
30
229
  executables: []
@@ -34,24 +233,248 @@ files:
34
233
  - MIT-LICENSE
35
234
  - README.md
36
235
  - Rakefile
37
- - app/views/cafe_car/application/_actions.html.erb
38
- - app/views/cafe_car/application/_aside.html.erb
39
- - app/views/cafe_car/application/_extra_fields.html.erb
40
- - app/views/cafe_car/application/_fields.html.erb
41
- - app/views/cafe_car/application/_filters.html.erb
42
- - app/views/cafe_car/application/_form.html.erb
236
+ - app/assets/fonts/Lexend.css
237
+ - app/assets/fonts/Lexend.ttf
238
+ - app/assets/images/noise.svg
239
+ - app/assets/stylesheets/actiontext.css
240
+ - app/assets/stylesheets/application.css
241
+ - app/assets/stylesheets/cafe_car.css
242
+ - app/assets/stylesheets/cafe_car/code/base16-dark.css
243
+ - app/assets/stylesheets/cafe_car/code/base16-light.css
244
+ - app/assets/stylesheets/cafe_car/pagination.css
245
+ - app/assets/stylesheets/cafe_car/themes/cool.css
246
+ - app/assets/stylesheets/cafe_car/themes/cool2.css
247
+ - app/assets/stylesheets/cafe_car/themes/defaults.css
248
+ - app/assets/stylesheets/cafe_car/themes/warm-dark.css
249
+ - app/assets/stylesheets/cafe_car/themes/warm.css
250
+ - app/assets/stylesheets/cafe_car/tooltips.css
251
+ - app/assets/stylesheets/cafe_car/trix.css
252
+ - app/assets/stylesheets/cafe_car/utility.css
253
+ - app/assets/stylesheets/iconoir.css
254
+ - app/assets/stylesheets/ui/Alert.css
255
+ - app/assets/stylesheets/ui/Article.css
256
+ - app/assets/stylesheets/ui/Button.css
257
+ - app/assets/stylesheets/ui/Card.css
258
+ - app/assets/stylesheets/ui/Chat.css
259
+ - app/assets/stylesheets/ui/Close.css
260
+ - app/assets/stylesheets/ui/Code.css
261
+ - app/assets/stylesheets/ui/Controls.css
262
+ - app/assets/stylesheets/ui/Error.css
263
+ - app/assets/stylesheets/ui/Example.css
264
+ - app/assets/stylesheets/ui/Field.css
265
+ - app/assets/stylesheets/ui/Grid.css
266
+ - app/assets/stylesheets/ui/Group.css
267
+ - app/assets/stylesheets/ui/Icon.css
268
+ - app/assets/stylesheets/ui/Image.css
269
+ - app/assets/stylesheets/ui/InfoCircle.css
270
+ - app/assets/stylesheets/ui/Input.css
271
+ - app/assets/stylesheets/ui/Layout.css
272
+ - app/assets/stylesheets/ui/Menu.css
273
+ - app/assets/stylesheets/ui/Modal.css
274
+ - app/assets/stylesheets/ui/Navigation.css
275
+ - app/assets/stylesheets/ui/Page.css
276
+ - app/assets/stylesheets/ui/Row.css
277
+ - app/assets/stylesheets/ui/Table.css
278
+ - app/assets/stylesheets/ui/components.css
279
+ - app/controllers/cafe_car/application_controller.rb
280
+ - app/controllers/cafe_car/examples_controller.rb
281
+ - app/controllers/cafe_car/sessions_controller.rb
282
+ - app/controllers/concerns/cafe_car/authentication.rb
283
+ - app/javascript/application.js
284
+ - app/javascript/cafe_car.js
285
+ - app/models/cafe_car/session.rb
286
+ - app/policies/cafe_car/application_policy.rb
287
+ - app/policies/cafe_car/session_policy.rb
288
+ - app/presenters/cafe_car/action_text/rich_text_presenter.rb
289
+ - app/presenters/cafe_car/active_record/base_presenter.rb
290
+ - app/presenters/cafe_car/active_record/relation_presenter.rb
291
+ - app/presenters/cafe_car/active_storage/attached/one_presenter.rb
292
+ - app/presenters/cafe_car/active_storage/attachment_presenter.rb
293
+ - app/presenters/cafe_car/basic_object_presenter.rb
294
+ - app/presenters/cafe_car/code_presenter.rb
295
+ - app/presenters/cafe_car/currency_presenter.rb
296
+ - app/presenters/cafe_car/date_and_time/compatibility_presenter.rb
297
+ - app/presenters/cafe_car/date_presenter.rb
298
+ - app/presenters/cafe_car/date_time_presenter.rb
299
+ - app/presenters/cafe_car/enumerable_presenter.rb
300
+ - app/presenters/cafe_car/false_class_presenter.rb
301
+ - app/presenters/cafe_car/hash_presenter.rb
302
+ - app/presenters/cafe_car/nil_class_presenter.rb
303
+ - app/presenters/cafe_car/presenter.rb
304
+ - app/presenters/cafe_car/range_presenter.rb
305
+ - app/presenters/cafe_car/record_presenter.rb
306
+ - app/presenters/cafe_car/string_presenter.rb
307
+ - app/presenters/cafe_car/symbol_presenter.rb
308
+ - app/presenters/cafe_car/true_class_presenter.rb
309
+ - app/ui/cafe_car/ui/button.rb
310
+ - app/ui/cafe_car/ui/card.rb
311
+ - app/ui/cafe_car/ui/field.rb
312
+ - app/ui/cafe_car/ui/grid.rb
313
+ - app/ui/cafe_car/ui/layout.rb
314
+ - app/ui/cafe_car/ui/page.rb
315
+ - app/views/application/_actions.html.haml
316
+ - app/views/application/_alerts.html.haml
317
+ - app/views/application/_aside.html.haml
318
+ - app/views/application/_body.html.haml
319
+ - app/views/application/_controls.html.haml
320
+ - app/views/application/_debug.html.haml
321
+ - app/views/application/_empty.html.haml
322
+ - app/views/application/_errors.html.haml
323
+ - app/views/application/_field.html.haml
324
+ - app/views/application/_fields.html.haml
325
+ - app/views/application/_filters.html.haml
326
+ - app/views/application/_footer.html.haml
327
+ - app/views/application/_form.html.haml
328
+ - app/views/application/_grid.html.haml
329
+ - app/views/application/_grid_item.html.haml
330
+ - app/views/application/_head.html.haml
331
+ - app/views/application/_index.html.haml
332
+ - app/views/application/_index_actions.html.haml
333
+ - app/views/application/_navigation.html.haml
334
+ - app/views/application/_navigation_links.html.haml
335
+ - app/views/application/_notes.html.haml
336
+ - app/views/application/_popup.html.haml
337
+ - app/views/application/_show.html.haml
338
+ - app/views/application/_submit.html.haml
339
+ - app/views/application/_table.html.haml
340
+ - app/views/cafe_car/application/create.turbo_stream.haml
341
+ - app/views/cafe_car/application/destroy.turbo_stream.haml
342
+ - app/views/cafe_car/application/edit.html.haml
343
+ - app/views/cafe_car/application/edit.turbo_stream.haml
344
+ - app/views/cafe_car/application/index.html.haml
345
+ - app/views/cafe_car/application/new.html.haml
346
+ - app/views/cafe_car/application/new.turbo_stream.haml
347
+ - app/views/cafe_car/application/show.html.haml
348
+ - app/views/cafe_car/application/update.turbo_stream.haml
349
+ - app/views/cafe_car/examples/_example.html.haml
350
+ - app/views/cafe_car/examples/_index.html.haml
351
+ - app/views/cafe_car/examples/_index_actions.html.haml
352
+ - app/views/cafe_car/examples/_navigation_links.html.haml
353
+ - app/views/cafe_car/examples/ui/_alert.html.haml
354
+ - app/views/cafe_car/examples/ui/_button.html.haml
355
+ - app/views/cafe_car/examples/ui/_card.html.haml
356
+ - app/views/cafe_car/examples/ui/_chat.html.haml
357
+ - app/views/cafe_car/examples/ui/_controls.html.haml
358
+ - app/views/cafe_car/examples/ui/_error.html.haml
359
+ - app/views/cafe_car/examples/ui/_field.html.haml
360
+ - app/views/cafe_car/examples/ui/_grid.html.haml
361
+ - app/views/cafe_car/examples/ui/_group.html.haml
362
+ - app/views/cafe_car/examples/ui/_info_circle.html.haml
363
+ - app/views/cafe_car/examples/ui/_menu.html.haml
364
+ - app/views/cafe_car/examples/ui/_modal.html.haml
365
+ - app/views/cafe_car/examples/ui/_navigation.html.haml
366
+ - app/views/cafe_car/examples/ui/_page.html.haml
367
+ - app/views/cafe_car/examples/ui/_table.html.haml
368
+ - app/views/cafe_car/layouts/mailer.html.haml
369
+ - app/views/cafe_car/layouts/mailer.text.erb
370
+ - app/views/layouts/action_text/contents/_content.html.erb
371
+ - app/views/layouts/application.html.haml
372
+ - app/views/layouts/mailer.html.erb
373
+ - app/views/layouts/mailer.text.erb
374
+ - app/views/notes/_fields.html.haml
375
+ - app/views/passwords_mailer/reset.html.haml
376
+ - app/views/passwords_mailer/reset.text.erb
377
+ - app/views/ui/_card.html.haml
378
+ - app/views/ui/_field.html.haml
379
+ - app/views/ui/_modal_close.html.haml
380
+ - app/views/ui/_page.html.haml
381
+ - config/brakeman.ignore
382
+ - config/importmap.rb
383
+ - config/locales/en.yml
384
+ - config/routes.rb
385
+ - db/migrate/20251005220017_create_slugs.rb
43
386
  - lib/cafe_car.rb
44
- - lib/cafe_car/railtie.rb
387
+ - lib/cafe_car/active_record.rb
388
+ - lib/cafe_car/application_responder.rb
389
+ - lib/cafe_car/attributes.rb
390
+ - lib/cafe_car/auto_resolver.rb
391
+ - lib/cafe_car/caching.rb
392
+ - lib/cafe_car/component.rb
393
+ - lib/cafe_car/context.rb
394
+ - lib/cafe_car/controller.rb
395
+ - lib/cafe_car/controller/filtering.rb
396
+ - lib/cafe_car/core_ext.rb
397
+ - lib/cafe_car/core_ext/array.rb
398
+ - lib/cafe_car/core_ext/hash.rb
399
+ - lib/cafe_car/core_ext/module.rb
400
+ - lib/cafe_car/current.rb
401
+ - lib/cafe_car/engine.rb
402
+ - lib/cafe_car/field_builder.rb
403
+ - lib/cafe_car/field_info.rb
404
+ - lib/cafe_car/fields.rb
405
+ - lib/cafe_car/filter.rb
406
+ - lib/cafe_car/filter/field_builder.rb
407
+ - lib/cafe_car/filter/field_info.rb
408
+ - lib/cafe_car/filter/form_builder.rb
409
+ - lib/cafe_car/filter_builder.rb
410
+ - lib/cafe_car/form_builder.rb
411
+ - lib/cafe_car/generators.rb
412
+ - lib/cafe_car/helpers.rb
413
+ - lib/cafe_car/href_builder.rb
414
+ - lib/cafe_car/informable.rb
415
+ - lib/cafe_car/input_builder.rb
416
+ - lib/cafe_car/inputs/association_builder.rb
417
+ - lib/cafe_car/inputs/base_input.rb
418
+ - lib/cafe_car/inputs/belongs_to_builder.rb
419
+ - lib/cafe_car/inputs/password_input.rb
420
+ - lib/cafe_car/inputs/string_input.rb
421
+ - lib/cafe_car/link_builder.rb
422
+ - lib/cafe_car/model.rb
423
+ - lib/cafe_car/model_info.rb
424
+ - lib/cafe_car/name_patch.rb
425
+ - lib/cafe_car/navigation.rb
426
+ - lib/cafe_car/option_helpers.rb
427
+ - lib/cafe_car/param_parser.rb
428
+ - lib/cafe_car/pluralization.rb
429
+ - lib/cafe_car/policy.rb
430
+ - lib/cafe_car/proc_helpers.rb
431
+ - lib/cafe_car/query_builder.rb
432
+ - lib/cafe_car/queryable.rb
433
+ - lib/cafe_car/resolver.rb
434
+ - lib/cafe_car/routing.rb
435
+ - lib/cafe_car/table/body_builder.rb
436
+ - lib/cafe_car/table/builder.rb
437
+ - lib/cafe_car/table/foot_builder.rb
438
+ - lib/cafe_car/table/head_builder.rb
439
+ - lib/cafe_car/table/label_builder.rb
440
+ - lib/cafe_car/table/objects_builder.rb
441
+ - lib/cafe_car/table/row_builder.rb
442
+ - lib/cafe_car/table_builder.rb
443
+ - lib/cafe_car/turbo_tag_builder.rb
444
+ - lib/cafe_car/ui.rb
45
445
  - lib/cafe_car/version.rb
446
+ - lib/cafe_car/visitors.rb
447
+ - lib/generators/cafe_car/controller/USAGE
448
+ - lib/generators/cafe_car/controller/controller_generator.rb
449
+ - lib/generators/cafe_car/controller/templates/controller.rb.tt
450
+ - lib/generators/cafe_car/install/USAGE
451
+ - lib/generators/cafe_car/install/install_generator.rb
452
+ - lib/generators/cafe_car/install/templates/application_policy.rb.tt
453
+ - lib/generators/cafe_car/notes/USAGE
454
+ - lib/generators/cafe_car/notes/notes_generator.rb
455
+ - lib/generators/cafe_car/notes/templates/create_notes.rb.tt
456
+ - lib/generators/cafe_car/notes/templates/notable.rb.tt
457
+ - lib/generators/cafe_car/notes/templates/note.rb.tt
458
+ - lib/generators/cafe_car/policy/USAGE
459
+ - lib/generators/cafe_car/policy/policy_generator.rb
460
+ - lib/generators/cafe_car/policy/templates/policy.rb.tt
461
+ - lib/generators/cafe_car/resource/USAGE
462
+ - lib/generators/cafe_car/resource/resource_generator.rb
463
+ - lib/generators/cafe_car/sessions/USAGE
464
+ - lib/generators/cafe_car/sessions/sessions_generator.rb
465
+ - lib/generators/cafe_car/sessions/templates/create_sessions.rb.tt
46
466
  - lib/tasks/cafe_car_tasks.rake
47
- homepage: https://concept.love/cafe_car
467
+ - lib/tasks/holdco_tasks.rake
468
+ - lib/tasks/templates/tasks_header.md
469
+ homepage: https://craft-concept.github.io/cafe_car
48
470
  licenses:
49
471
  - MIT
50
472
  metadata:
51
- homepage_uri: https://concept.love/cafe_car
473
+ homepage_uri: https://craft-concept.github.io/cafe_car
52
474
  source_code_uri: https://github.com/craft-concept/cafe_car
53
- changelog_uri: https://github.com/craft-concept/cafe_car
54
- post_install_message:
475
+ changelog_uri: https://github.com/craft-concept/cafe_car/blob/main/CHANGELOG.md
476
+ bug_tracker_uri: https://github.com/craft-concept/cafe_car/issues
477
+ rubygems_mfa_required: 'true'
55
478
  rdoc_options: []
56
479
  require_paths:
57
480
  - lib
@@ -59,15 +482,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
59
482
  requirements:
60
483
  - - ">="
61
484
  - !ruby/object:Gem::Version
62
- version: '0'
485
+ version: '3.3'
63
486
  required_rubygems_version: !ruby/object:Gem::Requirement
64
487
  requirements:
65
488
  - - ">="
66
489
  - !ruby/object:Gem::Version
67
490
  version: '0'
68
491
  requirements: []
69
- rubygems_version: 3.5.3
70
- signing_key:
492
+ rubygems_version: 3.6.7
71
493
  specification_version: 4
72
- summary: Rails UI and admin panels.
494
+ summary: Auto-generate CRUD admin UI for your Rails models, with sensible overridable
495
+ defaults.
73
496
  test_files: []
@@ -1,7 +0,0 @@
1
- <% record_policy.editable_attributes.each do |c| %>
2
- <%= f.input c %>
3
- <% end %>
4
-
5
- <% record_policy.reflect_on_editable_associations.each do |a| %>
6
- <%= f.association a.name %>
7
- <% end %>
File without changes
@@ -1,22 +0,0 @@
1
- <% remote ||= false %>
2
- <% title ||= nil %>
3
-
4
- <%= form_for record, url: polymorphic_path(record), remote:, builder: CafeCar::FormBuilder do |f| %>
5
- <div class="Card Card-limit">
6
- <% if title.present? %>
7
- <div class="Card_Head Card_Head-slim">
8
- <h2><%= title %></h2>
9
- </div>
10
- <% end %>
11
-
12
- .Card_Body.Flex
13
- - f.object.errors.full_messages.each do |msg|
14
- .Box.Box-error= msg
15
- = render "fields", f: f
16
-
17
- - if extra = render("extra_fields", f: f).presence
18
- .Card_Body.Flex= extra
19
-
20
- .Card_Body= f.submit class: 'btn blue', data: { disable_with: "Updating..." }
21
- </div>
22
- <% end %>
@@ -1,4 +0,0 @@
1
- module CafeCar
2
- class Railtie < ::Rails::Railtie
3
- end
4
- end