alchemy_cms 6.0.14 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +0 -3
  3. data/.github/workflows/stale.yml +2 -0
  4. data/CHANGELOG.md +34 -5
  5. data/Gemfile +2 -2
  6. data/alchemy_cms.gemspec +2 -1
  7. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +13 -11
  8. data/app/assets/stylesheets/alchemy/_variables.scss +9 -4
  9. data/app/assets/stylesheets/alchemy/elements.scss +96 -4
  10. data/app/assets/stylesheets/alchemy/forms.scss +59 -17
  11. data/app/assets/stylesheets/tinymce/skins/alchemy/content.min.css.scss +3 -3
  12. data/app/controllers/alchemy/admin/ingredients_controller.rb +1 -1
  13. data/app/controllers/alchemy/admin/pages_controller.rb +3 -3
  14. data/app/controllers/alchemy/api/ingredients_controller.rb +22 -0
  15. data/app/controllers/alchemy/messages_controller.rb +1 -1
  16. data/app/controllers/alchemy/pages_controller.rb +19 -5
  17. data/app/decorators/alchemy/ingredient_editor.rb +4 -0
  18. data/app/helpers/alchemy/elements_helper.rb +0 -8
  19. data/app/helpers/alchemy/url_helper.rb +0 -8
  20. data/app/models/alchemy/element/definitions.rb +16 -2
  21. data/app/models/alchemy/element/dom_id.rb +30 -0
  22. data/app/models/alchemy/element/presenters.rb +1 -1
  23. data/app/models/alchemy/element.rb +12 -3
  24. data/app/models/alchemy/ingredients/headline.rb +4 -1
  25. data/app/models/alchemy/ingredients/text.rb +3 -0
  26. data/app/models/alchemy/page/page_layouts.rb +128 -0
  27. data/app/models/alchemy/page.rb +4 -2
  28. data/app/models/alchemy/picture_thumb/create.rb +1 -1
  29. data/app/models/concerns/alchemy/dom_ids.rb +32 -0
  30. data/app/serializers/alchemy/ingredient_serializer.rb +11 -0
  31. data/app/views/alchemy/admin/elements/update.js.erb +3 -0
  32. data/app/views/alchemy/admin/ingredients/_dom_id_fields.html.erb +4 -0
  33. data/app/views/alchemy/admin/ingredients/_headline_fields.html.erb +3 -0
  34. data/app/views/alchemy/admin/ingredients/_text_fields.html.erb +3 -0
  35. data/app/views/alchemy/admin/ingredients/update.js.erb +7 -0
  36. data/app/views/alchemy/admin/languages/_form.html.erb +1 -1
  37. data/app/views/alchemy/admin/languages/_language.html.erb +1 -1
  38. data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +1 -1
  39. data/app/views/alchemy/admin/partials/_routes.html.erb +2 -1
  40. data/app/views/alchemy/ingredients/_headline_editor.html.erb +22 -20
  41. data/app/views/alchemy/ingredients/_headline_view.html.erb +1 -0
  42. data/app/views/alchemy/ingredients/_text_editor.html.erb +3 -0
  43. data/app/views/alchemy/ingredients/_text_view.html.erb +7 -3
  44. data/app/views/alchemy/ingredients/shared/_anchor.html.erb +9 -0
  45. data/app/views/alchemy/messages_mailer/contact_form_mail.de.text.erb +2 -0
  46. data/app/views/alchemy/messages_mailer/contact_form_mail.en.text.erb +2 -0
  47. data/app/views/alchemy/messages_mailer/contact_form_mail.es.text.erb +2 -0
  48. data/config/locales/alchemy.en.yml +5 -2
  49. data/config/routes.rb +1 -0
  50. data/lib/alchemy/error_tracking/error_logger.rb +13 -0
  51. data/lib/alchemy/error_tracking.rb +3 -1
  52. data/lib/alchemy/install/tasks.rb +1 -7
  53. data/lib/alchemy/page_layout.rb +0 -113
  54. data/lib/alchemy/test_support/shared_dom_ids_examples.rb +119 -0
  55. data/lib/alchemy/upgrader/tasks/add_page_versions.rb +2 -2
  56. data/lib/alchemy/upgrader/tasks/ingredients_migrator.rb +7 -5
  57. data/lib/alchemy/version.rb +1 -1
  58. data/lib/alchemy.rb +4 -0
  59. data/lib/alchemy_cms.rb +1 -1
  60. data/lib/generators/alchemy/elements/templates/view.html.erb +1 -1
  61. data/lib/generators/alchemy/elements/templates/view.html.haml +1 -1
  62. data/lib/generators/alchemy/elements/templates/view.html.slim +1 -1
  63. data/lib/tasks/alchemy/thumbnails.rake +1 -1
  64. data/package/admin.js +2 -0
  65. data/package/src/ingredient_anchor_link.js +17 -0
  66. data/package.json +2 -2
  67. data/vendor/assets/javascripts/tinymce/tinymce.min.js +2 -2
  68. metadata +32 -6
  69. data/lib/non_stupid_digest_assets.rb +0 -55
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.14
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2023-05-18 00:00:00.000000000 Z
16
+ date: 2023-01-19 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionmailer
@@ -387,6 +387,20 @@ dependencies:
387
387
  - - "~>"
