moduler 0.2.0 → 0.4.0

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 (125) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/builds/moduler/tailwind.css +2103 -1
  3. data/app/assets/javascripts/moduler/application.js +1 -0
  4. data/app/assets/javascripts/moduler/controllers/flash_controller.js +19 -0
  5. data/app/assets/javascripts/moduler/controllers/wysiwyg_controller.js +126 -0
  6. data/app/assets/javascripts/moduler/vendor/marked.esm.js +77 -0
  7. data/app/assets/stylesheets/moduler/tailwind.css +3 -0
  8. data/app/components/moduler/administration/page_component.html.erb +7 -0
  9. data/app/components/moduler/administration/page_component.rb +6 -0
  10. data/app/components/moduler/badge_component.html.erb +8 -0
  11. data/app/components/moduler/badge_component.rb +10 -0
  12. data/app/components/moduler/button_component.html.erb +7 -0
  13. data/app/components/moduler/button_component.rb +19 -0
  14. data/app/components/moduler/button_link_component.html.erb +5 -0
  15. data/app/components/moduler/button_link_component.rb +15 -0
  16. data/app/components/moduler/filter_component.html.erb +12 -0
  17. data/app/components/moduler/filter_component.rb +15 -0
  18. data/app/components/moduler/form/base_error_component.html.erb +1 -0
  19. data/app/components/moduler/form/base_error_component.rb +9 -0
  20. data/app/components/moduler/form/email_component.html.erb +14 -0
  21. data/app/components/moduler/form/email_component.rb +11 -0
  22. data/app/components/moduler/form/password_component.html.erb +14 -0
  23. data/app/components/moduler/form/password_component.rb +11 -0
  24. data/app/components/moduler/form/section_component.html.erb +5 -0
  25. data/app/components/moduler/form/section_component.rb +14 -0
  26. data/app/components/moduler/form/select_component.html.erb +14 -0
  27. data/app/components/moduler/form/select_component.rb +12 -0
  28. data/app/components/moduler/form/submit_component.html.erb +3 -0
  29. data/app/components/moduler/form/submit_component.rb +10 -0
  30. data/app/components/moduler/form/text_component.html.erb +14 -0
  31. data/app/components/moduler/form/text_component.rb +11 -0
  32. data/app/components/moduler/form/textarea_component.html.erb +14 -0
  33. data/app/components/moduler/form/textarea_component.rb +11 -0
  34. data/app/components/moduler/form/wysiwyg_component.html.erb +30 -0
  35. data/app/components/moduler/form/wysiwyg_component.rb +62 -0
  36. data/app/components/moduler/list_component.html.erb +15 -0
  37. data/app/components/moduler/list_component.rb +18 -0
  38. data/app/components/moduler/list_item_component.html.erb +23 -0
  39. data/app/components/moduler/list_item_component.rb +14 -0
  40. data/app/components/moduler/page_header_component.html.erb +16 -0
  41. data/app/components/moduler/page_header_component.rb +12 -0
  42. data/app/components/moduler/sidebar_action_component.html.erb +5 -0
  43. data/app/components/moduler/sidebar_action_component.rb +15 -0
  44. data/app/controllers/concerns/moduler/authentication.rb +10 -2
  45. data/app/controllers/moduler/administration/application_controller.rb +7 -0
  46. data/app/controllers/moduler/administration/articles_controller.rb +57 -0
  47. data/app/controllers/moduler/administration/home_controller.rb +9 -0
  48. data/app/controllers/moduler/administration/sessions_controller.rb +34 -0
  49. data/app/controllers/moduler/administration/users_controller.rb +56 -0
  50. data/app/controllers/moduler/application_controller.rb +15 -0
  51. data/app/controllers/moduler/articles_controller.rb +15 -0
  52. data/app/controllers/moduler/profile/sessions/revocation_controller.rb +14 -0
  53. data/app/controllers/moduler/profile/sessions_controller.rb +21 -0
  54. data/app/controllers/moduler/profile_controller.rb +27 -0
  55. data/app/controllers/moduler/sessions_controller.rb +8 -1
  56. data/app/controllers/moduler/users_controller.rb +7 -0
  57. data/app/filters/application_filter.rb +41 -0
  58. data/app/filters/query_filter.rb +18 -0
  59. data/app/lib/moduler/form_builder.rb +2 -2
  60. data/app/models/moduler/article.rb +25 -0
  61. data/app/models/moduler/session.rb +12 -0
  62. data/app/models/moduler/user.rb +9 -0
  63. data/app/policies/moduler/administration/article_policy.rb +29 -0
  64. data/app/policies/moduler/administration/base_policy.rb +11 -0
  65. data/app/policies/moduler/administration/home_policy.rb +9 -0
  66. data/app/policies/moduler/administration/session_policy.rb +13 -0
  67. data/app/policies/moduler/administration/user_policy.rb +25 -0
  68. data/app/policies/moduler/application_policy.rb +38 -0
  69. data/app/views/kaminari/_gap.html.erb +1 -0
  70. data/app/views/kaminari/_next_page.html.erb +1 -0
  71. data/app/views/kaminari/_page.html.erb +3 -0
  72. data/app/views/kaminari/_paginator.html.erb +13 -0
  73. data/app/views/kaminari/_prev_page.html.erb +1 -0
  74. data/app/views/layouts/moduler/application.html.erb +5 -6
  75. data/app/views/layouts/moduler/articles.html.erb +18 -0
  76. data/app/views/moduler/administration/articles/_article.html.erb +13 -0
  77. data/app/views/moduler/administration/articles/_form.html.erb +18 -0
  78. data/app/views/moduler/administration/articles/edit.html.erb +1 -0
  79. data/app/views/moduler/administration/articles/index.html.erb +13 -0
  80. data/app/views/moduler/administration/articles/new.html.erb +1 -0
  81. data/app/views/moduler/administration/home/index.html.erb +6 -0
  82. data/app/views/moduler/administration/sessions/_session.html.erb +30 -0
  83. data/app/views/moduler/administration/sessions/index.html.erb +9 -0
  84. data/app/views/moduler/administration/users/_user.html.erb +13 -0
  85. data/app/views/moduler/administration/users/edit.html.erb +14 -0
  86. data/app/views/moduler/administration/users/index.html.erb +13 -0
  87. data/app/views/moduler/administration/users/new.html.erb +18 -0
  88. data/app/views/moduler/articles/_article.html.erb +16 -0
  89. data/app/views/moduler/articles/index.html.erb +15 -0
  90. data/app/views/moduler/articles/show.html.erb +21 -0
  91. data/app/views/moduler/common/_flash.html.erb +16 -0
  92. data/app/views/moduler/common/_header.html.erb +12 -3
  93. data/app/views/moduler/common/_sidebar.html.erb +7 -0
  94. data/app/views/moduler/common/administration/_sidebar.html.erb +12 -0
  95. data/app/views/moduler/common/profile/_sidebar.html.erb +6 -0
  96. data/app/views/moduler/home/index.html.erb +6 -0
  97. data/app/views/moduler/profile/edit.html.erb +28 -0
  98. data/app/views/moduler/profile/sessions/_session.html.erb +52 -0
  99. data/app/views/moduler/profile/sessions/index.html.erb +26 -0
  100. data/app/views/moduler/sessions/new.html.erb +4 -18
  101. data/app/views/moduler/users/new.html.erb +5 -32
  102. data/config/importmap.rb +3 -0
  103. data/config/locales/moduler/administration/articles/en.yml +37 -0
  104. data/config/locales/moduler/administration/sessions/en.yml +24 -0
  105. data/config/locales/moduler/administration/users/en.yml +43 -0
  106. data/config/locales/moduler/articles/en.yml +13 -0
  107. data/config/locales/moduler/common/en.yml +12 -0
  108. data/config/locales/moduler/components/en.yml +27 -0
  109. data/config/locales/moduler/en.yml +4 -0
  110. data/config/locales/moduler/profile/en.yml +26 -0
  111. data/config/locales/moduler/profile/sessions/en.yml +25 -0
  112. data/config/locales/moduler/sessions/en.yml +1 -0
  113. data/config/locales/moduler/users/en.yml +7 -1
  114. data/config/routes.rb +18 -1
  115. data/db/migrate/20261015171504_add_role_to_moduler_users.rb +5 -0
  116. data/db/migrate/20261020191709_enable_pg_trgm.rb +5 -0
  117. data/db/migrate/20261026203827_create_moduler_articles.rb +15 -0
  118. data/lib/moduler/engine.rb +2 -0
  119. data/lib/moduler/version.rb +1 -1
  120. data/lib/moduler.rb +7 -0
  121. data/lib/tasks/moduler_tasks.rake +2 -4
  122. metadata +202 -5
  123. data/app/assets/javascripts/moduler/controllers/hello_controller.js +0 -6
  124. data/app/controllers/moduler/hello_controller.rb +0 -5
  125. data/app/views/moduler/hello/index.html.erb +0 -5
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Kowalewski
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-09-27 00:00:00.000000000 Z
10
+ date: 2026-10-27 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails
@@ -69,6 +69,26 @@ dependencies:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
71
  version: 1.3.4
