alchemy_cms 5.0.1 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/.github/PULL_REQUEST_TEMPLATE.md +1 -1
  3. data/.github/workflows/ci.yml +126 -0
  4. data/.github/workflows/stale.yml +1 -1
  5. data/.gitignore +1 -0
  6. data/CHANGELOG.md +66 -2
  7. data/CONTRIBUTING.md +2 -2
  8. data/Gemfile +2 -2
  9. data/README.md +2 -2
  10. data/alchemy_cms.gemspec +3 -3
  11. data/app/assets/images/alchemy/missing-image.svg +1 -0
  12. data/app/assets/javascripts/alchemy/admin.js +0 -1
  13. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +1 -4
  14. data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +0 -3
  15. data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +29 -4
  16. data/app/assets/stylesheets/alchemy/_variables.scss +8 -0
  17. data/app/assets/stylesheets/alchemy/admin.scss +0 -1
  18. data/app/assets/stylesheets/alchemy/archive.scss +23 -17
  19. data/app/assets/stylesheets/alchemy/buttons.scss +26 -15
  20. data/app/assets/stylesheets/alchemy/elements.scss +58 -19
  21. data/app/assets/stylesheets/alchemy/errors.scss +1 -1
  22. data/app/assets/stylesheets/alchemy/frame.scss +0 -1
  23. data/app/assets/stylesheets/alchemy/hints.scss +2 -1
  24. data/app/assets/stylesheets/alchemy/navigation.scss +7 -10
  25. data/app/assets/stylesheets/alchemy/pagination.scss +1 -1
  26. data/app/assets/stylesheets/alchemy/search.scss +13 -3
  27. data/app/assets/stylesheets/alchemy/selects.scss +26 -20
  28. data/app/assets/stylesheets/alchemy/tables.scss +38 -9
  29. data/app/assets/stylesheets/alchemy/tags.scss +19 -31
  30. data/app/controllers/alchemy/admin/pages_controller.rb +58 -8
  31. data/app/controllers/alchemy/admin/pictures_controller.rb +13 -6
  32. data/app/controllers/alchemy/admin/resources_controller.rb +3 -3
  33. data/app/controllers/alchemy/pages_controller.rb +49 -14
  34. data/app/decorators/alchemy/element_editor.rb +1 -0
  35. data/app/helpers/alchemy/admin/base_helper.rb +0 -44
  36. data/app/helpers/alchemy/admin/navigation_helper.rb +2 -1
  37. data/app/models/alchemy/attachment.rb +20 -3
  38. data/app/models/alchemy/attachment/url.rb +40 -0
  39. data/app/models/alchemy/essence_picture.rb +3 -3
  40. data/app/models/alchemy/essence_picture_view.rb +5 -3
  41. data/app/models/alchemy/legacy_page_url.rb +1 -1
  42. data/app/models/alchemy/page.rb +24 -1
  43. data/app/models/alchemy/page/page_natures.rb +2 -0
  44. data/app/models/alchemy/page/url_path.rb +8 -6
  45. data/app/models/alchemy/picture.rb +58 -2
  46. data/app/models/alchemy/picture/calculations.rb +55 -0
  47. data/app/models/alchemy/picture/transformations.rb +5 -49
  48. data/app/models/alchemy/picture/url.rb +28 -77
  49. data/app/models/alchemy/picture_thumb.rb +57 -0
  50. data/app/models/alchemy/picture_thumb/create.rb +39 -0
  51. data/app/models/alchemy/picture_thumb/signature.rb +23 -0
  52. data/app/models/alchemy/picture_thumb/uid.rb +22 -0
  53. data/app/models/alchemy/picture_variant.rb +114 -0
  54. data/app/models/alchemy/site/layout.rb +30 -2
  55. data/app/serializers/alchemy/page_tree_serializer.rb +4 -4
  56. data/app/views/alchemy/admin/attachments/show.html.erb +8 -8
  57. data/app/views/alchemy/admin/dashboard/index.html.erb +13 -16
  58. data/app/views/alchemy/admin/elements/_element_footer.html.erb +1 -1
  59. data/app/views/alchemy/admin/elements/publish.js.erb +1 -0
  60. data/app/views/alchemy/admin/essence_pictures/crop.html.erb +1 -1
  61. data/app/views/alchemy/admin/essence_pictures/edit.html.erb +2 -2
  62. data/app/views/alchemy/admin/layoutpages/edit.html.erb +4 -6
  63. data/app/views/alchemy/admin/pages/_create_language_form.html.erb +19 -29
  64. data/app/views/alchemy/admin/pages/_form.html.erb +4 -6
  65. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +12 -2
  66. data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +29 -0
  67. data/app/views/alchemy/admin/pages/_table.html.erb +27 -0
  68. data/app/views/alchemy/admin/pages/_table_row.html.erb +107 -0
  69. data/app/views/alchemy/admin/pages/_toolbar.html.erb +77 -0
  70. data/app/views/alchemy/admin/pages/edit.html.erb +9 -1
  71. data/app/views/alchemy/admin/pages/index.html.erb +41 -74
  72. data/app/views/alchemy/admin/pages/list/_table.html.erb +31 -0
  73. data/app/views/alchemy/admin/pages/unlock.js.erb +2 -2
  74. data/app/views/alchemy/admin/pages/update.js.erb +19 -10
  75. data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +14 -13
  76. data/app/views/alchemy/admin/partials/_search_form.html.erb +8 -8
  77. data/app/views/alchemy/admin/pictures/_archive.html.erb +1 -1
  78. data/app/views/alchemy/admin/pictures/_form.html.erb +1 -1
  79. data/app/views/alchemy/admin/pictures/_picture.html.erb +3 -3
  80. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +1 -1
  81. data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +1 -1
  82. data/app/views/alchemy/admin/pictures/index.html.erb +1 -1
  83. data/app/views/alchemy/admin/pictures/show.html.erb +3 -3
  84. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +13 -11
  85. data/app/views/alchemy/admin/resources/_per_page_select.html.erb +3 -3
  86. data/app/views/alchemy/admin/resources/index.html.erb +4 -1
  87. data/app/views/alchemy/admin/tags/index.html.erb +14 -15
  88. data/app/views/alchemy/base/500.html.erb +11 -13
  89. data/app/views/alchemy/essences/_essence_file_view.html.erb +3 -3
  90. data/config/alchemy/config.yml +15 -11
  91. data/config/alchemy/modules.yml +12 -12
  92. data/config/locales/alchemy.en.yml +6 -4
  93. data/config/routes.rb +1 -1
  94. data/db/migrate/20200617110713_create_alchemy_picture_thumbs.rb +22 -0
  95. data/db/migrate/20200907111332_remove_tri_state_booleans.rb +33 -0
  96. data/lib/alchemy.rb +66 -0
  97. data/lib/alchemy/admin/preview_url.rb +2 -0
  98. data/lib/alchemy/auth_accessors.rb +12 -5
  99. data/lib/alchemy/config.rb +1 -3
  100. data/lib/alchemy/engine.rb +7 -6
  101. data/lib/alchemy/modules.rb +11 -1
  102. data/lib/alchemy/permissions.rb +1 -0
  103. data/lib/alchemy/test_support/factories/picture_factory.rb +0 -1
  104. data/lib/alchemy/test_support/factories/picture_thumb_factory.rb +12 -0
  105. data/lib/alchemy/test_support/integration_helpers.rb +0 -7
  106. data/lib/alchemy/version.rb +1 -1
  107. data/lib/alchemy_cms.rb +2 -4
  108. data/lib/generators/alchemy/install/files/alchemy.en.yml +2 -2
  109. data/lib/generators/alchemy/install/templates/dragonfly.rb.tt +5 -5
  110. data/lib/tasks/alchemy/thumbnails.rake +37 -0
  111. data/vendor/assets/javascripts/jquery_plugins/select2.js +3729 -0
  112. data/vendor/assets/stylesheets/alchemy_admin/select2.scss +740 -0
  113. metadata +46 -37
  114. data/.github/workflows/greetings.yml +0 -13
  115. data/.travis.yml +0 -48
  116. data/app/controllers/concerns/alchemy/locale_redirects.rb +0 -40
  117. data/app/controllers/concerns/alchemy/page_redirects.rb +0 -68
  118. data/lib/alchemy/userstamp.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6917c640c04335035e6dc96c947904226222acd26dec111b81da71496b40505e