388
388
  - !ruby/object:Gem::Version
389
389
  version: '3.1'
390
+ - !ruby/object:Gem::Dependency
391
+ name: non-stupid-digest-assets
392
+ requirement: !ruby/object:Gem::Requirement
393
+ requirements:
394
+ - - "~>"
395
+ - !ruby/object:Gem::Version
396
+ version: 1.0.8
397
+ type: :runtime
398
+ prerelease: false
399
+ version_requirements: !ruby/object:Gem::Requirement
400
+ requirements:
401
+ - - "~>"
402
+ - !ruby/object:Gem::Version
403
+ version: 1.0.8
390
404
  - !ruby/object:Gem::Dependency
391
405
  name: ransack
392
406
  requirement: !ruby/object:Gem::Requirement
@@ -577,14 +591,14 @@ dependencies:
577
591
  requirements:
578
592
  - - "~>"
579
593
  - !ruby/object:Gem::Version
580
- version: '5.0'
594
+ version: '6.0'
581
595
  type: :development
582
596
  prerelease: false
583
597
  version_requirements: !ruby/object:Gem::Requirement
584
598
  requirements:
585
599
  - - "~>"
586
600
  - !ruby/object:Gem::Version
587
- version: '5.0'
601
+ version: '6.0'
588
602
  - !ruby/object:Gem::Dependency
589
603
  name: rails-controller-testing
590
604
  requirement: !ruby/object:Gem::Requirement
@@ -861,6 +875,7 @@ files:
861
875
  - app/controllers/alchemy/api/base_controller.rb
862
876
  - app/controllers/alchemy/api/contents_controller.rb
863
877
  - app/controllers/alchemy/api/elements_controller.rb
878
+ - app/controllers/alchemy/api/ingredients_controller.rb
864
879
  - app/controllers/alchemy/api/nodes_controller.rb
865
880
  - app/controllers/alchemy/api/pages_controller.rb
866
881
  - app/controllers/alchemy/attachments_controller.rb
@@ -905,6 +920,7 @@ files:
905
920
  - app/models/alchemy/eager_loading.rb
906
921
  - app/models/alchemy/element.rb
907
922
  - app/models/alchemy/element/definitions.rb
923
+ - app/models/alchemy/element/dom_id.rb
908
924
  - app/models/alchemy/element/element_contents.rb
909
925
  - app/models/alchemy/element/element_essences.rb
910
926
  - app/models/alchemy/element/element_ingredients.rb