72
+ - !ruby/object:Gem::Dependency
73
+ name: turbo-rails
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - "~>"
77
+ - !ruby/object:Gem::Version
78
+ version: '2.0'
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: 2.0.23
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '2.0'
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 2.0.23
72
92
  - !ruby/object:Gem::Dependency
73
93
  name: tailwindcss-rails
74
94
  requirement: !ruby/object:Gem::Requirement
@@ -103,6 +123,90 @@ dependencies:
103
123
  - - ">="
104
124
  - !ruby/object:Gem::Version
105
125
  version: 3.1.22
126
+ - !ruby/object:Gem::Dependency
127
+ name: view_component
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '4.15'
133
+ type: :runtime
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '4.15'
140
+ - !ruby/object:Gem::Dependency
141
+ name: kaminari
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: '1.2'
147
+ type: :runtime
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: '1.2'
154
+ - !ruby/object:Gem::Dependency
155
+ name: pg_search
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '2.4'
161
+ type: :runtime
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '2.4'
168
+ - !ruby/object:Gem::Dependency
169
+ name: pundit
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - "~>"
173
+ - !ruby/object:Gem::Version
174
+ version: '2.5'
175
+ type: :runtime
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - "~>"
180
+ - !ruby/object:Gem::Version
181
+ version: '2.5'
182
+ - !ruby/object:Gem::Dependency
183
+ name: active_storage_validations
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - "~>"
187
+ - !ruby/object:Gem::Version
188
+ version: '4.1'
189
+ type: :runtime
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - "~>"
194
+ - !ruby/object:Gem::Version
195
+ version: '4.1'
196
+ - !ruby/object:Gem::Dependency
197
+ name: redcarpet
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - "~>"
201
+ - !ruby/object:Gem::Version
202
+ version: '3.6'
203
+ type: :runtime
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - "~>"
208
+ - !ruby/object:Gem::Version
209
+ version: '3.6'
106
210
  email:
107
211
  - me@tkowalewski.pl
108
212
  executables: []
@@ -115,36 +219,129 @@ files:
115
219
  - app/assets/builds/moduler/tailwind.css
116
220
  - app/assets/config/moduler/manifest.js
117
221
  - app/assets/javascripts/moduler/application.js
118
- - app/assets/javascripts/moduler/controllers/hello_controller.js
222
+ - app/assets/javascripts/moduler/controllers/flash_controller.js
223
+ - app/assets/javascripts/moduler/controllers/wysiwyg_controller.js
224
+ - app/assets/javascripts/moduler/vendor/marked.esm.js
119
225
  - app/assets/stylesheets/moduler/application.css
120
226
  - app/assets/stylesheets/moduler/tailwind.css
227
+ - app/components/moduler/administration/page_component.html.erb
228
+ - app/components/moduler/administration/page_component.rb
229
+ - app/components/moduler/badge_component.html.erb
230
+ - app/components/moduler/badge_component.rb
231
+ - app/components/moduler/button_component.html.erb
232
+ - app/components/moduler/button_component.rb
233
+ - app/components/moduler/button_link_component.html.erb
234
+ - app/components/moduler/button_link_component.rb
235
+ - app/components/moduler/filter_component.html.erb
236
+ - app/components/moduler/filter_component.rb
237
+ - app/components/moduler/form/base_error_component.html.erb
238
+ - app/components/moduler/form/base_error_component.rb
239
+ - app/components/moduler/form/email_component.html.erb
240
+ - app/components/moduler/form/email_component.rb
241
+ - app/components/moduler/form/password_component.html.erb
242
+ - app/components/moduler/form/password_component.rb
243
+ - app/components/moduler/form/section_component.html.erb
244
+ - app/components/moduler/form/section_component.rb
245
+ - app/components/moduler/form/select_component.html.erb
246
+ - app/components/moduler/form/select_component.rb
247
+ - app/components/moduler/form/submit_component.html.erb
248
+ - app/components/moduler/form/submit_component.rb
249
+ - app/components/moduler/form/text_component.html.erb
250
+ - app/components/moduler/form/text_component.rb
251
+ - app/components/moduler/form/textarea_component.html.erb
252
+ - app/components/moduler/form/textarea_component.rb
253
+ - app/components/moduler/form/wysiwyg_component.html.erb
254
+ - app/components/moduler/form/wysiwyg_component.rb
255
+ - app/components/moduler/list_component.html.erb
256
+ - app/components/moduler/list_component.rb
257
+ - app/components/moduler/list_item_component.html.erb
258
+ - app/components/moduler/list_item_component.rb
259
+ - app/components/moduler/page_header_component.html.erb
260
+ - app/components/moduler/page_header_component.rb
261
+ - app/components/moduler/sidebar_action_component.html.erb
262
+ - app/components/moduler/sidebar_action_component.rb
121
263
  - app/controllers/concerns/moduler/authentication.rb