4
- data.tar.gz: d5e33e37d5d5cbacbbb6c3729468548155add079b131524880bdd9c8ff8fd35f
3
+ metadata.gz: 7244fdbb3c06cd1c7375f6006d94e5b5b16a860d62fb9268fedc79a42d52e7fd
4
+ data.tar.gz: 1b46460a9e387144126d5d4d17a905697e6a80dc8d480743dcbd5a0c8c99d3ca
5
5
  SHA512:
6
- metadata.gz: e73a121ef1c1eee8c0dc065a585509cc55f3eeb457e89f4356ab112a6c8347e1209bb6b37f7f865a1f3589f3f4aae07158a8e842874e735e46ebbb1566a689c7
7
- data.tar.gz: d82eb3375db6a20ac410051da9e476b50193b1a72337660a87bc8931d56b674369bb4f1bc9909511b85183f16949a854cdbed6301884db8c59c1016a8b6fa53d
6
+ metadata.gz: e4c138b229e5653765b5ae2ade3a34acdc644a489891ae4664e878e6c7c8ecb32080d76403a167a0d2b05d5349be0903628a6c747cfeae1bec927571d1094928
7
+ data.tar.gz: '08fde58900a7e4359888c5409d59f8492f94025b14f131d69526acef5b0cd4378c39af534624e35edc47b2fa2d55a738db366ae9c349056db3a22ae00277ed6a'
@@ -13,6 +13,6 @@ Explain any changes (maybe breaking?) that have been made.
13
13
  Remove if no visual changes have been made.
14
14
 
15
15
  ## Checklist
