alchemy_cms 4.5.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of alchemy_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +23 -17
- data/.rubocop.yml +7 -15
- data/CHANGELOG.md +17 -0
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +5 -5
- data/app/assets/javascripts/alchemy/templates/page.hbs +1 -1
- data/app/assets/stylesheets/alchemy/_mixins.scss +2 -3
- data/app/assets/stylesheets/alchemy/_variables.scss +2 -2
- data/app/assets/stylesheets/alchemy/lists.scss +0 -8
- data/app/assets/stylesheets/alchemy/nodes.scss +1 -1
- data/app/assets/stylesheets/alchemy/sitemap.scss +59 -21
- data/app/controllers/alchemy/admin/pages_controller.rb +0 -1
- data/app/controllers/alchemy/api/pages_controller.rb +2 -0
- data/app/decorators/alchemy/content_editor.rb +55 -0
- data/app/helpers/alchemy/admin/pages_helper.rb +16 -16
- data/app/models/alchemy/content.rb +8 -22
- data/app/models/alchemy/node.rb +8 -7
- data/app/models/alchemy/page.rb +11 -0
- data/app/models/alchemy/page/url_path.rb +66 -0
- data/app/serializers/alchemy/page_serializer.rb +2 -1
- data/app/serializers/alchemy/page_tree_serializer.rb +4 -3
- data/app/views/alchemy/admin/layoutpages/index.html.erb +5 -1
- data/app/views/alchemy/admin/nodes/_form.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_form.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_menu_fields.html.erb +33 -29
- data/app/views/alchemy/admin/pages/_page.html.erb +3 -6
- data/app/views/alchemy/admin/pages/_sitemap.html.erb +6 -0
- data/app/views/alchemy/admin/pages/info.html.erb +1 -1
- data/config/alchemy/config.yml +0 -6
- data/config/locales/alchemy.en.yml +6 -6
- data/lib/alchemy/config.rb +30 -2
- data/lib/alchemy/ssl_protection.rb +3 -1
- data/lib/alchemy/upgrader/four_point_six.rb +50 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/tasks/alchemy/convert.rake +2 -0
- data/lib/tasks/alchemy/upgrade.rake +67 -46
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f321858feead1aacab75385da9c01e7a8db1018adaf2e5f2ccb714be4c8edf44
|
4
|
+
data.tar.gz: 68ae5e042e449693217ab9390a04b5a6bab6d6810011e1c0aaaf8c3f80065f43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78af2956df792c714818a8cdf91b3e3d87afa53c62617dd2d373eb168ce0bcc62c561f1a1343cb1ee9515f827a45e671330d1622abac789cdcff27b1658d1a8e
|
7
|
+
data.tar.gz: 54995595358bd0692c01892f4c1fc2691725f0e89846483c2d23bb519304e90177997ef61f4fb37e760100e10baf28dc4d8a3664ff1a9e4c431e64f2ce2bc5da
|
data/.github/workflows/ci.yml
CHANGED
@@ -19,9 +19,9 @@ jobs:
|
|
19
19
|
- postgresql
|
20
20
|
env:
|
21
21
|
DB: ${{ matrix.database }}
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
DB_USER: alchemy_user
|
23
|
+
DB_PASSWORD: password
|
24
|
+
DB_HOST: '127.0.0.1'
|
25
25
|
RAILS_ENV: test
|
26
26
|
RAILS_VERSION: ${{ matrix.rails }}
|
27
27
|
CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
|
@@ -29,11 +29,20 @@ jobs:
|
|
29
29
|
postgres:
|
30
30
|
image: postgres:11
|
31
31
|
env:
|
32
|
-
POSTGRES_USER:
|
32
|
+
POSTGRES_USER: alchemy_user
|
33
33
|
POSTGRES_PASSWORD: password
|
34
34
|
POSTGRES_DB: alchemy_cms_dummy_test
|
35
35
|
ports: ['5432:5432']
|
36
36
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
37
|
+
mysql:
|
38
|
+
image: mysql:latest
|
39
|
+
ports: ['3306:3306']
|
40
|
+
env:
|
41
|
+
MYSQL_USER: alchemy_user
|
42
|
+
MYSQL_PASSWORD: password
|
43
|
+
MYSQL_DATABASE: alchemy_cms_dummy_test
|
44
|
+
MYSQL_ROOT_PASSWORD: password
|
45
|
+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
|
37
46
|
steps:
|
38
47
|
- uses: actions/checkout@v1
|
39
48
|
- name: Set up Ruby
|
@@ -52,15 +61,15 @@ jobs:
|
|
52
61
|
if: matrix.database == 'postgresql'
|
53
62
|
run: |
|
54
63
|
mkdir -p /home/runner/apt/cache
|
55
|
-
sudo apt
|
56
|
-
sudo apt
|
64
|
+
sudo apt update -qq
|
65
|
+
sudo apt install -qq --fix-missing libpq-dev -o dir::cache::archives="/home/runner/apt/cache"
|
57
66
|
sudo chown -R runner /home/runner/apt/cache
|
58
67
|
- name: Install MySQL headers
|
59
68
|
if: matrix.database == 'mysql'
|
60
69
|
run: |
|
61
70
|
mkdir -p /home/runner/apt/cache
|
62
|
-
sudo apt
|
63
|
-
sudo apt
|
71
|
+
sudo apt update -qq
|
72
|
+
sudo apt install -qq --fix-missing libmysqlclient-dev -o dir::cache::archives="/home/runner/apt/cache"
|
64
73
|
sudo chown -R runner /home/runner/apt/cache
|
65
74
|
- name: Install bundler
|
66
75
|
run: |
|
@@ -80,15 +89,12 @@ jobs:
|
|
80
89
|
- name: Prepare database
|
81
90
|
run: |
|
82
91
|
bundle exec rake alchemy:spec:prepare
|
83
|
-
- name:
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
run: |
|
90
|
-
bundle exec rspec
|
91
|
-
./cc-test-reporter after-build --exit-code $?
|
92
|
+
- name: Run tests & publish code coverage
|
93
|
+
uses: paambaati/codeclimate-action@v2.5.7
|
94
|
+
env:
|
95
|
+
CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
|
96
|
+
with:
|
97
|
+
coverageCommand: bundle exec rspec
|
92
98
|
- uses: actions/upload-artifact@master
|
93
99
|
if: failure()
|
94
100
|
with:
|
data/.rubocop.yml
CHANGED
@@ -9,17 +9,12 @@ AllCops:
|
|
9
9
|
- 'alchemy_cms.gemspec'
|
10
10
|
- 'Rakefile'
|
11
11
|
|
12
|
-
TargetRubyVersion: 2.
|
12
|
+
TargetRubyVersion: 2.4
|
13
13
|
|
14
14
|
# Really, rubocop?
|
15
15
|
Bundler/OrderedGems:
|
16
16
|
Enabled: false
|
17
17
|
|
18
|
-
# Sometimes I believe this reads better
|
19
|
-
# This also causes spacing issues on multi-line fixes
|
20
|
-
Style/BracesAroundHashParameters:
|
21
|
-
Enabled: false
|
22
|
-
|
23
18
|
Style/EmptyLiteral:
|
24
19
|
Enabled: false
|
25
20
|
|
@@ -55,13 +50,10 @@ Style/MixinUsage:
|
|
55
50
|
Exclude:
|
56
51
|
- spec/**/*
|
57
52
|
|
58
|
-
|
59
|
-
Enabled: false
|
60
|
-
|
61
|
-
Layout/AlignHash:
|
53
|
+
Layout/HashAlignment:
|
62
54
|
Enabled: false
|
63
55
|
|
64
|
-
Layout/
|
56
|
+
Layout/ParameterAlignment:
|
65
57
|
Enabled: false
|
66
58
|
|
67
59
|
Layout/ClosingParenthesisIndentation:
|
@@ -77,13 +69,13 @@ Layout/ElseAlignment:
|
|
77
69
|
Layout/EmptyLineAfterMagicComment:
|
78
70
|
Enabled: false
|
79
71
|
|
80
|
-
Layout/
|
72
|
+
Layout/FirstArrayElementIndentation:
|
81
73
|
Enabled: false
|
82
74
|
|
83
|
-
Layout/
|
75
|
+
Layout/FirstHashElementIndentation:
|
84
76
|
Enabled: false
|
85
77
|
|
86
|
-
Layout/
|
78
|
+
Layout/HeredocIndentation:
|
87
79
|
EnforcedStyle: active_support
|
88
80
|
|
89
81
|
Layout/IndentationWidth:
|
@@ -115,7 +107,7 @@ Layout/SpaceInsideParens:
|
|
115
107
|
Layout/EndAlignment:
|
116
108
|
Enabled: false
|
117
109
|
|
118
|
-
Lint/
|
110
|
+
Lint/SuppressedException:
|
119
111
|
Exclude:
|
120
112
|
- 'config/initializers/mini_profiler.rb'
|
121
113
|
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
## 5.0.0 (unreleased)
|
2
2
|
|
3
|
+
## 4.6.0 (2020-06-04)
|
4
|
+
|
5
|
+
- Use apt update instead of apt-get in GH action [#1865](https://github.com/AlchemyCMS/alchemy_cms/pull/1865) ([tvdeyen](https://github.com/tvdeyen))
|
6
|
+
- Use depth for page tree serializer root_or_leaf [#1864](https://github.com/AlchemyCMS/alchemy_cms/pull/1864) ([tvdeyen](https://github.com/tvdeyen))
|
7
|
+
- Fix sitemap wrapper height [#1861](https://github.com/AlchemyCMS/alchemy_cms/pull/1861) ([tvdeyen](https://github.com/tvdeyen))
|
8
|
+
- Do not return the root page with API responses. [#1860](https://github.com/AlchemyCMS/alchemy_cms/pull/1860) ([tvdeyen](https://github.com/tvdeyen))
|
9
|
+
- Introduce page.url_path and use it for alchemyPageSelect [#1859](https://github.com/AlchemyCMS/alchemy_cms/pull/1859) ([tvdeyen](https://github.com/tvdeyen))
|
10
|
+
- Update Urlname translation [#1857](https://github.com/AlchemyCMS/alchemy_cms/pull/1857) ([tvdeyen](https://github.com/tvdeyen))
|
11
|
+
- Show url name in Page tree [#1856](https://github.com/AlchemyCMS/alchemy_cms/pull/1856) ([tvdeyen](https://github.com/tvdeyen))
|
12
|
+
- Deprecate Page#visible attribute [#1855](https://github.com/AlchemyCMS/alchemy_cms/pull/1855) ([tvdeyen](https://github.com/tvdeyen))
|
13
|
+
- 4.6: Re-add `auto_logout_time` configuration option [#1852](https://github.com/AlchemyCMS/alchemy_cms/pull/1852) ([mamhoff](https://github.com/mamhoff))
|
14
|
+
- Backport ContentEditor to 4.6, deprecate removed methods on `Alchemy::Content` [#1847](https://github.com/AlchemyCMS/alchemy_cms/pull/1847) ([mamhoff](https://github.com/mamhoff))
|
15
|
+
- Deprecate auto_logout_time (4.6) [#1843](https://github.com/AlchemyCMS/alchemy_cms/pull/1843) ([tvdeyen](https://github.com/tvdeyen))
|
16
|
+
- Deprecate require_ssl (4.6) [#1842](https://github.com/AlchemyCMS/alchemy_cms/pull/1842) ([tvdeyen](https://github.com/tvdeyen))
|
17
|
+
- Deprecate url_nesting configuration (4.6) [#1841](https://github.com/AlchemyCMS/alchemy_cms/pull/1841) ([tvdeyen](https://github.com/tvdeyen))
|
18
|
+
- Allow page visible toggle (4.6) [#1838](https://github.com/AlchemyCMS/alchemy_cms/pull/1838) ([tvdeyen](https://github.com/tvdeyen))
|
19
|
+
|
3
20
|
## 4.5.0 (2020-03-30)
|
4
21
|
|
5
22
|
- Sortable menus [#1758](https://github.com/AlchemyCMS/alchemy_cms/pull/1758) ([mamhoff](https://github.com/mamhoff))
|
@@ -76,16 +76,16 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
|
|
76
76
|
meta = data.meta
|
77
77
|
results:
|
78
78
|
data.pages.map (page) ->
|
79
|
-
id:
|
79
|
+
id: page.url_path
|
80
80
|
name: page.name
|
81
|
-
|
81
|
+
url_path: page.url_path
|
82
82
|
page_id: page.id
|
83
83
|
more: meta.page * meta.per_page < meta.total_count
|
84
84
|
initSelection: ($element, callback) =>
|
85
85
|
urlname = $element.val()
|
86
86
|
$.get Alchemy.routes.api_pages_path,
|
87
87
|
q:
|
88
|
-
urlname_eq: urlname.replace(
|
88
|
+
urlname_eq: urlname.replace(/^\/([a-z]{2}(-[A-Z]{2})?\/)?/, '')
|
89
89
|
page: 1
|
90
90
|
per_page: 1,
|
91
91
|
(data) =>
|
@@ -93,9 +93,9 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
|
|
93
93
|
if page
|
94
94
|
@initElementSelect(page.id)
|
95
95
|
callback
|
96
|
-
id:
|
96
|
+
id: page.url_path
|
97
97
|
name: page.name
|
98
|
-
|
98
|
+
url_path: page.url_path
|
99
99
|
page_id: page.id
|
100
100
|
formatSelection: (page) ->
|
101
101
|
page.name
|
@@ -76,7 +76,7 @@ $button-text-shadow: none !default;
|
|
76
76
|
$button-box-shadow: 0px 1px 1px -1px #333 !default;
|
77
77
|
$button-focus-box-shadow: 0px 1px 1px 0px $button-focus-border-color !default;
|
78
78
|
$button-padding: 0.55em 2em !default;
|
79
|
-
$small-button-padding: 0.4em
|
79
|
+
$small-button-padding: 0.4em 0.8em !default;
|
80
80
|
$button-margin: $form-field-margin !default;
|
81
81
|
|
82
82
|
$secondary-button-bg-color: transparent !default;
|
@@ -108,7 +108,7 @@ $form-right-width: 65% !default;
|
|
108
108
|
$sitemap-line-height: 32px !default;
|
109
109
|
$sitemap-page-background-color: rgba($white, 0.75) !default;
|
110
110
|
$sitemap-page-hover-color: rgba($light_yellow, 0.5) !default;
|
111
|
-
$sitemap-info-background-color: rgba($
|
111
|
+
$sitemap-info-background-color: rgba($white, 0.5) !default;
|
112
112
|
$sitemap-highlight-color: rgba(#fffba5, 0.5) !default;
|
113
113
|
|
114
114
|
$main-menu-width: 150px !default;
|
@@ -1,3 +1,6 @@
|
|
1
|
+
$sitemap-url-large-width: 250px;
|
2
|
+
$sitemap-url-xlarge-width: 350px;
|
3
|
+
|
1
4
|
#sort_panel {
|
2
5
|
background: $light-gray;
|
3
6
|
padding: 47px 0 8px 0;
|
@@ -20,7 +23,7 @@
|
|
20
23
|
|
21
24
|
#sitemap-wrapper {
|
22
25
|
position: relative;
|
23
|
-
min-height:
|
26
|
+
min-height: calc(100vh - 96px);
|
24
27
|
}
|
25
28
|
|
26
29
|
.sitemap_pagename_link {
|
@@ -28,23 +31,35 @@
|
|
28
31
|
padding: 0 10px;
|
29
32
|
margin: 2px;
|
30
33
|
text-decoration: none;
|
34
|
+
white-space: nowrap;
|
35
|
+
text-overflow: ellipsis;
|
36
|
+
overflow: hidden;
|
31
37
|
|
32
38
|
&.inactive {
|
33
39
|
color: #656565;
|
34
40
|
}
|
35
41
|
}
|
36
42
|
|
37
|
-
.
|
43
|
+
.sitemap_url {
|
44
|
+
display: none;
|
38
45
|
float: right;
|
39
|
-
text-align: right;
|
40
46
|
background-color: $sitemap-info-background-color;
|
41
|
-
line-height: $sitemap-line-height;
|
47
|
+
line-height: $sitemap-line-height - 2px;
|
42
48
|
font-size: $small-font-size;
|
43
|
-
padding: 0 2
|
44
|
-
max-width: 45%;
|
49
|
+
padding: 0 2 * $default-padding;
|
45
50
|
white-space: nowrap;
|
46
51
|
overflow: hidden;
|
47
52
|
text-overflow: ellipsis;
|
53
|
+
border: 1px solid $sitemap-page-background-color;
|
54
|
+
|
55
|
+
@media screen and (min-width: $large-screen-break-point) {
|
56
|
+
display: block;
|
57
|
+
width: $sitemap-url-large-width;
|
58
|
+
}
|
59
|
+
|
60
|
+
@media screen and (min-width: 1440px) {
|
61
|
+
width: $sitemap-url-xlarge-width;
|
62
|
+
}
|
48
63
|
}
|
49
64
|
|
50
65
|
.sitemap_line_spacer {
|
@@ -55,7 +70,7 @@
|
|
55
70
|
|
56
71
|
.sitemap_page {
|
57
72
|
height: $sitemap-line-height;
|
58
|
-
margin: 3
|
73
|
+
margin: 3 * $default-margin 0;
|
59
74
|
position: relative;
|
60
75
|
transition: background-color $transition-duration;
|
61
76
|
|
@@ -89,13 +104,13 @@
|
|
89
104
|
width: 32px;
|
90
105
|
line-height: $sitemap-line-height;
|
91
106
|
float: left;
|
92
|
-
padding: 0 2
|
107
|
+
padding: 0 2 * $default-padding;
|
93
108
|
text-align: center;
|
94
109
|
}
|
95
110
|
|
96
111
|
.sitemap_right_tools {
|
97
112
|
height: $sitemap-line-height;
|
98
|
-
padding: 0 2
|
113
|
+
padding: 0 2 * $default-padding;
|
99
114
|
float: right;
|
100
115
|
|
101
116
|
.sitemap_tool {
|
@@ -130,7 +145,9 @@
|
|
130
145
|
&.sorting {
|
131
146
|
padding-top: 100px;
|
132
147
|
|
133
|
-
.page_icon {
|
148
|
+
.page_icon {
|
149
|
+
cursor: move;
|
150
|
+
}
|
134
151
|
}
|
135
152
|
|
136
153
|
.page_folder {
|
@@ -183,25 +200,44 @@
|
|
183
200
|
}
|
184
201
|
|
185
202
|
#sitemap_heading {
|
203
|
+
display: flex;
|
186
204
|
padding: 0;
|
187
|
-
|
188
|
-
.page_infos {
|
189
|
-
margin-right: 210px;
|
190
|
-
text-align: left;
|
191
|
-
float: right;
|
192
|
-
line-height: 28px;
|
193
|
-
background: transparent;
|
194
|
-
}
|
205
|
+
line-height: 28px;
|
195
206
|
|
196
207
|
.page_name {
|
197
|
-
line-height: 28px;
|
198
208
|
margin-left: 43px;
|
199
209
|
}
|
210
|
+
|
211
|
+
.page_urlname {
|
212
|
+
display: none;
|
213
|
+
margin-left: auto;
|
214
|
+
padding-left: 2 * $default-padding;
|
215
|
+
padding-right: 2 * $default-padding;
|
216
|
+
|
217
|
+
@media screen and (min-width: $large-screen-break-point) {
|
218
|
+
display: block;
|
219
|
+
width: $sitemap-url-large-width;
|
220
|
+
}
|
221
|
+
|
222
|
+
@media screen and (min-width: 1440px) {
|
223
|
+
width: $sitemap-url-xlarge-width;
|
224
|
+
}
|
225
|
+
}
|
226
|
+
|
227
|
+
.page_status {
|
228
|
+
padding-left: 2 * $default-padding;
|
229
|
+
margin-right: 214px;
|
230
|
+
margin-left: auto;
|
231
|
+
|
232
|
+
@media screen and (min-width: $large-screen-break-point) {
|
233
|
+
margin-left: initial;
|
234
|
+
}
|
235
|
+
}
|
200
236
|
}
|
201
237
|
|
202
238
|
#page_filter_result {
|
203
239
|
display: none;
|
204
|
-
margin-left: 2
|
240
|
+
margin-left: 2 * $default-margin;
|
205
241
|
}
|
206
242
|
|
207
243
|
.alchemy-dialog {
|
@@ -213,6 +249,8 @@
|
|
213
249
|
margin: 0;
|
214
250
|
padding: 0 24px 8px 8px;
|
215
251
|
|
216
|
-
.page_icon {
|
252
|
+
.page_icon {
|
253
|
+
cursor: default;
|
254
|
+
}
|
217
255
|
}
|
218
256
|
}
|
@@ -13,6 +13,7 @@ module Alchemy
|
|
13
13
|
else
|
14
14
|
@pages = Page.accessible_by(current_ability, :index)
|
15
15
|
end
|
16
|
+
@pages = @pages.where.not(parent_id: nil)
|
16
17
|
@pages = @pages.includes(*page_includes)
|
17
18
|
if params[:page_layout].present?
|
18
19
|
Alchemy::Deprecation.warn <<~WARN
|
@@ -104,6 +105,7 @@ module Alchemy
|
|
104
105
|
[
|
105
106
|
:tags,
|
106
107
|
{
|
108
|
+
language: :site,
|
107
109
|
elements: [
|
108
110
|
{
|
109
111
|
nested_elements: [
|