alchemy_cms 7.0.0.pre.a → 7.0.0.pre.c

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 (237) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/brakeman-analysis.yml +2 -2
  3. data/.github/workflows/lint.yml +37 -0
  4. data/.github/workflows/{ci.yml → test.yml} +8 -8
  5. data/.gitignore +0 -5
  6. data/.hound.yml +2 -3
  7. data/.rubocop.yml +4 -350
  8. data/.standard.yml +3 -0
  9. data/CHANGELOG.md +33 -0
  10. data/Gemfile +3 -2
  11. data/README.md +10 -12
  12. data/Rakefile +0 -19
  13. data/alchemy_cms.gemspec +4 -2
  14. data/app/assets/config/alchemy_manifest.js +1 -0
  15. data/app/assets/javascripts/alchemy/admin.js +0 -2
  16. data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +1 -1
  17. data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +5 -12
  18. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +6 -1
  19. data/app/assets/stylesheets/alchemy/base.scss +2 -2
  20. data/app/components/alchemy/ingredients/audio_view.rb +37 -0
  21. data/app/components/alchemy/ingredients/base_view.rb +38 -0
  22. data/app/components/alchemy/ingredients/boolean_view.rb +13 -0
  23. data/app/components/alchemy/ingredients/datetime_view.rb +22 -0
  24. data/app/components/alchemy/ingredients/file_view.rb +40 -0
  25. data/app/components/alchemy/ingredients/headline_view.rb +20 -0
  26. data/app/components/alchemy/ingredients/html_view.rb +9 -0
  27. data/app/components/alchemy/ingredients/link_view.rb +25 -0
  28. data/app/components/alchemy/ingredients/node_view.rb +11 -0
  29. data/app/components/alchemy/ingredients/page_view.rb +15 -0
  30. data/app/components/alchemy/ingredients/picture_view.rb +108 -0
  31. data/app/components/alchemy/ingredients/richtext_view.rb +22 -0
  32. data/app/components/alchemy/ingredients/select_view.rb +6 -0
  33. data/app/components/alchemy/ingredients/text_view.rb +41 -0
  34. data/app/components/alchemy/ingredients/video_view.rb +39 -0
  35. data/app/controllers/alchemy/admin/attachments_controller.rb +3 -3
  36. data/app/controllers/alchemy/admin/base_controller.rb +7 -7
  37. data/app/controllers/alchemy/admin/clipboard_controller.rb +2 -2
  38. data/app/controllers/alchemy/admin/elements_controller.rb +26 -11
  39. data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
  40. data/app/controllers/alchemy/admin/nodes_controller.rb +2 -2
  41. data/app/controllers/alchemy/admin/pages_controller.rb +10 -10
  42. data/app/controllers/alchemy/admin/pictures_controller.rb +14 -14
  43. data/app/controllers/alchemy/admin/resources_controller.rb +27 -28
  44. data/app/controllers/alchemy/admin/styleguide_controller.rb +1 -0
  45. data/app/controllers/alchemy/admin/tags_controller.rb +11 -11
  46. data/app/controllers/alchemy/api/base_controller.rb +2 -2
  47. data/app/controllers/alchemy/api/elements_controller.rb +11 -11
  48. data/app/controllers/alchemy/api/ingredients_controller.rb +1 -1
  49. data/app/controllers/alchemy/api/nodes_controller.rb +1 -1
  50. data/app/controllers/alchemy/api/pages_controller.rb +11 -11
  51. data/app/controllers/alchemy/attachments_controller.rb +3 -3
  52. data/app/controllers/alchemy/base_controller.rb +1 -8
  53. data/app/controllers/alchemy/messages_controller.rb +9 -9
  54. data/app/controllers/alchemy/pages_controller.rb +8 -19
  55. data/app/controllers/concerns/alchemy/admin/archive_overlay.rb +1 -0
  56. data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +5 -7
  57. data/app/controllers/concerns/alchemy/legacy_page_redirects.rb +5 -5
  58. data/app/decorators/alchemy/element_editor.rb +4 -4
  59. data/app/decorators/alchemy/ingredient_editor.rb +6 -6
  60. data/app/helpers/alchemy/admin/attachments_helper.rb +1 -1
  61. data/app/helpers/alchemy/admin/base_helper.rb +21 -22
  62. data/app/helpers/alchemy/admin/elements_helper.rb +1 -1
  63. data/app/helpers/alchemy/admin/form_helper.rb +1 -1
  64. data/app/helpers/alchemy/admin/navigation_helper.rb +7 -7
  65. data/app/helpers/alchemy/admin/pages_helper.rb +2 -2
  66. data/app/helpers/alchemy/admin/tags_helper.rb +3 -3
  67. data/app/helpers/alchemy/base_helper.rb +2 -2
  68. data/app/helpers/alchemy/elements_block_helper.rb +9 -7
  69. data/app/helpers/alchemy/elements_helper.rb +12 -12
  70. data/app/helpers/alchemy/pages_helper.rb +11 -11
  71. data/app/helpers/alchemy/url_helper.rb +1 -1
  72. data/{package/src → app/javascript/alchemy_admin}/datepicker.js +1 -0
  73. data/{package/src → app/javascript/alchemy_admin}/node_tree.js +2 -2
  74. data/{package/src → app/javascript/alchemy_admin}/page_publication_fields.js +1 -1
  75. data/{package/src → app/javascript/alchemy_admin}/page_sorter.js +1 -1
  76. data/{package/src → app/javascript/alchemy_admin}/picture_editors.js +2 -2
  77. data/{package/src → app/javascript/alchemy_admin}/sitemap.js +4 -4
  78. data/app/javascript/alchemy_admin/tinymce.js +142 -0
  79. data/app/javascript/alchemy_admin.js +34 -0
  80. data/app/mailers/alchemy/messages_mailer.rb +1 -1
  81. data/app/models/alchemy/attachment.rb +6 -6
  82. data/app/models/alchemy/base_record.rb +1 -0
  83. data/app/models/alchemy/eager_loading.rb +6 -6
  84. data/app/models/alchemy/element/definitions.rb +1 -1
  85. data/app/models/alchemy/element/element_ingredients.rb +3 -3
  86. data/app/models/alchemy/element.rb +2 -2
  87. data/app/models/alchemy/elements_repository.rb +1 -1
  88. data/app/models/alchemy/image_cropper_settings.rb +2 -2
  89. data/app/models/alchemy/ingredient.rb +14 -12
  90. data/app/models/alchemy/ingredient_validator.rb +1 -1
  91. data/app/models/alchemy/ingredients/datetime.rb +1 -1
  92. data/app/models/alchemy/ingredients/file.rb +5 -5
  93. data/app/models/alchemy/ingredients/headline.rb +4 -4
  94. data/app/models/alchemy/ingredients/picture.rb +27 -9
  95. data/app/models/alchemy/ingredients/richtext.rb +15 -12
  96. data/app/models/alchemy/ingredients/text.rb +6 -6
  97. data/app/models/alchemy/language/code.rb +1 -1
  98. data/app/models/alchemy/language.rb +4 -4
  99. data/app/models/alchemy/legacy_page_url.rb +1 -1
  100. data/app/models/alchemy/node.rb +2 -2
  101. data/app/models/alchemy/page/page_elements.rb +14 -14
  102. data/app/models/alchemy/page/page_naming.rb +4 -4
  103. data/app/models/alchemy/page/page_natures.rb +1 -1
  104. data/app/models/alchemy/page/page_scopes.rb +5 -5
  105. data/app/models/alchemy/page.rb +11 -11
  106. data/app/models/alchemy/picture/calculations.rb +2 -2
  107. data/app/models/alchemy/picture/transformations.rb +2 -2
  108. data/app/models/alchemy/picture/url.rb +4 -4
  109. data/app/models/alchemy/picture.rb +11 -10
  110. data/app/models/alchemy/picture_thumb/create.rb +1 -1
  111. data/app/models/alchemy/picture_thumb.rb +1 -1
  112. data/app/models/alchemy/picture_variant.rb +2 -3
  113. data/app/models/alchemy/tag.rb +8 -0
  114. data/app/models/concerns/alchemy/picture_thumbnails.rb +6 -6
  115. data/app/serializers/alchemy/base_serializer.rb +1 -1
  116. data/app/serializers/alchemy/page_tree_serializer.rb +7 -7
  117. data/app/services/alchemy/duplicate_element.rb +3 -3
  118. data/app/services/alchemy/tag_validations.rb +1 -1
  119. data/app/views/alchemy/_menubar.html.erb +1 -1
  120. data/app/views/alchemy/admin/attachments/_replace_button.html.erb +1 -1
  121. data/app/views/alchemy/admin/attachments/destroy.js.erb +1 -1
  122. data/app/views/alchemy/admin/elements/_element.html.erb +3 -0
  123. data/app/views/alchemy/admin/nodes/index.html.erb +4 -2
  124. data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +1 -1
  125. data/app/views/alchemy/admin/pages/edit.html.erb +3 -7
  126. data/app/views/alchemy/admin/pages/index.html.erb +1 -1
  127. data/app/views/alchemy/admin/pages/update.js.erb +12 -6
  128. data/app/views/alchemy/admin/pictures/_infos.html.erb +1 -1
  129. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +1 -1
  130. data/app/views/alchemy/admin/styleguide/index.html.erb +1 -1
  131. data/app/views/alchemy/admin/uploader/_button.html.erb +1 -1
  132. data/app/views/alchemy/base/permission_denied.js.erb +1 -1
  133. data/app/views/alchemy/base/redirect.js.erb +1 -1
  134. data/app/views/alchemy/ingredients/_audio_view.html.erb +1 -14
  135. data/app/views/alchemy/ingredients/_boolean_view.html.erb +1 -1
  136. data/app/views/alchemy/ingredients/_datetime_view.html.erb +3 -9
  137. data/app/views/alchemy/ingredients/_file_view.html.erb +3 -16
  138. data/app/views/alchemy/ingredients/_headline_view.html.erb +4 -10
  139. data/app/views/alchemy/ingredients/_html_view.html.erb +1 -1
  140. data/app/views/alchemy/ingredients/_link_view.html.erb +4 -9
  141. data/app/views/alchemy/ingredients/_node_view.html.erb +1 -1
  142. data/app/views/alchemy/ingredients/_page_view.html.erb +1 -4
  143. data/app/views/alchemy/ingredients/_picture_view.html.erb +4 -5
  144. data/app/views/alchemy/ingredients/_richtext_editor.html.erb +11 -2
  145. data/app/views/alchemy/ingredients/_richtext_view.html.erb +3 -3
  146. data/app/views/alchemy/ingredients/_select_view.html.erb +1 -1
  147. data/app/views/alchemy/ingredients/_text_view.html.erb +3 -19
  148. data/app/views/alchemy/ingredients/_video_view.html.erb +3 -18
  149. data/app/views/alchemy/ingredients/shared/_link_tools.html.erb +1 -0
  150. data/app/views/alchemy/ingredients/shared/_picture_tools.html.erb +1 -0
  151. data/app/views/layouts/alchemy/admin.html.erb +9 -15
  152. data/bin/importmap +4 -0
  153. data/bin/setup +28 -0
  154. data/bin/start +17 -0
  155. data/config/brakeman.ignore +0 -46
  156. data/config/importmap.rb +8 -0
  157. data/config/initializers/assets.rb +1 -0
  158. data/config/initializers/dragonfly.rb +1 -0
  159. data/config/initializers/mime_types.rb +1 -0
  160. data/config/initializers/mini_profiler.rb +1 -0
  161. data/config/initializers/simple_form.rb +3 -2
  162. data/config/locales/alchemy.en.yml +1 -1
  163. data/config/routes.rb +21 -20
  164. data/config/spring.rb +1 -0
  165. data/db/migrate/20230121212637_alchemy_six_point_one.rb +8 -8
  166. data/db/migrate/20230505132743_add_indexes_to_alchemy_pictures.rb +6 -0
  167. data/lib/alchemy/admin/locale.rb +3 -3
  168. data/lib/alchemy/admin/preview_url.rb +2 -2
  169. data/lib/alchemy/auth_accessors.rb +1 -1
  170. data/lib/alchemy/config.rb +1 -1
  171. data/lib/alchemy/controller_actions.rb +4 -4
  172. data/lib/alchemy/deprecation.rb +1 -0
  173. data/lib/alchemy/dragonfly/processors/thumbnail.rb +1 -1
  174. data/lib/alchemy/element_definition.rb +2 -2
  175. data/lib/alchemy/engine.rb +16 -1
  176. data/lib/alchemy/filetypes.rb +7 -7
  177. data/lib/alchemy/forms/builder.rb +4 -4
  178. data/lib/alchemy/i18n.rb +6 -4
  179. data/lib/alchemy/install/tasks.rb +2 -1
  180. data/lib/alchemy/name_conversions.rb +1 -1
  181. data/lib/alchemy/page_layout.rb +1 -1
  182. data/lib/alchemy/permissions.rb +5 -4
  183. data/lib/alchemy/resource.rb +10 -10
  184. data/lib/alchemy/resources_helper.rb +7 -7
  185. data/lib/alchemy/routing_constraints.rb +2 -2
  186. data/lib/alchemy/seeder.rb +12 -5
  187. data/lib/alchemy/shell.rb +2 -1
  188. data/lib/alchemy/taggable.rb +3 -2
  189. data/lib/alchemy/tasks/tidy.rb +1 -0
  190. data/lib/alchemy/test_support/capybara_helpers.rb +1 -1
  191. data/lib/alchemy/test_support/config_stubbing.rb +1 -0
  192. data/lib/alchemy/test_support/factories/element_factory.rb +4 -0
  193. data/lib/alchemy/test_support/factories/page_factory.rb +2 -2
  194. data/lib/alchemy/test_support/having_crop_action_examples.rb +9 -9
  195. data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +33 -33
  196. data/lib/alchemy/test_support/integration_helpers.rb +4 -3
  197. data/lib/alchemy/test_support/shared_contexts.rb +2 -1
  198. data/lib/alchemy/test_support/shared_dom_ids_examples.rb +9 -9
  199. data/lib/alchemy/test_support/shared_ingredient_examples.rb +12 -6
  200. data/lib/alchemy/test_support/shared_uploader_examples.rb +1 -0
  201. data/lib/alchemy/tinymce.rb +3 -26
  202. data/lib/alchemy/upgrader/seven_point_zero.rb +13 -23
  203. data/lib/alchemy/upgrader.rb +1 -11
  204. data/lib/alchemy/version.rb +1 -1
  205. data/lib/alchemy.rb +5 -0
  206. data/lib/alchemy_cms.rb +3 -1
  207. data/lib/generators/alchemy/base.rb +3 -2
  208. data/lib/generators/alchemy/elements/elements_generator.rb +2 -1
  209. data/lib/generators/alchemy/ingredient/ingredient_generator.rb +1 -0
  210. data/lib/generators/alchemy/install/files/application.html.erb +2 -2
  211. data/lib/generators/alchemy/install/install_generator.rb +2 -25
  212. data/lib/generators/alchemy/module/module_generator.rb +1 -0
  213. data/lib/generators/alchemy/page_layouts/page_layouts_generator.rb +1 -0
  214. data/lib/generators/alchemy/site_layouts/site_layouts_generator.rb +1 -0
  215. data/lib/generators/alchemy/views/views_generator.rb +2 -1
  216. data/lib/tasks/alchemy/thumbnails.rake +5 -5
  217. data/lib/tasks/alchemy/tidy.rake +1 -0
  218. data/lib/tasks/alchemy/upgrade.rake +10 -15
  219. data/package.json +6 -26
  220. metadata +80 -31
  221. data/app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee +0 -93
  222. data/app/presenters/alchemy/picture_view.rb +0 -88
  223. data/app/views/alchemy/admin/pages/_tinymce_custom_config.html.erb +0 -10
  224. data/package/admin.js +0 -32
  225. data/package/dist/admin.js +0 -16
  226. data/package/dist/admin.js.map +0 -7
  227. data/package/src/__tests__/i18n.spec.js +0 -93
  228. data/package/src/utils/__tests__/ajax.spec.js +0 -168
  229. data/package/src/utils/__tests__/events.spec.js +0 -38
  230. /data/{package/src → app/javascript/alchemy_admin}/file_editors.js +0 -0
  231. /data/{package/src → app/javascript/alchemy_admin}/i18n.js +0 -0
  232. /data/{package/src → app/javascript/alchemy_admin}/image_cropper.js +0 -0
  233. /data/{package/src → app/javascript/alchemy_admin}/image_loader.js +0 -0
  234. /data/{package/src → app/javascript/alchemy_admin}/ingredient_anchor_link.js +0 -0
  235. /data/{package/src → app/javascript/alchemy_admin}/translations.js +0 -0
  236. /data/{package/src → app/javascript/alchemy_admin}/utils/ajax.js +0 -0
  237. /data/{package/src → app/javascript/alchemy_admin}/utils/events.js +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b458227c38affbfe51743916b5d726410371bc82d1aecdaec6f587df2fef882
