active_element 0.0.10 → 0.0.12

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 (219) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +12 -2
  3. data/.strong_versions.yml +1 -0
  4. data/Gemfile +5 -0
  5. data/Gemfile.lock +115 -75
  6. data/Makefile +10 -0
  7. data/active_element.gemspec +1 -1
  8. data/app/assets/javascripts/active_element/application.js +1 -0
  9. data/app/assets/javascripts/active_element/form.js +16 -32
  10. data/app/assets/javascripts/active_element/json_field.js +391 -135
  11. data/app/assets/javascripts/active_element/setup.js +13 -8
  12. data/app/assets/javascripts/active_element/text_search_field.js +38 -27
  13. data/app/assets/javascripts/active_element/theme.js +1 -1
  14. data/app/assets/javascripts/active_element/timezones.js +6 -0
  15. data/app/assets/stylesheets/active_element/_dark.scss +86 -0
  16. data/app/assets/stylesheets/active_element/_variables.scss +2 -1
  17. data/app/assets/stylesheets/active_element/application.scss +166 -33
  18. data/app/controllers/active_element/application_controller.rb +5 -0
  19. data/app/controllers/concerns/active_element/default_controller_actions.rb +38 -0
  20. data/app/views/active_element/_user.html.erb +20 -0
  21. data/app/views/active_element/components/fields/_json.html.erb +24 -0
  22. data/app/views/active_element/components/form/_check_box.html.erb +1 -0
  23. data/app/views/active_element/components/form/_check_boxes.html.erb +1 -1
  24. data/app/views/active_element/components/form/_datetime_range_field.html.erb +14 -0
  25. data/app/views/active_element/components/form/_field.html.erb +10 -7
  26. data/app/views/active_element/components/form/_generic_field.html.erb +1 -0
  27. data/app/views/active_element/components/form/_json.html.erb +10 -2
  28. data/app/views/active_element/components/form/_label.html.erb +12 -1
  29. data/app/views/active_element/components/form/_select.html.erb +4 -1
  30. data/app/views/active_element/components/form/_summary.html.erb +11 -1
  31. data/app/views/active_element/components/form/_templates.html.erb +42 -24
  32. data/app/views/active_element/components/form/_text_area.html.erb +2 -1
  33. data/app/views/active_element/components/form/_text_search.html.erb +8 -4
  34. data/app/views/active_element/components/form.html.erb +20 -17
  35. data/app/views/active_element/components/json.html.erb +1 -0
  36. data/app/views/active_element/components/navbar.html.erb +26 -0
  37. data/app/views/active_element/components/table/_collection_row.html.erb +2 -1
  38. data/app/views/active_element/components/table/_field.html.erb +8 -0
  39. data/app/views/active_element/components/table/_ungrouped_collection.html.erb +1 -0
  40. data/app/views/active_element/components/table/collection.html.erb +1 -1
  41. data/app/views/active_element/components/table/item.html.erb +6 -4
  42. data/app/views/active_element/default_views/edit.html.erb +5 -0
  43. data/app/views/active_element/default_views/forbidden.html.erb +7 -0
  44. data/app/views/active_element/default_views/index.html.erb +15 -0
  45. data/app/views/active_element/default_views/new.html.erb +4 -0
  46. data/app/views/active_element/default_views/show.html.erb +7 -0
  47. data/app/views/active_element/navbar/_menu.html.erb +1 -30
  48. data/app/views/active_element/theme/_select.html.erb +1 -1
  49. data/app/views/layouts/active_element.html.erb +16 -1
  50. data/config/brakeman.ignore +48 -0
  51. data/config/locales/en.yml +3 -0
  52. data/example_app/.gitattributes +7 -0
  53. data/example_app/.gitignore +35 -0
  54. data/example_app/.ruby-version +1 -0
  55. data/example_app/Gemfile +34 -0
  56. data/example_app/Gemfile.lock +296 -0
  57. data/example_app/README.md +24 -0
  58. data/example_app/Rakefile +6 -0
  59. data/example_app/app/assets/config/manifest.js +4 -0
  60. data/example_app/app/assets/images/.keep +0 -0
  61. data/example_app/app/assets/stylesheets/application.css +15 -0
  62. data/example_app/app/channels/application_cable/channel.rb +4 -0
  63. data/example_app/app/channels/application_cable/connection.rb +4 -0
  64. data/example_app/app/controllers/application_controller.rb +12 -0
  65. data/example_app/app/controllers/concerns/.keep +0 -0
  66. data/example_app/app/controllers/pets_controller.rb +7 -0
  67. data/example_app/app/controllers/users_controller.rb +7 -0
  68. data/example_app/app/helpers/application_helper.rb +2 -0
  69. data/example_app/app/javascript/application.js +3 -0
  70. data/example_app/app/javascript/controllers/application.js +9 -0
  71. data/example_app/app/javascript/controllers/hello_controller.js +7 -0
  72. data/example_app/app/javascript/controllers/index.js +11 -0
  73. data/example_app/app/jobs/application_job.rb +7 -0
  74. data/example_app/app/mailers/application_mailer.rb +4 -0
  75. data/example_app/app/models/application_record.rb +3 -0
  76. data/example_app/app/models/concerns/.keep +0 -0
  77. data/example_app/app/models/pet.rb +3 -0
  78. data/example_app/app/models/user.rb +8 -0
  79. data/example_app/app/views/layouts/application.html.erb +16 -0
  80. data/example_app/app/views/layouts/mailer.html.erb +13 -0
  81. data/example_app/app/views/layouts/mailer.text.erb +1 -0
  82. data/example_app/app/views/pets/index.html.erb +3 -0
  83. data/example_app/app/views/users/show.html.erb +3 -0
  84. data/example_app/bin/bundle +109 -0
  85. data/example_app/bin/importmap +4 -0
  86. data/example_app/bin/rails +4 -0
  87. data/example_app/bin/rake +4 -0
  88. data/example_app/bin/setup +33 -0
  89. data/example_app/config/application.rb +22 -0
  90. data/example_app/config/boot.rb +4 -0
  91. data/example_app/config/cable.yml +10 -0
  92. data/example_app/config/credentials.yml.enc +1 -0
  93. data/example_app/config/database.yml +25 -0
  94. data/example_app/config/environment.rb +5 -0
  95. data/example_app/config/environments/development.rb +70 -0
  96. data/example_app/config/environments/production.rb +93 -0
  97. data/example_app/config/environments/test.rb +60 -0
  98. data/example_app/config/importmap.rb +7 -0
  99. data/example_app/config/initializers/assets.rb +12 -0
  100. data/example_app/config/initializers/content_security_policy.rb +25 -0
  101. data/example_app/config/initializers/devise.rb +16 -0
  102. data/example_app/config/initializers/filter_parameter_logging.rb +8 -0
  103. data/example_app/config/initializers/inflections.rb +16 -0
  104. data/example_app/config/initializers/permissions_policy.rb +11 -0
  105. data/example_app/config/locales/devise.en.yml +65 -0
  106. data/example_app/config/locales/en.yml +33 -0
  107. data/example_app/config/puma.rb +43 -0
  108. data/example_app/config/routes.rb +8 -0
  109. data/example_app/config/storage.yml +34 -0
  110. data/example_app/config.ru +6 -0
  111. data/example_app/db/migrate/20230616210539_create_pet.rb +12 -0
  112. data/example_app/db/migrate/20230616211328_devise_create_users.rb +46 -0
  113. data/example_app/db/schema.rb +37 -0
  114. data/example_app/db/seeds.rb +33 -0
  115. data/example_app/lib/assets/.keep +0 -0
  116. data/example_app/lib/tasks/.keep +0 -0
  117. data/example_app/log/.keep +0 -0
  118. data/example_app/public/404.html +67 -0
  119. data/example_app/public/422.html +67 -0
  120. data/example_app/public/500.html +66 -0
  121. data/example_app/public/apple-touch-icon-precomposed.png +0 -0
  122. data/example_app/public/apple-touch-icon.png +0 -0
  123. data/example_app/public/favicon.ico +0 -0
  124. data/example_app/public/robots.txt +1 -0
  125. data/example_app/storage/.keep +0 -0
  126. data/example_app/test/application_system_test_case.rb +5 -0
  127. data/example_app/test/channels/application_cable/connection_test.rb +11 -0
  128. data/example_app/test/controllers/.keep +0 -0
  129. data/example_app/test/fixtures/files/.keep +0 -0
  130. data/example_app/test/fixtures/users.yml +11 -0
  131. data/example_app/test/helpers/.keep +0 -0
  132. data/example_app/test/integration/.keep +0 -0
  133. data/example_app/test/mailers/.keep +0 -0
  134. data/example_app/test/models/.keep +0 -0
  135. data/example_app/test/models/user_test.rb +7 -0
  136. data/example_app/test/system/.keep +0 -0
  137. data/example_app/test/test_helper.rb +13 -0
  138. data/example_app/tmp/.keep +0 -0
  139. data/example_app/tmp/pids/.keep +0 -0
  140. data/example_app/tmp/storage/.keep +0 -0
  141. data/example_app/vendor/.keep +0 -0
  142. data/example_app/vendor/javascript/.keep +0 -0
  143. data/lib/active_element/component.rb +9 -2
  144. data/lib/active_element/components/collection_table.rb +9 -2
  145. data/lib/active_element/components/email_fields.rb +14 -0
  146. data/lib/active_element/components/form.rb +48 -17
  147. data/lib/active_element/components/navbar.rb +64 -0
  148. data/lib/active_element/components/phone_fields.rb +14 -0
  149. data/lib/active_element/components/text_search/authorization.rb +9 -6
  150. data/lib/active_element/components/text_search/component.rb +4 -2
  151. data/lib/active_element/components/text_search.rb +13 -0
  152. data/lib/active_element/components/util/association_mapping.rb +74 -19
  153. data/lib/active_element/components/util/display_value_mapping.rb +13 -4
  154. data/lib/active_element/components/util/form_field_mapping.rb +139 -10
  155. data/lib/active_element/components/util/form_value_mapping.rb +3 -3
  156. data/lib/active_element/components/util/i18n.rb +1 -1
  157. data/lib/active_element/components/util/numeric_field.rb +73 -0
  158. data/lib/active_element/components/util/record_mapping.rb +43 -11
  159. data/lib/active_element/components/util/record_path.rb +21 -4
  160. data/lib/active_element/components/util.rb +13 -5
  161. data/lib/active_element/components.rb +3 -0
  162. data/lib/active_element/controller_action.rb +8 -2
  163. data/lib/active_element/controller_interface.rb +56 -18
  164. data/lib/active_element/controller_state.rb +44 -0
  165. data/lib/active_element/default_controller.rb +137 -0
  166. data/lib/active_element/default_record_params.rb +62 -0
  167. data/lib/active_element/default_search.rb +110 -0
  168. data/lib/active_element/json_field_schema.rb +59 -0
  169. data/lib/active_element/pre_render_processors/json.rb +98 -0
  170. data/lib/active_element/pre_render_processors.rb +11 -0
  171. data/lib/active_element/route.rb +12 -0
  172. data/lib/active_element/routes.rb +2 -1
  173. data/lib/active_element/version.rb +1 -1
  174. data/lib/active_element.rb +15 -32
  175. data/lib/tasks/active_element.rake +12 -1
  176. data/rspec-documentation/_head.html.erb +34 -0
  177. data/rspec-documentation/pages/000-Introduction.md +18 -0
  178. data/rspec-documentation/pages/005-Setup.md +75 -0
  179. data/rspec-documentation/pages/010-Components/Form Fields/Check Boxes.md +1 -0
  180. data/rspec-documentation/pages/010-Components/Form Fields/JSON/Controller Params.md +97 -0
  181. data/rspec-documentation/pages/010-Components/Form Fields/JSON/Schema.md +283 -0
  182. data/rspec-documentation/pages/010-Components/Form Fields/JSON/Types.md +36 -0
  183. data/rspec-documentation/pages/010-Components/Form Fields/JSON.md +70 -0
  184. data/rspec-documentation/pages/010-Components/Form Fields/Text Search.md +133 -0
  185. data/rspec-documentation/pages/010-Components/Form Fields.md +46 -0
  186. data/rspec-documentation/pages/010-Components/Forms.md +44 -0
  187. data/rspec-documentation/pages/010-Components/JSON Data.md +23 -0
  188. data/rspec-documentation/pages/010-Components/Navbar.md +56 -0
  189. data/rspec-documentation/pages/010-Components/Page Section Title.md +13 -0
  190. data/rspec-documentation/pages/010-Components/Page Subtitle.md +11 -0
  191. data/rspec-documentation/pages/010-Components/Page Title.md +11 -0
  192. data/rspec-documentation/pages/010-Components/Tables/Collection Table.md +29 -0
  193. data/rspec-documentation/pages/010-Components/Tables/Item Table.md +18 -0
  194. data/rspec-documentation/pages/010-Components/Tables/Options.md +19 -0
  195. data/rspec-documentation/pages/010-Components/Tables.md +29 -0
  196. data/rspec-documentation/pages/010-Components.md +15 -0
  197. data/rspec-documentation/pages/020-Access Control/010-Authentication.md +20 -0
  198. data/rspec-documentation/pages/020-Access Control/020-Authorization/Environments.md +9 -0
  199. data/rspec-documentation/pages/020-Access Control/020-Authorization/Permissions/Custom Routes.md +41 -0
  200. data/rspec-documentation/pages/020-Access Control/020-Authorization/Permissions.md +58 -0
  201. data/rspec-documentation/pages/020-Access Control/020-Authorization/Setup.md +27 -0
  202. data/rspec-documentation/pages/020-Access Control/020-Authorization.md +11 -0
  203. data/rspec-documentation/pages/020-Access Control.md +31 -0
  204. data/rspec-documentation/pages/040-Decorators/Inline Decorators.md +24 -0
  205. data/rspec-documentation/pages/040-Decorators/View Decorators.md +55 -0
  206. data/rspec-documentation/pages/040-Decorators.md +12 -0
  207. data/rspec-documentation/pages/300-Alternatives.md +21 -0
  208. data/rspec-documentation/pages/900-License.md +11 -0
  209. data/rspec-documentation/spec_helper.rb +53 -16
  210. data/rspec-documentation/support.rb +84 -0
  211. metadata +159 -14
  212. data/rspec-documentation/pages/Components/Forms.md +0 -1
  213. data/rspec-documentation/pages/Components/Tables.md +0 -47
  214. data/rspec-documentation/pages/Components.md +0 -1
  215. data/rspec-documentation/pages/Decorators/Inline Decorators.md +0 -1
  216. data/rspec-documentation/pages/Decorators/View Decorators.md +0 -1
  217. data/rspec-documentation/pages/Index.md +0 -3
  218. data/rspec-documentation/pages/Util/I18n.md +0 -1
  219. /data/rspec-documentation/pages/{Components → 010-Components}/Tabs.md +0 -0