264
+ - app/controllers/moduler/administration/application_controller.rb
265
+ - app/controllers/moduler/administration/articles_controller.rb
266
+ - app/controllers/moduler/administration/home_controller.rb
267
+ - app/controllers/moduler/administration/sessions_controller.rb
268
+ - app/controllers/moduler/administration/users_controller.rb
122
269
  - app/controllers/moduler/application_controller.rb
123
- - app/controllers/moduler/hello_controller.rb
270
+ - app/controllers/moduler/articles_controller.rb
124
271
  - app/controllers/moduler/home_controller.rb
272
+ - app/controllers/moduler/profile/sessions/revocation_controller.rb
273
+ - app/controllers/moduler/profile/sessions_controller.rb
274
+ - app/controllers/moduler/profile_controller.rb
125
275
  - app/controllers/moduler/sessions_controller.rb
126
276
  - app/controllers/moduler/users_controller.rb
277
+ - app/filters/application_filter.rb
278
+ - app/filters/query_filter.rb
127
279
  - app/helpers/moduler/application_helper.rb
128
280
  - app/jobs/moduler/application_job.rb
129
281
  - app/lib/moduler/form_builder.rb
130
282
  - app/mailers/moduler/application_mailer.rb
131
283
  - app/models/moduler/application_record.rb
284
+ - app/models/moduler/article.rb
132
285
  - app/models/moduler/current.rb
133
286
  - app/models/moduler/session.rb
134
287
  - app/models/moduler/user.rb
288
+ - app/policies/moduler/administration/article_policy.rb
289
+ - app/policies/moduler/administration/base_policy.rb
290
+ - app/policies/moduler/administration/home_policy.rb
291
+ - app/policies/moduler/administration/session_policy.rb
292
+ - app/policies/moduler/administration/user_policy.rb
293
+ - app/policies/moduler/application_policy.rb
294
+ - app/views/kaminari/_gap.html.erb
295
+ - app/views/kaminari/_next_page.html.erb
296
+ - app/views/kaminari/_page.html.erb
297
+ - app/views/kaminari/_paginator.html.erb
298
+ - app/views/kaminari/_prev_page.html.erb
135
299
  - app/views/layouts/moduler/application.html.erb