4
- data.tar.gz: 14626367bd1b8cb8f891518514915273ebb95f320e9a91e5815108a2109854f3
3
+ metadata.gz: 3d9b2124fdbd7438389b1120a0df30d6ce57a1f353a9ccdae2c59f634b7a60de
4
+ data.tar.gz: ae2985754c1cb922c8ab9c8b3e510ed13d5139c3b96102346b36710a18f2db5e
5
5
  SHA512:
6
- metadata.gz: '068c0aac56cf25bc3bb88a2c1114db7028f5a1177e71e8763d2f7cd0124cfecbf984aa3b62c75267077af051f5032c18ec779d354a61a6c082b6b96d4d0bc706'
7
- data.tar.gz: 6cd013283061060f7d97c0222c474d67e1748b8865c03872cdd00f2c6583d6f3c3c6918d69dff069bd60392e2c0814c0cf1a00cb79ad75f7be49ec6f1032be41
6
+ metadata.gz: 8a8965055910fe95085ec5c3ed24ca588d8ab6978463ab4445d762dc1cdcb440f7f6830eb13c09e63d8cbac8fef106f0423ee7689d3bc8f0194fd9e9d474c14a
7
+ data.tar.gz: f570c09d5423ef778c099c5467e7d0d21d0aab5e027581ad1644f3a3c261633a415b50a47605eed83c702d50d3962a16c6e37d8e2f63a319d2b4f43fbe6421a3
@@ -19,7 +19,7 @@ jobs:
19
19
  steps:
20
20
  # Checkout the repository to the GitHub Actions runner
21
21
  - name: Checkout
22
- uses: actions/checkout@v2
22
+ uses: actions/checkout@v3
23
23
 
24
24
  # Customize the ruby version depending on your needs
25
25
  - name: Set up Ruby
@@ -41,6 +41,6 @@ jobs:
41
41
 
42
42
  # Upload the SARIF file generated in the previous step
43
43
  - name: Upload SARIF
44
- uses: github/codeql-action/upload-sarif@v1
44
+ uses: github/codeql-action/upload-sarif@v2
45
45
  with:
46
46
  sarif_file: output.sarif.json
@@ -0,0 +1,37 @@
1
+ name: Lint
2
+
3
+ on: [pull_request]
4
+
5
+ jobs:
6
+ Standard:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - name: Checkout code
10
+ uses: actions/checkout@v3
11
+ - name: Install Ruby and gems
12
+ uses: ruby/setup-ruby@v1
13
+ with:
14
+ ruby-version: "3.0"
15
+ bundler-cache: true
16
+ - name: Lint Ruby files
17
+ run: bundle exec standardrb
18
+ Prettier:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v3
23
+ - name: Setup Node
24
+ uses: actions/setup-node@v3
25
+ with:
26
+ node-version: "18"
27
+ - name: Restore node_modules cache
28
+ uses: actions/cache@v3
29
+ with:
30
+ path: node_modules
31
+ key: ${{ runner.os }}-node-modules-${{ hashFiles('package.json') }}
32
+ restore-keys: |
33
+ ${{ runner.os }}-node-modules
34
+ - name: Install dependencies
35
+ run: yarn install
36
+ - name: Lint code
37
+ run: yarn lint
@@ -1,4 +1,4 @@
1
- name: CI
1
+ name: Test
2
2
 