@@ -952,6 +968,7 @@ files:
952
968
  - app/models/alchemy/page.rb
953
969
  - app/models/alchemy/page/fixed_attributes.rb
954
970
  - app/models/alchemy/page/page_elements.rb
971
+ - app/models/alchemy/page/page_layouts.rb
955
972
  - app/models/alchemy/page/page_naming.rb
956
973
  - app/models/alchemy/page/page_natures.rb
957
974
  - app/models/alchemy/page/page_scopes.rb
@@ -972,6 +989,7 @@ files:
972
989
  - app/models/alchemy/site/layout.rb
973
990
  - app/models/alchemy/tag.rb
974
991
  - app/models/alchemy/tree_node.rb
992
+ - app/models/concerns/alchemy/dom_ids.rb
975
993
  - app/models/concerns/alchemy/picture_thumbnails.rb
976
994
  - app/models/concerns/alchemy/touch_elements.rb
977
995
  - app/presenters/alchemy/picture_view.rb
@@ -988,6 +1006,7 @@ files:
988
1006
  - app/serializers/alchemy/essence_richtext_serializer.rb
989
1007
  - app/serializers/alchemy/essence_select_serializer.rb
990
1008
  - app/serializers/alchemy/essence_text_serializer.rb
1009
+ - app/serializers/alchemy/ingredient_serializer.rb
991
1010
  - app/serializers/alchemy/node_serializer.rb
992
1011
  - app/serializers/alchemy/page_serializer.rb
993
1012
  - app/serializers/alchemy/page_tree_serializer.rb
@@ -1046,10 +1065,14 @@ files:
1046
1065
  - app/views/alchemy/admin/essence_pictures/update.js.erb
1047
1066
  - app/views/alchemy/admin/essence_videos/edit.html.erb
1048
1067
  - app/views/alchemy/admin/ingredients/_audio_fields.html.erb
1068
+ - app/views/alchemy/admin/ingredients/_dom_id_fields.html.erb
1049
1069
  - app/views/alchemy/admin/ingredients/_file_fields.html.erb
1070
+ - app/views/alchemy/admin/ingredients/_headline_fields.html.erb
1050
1071
  - app/views/alchemy/admin/ingredients/_picture_fields.html.erb
1072
+ - app/views/alchemy/admin/ingredients/_text_fields.html.erb
1051
1073
  - app/views/alchemy/admin/ingredients/_video_fields.html.erb
1052
1074
  - app/views/alchemy/admin/ingredients/edit.html.erb
1075
+ - app/views/alchemy/admin/ingredients/update.js.erb
1053
1076
  - app/views/alchemy/admin/languages/_form.html.erb
1054
1077
  - app/views/alchemy/admin/languages/_language.html.erb
1055
1078
  - app/views/alchemy/admin/languages/_table.html.erb
@@ -1226,6 +1249,7 @@ files:
1226
1249
  - app/views/alchemy/ingredients/_text_view.html.erb
1227
1250
  - app/views/alchemy/ingredients/_video_editor.html.erb
1228
1251
  - app/views/alchemy/ingredients/_video_view.html.erb
1252
+ - app/views/alchemy/ingredients/shared/_anchor.html.erb
1229
1253
  - app/views/alchemy/ingredients/shared/_link_tools.html.erb
1230
1254
  - app/views/alchemy/ingredients/shared/_picture_tools.html.erb
1231
1255
  - app/views/alchemy/language_links/_language.html.erb
@@ -1298,6 +1322,7 @@ files:
1298
1322
  - lib/alchemy/elements_finder.rb
1299
1323
  - lib/alchemy/engine.rb
1300
1324
  - lib/alchemy/error_tracking.rb
1325
+ - lib/alchemy/error_tracking/error_logger.rb
1301
1326
  - lib/alchemy/errors.rb
1302
1327
  - lib/alchemy/essence.rb
1303
1328
  - lib/alchemy/filetypes.rb