300
+ - app/views/layouts/moduler/articles.html.erb
301
+ - app/views/moduler/administration/articles/_article.html.erb
302
+ - app/views/moduler/administration/articles/_form.html.erb
303
+ - app/views/moduler/administration/articles/edit.html.erb
304
+ - app/views/moduler/administration/articles/index.html.erb
305
+ - app/views/moduler/administration/articles/new.html.erb
306
+ - app/views/moduler/administration/home/index.html.erb
307
+ - app/views/moduler/administration/sessions/_session.html.erb
308
+ - app/views/moduler/administration/sessions/index.html.erb
309
+ - app/views/moduler/administration/users/_user.html.erb
310
+ - app/views/moduler/administration/users/edit.html.erb
311
+ - app/views/moduler/administration/users/index.html.erb
312
+ - app/views/moduler/administration/users/new.html.erb
313
+ - app/views/moduler/articles/_article.html.erb
314
+ - app/views/moduler/articles/index.html.erb
315
+ - app/views/moduler/articles/show.html.erb
316
+ - app/views/moduler/common/_flash.html.erb
136
317
  - app/views/moduler/common/_header.html.erb
137
- - app/views/moduler/hello/index.html.erb
318
+ - app/views/moduler/common/_sidebar.html.erb
319
+ - app/views/moduler/common/administration/_sidebar.html.erb
320
+ - app/views/moduler/common/profile/_sidebar.html.erb
138
321
  - app/views/moduler/home/index.html.erb
322
+ - app/views/moduler/profile/edit.html.erb
323
+ - app/views/moduler/profile/sessions/_session.html.erb
324
+ - app/views/moduler/profile/sessions/index.html.erb
139
325
  - app/views/moduler/sessions/new.html.erb
140
326
  - app/views/moduler/users/new.html.erb
141
327
  - config/importmap.rb
328
+ - config/locales/moduler/administration/articles/en.yml
329
+ - config/locales/moduler/administration/sessions/en.yml
330
+ - config/locales/moduler/administration/users/en.yml
331
+ - config/locales/moduler/articles/en.yml
142
332
  - config/locales/moduler/common/en.yml
333
+ - config/locales/moduler/components/en.yml
334
+ - config/locales/moduler/en.yml
335
+ - config/locales/moduler/profile/en.yml
336
+ - config/locales/moduler/profile/sessions/en.yml
143
337
  - config/locales/moduler/sessions/en.yml
144
338
  - config/locales/moduler/users/en.yml
145
339
  - config/routes.rb
146
340
  - db/migrate/20260322152259_create_moduler_users.rb
147
341
  - db/migrate/20260322153744_create_moduler_sessions.rb
342
+ - db/migrate/20261015171504_add_role_to_moduler_users.rb
343
+ - db/migrate/20261020191709_enable_pg_trgm.rb
344
+ - db/migrate/20261026203827_create_moduler_articles.rb
148
345
  - lib/moduler.rb
149
346
  - lib/moduler/configuration.rb
150
347
  - lib/moduler/engine.rb
@@ -1,6 +0,0 @@
1
- import { Controller } from "@hotwired/stimulus";
2
- export default class extends Controller {
3
- connect() {
4
- this.element.textContent = "Moduler 🔥";
5
- }
6
- }
@@ -1,5 +0,0 @@
1
- module Moduler
2
- class HelloController < ApplicationController
3
- def index; end
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- <div class="bg-white px-6 py-24 sm:py-32 lg:px-8">
2
- <div class="mx-auto max-w-2xl text-center">
3
- <h2 class="text-4xl font-bold tracking-tight text-custom sm:text-6xl"><div data-controller="hello"></div></h2>
4
- </div>
5
- </div>