3
3
  on: [push, pull_request]
4
4
 
@@ -12,9 +12,9 @@ jobs:
12
12
  - "6.1"
13
13
  - "7.0"
14
14
  ruby:
15
- - "2.7"
16
15
  - "3.0"
17
16
  - "3.1"
17
+ - "3.2"
18
18
  database:
19
19
  - mysql
20
20
  - postgresql
@@ -54,7 +54,7 @@ jobs:
54
54
  MARIADB_ROOT_PASSWORD: password
55
55
  options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=5
56
56
  steps:
57
- - uses: actions/checkout@v2.3.4
57
+ - uses: actions/checkout@v3
58
58
  - name: Set up Ruby
59
59
  uses: ruby/setup-ruby@v1
60
60
  with:
@@ -62,7 +62,7 @@ jobs:
62
62
  bundler-cache: true
63
63
  - name: Restore apt cache
64
64
  id: apt-cache
65
- uses: actions/cache@v2.1.3
65
+ uses: actions/cache@v3
66
66
  with:
67
67
  path: /home/runner/apt/cache
68
68
  key: ${{ runner.os }}-apt-${{ matrix.database }}
@@ -84,7 +84,7 @@ jobs:
84
84
  sudo chown -R runner /home/runner/apt/cache
85
85
  - name: Restore node modules cache
86
86
  id: yarn-cache
87
- uses: actions/cache@v2.1.3
87
+ uses: actions/cache@v3
88
88
  with:
89
89
  path: spec/dummy/node_modules
90
90
  key: ${{ runner.os }}-yarn-dummy-${{ hashFiles('./package.json') }}
@@ -94,7 +94,7 @@ jobs:
94
94
  run: |
95
95
  bundle exec rake alchemy:spec:prepare
96
96
  - name: Run tests & publish code coverage
97
- uses: paambaati/codeclimate-action@v2.7.5
97
+ uses: paambaati/codeclimate-action@v3.2.0
98
98
  env:
99
99
  CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
100
100
  with:
@@ -109,9 +109,9 @@ jobs:
109
109
  env:
110
110
  NODE_ENV: test
111
111
  steps:
112
- - uses: actions/checkout@v2.3.4
112
+ - uses: actions/checkout@v3
113
113
  - name: Restore node modules cache
114
- uses: actions/cache@v2.1.3
114
+ uses: actions/cache@v3
115
115
  with:
116
116
  path: node_modules
117
117
  key: ${{ runner.os }}-yarn-${{ hashFiles('./package.json') }}
data/.gitignore CHANGED
@@ -9,15 +9,10 @@ pkg
9
9
  tmp
10
10
  log
11
11
  .sass-cache