@@ -1347,6 +1372,7 @@ files:
1347
1372
  - lib/alchemy/test_support/having_picture_thumbnails_examples.rb
1348
1373
  - lib/alchemy/test_support/integration_helpers.rb
1349
1374
  - lib/alchemy/test_support/shared_contexts.rb
1375
+ - lib/alchemy/test_support/shared_dom_ids_examples.rb
1350
1376
  - lib/alchemy/test_support/shared_ingredient_editor_examples.rb
1351
1377
  - lib/alchemy/test_support/shared_ingredient_examples.rb
1352
1378
  - lib/alchemy/test_support/shared_uploader_examples.rb
@@ -1405,7 +1431,6 @@ files:
1405
1431
  - lib/generators/alchemy/site_layouts/templates/layout.html.haml
1406
1432
  - lib/generators/alchemy/site_layouts/templates/layout.html.slim
1407
1433
  - lib/generators/alchemy/views/views_generator.rb
1408
- - lib/non_stupid_digest_assets.rb
1409
1434
  - lib/tasks/alchemy/db.rake
1410
1435
  - lib/tasks/alchemy/install.rake
1411
1436
  - lib/tasks/alchemy/thumbnails.rake
@@ -1419,6 +1444,7 @@ files:
1419
1444
  - package/src/i18n.js
1420
1445
  - package/src/image_cropper.js
1421
1446
  - package/src/image_loader.js
1447
+ - package/src/ingredient_anchor_link.js
1422
1448
  - package/src/node_tree.js
1423
1449
  - package/src/page_publication_fields.js
1424
1450
  - package/src/page_sorter.js
@@ -1511,7 +1537,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1511
1537
  version: '0'
1512
1538
  requirements:
1513
1539
  - ImageMagick (libmagick), v6.6 or greater.
1514
- rubygems_version: 3.4.12
1540
+ rubygems_version: 3.3.26
1515
1541
  signing_key:
1516
1542
  specification_version: 4
1517
1543
  summary: A powerful, userfriendly and flexible CMS for Rails
@@ -1,55 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "sprockets/manifest"
4
- require "active_support/core_ext/module/attribute_accessors"
5
-
6
- module NonStupidDigestAssets
7
- mattr_accessor :whitelist
8
- @@whitelist = []
9
-
10
- class << self
11
- def assets(assets)
12
- return assets if whitelist.empty?
13
-
14
- whitelisted_assets(assets)
15
- end
16
-
17
- private
18
-
19
- def whitelisted_assets(assets)
20
- assets.select do |logical_path, _digest_path|
21
- whitelist.any? do |item|
22
- item =~ logical_path
23
- end
24
- end
25
- end
26
- end
27
-
28
- module CompileWithNonDigest
29
- def compile(*args)
30
- paths = super
31
- NonStupidDigestAssets.assets(assets).each do |(logical_path, digest_path)|
32
- full_digest_path = File.join dir, digest_path
33
- full_digest_gz_path = "#{full_digest_path}.gz"
34
- full_non_digest_path = File.join dir, logical_path
35
- full_non_digest_gz_path = "#{full_non_digest_path}.gz"
36
-
37
- if File.exist? full_digest_path
38
- logger.debug "Writing #{full_non_digest_path}"
39
- FileUtils.copy_file full_digest_path, full_non_digest_path, :preserve_attributes
40
- else
41
- logger.debug "Could not find: #{full_digest_path}"
42
- end
43
- if File.exist? full_digest_gz_path
44
- logger.debug "Writing #{full_non_digest_gz_path}"
45
- FileUtils.copy_file full_digest_gz_path, full_non_digest_gz_path, :preserve_attributes
46
- else
47
- logger.debug "Could not find: #{full_digest_gz_path}"
48
- end
49
- end
50
- paths
51
- end
52
- end
53
- end
54
-
55
- Sprockets::Manifest.prepend NonStupidDigestAssets::CompileWithNonDigest