alchemy_cms 6.0.0.b3 → 6.0.0.pre.b4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +14 -2
- data/Rakefile +37 -23
- data/app/assets/stylesheets/alchemy/fonts.scss +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.svg +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.svg +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/anchor.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/loader.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/object.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/trans.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +0 -0
- data/app/helpers/alchemy/elements_block_helper.rb +6 -0
- data/app/models/alchemy/element.rb +0 -14
- data/app/models/alchemy/page/page_natures.rb +1 -10
- data/app/models/alchemy/page.rb +3 -3
- data/app/models/alchemy/page_version.rb +1 -1
- data/app/views/alchemy/admin/elements/update.js.erb +1 -1
- data/app/views/alchemy/admin/pages/edit.html.erb +1 -1
- data/lib/alchemy/tinymce.rb +4 -0
- data/lib/alchemy/version.rb +1 -1
- data/package.json +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb49f5d73d0fe450fc5b15c1a31b8ea9db3c281a0ffbc10ea41fac56617f0ba8
|
4
|
+
data.tar.gz: a0a78888094965fc097dcfe0642ef1ea22905300abff1659257d8ae2b7990670
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ce83617901077c47a15d5e3e3ec48e3f78ff1c879a18467a44aab0c20d69b59f4a7eb698b49688ca6e7d5cd45b1127196084943c4604d7474ea588eeae176e9
|
7
|
+
data.tar.gz: 6e13fe6a39778668e02f5f09c475db1029f28fb42f8f439464798f017169ee28247f45e3a444c5c82a88d2d928cbdc4492ce5ba4d21dea509e61cb8098b8102f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## 6.0.0-b4 (2021-08-27)
|
2
|
+
|
3
|
+
- Load custom Tinymce config for ingredients [#2182](https://github.com/AlchemyCMS/alchemy_cms/pull/2182) ([tvdeyen](https://github.com/tvdeyen))
|
4
|
+
- Fix ingredient editor selector in element update callback [#2181](https://github.com/AlchemyCMS/alchemy_cms/pull/2181) ([tvdeyen](https://github.com/tvdeyen))
|
5
|
+
- Ingredient by role block level helper [#2180](https://github.com/AlchemyCMS/alchemy_cms/pull/2180) ([tvdeyen](https://github.com/tvdeyen))
|
6
|
+
- Fixes caching [#2179](https://github.com/AlchemyCMS/alchemy_cms/pull/2179) ([tvdeyen](https://github.com/tvdeyen))
|
7
|
+
- make images non-executable [#2176](https://github.com/AlchemyCMS/alchemy_cms/pull/2176) ([mensfeld](https://github.com/mensfeld))
|
8
|
+
- Release task [#2173](https://github.com/AlchemyCMS/alchemy_cms/pull/2173) ([tvdeyen](https://github.com/tvdeyen))
|
9
|
+
|
1
10
|
## 6.0.0.b3 (2021-08-12)
|
2
11
|
|
3
12
|
### Fixes
|
data/README.md
CHANGED
@@ -339,6 +339,10 @@ $ bin/rails s
|
|
339
339
|
|
340
340
|
## 📦 Releasing
|
341
341
|
|
342
|
+
### Bump version
|
343
|
+
|
344
|
+
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).
|
345
|
+
|
342
346
|
### Update the changelog
|
343
347
|
|
344
348
|
```bash
|
@@ -346,12 +350,20 @@ $ export GITHUB_ACCESS_TOKEN=...
|
|
346
350
|
$ PREVIOUS_VERSION=4.1.0 bundle exec rake alchemy:changelog:update
|
347
351
|
```
|
348
352
|
|
349
|
-
###
|
353
|
+
### Commit version bump
|
350
354
|
|
351
355
|
```bash
|
352
|
-
$
|
356
|
+
$ git commit -am "Bump version to vX.Y.Z"
|
353
357
|
```
|
354
358
|
|
359
|
+
### Release a new version
|
360
|
+
|
361
|
+
This task will publish both the ruby gem and the npm package.
|
362
|
+
It also tags the latest commit.
|
363
|
+
|
364
|
+
```bash
|
365
|
+
$ bundle exec rake alchemy:release
|
366
|
+
```
|
355
367
|
|
356
368
|
## ❓Getting Help
|
357
369
|
|
data/Rakefile
CHANGED
@@ -1,37 +1,37 @@
|
|
1
1
|
begin
|
2
|
-
require
|
2
|
+
require "bundler/setup"
|
3
3
|
rescue LoadError
|
4
|
-
puts
|
4
|
+
puts "You must `gem install bundler` and `bundle install` to run rake tasks"
|
5
5
|
end
|
6
6
|
|
7
7
|
begin
|
8
|
-
require
|
8
|
+
require "rdoc/task"
|
9
9
|
rescue LoadError
|
10
|
-
require
|
11
|
-
require
|
10
|
+
require "rdoc/rdoc"
|
11
|
+
require "rake/rdoctask"
|
12
12
|
RDoc::Task = Rake::RDocTask
|
13
13
|
end
|
14
14
|
|
15
|
-
desc
|
15
|
+
desc "Generate documentation for Alchemy CMS."
|
16
16
|
RDoc::Task.new(:rdoc) do |rdoc|
|
17
|
-
rdoc.rdoc_dir =
|
18
|
-
rdoc.title
|
19
|
-
rdoc.options <<
|
20
|
-
rdoc.rdoc_files.include(
|
21
|
-
rdoc.rdoc_files.include(
|
22
|
-
rdoc.rdoc_files.include(
|
23
|
-
rdoc.rdoc_files.include(
|
17
|
+
rdoc.rdoc_dir = "rdoc"
|
18
|
+
rdoc.title = "Alchemy CMS"
|
19
|
+
rdoc.options << "--line-numbers" << "--inline-source"
|
20
|
+
rdoc.rdoc_files.include("README.md")
|
21
|
+
rdoc.rdoc_files.include("config/alchemy/*.yml")
|
22
|
+
rdoc.rdoc_files.include("lib/**/*.rb")
|
23
|
+
rdoc.rdoc_files.include("app/**/*.rb")
|
24
24
|
end
|
25
25
|
|
26
|
-
APP_RAKEFILE = File.expand_path(
|
27
|
-
load
|
26
|
+
APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
|
27
|
+
load "rails/tasks/engine.rake"
|
28
28
|
|
29
|
-
require
|
30
|
-
require
|
29
|
+
require "rspec/core"
|
30
|
+
require "rspec/core/rake_task"
|
31
31
|
|
32
32
|
RSpec::Core::RakeTask.new(:spec)
|
33
33
|
|
34
|
-
task default: [
|
34
|
+
task default: ["alchemy:spec:prepare", :spec]
|
35
35
|
|
36
36
|
Bundler::GemHelper.install_tasks
|
37
37
|
|
@@ -56,11 +56,11 @@ namespace :alchemy do
|
|
56
56
|
namespace :changelog do
|
57
57
|
desc "Update CHANGELOG from GitHub (Set GITHUB_ACCESS_TOKEN and PREVIOUS_VERSION to a version you want to write changelog changes for)"
|
58
58
|
task :update do
|
59
|
-
original_file =
|
60
|
-
new_file = original_file +
|
61
|
-
backup = original_file +
|
62
|
-
changes = `git rev-list v#{ENV[
|
63
|
-
File.open(new_file,
|
59
|
+
original_file = "./CHANGELOG.md"
|
60
|
+
new_file = original_file + ".new"
|
61
|
+
backup = original_file + ".old"
|
62
|
+
changes = `git rev-list v#{ENV["PREVIOUS_VERSION"]}..HEAD | bundle exec github_fast_changelog AlchemyCMS/alchemy_cms`
|
63
|
+
File.open(new_file, "w") do |fo|
|
64
64
|
fo.puts changes
|
65
65
|
File.foreach(original_file) do |li|
|
66
66
|
fo.puts li
|
@@ -72,4 +72,18 @@ namespace :alchemy do
|
|
72
72
|
File.delete(backup)
|
73
73
|
end
|
74
74
|
end
|
75
|
+
|
76
|
+
desc "Release a new Ruby gem and npm package in one command"
|
77
|
+
task :release do
|
78
|
+
require "json"
|
79
|
+
require_relative "lib/alchemy/version"
|
80
|
+
package = File.read("package.json")
|
81
|
+
unless JSON.parse(package)["version"] == Alchemy.version
|
82
|
+
abort "Ruby gem and npm package versions are out of sync! Please fix."
|
83
|
+
end
|
84
|
+
# Release the Ruby gem with bundler
|
85
|
+
Rake::Task["release"].invoke
|
86
|
+
# Publish npm package via CLI
|
87
|
+
system "npm publish"
|
88
|
+
end
|
75
89
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -77,6 +77,12 @@ module Alchemy
|
|
77
77
|
end
|
78
78
|
|
79
79
|
deprecate essence: "Use `ingredient_by_role` instead", deprecator: Alchemy::Deprecation
|
80
|
+
|
81
|
+
# Return's the ingredient record by given role.
|
82
|
+
#
|
83
|
+
def ingredient_by_role(role)
|
84
|
+
element.ingredient_by_role(role)
|
85
|
+
end
|
80
86
|
end
|
81
87
|
|
82
88
|
# Block-level helper for element views. Constructs a DOM element wrapping
|
@@ -267,20 +267,6 @@ module Alchemy
|
|
267
267
|
"alchemy/elements/#{name}"
|
268
268
|
end
|
269
269
|
|
270
|
-
# Returns the key that's taken for cache path.
|
271
|
-
#
|
272
|
-
# Uses the page's +published_at+ value that's updated when the user publishes the page.
|
273
|
-
#
|
274
|
-
# If the page is the current preview it uses the element's updated_at value as cache key.
|
275
|
-
#
|
276
|
-
def cache_key
|
277
|
-
if Page.current_preview == page
|
278
|
-
"alchemy/elements/#{id}-#{updated_at}"
|
279
|
-
else
|
280
|
-
"alchemy/elements/#{id}-#{page.published_at}"
|
281
|
-
end
|
282
|
-
end
|
283
|
-
|
284
270
|
# A collection of element names that can be nested inside this element.
|
285
271
|
def nestable_elements
|
286
272
|
definition.fetch("nestable_elements", [])
|
@@ -110,22 +110,13 @@ module Alchemy
|
|
110
110
|
# If the page is the current preview it uses the updated_at value as cache key.
|
111
111
|
#
|
112
112
|
def cache_key
|
113
|
-
if Page.current_preview ==
|
113
|
+
if Page.current_preview == id
|
114
114
|
"alchemy/pages/#{id}-#{updated_at}"
|
115
115
|
else
|
116
116
|
"alchemy/pages/#{id}-#{published_at}"
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
-
# We use the published_at value for the cache_key.
|
121
|
-
#
|
122
|
-
# If no published_at value is set yet, i.e. because it was never published,
|
123
|
-
# we return the updated_at value.
|
124
|
-
#
|
125
|
-
def published_at
|
126
|
-
read_attribute(:published_at) || updated_at
|
127
|
-
end
|
128
|
-
|
129
120
|
# Returns true if the page cache control headers should be set.
|
130
121
|
#
|
131
122
|
# == Disable Alchemy's page caching globally
|
data/app/models/alchemy/page.rb
CHANGED
@@ -198,13 +198,13 @@ module Alchemy
|
|
198
198
|
%w[name urlname title]
|
199
199
|
end
|
200
200
|
|
201
|
-
# Used to store the current page previewed in the edit page template.
|
201
|
+
# Used to store the current page id previewed in the edit page template.
|
202
202
|
#
|
203
203
|
def current_preview=(page)
|
204
|
-
RequestStore.store[:alchemy_current_preview] = page
|
204
|
+
RequestStore.store[:alchemy_current_preview] = page&.id
|
205
205
|
end
|
206
206
|
|
207
|
-
# Returns the current page previewed in the edit page template.
|
207
|
+
# Returns the current page id previewed in the edit page template.
|
208
208
|
#
|
209
209
|
def current_preview
|
210
210
|
RequestStore.store[:alchemy_current_preview]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Alchemy
|
4
4
|
class PageVersion < BaseRecord
|
5
|
-
belongs_to :page, class_name: "Alchemy::Page", inverse_of: :versions
|
5
|
+
belongs_to :page, class_name: "Alchemy::Page", inverse_of: :versions, touch: true
|
6
6
|
|
7
7
|
has_many :elements, -> { order(:position) },
|
8
8
|
class_name: "Alchemy::Element",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
(function() {
|
2
2
|
var $el = $('#element_<%= @element.id %>');
|
3
3
|
var $errors = $('#element_<%= @element.id %>_errors');
|
4
|
-
$('> .element-content .content_editor, > .element-content .
|
4
|
+
$('> .element-content .content_editor, > .element-content .ingredient-editor', $el).removeClass('validation_failed');
|
5
5
|
|
6
6
|
<%- if @element_validated -%>
|
7
7
|
|
data/lib/alchemy/tinymce.rb
CHANGED
@@ -34,6 +34,10 @@ module Alchemy
|
|
34
34
|
@@init
|
35
35
|
end
|
36
36
|
|
37
|
+
def custom_configs_present?(page)
|
38
|
+
custom_config_contents(page).any? || custom_config_ingredients(page).any?
|
39
|
+
end
|
40
|
+
|
37
41
|
def custom_config_contents(page)
|
38
42
|
content_definitions_from_elements(page.descendent_element_definitions)
|
39
43
|
end
|
data/lib/alchemy/version.rb
CHANGED
data/package.json
CHANGED
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.0.
|
4
|
+
version: 6.0.0.pre.b4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -10,10 +10,10 @@ authors:
|
|
10
10
|
- Hendrik Mans
|
11
11
|
- Carsten Fregin
|
12
12
|
- Martin Meyerhoff
|
13
|
-
autorequire:
|
13
|
+
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2021-08-
|
16
|
+
date: 2021-08-27 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: actionmailer
|
@@ -1517,8 +1517,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1517
1517
|
requirements:
|
1518
1518
|
- ImageMagick (libmagick), v6.6 or greater.
|
1519
1519
|
rubygems_version: 3.1.6
|
1520
|
-
signing_key:
|
1520
|
+
signing_key:
|
1521
1521
|
specification_version: 4
|
1522
1522
|
summary: A powerful, userfriendly and flexible CMS for Rails
|
1523
1523
|
test_files: []
|
1524
|
-
...
|