12
- spec/dummy/app/assets/builds/*.js*
13
- spec/dummy/app/javascript/
14
12
  spec/dummy/config/alchemy/config.yml
15
13
  spec/dummy/db/*.sqlite3*
16
- spec/dummy/package.json
17
14
  spec/dummy/postcss.config.js
18
15
  spec/dummy/public/assets/
19
- spec/dummy/public/packs/
20
- spec/dummy/public/packs-test/
21
16
  spec/dummy/uploads/
22
17
  .rvmrc
23
18
  /coverage/
data/.hound.yml CHANGED
@@ -1,10 +1,9 @@
1
1
  rubocop:
2
- config_file: .rubocop.yml
3
- version: 1.5.2
2
+ enabled: false
4
3
  scss:
5
4
  enabled: false
6
5
  coffeescript:
7
6
  enabled: false
8
7
  javascript:
9
8
  enabled: false
10
- fail_on_violations: true
9
+ fail_on_violations: false
data/.rubocop.yml CHANGED
@@ -1,353 +1,7 @@
1
- # Relaxed.Ruby.Style
1
+ require: standard
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.5
5
- Exclude:
6
- - 'bin/rspec'
7
- - 'vendor/**/*'
8
- - 'spec/dummy/db/**/*'
9
- - 'spec/dummy/config/**/*'
10
- - 'alchemy_cms.gemspec'
11
- - 'Rakefile'
12
- - 'node_modules/**/*'
4
+ TargetRubyVersion: 3.0
13
5
 