@@ -0,0 +1,35 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-*
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*
16
+ /tmp/*
17
+ !/log/.keep
18
+ !/tmp/.keep
19
+
20
+ # Ignore pidfiles, but keep the directory.
21
+ /tmp/pids/*
22
+ !/tmp/pids/
23
+ !/tmp/pids/.keep
24
+
25
+ # Ignore uploaded files in development.
26
+ /storage/*
27
+ !/storage/.keep
28
+ /tmp/storage/*
29
+ !/tmp/storage/
30
+ !/tmp/storage/.keep
31
+
32
+ /public/assets
33
+
34
+ # Ignore master key for decrypting credentials and more.
35
+ /config/master.key
@@ -0,0 +1 @@
1
+ 2.7.8
@@ -0,0 +1,34 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
4
+
5
+ ruby "2.7.8"
6
+
7
+ gem 'devise'
8
+ gem 'faker'
9
+ gem "rails", "~> 7.0.4", ">= 7.0.4.3"
10
+ gem "sprockets-rails"
11
+ gem "sqlite3", "~> 1.4"
12
+ gem "puma", "~> 5.0"
13
+ gem "importmap-rails"
14
+ gem "turbo-rails"
15
+ gem "stimulus-rails"
16
+ gem "jbuilder"
17
+ gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
18
+ gem "bootsnap", require: false
19
+ gem 'active_element', path: '../'
20
+
21
+ group :development, :test do
22
+ gem "debug", platforms: %i[ mri mingw x64_mingw ]
23
+ gem 'devpack'
24
+ end
25
+
26
+ group :development do
27
+ gem "web-console"
28
+ end
29
+
30
+ group :test do
31
+ gem "capybara"
32
+ gem "selenium-webdriver"
33
+ gem "webdrivers"
34
+ end
@@ -0,0 +1,296 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ active_element (0.0.12)
5
+ bootstrap (~> 5.3.0alpha3)
6
+ kaminari (~> 1.2)
7
+ paintbrush (~> 0.1.2)
8
+ rails (>= 6.0)
9
+ rouge (~> 4.1)
10
+ sassc (~> 2.4)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ actioncable (7.0.5)
16
+ actionpack (= 7.0.5)
17
+ activesupport (= 7.0.5)
18
+ nio4r (~> 2.0)
19
+ websocket-driver (>= 0.6.1)
20
+ actionmailbox (7.0.5)
21
+ actionpack (= 7.0.5)
22
+ activejob (= 7.0.5)
23
+ activerecord (= 7.0.5)
24
+ activestorage (= 7.0.5)
25
+ activesupport (= 7.0.5)
26
+ mail (>= 2.7.1)
27
+ net-imap
28
+ net-pop
29
+ net-smtp
30
+ actionmailer (7.0.5)
31
+ actionpack (= 7.0.5)
32
+ actionview (= 7.0.5)
33
+ activejob (= 7.0.5)
34
+ activesupport (= 7.0.5)
35
+ mail (~> 2.5, >= 2.5.4)
36
+ net-imap
37
+ net-pop
38
+ net-smtp
39
+ rails-dom-testing (~> 2.0)
40
+ actionpack (7.0.5)
41
+ actionview (= 7.0.5)
42
+ activesupport (= 7.0.5)
43
+ rack (~> 2.0, >= 2.2.4)
44
+ rack-test (>= 0.6.3)
45
+ rails-dom-testing (~> 2.0)
46
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
47
+ actiontext (7.0.5)
48
+ actionpack (= 7.0.5)
49
+ activerecord (= 7.0.5)
50
+ activestorage (= 7.0.5)
51
+ activesupport (= 7.0.5)
52
+ globalid (>= 0.6.0)
53
+ nokogiri (>= 1.8.5)
54
+ actionview (7.0.5)
55
+ activesupport (= 7.0.5)
56
+ builder (~> 3.1)
57
+ erubi (~> 1.4)
58
+ rails-dom-testing (~> 2.0)
59
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
60
+ activejob (7.0.5)
61
+ activesupport (= 7.0.5)
62
+ globalid (>= 0.3.6)
63
+ activemodel (7.0.5)
64
+ activesupport (= 7.0.5)
65
+ activerecord (7.0.5)
66
+ activemodel (= 7.0.5)
67
+ activesupport (= 7.0.5)
68
+ activestorage (7.0.5)
69
+ actionpack (= 7.0.5)
70
+ activejob (= 7.0.5)
71
+ activerecord (= 7.0.5)
72
+ activesupport (= 7.0.5)
73
+ marcel (~> 1.0)
74
+ mini_mime (>= 1.1.0)
75
+ activesupport (7.0.5)
76
+ concurrent-ruby (~> 1.0, >= 1.0.2)
77
+ i18n (>= 1.6, < 2)
78
+ minitest (>= 5.1)
79
+ tzinfo (~> 2.0)
80
+ addressable (2.8.4)
81
+ public_suffix (>= 2.0.2, < 6.0)
82
+ autoprefixer-rails (10.4.13.0)
83
+ execjs (~> 2)
84
+ bcrypt (3.1.18)
85
+ bindex (0.8.1)
86
+ bootsnap (1.16.0)
87
+ msgpack (~> 1.2)
88
+ bootstrap (5.3.0.alpha3)
89
+ autoprefixer-rails (>= 9.1.0)
90
+ popper_js (>= 2.11.7, < 3)
91
+ sassc-rails (>= 2.0.0)
92
+ builder (3.2.4)
93
+ capybara (3.39.2)
94
+ addressable
95
+ matrix
96
+ mini_mime (>= 0.1.3)
97
+ nokogiri (~> 1.8)
98
+ rack (>= 1.6.0)
99
+ rack-test (>= 0.6.3)
100
+ regexp_parser (>= 1.5, < 3.0)
101
+ xpath (~> 3.2)
102
+ concurrent-ruby (1.2.2)
103
+ crass (1.0.6)
104
+ date (3.3.3)
105
+ debug (1.8.0)
106
+ irb (>= 1.5.0)
107
+ reline (>= 0.3.1)
108
+ devise (4.9.2)
109
+ bcrypt (~> 3.0)
110
+ orm_adapter (~> 0.1)
111
+ railties (>= 4.1.0)
112
+ responders
113
+ warden (~> 1.2.3)
114
+ devpack (0.4.1)
115
+ erubi (1.12.0)
116
+ execjs (2.8.1)
117
+ faker (2.23.0)
118
+ i18n (>= 1.8.11, < 2)
119
+ ffi (1.15.5)
120
+ globalid (1.1.0)
121
+ activesupport (>= 5.0)
122
+ i18n (1.14.1)
123
+ concurrent-ruby (~> 1.0)
124
+ importmap-rails (1.1.6)
125
+ actionpack (>= 6.0.0)
126
+ railties (>= 6.0.0)
127
+ io-console (0.6.0)
128
+ irb (1.7.0)
129
+ reline (>= 0.3.0)
130
+ jbuilder (2.11.5)
131
+ actionview (>= 5.0.0)
132
+ activesupport (>= 5.0.0)
133
+ kaminari (1.2.2)
134
+ activesupport (>= 4.1.0)
135
+ kaminari-actionview (= 1.2.2)
136
+ kaminari-activerecord (= 1.2.2)
137
+ kaminari-core (= 1.2.2)
138
+ kaminari-actionview (1.2.2)
139
+ actionview
140
+ kaminari-core (= 1.2.2)
141
+ kaminari-activerecord (1.2.2)
142
+ activerecord
143
+ kaminari-core (= 1.2.2)
144
+ kaminari-core (1.2.2)
145
+ loofah (2.21.3)
146
+ crass (~> 1.0.2)
147
+ nokogiri (>= 1.12.0)
148
+ mail (2.8.1)
149
+ mini_mime (>= 0.1.1)
150
+ net-imap
151
+ net-pop
152
+ net-smtp
153
+ marcel (1.0.2)
154
+ matrix (0.4.2)
155
+ method_source (1.0.0)
156
+ mini_mime (1.1.2)
157
+ minitest (5.18.1)
158
+ msgpack (1.7.1)
159
+ net-imap (0.3.6)
160
+ date
161
+ net-protocol
162
+ net-pop (0.1.2)
163
+ net-protocol
164
+ net-protocol (0.2.1)
165
+ timeout
166
+ net-smtp (0.3.3)
167
+ net-protocol
168
+ nio4r (2.5.9)
169
+ nokogiri (1.15.2-x86_64-linux)
170
+ racc (~> 1.4)
171
+ orm_adapter (0.5.0)
172
+ paintbrush (0.1.3)
173
+ popper_js (2.11.7)
174
+ public_suffix (5.0.1)
175
+ puma (5.6.5)
176
+ nio4r (~> 2.0)
177
+ racc (1.7.1)
178
+ rack (2.2.7)
179
+ rack-test (2.1.0)
180
+ rack (>= 1.3)
181
+ rails (7.0.5)
182
+ actioncable (= 7.0.5)
183
+ actionmailbox (= 7.0.5)
184
+ actionmailer (= 7.0.5)
185
+ actionpack (= 7.0.5)
186
+ actiontext (= 7.0.5)
187
+ actionview (= 7.0.5)
188
+ activejob (= 7.0.5)
189
+ activemodel (= 7.0.5)
190
+ activerecord (= 7.0.5)
191
+ activestorage (= 7.0.5)
192
+ activesupport (= 7.0.5)
193
+ bundler (>= 1.15.0)
194
+ railties (= 7.0.5)
195
+ rails-dom-testing (2.0.3)
196
+ activesupport (>= 4.2.0)
197
+ nokogiri (>= 1.6)
198
+ rails-html-sanitizer (1.6.0)
199
+ loofah (~> 2.21)
200
+ nokogiri (~> 1.14)
201
+ railties (7.0.5)
202
+ actionpack (= 7.0.5)
203
+ activesupport (= 7.0.5)
204
+ method_source
205
+ rake (>= 12.2)
206
+ thor (~> 1.0)
207
+ zeitwerk (~> 2.5)
208
+ rake (13.0.6)
209
+ regexp_parser (2.8.1)
210
+ reline (0.3.5)
211
+ io-console (~> 0.5)
212
+ responders (3.1.0)
213
+ actionpack (>= 5.2)
214
+ railties (>= 5.2)
215
+ rexml (3.2.5)
216
+ rouge (4.1.2)
217
+ rubyzip (2.3.2)
218
+ sassc (2.4.0)
219
+ ffi (~> 1.9)
220
+ sassc-rails (2.1.2)
221
+ railties (>= 4.0.0)
222
+ sassc (>= 2.0)
223
+ sprockets (> 3.0)
224
+ sprockets-rails
225
+ tilt
226
+ selenium-webdriver (4.9.0)
227
+ rexml (~> 3.2, >= 3.2.5)
228
+ rubyzip (>= 1.2.2, < 3.0)
229
+ websocket (~> 1.0)
230
+ sprockets (4.2.0)
231
+ concurrent-ruby (~> 1.0)
232
+ rack (>= 2.2.4, < 4)
233
+ sprockets-rails (3.4.2)
234
+ actionpack (>= 5.2)
235
+ activesupport (>= 5.2)
236
+ sprockets (>= 3.0.0)
237
+ sqlite3 (1.6.3-x86_64-linux)
238
+ stimulus-rails (1.2.1)
239
+ railties (>= 6.0.0)
240
+ thor (1.2.2)
241
+ tilt (2.2.0)
242
+ timeout (0.3.2)
243
+ turbo-rails (1.4.0)
244
+ actionpack (>= 6.0.0)
245
+ activejob (>= 6.0.0)
246
+ railties (>= 6.0.0)
247
+ tzinfo (2.0.6)
248
+ concurrent-ruby (~> 1.0)
249
+ warden (1.2.9)
250
+ rack (>= 2.0.9)
251
+ web-console (4.2.0)
252
+ actionview (>= 6.0.0)
253
+ activemodel (>= 6.0.0)
254
+ bindex (>= 0.4.0)
255
+ railties (>= 6.0.0)
256
+ webdrivers (5.2.0)
257
+ nokogiri (~> 1.6)
258
+ rubyzip (>= 1.3.0)
259
+ selenium-webdriver (~> 4.0)
260
+ websocket (1.2.9)
261
+ websocket-driver (0.7.5)
262
+ websocket-extensions (>= 0.1.0)
263
+ websocket-extensions (0.1.5)
264
+ xpath (3.2.0)
265
+ nokogiri (~> 1.8)
266
+ zeitwerk (2.6.8)
267
+
268
+ PLATFORMS
269
+ x86_64-linux
270
+
271
+ DEPENDENCIES
272
+ active_element!
273
+ bootsnap
274
+ capybara
275
+ debug
276
+ devise
277
+ devpack
278
+ faker
279
+ importmap-rails
280
+ jbuilder
281
+ puma (~> 5.0)
282
+ rails (~> 7.0.4, >= 7.0.4.3)
283
+ selenium-webdriver
284
+ sprockets-rails
285
+ sqlite3 (~> 1.4)
286
+ stimulus-rails
287
+ turbo-rails
288
+ tzinfo-data
289
+ web-console
290
+ webdrivers
291
+
292
+ RUBY VERSION
293
+ ruby 2.7.8p225
294
+
295
+ BUNDLED WITH
296
+ 2.4.13
@@ -0,0 +1,24 @@
1
+ # README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative "config/application"
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,4 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../stylesheets .css
3
+ //= link_tree ../../javascript .js
4
+ //= link_tree ../../../vendor/javascript .js
File without changes
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
6
+ * vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Channel < ActionCable::Channel::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ end
4
+ end
@@ -0,0 +1,12 @@
1
+ class ApplicationController < ActiveElement::ApplicationController
2
+ prepend_before_action :configure_authentication
3
+
4
+ private
5
+
6
+ def configure_authentication
7
+ active_element.authenticate_with { authenticate_user! }
8
+ active_element.authorize_with { current_user }
9
+ active_element.sign_out_with(method: :delete) { destroy_user_session_path }
10
+ active_element.sign_in_with { new_user_session_path }
11
+ end
12
+ end
File without changes
@@ -0,0 +1,7 @@
1
+ class PetsController < ApplicationController
2
+ active_element.listable_fields :name, :animal, :owner, :created_at, :updated_at
3
+ active_element.viewable_fields :name, :animal, :owner, :created_at, :updated_at
4
+ active_element.editable_fields :name, :animal, :owner
5
+ active_element.searchable_fields :name, :animal, :owner, :created_at, :updated_at
6
+ active_element.deletable
7
+ end
@@ -0,0 +1,7 @@
1
+ class UsersController < ApplicationController
2
+ active_element.editable_fields :name, :email, :password, :password_confirmation
3
+ active_element.viewable_fields :name, :email, :created_at, :updated_at, :pets
4
+ active_element.listable_fields :name, :email, :created_at, :updated_at
5
+ active_element.searchable_fields :name, :email, :created_at, :updated_at
6
+ active_element.deletable
7
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,3 @@
1
+ // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
2
+ import "@hotwired/turbo-rails"
3
+ import "controllers"
@@ -0,0 +1,9 @@
1
+ import { Application } from "@hotwired/stimulus"
2
+
3
+ const application = Application.start()
4
+
5
+ // Configure Stimulus development experience
6
+ application.debug = false
7
+ window.Stimulus = application
8
+
9
+ export { application }
@@ -0,0 +1,7 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class extends Controller {
4
+ connect() {
5
+ this.element.textContent = "Hello World!"
6
+ }
7
+ }
@@ -0,0 +1,11 @@
1
+ // Import and register all your controllers from the importmap under controllers/*
2
+
3
+ import { application } from "controllers/application"
4
+
5
+ // Eager load all controllers defined in the import map under controllers/**/*_controller
6
+ import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
7
+ eagerLoadControllersFrom("controllers", application)
8
+
9
+ // Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
10
+ // import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
11
+ // lazyLoadControllersFrom("controllers", application)
@@ -0,0 +1,7 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ # Automatically retry jobs that encountered a deadlock
3
+ # retry_on ActiveRecord::Deadlocked
4
+
5
+ # Most jobs are safe to ignore if the underlying records are no longer available
6
+ # discard_on ActiveJob::DeserializationError
7
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: "from@example.com"
3
+ layout "mailer"
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ primary_abstract_class
3
+ end
File without changes
@@ -0,0 +1,3 @@
1
+ class Pet < ApplicationRecord
2
+ belongs_to :owner, class_name: 'User'
3
+ end
@@ -0,0 +1,8 @@
1
+ class User < ApplicationRecord
2
+ # Include default devise modules. Others available are:
3
+ # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
4
+ devise :database_authenticatable, :registerable,
5
+ :recoverable, :rememberable, :validatable
6
+
7
+ has_many :pets, foreign_key: 'owner_id'
8
+ end
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>ExampleApp</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <%= csrf_meta_tags %>
7
+ <%= csp_meta_tag %>
8
+
9
+ <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
10
+ <%= javascript_importmap_tags %>
11
+ </head>
12
+
13
+ <body>
14
+ <%= yield %>
15
+ </body>
16
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,3 @@
1
+ <%= active_element.component.page_title 'Pets' %>
2
+
3
+ <%= active_element.component.table collection: @pets, fields: [:name, :owner, :date_of_birth, :animal, :created_at] %>
@@ -0,0 +1,3 @@
1
+ <%= active_element.component.page_title 'User' %>
2
+
3
+ <%= active_element.component.table item: @user, edit: true, destroy: true, fields: [:email, :name, :created_at] %>