16
- - [ ] I have followed [Pull Request guidelines](https://github.com/AlchemyCMS/alchemy_cms/blob/master/CONTRIBUTING.md)
16
+ - [ ] I have followed [Pull Request guidelines](https://github.com/AlchemyCMS/alchemy_cms/blob/main/CONTRIBUTING.md)
17
17
  - [ ] I have added a detailed description into each commit message
18
18
  - [ ] I have added tests to cover this change
@@ -0,0 +1,126 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ RSpec:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ rails:
12
+ - '5.2'
13
+ - '6.0'
14
+ ruby:
15
+ - '2.5.x'
16
+ - '2.6.x'
17
+ database:
18
+ - mysql
19
+ - postgresql
20
+ env:
21
+ DB: ${{ matrix.database }}
22
+ DB_USER: alchemy_user
23
+ DB_PASSWORD: password
24
+ DB_HOST: '127.0.0.1'
25
+ RAILS_ENV: test
26
+ RAILS_VERSION: ${{ matrix.rails }}
27
+ services:
28
+ postgres:
29
+ image: postgres:11
30
+ env:
31
+ POSTGRES_USER: alchemy_user
32
+ POSTGRES_PASSWORD: password
33
+ POSTGRES_DB: alchemy_cms_dummy_test
34
+ ports: ['5432:5432']
35
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
36
+ mysql:
37
+ image: mysql:latest
38
+ ports: ['3306:3306']
39
+ env:
40
+ MYSQL_USER: alchemy_user
41
+ MYSQL_PASSWORD: password
42
+ MYSQL_DATABASE: alchemy_cms_dummy_test
43
+ MYSQL_ROOT_PASSWORD: password
44
+ options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
45
+ steps:
46
+ - uses: actions/checkout@v2.3.4
47
+ - name: Set up Ruby
48
+ uses: actions/setup-ruby@v1.1.2
49
+ with:
50
+ ruby-version: ${{ matrix.ruby }}
51
+ - name: Restore apt cache
52
+ id: apt-cache
53
+ uses: actions/cache@v2.1.3
54
+ with:
55
+ path: /home/runner/apt/cache
56
+ key: ${{ runner.os }}-apt-${{ matrix.database }}
57
+ restore-keys: |
58
+ ${{ runner.os }}-apt-
59
+ - name: Install Postgres headers
60
+ if: matrix.database == 'postgresql'
61
+ run: |
62
+ mkdir -p /home/runner/apt/cache
63
+ sudo apt update -qq
64
+ sudo apt install -qq --fix-missing libpq-dev -o dir::cache::archives="/home/runner/apt/cache"
65
+ sudo chown -R runner /home/runner/apt/cache
66
+ - name: Install MySQL headers
67
+ if: matrix.database == 'mysql'
68
+ run: |
69
+ mkdir -p /home/runner/apt/cache
70
+ sudo apt update -qq
71
+ sudo apt install -qq --fix-missing libmysqlclient-dev -o dir::cache::archives="/home/runner/apt/cache"
72
+ sudo chown -R runner /home/runner/apt/cache
73
+ - name: Install bundler
74
+ run: |
75
+ gem install bundler
76
+ - name: Restore Ruby Gems cache
77
+ id: cache
78
+ uses: actions/cache@v2.1.3
79
+ with:
80
+ path: vendor/bundle
81
+ key: ${{ runner.os }}-bundle-${{ matrix.ruby }}-${{ matrix.rails }}-${{ matrix.database }}-${{ hashFiles('**/Gemfile') }}
82
+ restore-keys: |
83
+ ${{ runner.os }}-bundle-
84
+ - name: Install bundle
85
+ timeout-minutes: 10
86
+ run: |
87
+ bundle install --jobs 4 --retry 3 --path vendor/bundle
88
+ - name: Restore node modules cache
89
+ id: yarn-cache
90
+ uses: actions/cache@v2.1.3
91
+ with:
92
+ path: spec/dummy/node_modules
93
+ key: ${{ runner.os }}-yarn-dummy-${{ hashFiles('./package.json') }}
94
+ restore-keys: |
95
+ ${{ runner.os }}-yarn-dummy-
96
+ - name: Prepare database
97
+ run: |
98
+ bundle exec rake alchemy:spec:prepare
99
+ - name: Run tests & publish code coverage
100
+ uses: paambaati/codeclimate-action@v2.7.5
101
+ env:
102
+ CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
103
+ with:
104
+ coverageCommand: bundle exec rspec
105
+ - uses: actions/upload-artifact@main
106
+ if: failure()
107
+ with:
108
+ name: Screenshots
109
+ path: spec/dummy/tmp/screenshots
110
+ Jest:
111
+ runs-on: ubuntu-latest
112
+ env:
113
+ NODE_ENV: test
114
+ steps:
115
+ - uses: actions/checkout@v2.3.4
116
+ - name: Restore node modules cache
117
+ uses: actions/cache@v2.1.3
118
+ with:
119
+ path: node_modules
120
+ key: ${{ runner.os }}-yarn-${{ hashFiles('./package.json') }}
121
+ restore-keys: |
122
+ ${{ runner.os }}-yarn-
123
+ - name: Install yarn
124
+ run: yarn install
125
+ - name: Run jest
126
+ run: yarn jest
@@ -14,4 +14,4 @@ jobs:
14
14
  with:
15
15
  repo-token: ${{ secrets.GITHUB_TOKEN }}
16
16
  stale-issue-message: 'This issue has not seen any activity in a long time. If the issue described still exists in recent versions of Alchemy, please open a new issue or preferably open a PR with a fix. Thanks for reporting.'
17
- stale-pr-message: 'This pull request has not seen any activiy in a long time. Probably because of missing tests or a necessary rebase. Please open a new PR to latest master if you want to continue working on this. Thanks for the contribution.'
17
+ stale-pr-message: 'This pull request has not seen any activiy in a long time. Probably because of missing tests or a necessary rebase. Please open a new PR to latest main if you want to continue working on this. Thanks for the contribution.'
data/.gitignore CHANGED
@@ -40,3 +40,4 @@ yarn-error.log
40
40
  yarn-debug.log*
41
41
  .yarn-integrity
42
42
  yarn.lock
43
+ /spec/dummy/public/pictures
@@ -1,6 +1,70 @@
1
+ ## 5.1.0 (2020-12-18)
2
+
3
+ ### Features
4
+
5
+ - Allow pound sign in legacy url [#1980](https://github.com/AlchemyCMS/alchemy_cms/pull/1980) ([robinboening](https://github.com/robinboening))
6
+ - Adjust element editor UI [#1979](https://github.com/AlchemyCMS/alchemy_cms/pull/1979) ([tvdeyen](https://github.com/tvdeyen))
7
+ - Always show the full page name in active page tab [#1972](https://github.com/AlchemyCMS/alchemy_cms/pull/1972) ([tvdeyen](https://github.com/tvdeyen))
8
+ - Allow multiple preview sources [#1959](https://github.com/AlchemyCMS/alchemy_cms/pull/1959) ([tvdeyen](https://github.com/tvdeyen))
9
+ - Add Publish Targets [#1957](https://github.com/AlchemyCMS/alchemy_cms/pull/1957) ([tvdeyen](https://github.com/tvdeyen))
10
+ - Persist rendered picture variants [#1882](https://github.com/AlchemyCMS/alchemy_cms/pull/1882) ([tvdeyen](https://github.com/tvdeyen))
11
+ - Store current pictures size in session [#1927](https://github.com/AlchemyCMS/alchemy_cms/pull/1927) ([tvdeyen](https://github.com/tvdeyen))
12
+ - Add support for custom mount points in Page::UrlPath [#1921](https://github.com/AlchemyCMS/alchemy_cms/pull/1921) ([tvdeyen](https://github.com/tvdeyen))
13
+ - Allow to set a custom Page::UrlPath class [#1919](https://github.com/AlchemyCMS/alchemy_cms/pull/1919) ([tvdeyen](https://github.com/tvdeyen))
14
+ - Introduce a pages list view [#1906](https://github.com/AlchemyCMS/alchemy_cms/pull/1906) ([tvdeyen](https://github.com/tvdeyen))
15
+
16
+ ### Changes
17
+
18
+ - Fix height of search input field [#1973](https://github.com/AlchemyCMS/alchemy_cms/pull/1973) ([tvdeyen](https://github.com/tvdeyen))
19
+ - Load select2 from assets folder [#1961](https://github.com/AlchemyCMS/alchemy_cms/pull/1961) ([tvdeyen](https://github.com/tvdeyen))
20
+ - Do not abort if user class cannot be found [#1950](https://github.com/AlchemyCMS/alchemy_cms/pull/1950) ([tvdeyen](https://github.com/tvdeyen))
21
+ - Deprivatize useful picture view methods [#1936](https://github.com/AlchemyCMS/alchemy_cms/pull/1936) ([mickenorlen](https://github.com/mickenorlen))
22
+ - Unset render_size on layout default selection [#1935](https://github.com/AlchemyCMS/alchemy_cms/pull/1935) ([mickenorlen](https://github.com/mickenorlen))
23
+ - Dont show sizes selection if using srcset [#1934](https://github.com/AlchemyCMS/alchemy_cms/pull/1934) ([mickenorlen](https://github.com/mickenorlen))
24
+ - Change all Boolean columns to never be null [#1933](https://github.com/AlchemyCMS/alchemy_cms/pull/1933) ([mamhoff](https://github.com/mamhoff))
25
+ - Autoselect first if only one layout available [#1932](https://github.com/AlchemyCMS/alchemy_cms/pull/1932) ([mickenorlen](https://github.com/mickenorlen))
26
+ - Remove page from search form query [#1928](https://github.com/AlchemyCMS/alchemy_cms/pull/1928) ([tvdeyen](https://github.com/tvdeyen))
27
+ - Allow coffee-rails 5 [#1926](https://github.com/AlchemyCMS/alchemy_cms/pull/1926) ([sechix](https://github.com/sechix))
28
+ - Update documentation [#1917](https://github.com/AlchemyCMS/alchemy_cms/pull/1917) ([dhughesbc](https://github.com/dhughesbc))
29
+ - Remove deprecated Attachment#urlname [#1911](https://github.com/AlchemyCMS/alchemy_cms/pull/1911) ([tvdeyen](https://github.com/tvdeyen))
30
+ - Remove redirect_to_public_child flag and feature [#1910](https://github.com/AlchemyCMS/alchemy_cms/pull/1910) ([tvdeyen](https://github.com/tvdeyen))
31
+ - Remove toolbar helper [#1909](https://github.com/AlchemyCMS/alchemy_cms/pull/1909) ([tvdeyen](https://github.com/tvdeyen))
32
+ - Two minor CSS fixes [#1908](https://github.com/AlchemyCMS/alchemy_cms/pull/1908) ([tvdeyen](https://github.com/tvdeyen))
33
+ - Do not convert JPG images into JPEG [#1905](https://github.com/AlchemyCMS/alchemy_cms/pull/1905) ([tvdeyen](https://github.com/tvdeyen))
34
+ - Full text search respects filters [#1901](https://github.com/AlchemyCMS/alchemy_cms/pull/1901) ([tvdeyen](https://github.com/tvdeyen))
35
+ - Do not add id attributes to hidden fields in search and filters [#1899](https://github.com/AlchemyCMS/alchemy_cms/pull/1899) ([tvdeyen](https://github.com/tvdeyen))
36
+ - Do not freeze common_search_filter_includes [#1898](https://github.com/AlchemyCMS/alchemy_cms/pull/1898) ([tvdeyen](https://github.com/tvdeyen))
37
+ - Refactor sidebar CSS [#1897](https://github.com/AlchemyCMS/alchemy_cms/pull/1897) ([tvdeyen](https://github.com/tvdeyen))
38
+ - Fix tag-list height [#1896](https://github.com/AlchemyCMS/alchemy_cms/pull/1896) ([tvdeyen](https://github.com/tvdeyen))
39
+ - Fix vertical position of site name in page tab [#1895](https://github.com/AlchemyCMS/alchemy_cms/pull/1895) ([tvdeyen](https://github.com/tvdeyen))
40
+ - Support nested controllers in modules [#1894](https://github.com/AlchemyCMS/alchemy_cms/pull/1894) ([tvdeyen](https://github.com/tvdeyen))
41
+ - Always make pages taggable [#1893](https://github.com/AlchemyCMS/alchemy_cms/pull/1893) ([tvdeyen](https://github.com/tvdeyen))
42
+ - Fix editing sites [#1891](https://github.com/AlchemyCMS/alchemy_cms/pull/1891) ([mamhoff](https://github.com/mamhoff))
43
+ - Fix missing help_text_text translations [#1888](https://github.com/AlchemyCMS/alchemy_cms/pull/1888) ([gr8bit](https://github.com/gr8bit))
44
+
45
+ ### Misc
46
+
47
+ - Move away from Travis CI [#1981](https://github.com/AlchemyCMS/alchemy_cms/pull/1981) ([tvdeyen](https://github.com/tvdeyen))
48
+ - Remove poltergeist and phantomjs leftovers [#1970](https://github.com/AlchemyCMS/alchemy_cms/pull/1970) ([tvdeyen](https://github.com/tvdeyen))
49
+ - [ruby - main] Upgrade rubocop to version 1.1.0 [#1958](https://github.com/AlchemyCMS/alchemy_cms/pull/1958) ([depfu](https://github.com/apps/depfu))
50
+ - Remove greetings action [#1956](https://github.com/AlchemyCMS/alchemy_cms/pull/1956) ([tvdeyen](https://github.com/tvdeyen))
51
+ - [ruby] Upgrade rubocop to version 1.0.0 [#1952](https://github.com/AlchemyCMS/alchemy_cms/pull/1952) ([depfu](https://github.com/apps/depfu))
52
+ - [ruby] Upgrade rubocop to version 0.93.1 [#1948](https://github.com/AlchemyCMS/alchemy_cms/pull/1948) ([depfu](https://github.com/apps/depfu))
53
+ - [ruby] Upgrade puma to version 5.0.2 [#1944](https://github.com/AlchemyCMS/alchemy_cms/pull/1944) ([depfu](https://github.com/apps/depfu))
54
+ - [ruby] Upgrade rubocop to version 0.92.0 [#1942](https://github.com/AlchemyCMS/alchemy_cms/pull/1942) ([depfu](https://github.com/apps/depfu))
55
+ - Use Node 12 on CI runs [#1925](https://github.com/AlchemyCMS/alchemy_cms/pull/1925) ([tvdeyen](https://github.com/tvdeyen))
56
+ - [ruby] Upgrade rubocop to version 0.89.0 [#1920](https://github.com/AlchemyCMS/alchemy_cms/pull/1920) ([depfu](https://github.com/apps/depfu))
57
+ - Move back to Travis CI [#1907](https://github.com/AlchemyCMS/alchemy_cms/pull/1907) ([tvdeyen](https://github.com/tvdeyen))
58
+ - [ruby] Upgrade rubocop to version 0.88.0 [#1892](https://github.com/AlchemyCMS/alchemy_cms/pull/1892) ([depfu](https://github.com/apps/depfu))
59
+ - [ruby] Upgrade rubocop to version 0.87.1 [#1889](https://github.com/AlchemyCMS/alchemy_cms/pull/1889) ([depfu](https://github.com/apps/depfu))
60
+
61
+ ## 5.0.2 (2020-12-18)
62
+
63
+ - Fix page sorting [#1984](https://github.com/AlchemyCMS/alchemy_cms/pull/1984) ([tvdeyen](https://github.com/tvdeyen))
64
+
1
65
  ## 5.0.1 (2020-09-29)
2
66
 
3
- - Better image alt text support [#1940](https://github.com/AlchemyCMS/alchemy_cms/pull/1940) ([tvdeyen](https://github.com/tvdeyen))
67
+ - [a11y] Better image alt text support [#1940](https://github.com/AlchemyCMS/alchemy_cms/pull/1940) ([tvdeyen](https://github.com/tvdeyen))
4
68
 
5
69
  ## 5.0.0 (2020-07-17)
6
70
 
@@ -8,7 +72,7 @@
8
72
  - Do not enable image cropper if file is missing [#1903](https://github.com/AlchemyCMS/alchemy_cms/pull/1903) ([tvdeyen](https://github.com/tvdeyen))
9
73
  - Always show original image as zoomed image [#1902](https://github.com/AlchemyCMS/alchemy_cms/pull/1902) ([tvdeyen](https://github.com/tvdeyen))
10
74
  - Rename Attachment#urlname into slug [#1848](https://github.com/AlchemyCMS/alchemy_cms/pull/1848) ([tvdeyen](https://github.com/tvdeyen))
11
- - Deprecate toolbar helper ([tvdeyen](https://github.com/tvdeyen))
75
+ - Deprecate toolbar helper [#1900](https://github.com/AlchemyCMS/alchemy_cms/pull/1900) ([tvdeyen](https://github.com/tvdeyen))
12
76
  - Deprecate redirect_to_public_child ([tvdeyen](https://github.com/tvdeyen))
13
77
  - Add --auto-accept option to installer ([tvdeyen](https://github.com/tvdeyen))
14
78
  - Move all installer code into install generator ([tvdeyen](https://github.com/tvdeyen))
@@ -39,11 +39,11 @@ refactoring and documentation changes require no new tests. If you are adding
39
39
  functionality or fixing a bug, we need tests!
40
40
 
41
41
  4. Push to your fork and submit a pull request. If the changes will apply cleanly
42
- to the latest stable branches and master branch, you will only need to submit one
42
+ to the latest stable branches and main branch, you will only need to submit one
43
43
  pull request.
44
44
 
45
45
  5. If a PR does not apply cleanly to one of its targeted branches, then a separate
46
- PR should be created that does. For instance, if a PR applied to master & 2.7-stable but not 2.8-stable, then there should be one PR for master & 2.7-stable and another, separate PR for 2.8-stable.
46
+ PR should be created that does. For instance, if a PR applied to main & 2.7-stable but not 2.8-stable, then there should be one PR for main & 2.7-stable and another, separate PR for 2.8-stable.
47
47
 
48
48
  At this point you're waiting on us. We like to at least comment on, if not
49
49
  accept pull requests. We may suggest some changes or improvements or alternatives.
data/Gemfile CHANGED
@@ -13,7 +13,7 @@ gem "mysql2", "~> 0.5.1" if ENV["DB"] == "mysql"
13
13
  gem "pg", "~> 1.0" if ENV["DB"] == "postgresql"
14
14
 
15
15
  group :development, :test do
16
- if ENV["TRAVIS"]
16
+ if ENV["GITHUB_ACTIONS"]
17
17
  gem "sassc", "~> 2.4.0" # https://github.com/sass/sassc-ruby/issues/146
18
18
  else
19
19
  gem "launchy"
@@ -22,7 +22,7 @@ group :development, :test do
22
22
  gem "yard"
23
23
  gem "redcarpet"
24
24
  gem "pry-byebug"
25
- gem "rubocop", "~> 0.85.0", require: false
25
+ gem "rubocop", "~> 1.1.0", require: false
26
26
  gem "listen"
27
27
  gem "localeapp", "~> 3.0", require: false
28
28
  gem "dotenv", "~> 2.2"
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # AlchemyCMS
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/alchemy_cms.svg)](http://badge.fury.io/rb/alchemy_cms)
4
- [![Build Status](https://travis-ci.com/AlchemyCMS/alchemy_cms.svg?branch=master)](https://travis-ci.com/AlchemyCMS/alchemy_cms)
4
+ [![Build Status](https://github.com/AlchemyCMS/alchemy_cms/workflows/CI/badge.svg?branch=main)](https://github.com/AlchemyCMS/alchemy_cms/actions)
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/196c56c56568ed24a697/maintainability)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/maintainability)
6
6
  [![Test Coverage](https://api.codeclimate.com/v1/badges/196c56c56568ed24a697/test_coverage)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/test_coverage)
7
7
  [![Depfu](https://badges.depfu.com/badges/ebe56d2dd7b7044a8ae700cc81212a8e/overview.svg)](https://depfu.com/github/AlchemyCMS/alchemy_cms?project_id=4600)
@@ -18,7 +18,7 @@ Alchemy is an open source CMS engine written in Ruby on Rails.
18
18
 
19
19
  Read more about Alchemy on the [website](https://alchemy-cms.com) and in the [guidelines](https://guides.alchemy-cms.com).
20
20
 
21
- **CAUTION: This master branch is a development branch that *can* contain bugs. For productive environments you should use the [current Ruby gem version](https://rubygems.org/gems/alchemy_cms), or the [latest stable branch (4.5-stable)](https://github.com/AlchemyCMS/alchemy_cms/tree/4.5-stable).**
21
+ **CAUTION: This main branch is a development branch that *can* contain bugs. For productive environments you should use the [current Ruby gem version](https://rubygems.org/gems/alchemy_cms), or the [latest stable branch (5.0-stable)](https://github.com/AlchemyCMS/alchemy_cms/tree/5.0-stable).**
22
22
 
23
23
 
24
24
  ## ✅ Features
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
22
22
  gem.add_runtime_dependency 'acts_as_list', ['>= 0.3', '< 2']
23
23
  gem.add_runtime_dependency 'awesome_nested_set', ['~> 3.1']
24
24
  gem.add_runtime_dependency 'cancancan', ['>= 2.1', '< 4.0']
25
- gem.add_runtime_dependency 'coffee-rails', ['~> 4.0', '< 5.0']
25
+ gem.add_runtime_dependency 'coffee-rails', ['>= 4.0', '< 6.0']
26
26
  gem.add_runtime_dependency 'dragonfly', ['~> 1.0', '>= 1.0.7']
27
27
  gem.add_runtime_dependency 'dragonfly_svg', ['~> 0.0.4']
28
28
  gem.add_runtime_dependency 'gutentag', ['~> 2.2', '>= 2.2.1']
@@ -37,7 +37,6 @@ Gem::Specification.new do |gem|
37
37
  gem.add_runtime_dependency 'request_store', ['~> 1.2']
38
38
  gem.add_runtime_dependency 'responders', ['>= 2.0', '< 4.0']
39
39
  gem.add_runtime_dependency 'sassc-rails', ['~> 2.1']
40
- gem.add_runtime_dependency 'select2-rails', ['>= 3.5.9.1', '< 4.0']
41
40
  gem.add_runtime_dependency 'simple_form', ['>= 4.0', '< 6']
42
41
  gem.add_runtime_dependency 'sprockets', ['>= 3.0', '< 5']
43
42
  gem.add_runtime_dependency 'turbolinks', ['>= 2.5']
@@ -46,7 +45,7 @@ Gem::Specification.new do |gem|
46
45
  gem.add_development_dependency 'capybara', ['~> 3.0']
47
46
  gem.add_development_dependency 'capybara-screenshot', ['~> 1.0']
48
47
  gem.add_development_dependency 'factory_bot_rails', ['~> 6.0']
49
- gem.add_development_dependency 'puma', ['~> 4.0']
48
+ gem.add_development_dependency 'puma', ['~> 5.0']
50
49
  gem.add_development_dependency 'rails-controller-testing', ['~> 1.0']
51
50
  gem.add_development_dependency 'rspec-activemodel-mocks', ['~> 1.0']
52
51
  gem.add_development_dependency 'rspec-rails', ['>= 4.0.0.beta2']
@@ -54,6 +53,7 @@ Gem::Specification.new do |gem|
54
53
  gem.add_development_dependency 'webdrivers', ['~> 4.0']
55
54
  gem.add_development_dependency 'webmock', ['~> 3.3']
56
55
  gem.add_development_dependency 'shoulda-matchers', ['~> 4.0']
56
+ gem.add_development_dependency 'timecop', ['~> 0.9']
57
57
 
58
58
  gem.post_install_message = <<-MSG
59
59
  -------------------------------------------------------------
@@ -0,0 +1 @@
1
+ <svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" width="16" height="16"><path fill="#f7f7f7" d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z" class=""></path></svg>
@@ -13,7 +13,6 @@
13
13
  //= require clipboard.min
14
14
  //= require keymaster
15
15
  //= require requestAnimationFrame
16
- //= require select2
17
16
  //= require handlebars
18
17
  //= require alchemy/templates
19
18
  //= require alchemy/alchemy.base
@@ -38,10 +38,7 @@ Alchemy.ElementEditors =
38
38
  @onSaveElement(e, data)
39
39
  # Listen to postMessage messages from the preview frame
40
40
  window.addEventListener 'message', (e) =>
41
- if e.origin == window.location.origin
42
- @onMessage(e.data)
43
- else
44
- console.warn 'Unsafe message origin!', e.origin
41
+ @onMessage(e.data)
45
42
  true
46
43
  return
47
44
 
@@ -22,9 +22,6 @@ Alchemy.initAlchemyPreviewMode = ->
22
22
 
23
23
  init: ->
24
24
  window.addEventListener "message", (event) =>
25
- if event.origin != window.location.origin
26
- console.warn 'Unsafe message origin!', event.origin
27
- return
28
25
  switch event.data.message
29
26
  when "Alchemy.blurElements" then @blurElements()
30
27
  when "Alchemy.focusElement" then @focusElement(event.data)
@@ -4,8 +4,10 @@ Alchemy.PreviewWindow =
4
4
  MIN_WIDTH: 240
5
5
  HEIGHT: 75 # Top menu height
6
6
 
7
- init: (url) ->
8
- $iframe = $("<iframe name=\"alchemy_preview_window\" src=\"#{url}\" id=\"alchemy_preview_window\" frameborder=\"0\"/>")
7
+ init: (previewUrl) ->
8
+ @select = document.querySelector('#preview_url')
9
+ @previewUrl = @_getCurrentPreviewUrl() || previewUrl[1]
10
+ $iframe = $("<iframe name=\"alchemy_preview_window\" src=\"#{@previewUrl}\" id=\"alchemy_preview_window\" frameborder=\"0\"/>")
9
11
  $reload = $('#reload_preview_button')
10
12
  @_showSpinner()
11
13
  $iframe.load =>
@@ -13,6 +15,10 @@ Alchemy.PreviewWindow =
13
15
  $('body').append($iframe)
14
16
  @currentWindow = $iframe
15
17
  @_bindReloadButton()
18
+ if @select
19
+ @select.value = @previewUrl
20
+ @_bindSelect()
21
+ return
16
22
 
17
23
  resize: (width) ->
18
24
  width = @MIN_WIDTH if width < @MIN_WIDTH
@@ -29,12 +35,12 @@ Alchemy.PreviewWindow =
29
35
  @_hideSpinner()
30
36
  if callback
31
37
  callback.call(e, $iframe)
32
- $iframe.attr 'src', $iframe.attr('src')
38
+ $iframe.attr('src', @previewUrl)
33
39
  true
34
40
 
35
41
  postMessage: (data) ->
36
42
  frameWindow = @currentWindow[0].contentWindow
37
- frameWindow.postMessage(data, window.location.origin)
43
+ frameWindow.postMessage(data, "*")
38
44
 
39
45
  _showSpinner: ->
40
46
  @reload = $('#reload_preview_button')
@@ -53,5 +59,24 @@ Alchemy.PreviewWindow =
53
59
  e.preventDefault()
54
60
  @refresh()
55
61
 
62
+ _getCurrentPreviewUrl: ->
63
+ if @select
64
+ option = Array.from(@select.options).find (o) =>
65
+ o.text == window.localStorage.getItem("alchemyPreview")
66
+ if option
67
+ option.value
68
+ else
69
+ null
70
+ else
71
+ null
72
+
73
+ _bindSelect: ->
74
+ $(@select).change (e) =>
75
+ @previewUrl = e.target.value
76
+ option = e.target.querySelector("option[value='#{@previewUrl}']")
77
+ window.localStorage.setItem("alchemyPreview", option.text)
78
+ @refresh()
79
+ return
80
+
56
81
  Alchemy.reloadPreview = ->
57
82
  Alchemy.PreviewWindow.refresh()
@@ -102,6 +102,9 @@ $error_border_color: #c49c9c !default;
102
102
  $error_text_color: #a23434 !default;
103
103
  $error_background_color: #efd3d3 !default;
104
104
 
105
+ $hint-background-color: $light_yellow !default;
106
+ $hint-text-color: $very-dark-gray !default;
107
+
105
108
  $form-left-width: 35% !default;
106
109
  $form-right-width: 65% !default;
107
110
 
@@ -140,9 +143,12 @@ $table-row-hover-color: rgba($light_yellow, 0.5) !default;
140
143
  $elements-window-width: 22.5vw !default;
141
144
  $elements-window-min-width: 400px !default;
142
145
  $element-header-bg-color: $medium-gray !default;
146
+ $element-header-active-bg-color: $dark-blue !default;
147
+ $element-header-active-color: $white !default;
143
148
  $top-menu-height: 75px !default;
144
149
 
145
150
  $tabs-height: 31px !default;
151
+ $pagination-height: 52px !default;
146
152
 
147
153
  $datepicker_current_bg: $blue !default;
148
154
  $datepicker_current_color: $white !default;
@@ -158,6 +164,8 @@ $datepicker_day_color: $text-color !default;
158
164
 
159
165
  $select-hover-bg-color: $dark-blue !default;
160
166
  $select-hover-text-color: $white !default;
167
+ $medium-select-box-width: 90px;
168
+ $large-select-box-width: 120px;
161
169
 
162
170
  $thumbnail-background-color: opacify($default-border-color, 1) !default;
163
171
  $medium-screen-break-point: 700px;