14
- # Really, rubocop?
15
- Bundler/OrderedGems:
16
- Enabled: false
17
-
18
- Style/EmptyLiteral:
19
- Enabled: false
20
-
21
- # We use class vars and will have to continue doing so for compatability
22
- Style/ClassVars:
23
- Enabled: false
24
-
25
- Style/FloatDivision:
26
- EnforcedStyle: left_coerce
27
-
28
- # This has been used for customization
29
- Style/MutableConstant:
30
- Enabled: false
31
-
32
- Style/ClassAndModuleChildren:
33
- Enabled: false
34
-
35
- Style/GuardClause:
36
- Enabled: false
37
-
38
- # We support older versions of Ruby (2.1) that do not have the %i syntax
39
- Style/SymbolArray:
40
- Enabled: false
41
-
42
- Style/SymbolProc:
43
- Exclude:
44
- - 'lib/alchemy/permissions.rb'
45
-
46
- Style/WordArray:
47
- Enabled: false
48
-
49
- Style/ConditionalAssignment:
50
- Enabled: false
51
-
52
- Style/MixinUsage:
53
- Exclude:
54
- - spec/**/*
55
-
56
- Layout/ArgumentAlignment:
57
- Enabled: false
58
-
59
- Layout/HashAlignment:
60
- Enabled: false
61
-
62
- Layout/ParameterAlignment:
63
- Enabled: false
64
-
65
- Layout/ClosingParenthesisIndentation:
66
- Enabled: false
67
-
68
- Layout/DotPosition:
69
- Enabled: false
70
- StyleGuide: http://relaxed.ruby.style/#styledotposition
71
-
72
- Layout/ElseAlignment:
73
- Enabled: false
74
-
75
- Layout/EmptyLineAfterMagicComment:
76
- Enabled: false
77
-
78
- Layout/EmptyLinesAroundAccessModifier:
79
- Exclude:
80
- - lib/alchemy/test_support/factories/*.rb
81
-
82
- Layout/FirstArrayElementIndentation:
83
- Enabled: false
84
-
85
- Layout/FirstHashElementIndentation:
86
- Enabled: false
87
-
88
- Layout/IndentationWidth:
89
- Enabled: false
90
-
91
- Layout/LineLength:
92
- Enabled: false
93
-
94
- Layout/MultilineHashBraceLayout:
95
- Enabled: false
96
-
97
- Layout/MultilineMethodCallBraceLayout:
98
- Enabled: false
99
-
100
- Layout/MultilineMethodCallIndentation:
101
- Enabled: false
102
-
103
- Layout/SpaceBeforeBlockBraces:
104
- Enabled: false
105
- StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces
106
-
107
- Layout/SpaceInsideHashLiteralBraces:
108
- Enabled: false
109
-
110
- Layout/SpaceInsideParens:
111
- Enabled: false
112
- StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens
113
-
114
- Layout/EndAlignment:
115
- Enabled: false
116
-
117
- Layout/RescueEnsureAlignment:
118
- Enabled: false
119
-
120
- Lint/SuppressedException:
121
- Exclude:
122
- - 'config/initializers/mini_profiler.rb'
123
-
124
- Style/CollectionMethods:
125
- Enabled: false
126
-
127
- Style/Alias:
128
- Enabled: false
129
- StyleGuide: http://relaxed.ruby.style/#stylealias
130
-
131
- Style/BeginBlock:
132
- Enabled: false
133
- StyleGuide: http://relaxed.ruby.style/#stylebeginblock
134
-
135
- Style/BlockDelimiters:
136
- Enabled: false
137
- StyleGuide: http://relaxed.ruby.style/#styleblockdelimiters
138
-
139
- Style/Documentation:
140
- Enabled: false
141
- StyleGuide: http://relaxed.ruby.style/#styledocumentation
142
-
143
- Style/DoubleNegation:
144
- Enabled: false
145
- StyleGuide: http://relaxed.ruby.style/#styledoublenegation
146
-
147
- Style/EmptyMethod:
148
- Enabled: false
149
-
150
- Style/EndBlock:
151
- Enabled: false
152
- StyleGuide: http://relaxed.ruby.style/#styleendblock
153
-
154
- Style/FormatString:
155
- Enabled: false
156
- StyleGuide: http://relaxed.ruby.style/#styleformatstring
157
-
158
- Style/IfUnlessModifier:
159
- Enabled: false
160
- StyleGuide: http://relaxed.ruby.style/#styleifunlessmodifier
161
-
162
- Style/Lambda:
163
- Enabled: false
164
- StyleGuide: http://relaxed.ruby.style/#stylelambda
165
-
166
- Style/ModuleFunction:
167
- Enabled: false
168
- StyleGuide: http://relaxed.ruby.style/#stylemodulefunction
169
-
170
- Style/MultilineBlockChain:
171
- Enabled: false
172
- StyleGuide: http://relaxed.ruby.style/#stylemultilineblockchain
173
-
174
- Style/NegatedIf:
175
- Enabled: false
176
- StyleGuide: http://relaxed.ruby.style/#stylenegatedif
177
-
178
- Style/NegatedWhile:
179
- Enabled: false
180
- StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile
181
-
182
- Style/NumericLiteralPrefix:
183
- Enabled: false
184
-
185
- Style/ParallelAssignment:
186
- Enabled: false
187
- StyleGuide: http://relaxed.ruby.style/#styleparallelassignment
188
-
189
- Style/PercentLiteralDelimiters:
190
- Enabled: false
191
- StyleGuide: http://relaxed.ruby.style/#stylepercentliteraldelimiters
192
-
193
- Style/PerlBackrefs:
194
- Enabled: false
195
- StyleGuide: http://relaxed.ruby.style/#styleperlbackrefs
196
-
197
- Style/RegexpLiteral:
198
- Enabled: false
199
-
200
- Style/Semicolon:
201
- Enabled: false
202
- StyleGuide: http://relaxed.ruby.style/#stylesemicolon
203
-
204
- Style/SignalException:
205
- Enabled: false
206
- StyleGuide: http://relaxed.ruby.style/#stylesignalexception
207
-
208
- Style/SingleLineBlockParams:
209
- Enabled: false
210
- StyleGuide: http://relaxed.ruby.style/#stylesinglelineblockparams
211
-
212
- Style/SingleLineMethods:
213
- Enabled: false
214
- StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods
215
-
216
- Style/SpecialGlobalVars:
217
- Enabled: false
218
- StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars
219
-
220
- Style/StringLiterals:
221
- EnforcedStyle: double_quotes
222
-
223
- Style/StringLiteralsInInterpolation:
224
- EnforcedStyle: double_quotes
225
-
226
- Style/TrailingCommaInArguments:
227
- Enabled: false
228
-
229
- Style/TrailingCommaInArrayLiteral:
230
- EnforcedStyleForMultiline: comma
231
-
232
- Style/TrailingCommaInHashLiteral:
233
- EnforcedStyleForMultiline: consistent_comma
234
-
235
- Style/WhileUntilModifier:
236
- Enabled: false
237
- StyleGuide: http://relaxed.ruby.style/#stylewhileuntilmodifier
238
-
239
- # We use a lot of
240
- #
241
- # expect {
242
- # something
243
- # }.to { happen }
244
- #
245
- # syntax in the specs files.
246
- Lint/AmbiguousBlockAssociation:
247
- Exclude:
248
- - 'spec/**/*'
249
-
250
- Lint/AmbiguousRegexpLiteral:
251
- Enabled: false
252
- StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral
253
-
254
- Lint/AssignmentInCondition:
255
- Enabled: false
256
- StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition
257
-
258
- # We use eval to get the correct url proxy object of engines in:
259
- # - app/helpers/alchemy/admin/navigation_helper.rb:139
260
- # - lib/alchemy/resources_helper.rb:24
261
- Security/Eval:
262
- Exclude:
263
- - app/helpers/alchemy/admin/navigation_helper.rb
264
- - lib/alchemy/resources_helper.rb
265
-
266
- Metrics/AbcSize:
267
- Enabled: false
268
-
269
- Metrics/BlockLength:
270
- Enabled: false
271
-
272
- Metrics/BlockNesting:
273
- Enabled: false
274
-
275
- Metrics/ClassLength:
276
- Enabled: false
277
-
278
- Metrics/ModuleLength:
279
- Enabled: false
280
-
281
- Metrics/CyclomaticComplexity:
282
- Enabled: false
283
-
284
- Metrics/MethodLength:
285
- Enabled: false
286
-
287
- Metrics/ParameterLists:
288
- Enabled: false
289
-
290
- Metrics/PerceivedComplexity:
291
- Enabled: false
292
-
293
- Naming/AccessorMethodName:
294
- Enabled: false
295
-
296
- Naming/HeredocDelimiterNaming:
297
- Enabled: false
298
-
299
- # This cop is great but has no config option to support the style `@_method_name` we are using.
300
- Naming/MemoizedInstanceVariableName:
301
- Enabled: false
302
-
303
- # We need these names for backwards compatability
304
- Naming/PredicateName:
305
- Enabled: false
306
-
307
- Naming/VariableNumber:
308
- Enabled: false
309
-
310
- Lint/DuplicateBranch: # (new in 1.3)
311
- Enabled: false
312
-
313
- Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
314
- Enabled: false
315
-
316
- Lint/EmptyBlock: # (new in 1.1)
317
- Enabled: false
318
-
319
- Lint/EmptyClass: # (new in 1.3)
320
- Enabled: false
321
-
322
- Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
323
- Enabled: false
324
-
325
- Lint/ToEnumArguments: # (new in 1.1)
326
- Enabled: false
327
-
328
- Lint/UnexpectedBlockArity: # (new in 1.5)
329
- Enabled: false
330
-
331
- Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
332
- Enabled: false
333
-
334
- Style/ArgumentsForwarding: # (new in 1.1)
335
- Enabled: false
336
-
337
- Style/CollectionCompact: # (new in 1.2)
338
- Enabled: false
339
-
340
- Style/DocumentDynamicEvalDefinition: # (new in 1.1)
341
- Enabled: false
342
-
343
- Style/NegatedIfElseCondition: # (new in 1.2)
344
- Enabled: false
345
-
346
- Style/NilLambda: # (new in 1.3)
347
- Enabled: false
348
-
349
- Style/RedundantArgument: # (new in 1.4)
350
- Enabled: false
351
-
352
- Style/SwapValues: # (new in 1.1)
353
- Enabled: false
6
+ inherit_gem:
7
+ standard: config/base.yml
data/.standard.yml ADDED
@@ -0,0 +1,3 @@
1
+ parallel: true
2
+ ignore:
3
+ - "spec/dummy/**/*"
data/CHANGELOG.md CHANGED
@@ -2,6 +2,39 @@
2
2
 
3
3
  ## 7.0.0 (unreleased)
4
4
 
5
+ - Lint JS code with Prettier [#2503](https://github.com/AlchemyCMS/alchemy_cms/pull/2503) ([tvdeyen](https://github.com/tvdeyen))
6
+ - Use absolute imports in modules [#2502](https://github.com/AlchemyCMS/alchemy_cms/pull/2502) ([tvdeyen](https://github.com/tvdeyen))
7
+ - Replace turbolinks with turbo [#2499](https://github.com/AlchemyCMS/alchemy_cms/pull/2499) ([sascha-karnatz](https://github.com/sascha-karnatz))
8
+ - Use Importmaps for admin JS [#2498](https://github.com/AlchemyCMS/alchemy_cms/pull/2498) ([tvdeyen](https://github.com/tvdeyen))
9
+ - Fix TinyMCE loading behavior after page change [#2494](https://github.com/AlchemyCMS/alchemy_cms/pull/2494) ([sascha-karnatz](https://github.com/sascha-karnatz))
10
+ - [js] Update esbuild → 0.18.4 (unknown) [#2492](https://github.com/AlchemyCMS/alchemy_cms/pull/2492) ([depfu](https://github.com/apps/depfu))
11
+ - Add ransackable attributes to tags [#2487](https://github.com/AlchemyCMS/alchemy_cms/pull/2487) ([tvdeyen](https://github.com/tvdeyen))
12
+ - Remove selenium-webdriver 4.9.0 [#2484](https://github.com/AlchemyCMS/alchemy_cms/pull/2484) ([depfu](https://github.com/apps/depfu))
13
+ - Make it easier to run the dummy app locally [#2483](https://github.com/AlchemyCMS/alchemy_cms/pull/2483) ([tvdeyen](https://github.com/tvdeyen))
14
+ - VideoView: Merge html_options onto options [#2481](https://github.com/AlchemyCMS/alchemy_cms/pull/2481) ([tvdeyen](https://github.com/tvdeyen))
15
+ - Allow to pass level to HeadlineView component [#2480](https://github.com/AlchemyCMS/alchemy_cms/pull/2480) ([tvdeyen](https://github.com/tvdeyen))
16
+ - Un-deprecate rendering ingredient view partials [#2479](https://github.com/AlchemyCMS/alchemy_cms/pull/2479) ([tvdeyen](https://github.com/tvdeyen))
17
+ - Fix installer application layout template [#2478](https://github.com/AlchemyCMS/alchemy_cms/pull/2478) ([tvdeyen](https://github.com/tvdeyen))
18
+ - Respect available locales set in application [#2477](https://github.com/AlchemyCMS/alchemy_cms/pull/2477) ([tvdeyen](https://github.com/tvdeyen))
19
+ - Use intersection observer to init Tinymce editors [#2476](https://github.com/AlchemyCMS/alchemy_cms/pull/2476) ([sascha-karnatz](https://github.com/sascha-karnatz))
20
+ - Revert "Preload related objects in Alchemy::PagesController" [#2472](https://github.com/AlchemyCMS/alchemy_cms/pull/2472) ([tvdeyen](https://github.com/tvdeyen))
21
+ - Collapse all nested elements on fold [#2471](https://github.com/AlchemyCMS/alchemy_cms/pull/2471) ([tvdeyen](https://github.com/tvdeyen))
22
+ - Do not render nested elements of element editor if folded [#2470](https://github.com/AlchemyCMS/alchemy_cms/pull/2470) ([tvdeyen](https://github.com/tvdeyen))
23
+ - Pin selenium-webdriver to 4.9.0 [#2469](https://github.com/AlchemyCMS/alchemy_cms/pull/2469) ([tvdeyen](https://github.com/tvdeyen))
24
+ - Add indexes to pictures table [#2466](https://github.com/AlchemyCMS/alchemy_cms/pull/2466) ([sascha-karnatz](https://github.com/sascha-karnatz))
25
+ - Use view_component for ingredient views [#2465](https://github.com/AlchemyCMS/alchemy_cms/pull/2465) ([tvdeyen](https://github.com/tvdeyen))
26
+ - Drop Ruby 2.x support [#2464](https://github.com/AlchemyCMS/alchemy_cms/pull/2464) ([tvdeyen](https://github.com/tvdeyen))
27
+ - Remove defer from admin JS includes [#2463](https://github.com/AlchemyCMS/alchemy_cms/pull/2463) ([tvdeyen](https://github.com/tvdeyen))
28
+ - Use ISO Date format in flatpickr [#2462](https://github.com/AlchemyCMS/alchemy_cms/pull/2462) ([phantomwhale](https://github.com/phantomwhale))
29
+ - Fix layoutpages configuration [#2459](https://github.com/AlchemyCMS/alchemy_cms/pull/2459) ([oRIOnTx](https://github.com/oRIOnTx))
30
+ - Fix picture show overlay if picture in use [#2456](https://github.com/AlchemyCMS/alchemy_cms/pull/2456) ([tvdeyen](https://github.com/tvdeyen))
31
+ - Fix picture file format filter [#2455](https://github.com/AlchemyCMS/alchemy_cms/pull/2455) ([tvdeyen](https://github.com/tvdeyen))
32
+ - Allow editors to switch language [#2454](https://github.com/AlchemyCMS/alchemy_cms/pull/2454) ([mamhoff](https://github.com/mamhoff))
33
+ - Use standard.rb as code linter and formatter [#2453](https://github.com/AlchemyCMS/alchemy_cms/pull/2453) ([tvdeyen](https://github.com/tvdeyen))
34
+ - CI: Update brakeman workflow [#2452](https://github.com/AlchemyCMS/alchemy_cms/pull/2452) ([tvdeyen](https://github.com/tvdeyen))
35
+ - CI: Use latest version of GitHub actions [#2451](https://github.com/AlchemyCMS/alchemy_cms/pull/2451) ([tvdeyen](https://github.com/tvdeyen))
36
+ - Send language_id (of the currently editing page) parameter to Pages API requests for page select on link overlay [#2439](https://github.com/AlchemyCMS/alchemy_cms/pull/2439) ([dbwinger](https://github.com/dbwinger))
37
+ - Fix page seeder [#2389](https://github.com/AlchemyCMS/alchemy_cms/pull/2389) ([tvdeyen](https://github.com/tvdeyen))
5
38
  - Remove deprecations [#2450](https://github.com/AlchemyCMS/alchemy_cms/pull/2450) ([tvdeyen](https://github.com/tvdeyen))
6
39
  - Fix respond_to? overwrite in ElementEditor [#2449](https://github.com/AlchemyCMS/alchemy_cms/pull/2449) ([tvdeyen](https://github.com/tvdeyen))
7
40
  - Fix installer: Add seeds file if not exists [#2446](https://github.com/AlchemyCMS/alchemy_cms/pull/2446) ([tvdeyen](https://github.com/tvdeyen))
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  source "https://rubygems.org"
3
4
 
4
5
  gemspec
@@ -19,7 +20,8 @@ group :development, :test do
19
20
  # in our case the culprit is `handlebars-assets`. The changes between 2.7.0 and 2.8.0 are
20
21
  # minimal, but breaking.
21
22
  gem "execjs", "= 2.8.1"
22
- gem "jsbundling-rails", "~> 1.1"
23
+ gem "rubocop", require: false
24
+ gem "standard", "~> 1.25", require: false
23
25
 
24
26
  if ENV["GITHUB_ACTIONS"]
25
27
  # Necessary because GH Actions gem cache does not have this "Bundled with Ruby" gem installed
@@ -32,7 +34,6 @@ group :development, :test do
32
34
  gem "yard"
33
35
  gem "redcarpet"
34
36
  gem "pry-byebug"
35
- gem "rubocop", "1.5.2", require: false
36
37
  gem "listen"
37
38
  gem "localeapp", "~> 3.0", require: false
38
39
  gem "dotenv", "~> 2.2"
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # AlchemyCMS
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/alchemy_cms.svg)](http://badge.fury.io/rb/alchemy_cms)
4
3
  [![Build Status](https://github.com/AlchemyCMS/alchemy_cms/workflows/CI/badge.svg?branch=main)](https://github.com/AlchemyCMS/alchemy_cms/actions)
4
+ [![Brakeman Scan](https://github.com/AlchemyCMS/alchemy_cms/actions/workflows/brakeman-analysis.yml/badge.svg)](https://github.com/AlchemyCMS/alchemy_cms/actions/workflows/brakeman-analysis.yml)
5
+
6
+ [![Gem Version](https://badge.fury.io/rb/alchemy_cms.svg)](http://badge.fury.io/rb/alchemy_cms)
5
7
  [![Maintainability](https://api.codeclimate.com/v1/badges/196c56c56568ed24a697/maintainability)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/maintainability)
6
8
  [![Test Coverage](https://api.codeclimate.com/v1/badges/196c56c56568ed24a697/test_coverage)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/test_coverage)
7
- [![Depfu](https://badges.depfu.com/badges/ebe56d2dd7b7044a8ae700cc81212a8e/overview.svg)](https://depfu.com/github/AlchemyCMS/alchemy_cms?project_id=4600)
8
-
9
- [![Slack Status](https://slackin.alchemy-cms.com/badge.svg)](https://slackin.alchemy-cms.com)
10
9
  [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
10
+ [![Depfu](https://badges.depfu.com/badges/ebe56d2dd7b7044a8ae700cc81212a8e/overview.svg)](https://depfu.com/github/AlchemyCMS/alchemy_cms?project_id=4600)
11
11
 
12
12
  [![Backers on Open Collective](https://opencollective.com/alchemy_cms/backers/badge.svg?color=blue)](#backers)
13
13
  [![Sponsors on Open Collective](https://opencollective.com/alchemy_cms/sponsors/badge.svg?color=blue)](#sponsors)
@@ -302,7 +302,7 @@ If you want to contribute to Alchemy ([and we encourage you to do so](CONTRIBUTI
302
302
  First of all you need to clone your fork to your local development machine. Then you need to install the dependencies with bundler.
303
303
 
304
304
  ```bash
305
- $ bundle install
305
+ $ bin/setup
306
306
  ```
307
307
 
308
308
  To prepare the tests of your Alchemy fork please make sure to run the preparation task:
@@ -316,7 +316,7 @@ to set up the database for testing.
316
316
  ### Run your tests with:
317
317
 
318
318
  ```bash
319
- $ bundle exec rspec
319
+ $ bin/rspec
320
320
  ```
321
321
 
322
322
  **Alternatively** you can just run*:
@@ -332,9 +332,7 @@ $ bundle exec rake
332
332
  You can even start the dummy app and use it to manually test your changes with:
333
333
 
334
334
  ```bash
335
- $ cd spec/dummy
336
- $ bin/setup
337
- $ bin/rails s
335
+ $ bin/start
338
336
  ```
339
337
 
340
338
 
@@ -342,7 +340,7 @@ $ bin/rails s
342
340
 
343
341
  ### Bump version
344
342
 
345
- Bump the version number in both `lib/alchemy/version.rb` and `./package.json`. Make sure both are exactly the same and follow [SemVer format](https://semver.org/#semantic-versioning-specification-semver).
343
+ Bump the version number in `lib/alchemy/version.rb`.
346
344
 
347
345
  ### Update the changelog
348
346
 
@@ -359,11 +357,11 @@ $ git commit -am "Bump version to vX.Y.Z"
359
357
 
360
358
  ### Release a new version
361
359
 
362
- This task will publish both the ruby gem and the npm package.
360
+ This task will publish the ruby gem.
363
361
  It also tags the latest commit.
364
362
 
365
363
  ```bash
366
- $ bundle exec rake alchemy:release
364
+ $ bundle exec rake release
367
365
  ```
368
366
 
369
367
  ## ❓Getting Help