alchemy_cms 3.6.2 → 3.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +6 -4
- data/CHANGELOG.md +20 -0
- data/Gemfile +3 -8
- data/alchemy_cms.gemspec +1 -1
- data/app/controllers/alchemy/admin/elements_controller.rb +4 -1
- data/app/models/alchemy/cell.rb +1 -1
- data/app/models/alchemy/element/definitions.rb +1 -1
- data/app/models/alchemy/site.rb +1 -1
- data/app/views/alchemy/admin/elements/index.html.erb +4 -2
- data/app/views/alchemy/admin/elements/new.html.erb +2 -1
- data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +1 -1
- data/lib/alchemy/config.rb +2 -1
- data/lib/alchemy/page_layout.rb +1 -1
- data/lib/alchemy/permissions.rb +0 -7
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +1 -0
- data/lib/rails/generators/alchemy/base.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9a490428d0bd7ad0bc938fa1390975de5764e222fc4a6cde1cfccdaf13901d3f
|
4
|
+
data.tar.gz: e2297acd723cbef927d578306de473f3b20125801757c569a09774234d3ba128
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b364510cd94a41a52fdbbbc8543c99a478be43d90bda1d506ca87f11dbd8a93a069293b042b0a4774e314971a7b9c1823217d874deb9208582ab7a02f8750e56
|
7
|
+
data.tar.gz: a96c75c5bbc4a44daa3ad82ec26b005cbcf11920c695793935cd1a40683cb98497cd2bd255054687c554a1ff37d6abeb691f819fb90b375eefad78d1e4ed265a
|
data/.travis.yml
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
language: ruby
|
2
2
|
sudo: false
|
3
|
+
services:
|
4
|
+
- mysql
|
5
|
+
- postgresql
|
3
6
|
cache:
|
4
7
|
bundler: true
|
5
8
|
directories:
|
6
9
|
- "travis_phantomjs"
|
7
10
|
rvm:
|
8
|
-
- 2.
|
9
|
-
- 2.
|
10
|
-
- 2.3.0
|
11
|
+
- 2.3
|
12
|
+
- 2.4
|
11
13
|
branches:
|
12
14
|
only:
|
13
15
|
- 3.6-stable
|
@@ -20,7 +22,7 @@ before_install:
|
|
20
22
|
- "if [ $(phantomjs --version) != '2.1.1' ]; then wget https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi"
|
21
23
|
- "if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
|
22
24
|
- "phantomjs --version"
|
23
|
-
- gem install bundler
|
25
|
+
- gem install bundler -v "< 2"
|
24
26
|
before_script: bundle exec rake alchemy:spec:prepare
|
25
27
|
script: bundle exec rspec
|
26
28
|
after_success: bundle exec codeclimate-test-reporter
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 3.6.7 (2021-04-13)
|
4
|
+
|
5
|
+
- Allow "data" key for module navigations
|
6
|
+
|
7
|
+
## 3.6.6 (2020-10-08)
|
8
|
+
|
9
|
+
- Allow AwesomeNestedSet >= 3.0 [#1619](https://github.com/AlchemyCMS/alchemy_cms/pull/1619) by [tvdeyen](https://github.com/tvdeyen)
|
10
|
+
|
11
|
+
## 3.6.5 (2018-05-08)
|
12
|
+
|
13
|
+
- Fix for drag'n'drop trashed elements into pages with cells [#1430](https://github.com/AlchemyCMS/alchemy_cms/pull/1430) by [tvdeyen](https://github.com/tvdeyen)
|
14
|
+
|
15
|
+
## 3.6.4 (2018-04-23)
|
16
|
+
|
17
|
+
- Allows `Symbol`, `Regexp` and `Date` in all YAML config files [#1333](https://github.com/AlchemyCMS/alchemy_cms/pull/1333) by [robinboening](https://github.com/robinboening)
|
18
|
+
|
19
|
+
## 3.6.3 (2017-10-24)
|
20
|
+
|
21
|
+
* Remove `:display` cancan alias [#1318](https://github.com/AlchemyCMS/alchemy_cms/pull/1318) by [tvdeyen](https://github.com/tvdeyen)
|
22
|
+
|
3
23
|
## 3.6.2 (2017-09-01)
|
4
24
|
|
5
25
|
* Handle custom errors in `Alchemy::Picture#url` [#1305](https://github.com/AlchemyCMS/alchemy_cms/pull/1305) by [tvdeyen](https://github.com/tvdeyen)
|
data/Gemfile
CHANGED
@@ -5,15 +5,16 @@ gemspec
|
|
5
5
|
# Profiling
|
6
6
|
gem 'rack-mini-profiler', group: :development, require: false
|
7
7
|
|
8
|
-
gem 'sqlite3' if ENV['DB'].nil? || ENV['DB'] == 'sqlite'
|
8
|
+
gem 'sqlite3', '~> 1.3.6' if ENV['DB'].nil? || ENV['DB'] == 'sqlite'
|
9
9
|
gem 'mysql2', '~> 0.3.18' if ENV['DB'] == 'mysql'
|
10
|
-
gem 'pg'
|
10
|
+
gem 'pg', '~> 0.21' if ENV['DB'] == 'postgresql'
|
11
11
|
gem 'sassc-rails'
|
12
12
|
|
13
13
|
group :development, :test do
|
14
14
|
gem 'jasmine-rails', github: 'searls/jasmine-rails'
|
15
15
|
gem 'jasmine-jquery-rails', github: 'travisjeffery/jasmine-jquery-rails'
|
16
16
|
gem 'simplecov', require: false
|
17
|
+
gem 'sassc', '~> 2.1.0'
|
17
18
|
if ENV['TRAVIS']
|
18
19
|
gem 'codeclimate-test-reporter', '~> 1.0', require: false
|
19
20
|
end
|
@@ -41,9 +42,3 @@ end
|
|
41
42
|
group :development, :production do
|
42
43
|
gem 'quiet_assets'
|
43
44
|
end
|
44
|
-
|
45
|
-
# We need this if we want to start the dummy app in production, ie on Teatro.io
|
46
|
-
group :production do
|
47
|
-
gem 'uglifier', '>= 1.0.3'
|
48
|
-
gem 'therubyracer'
|
49
|
-
end
|
data/alchemy_cms.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.add_runtime_dependency 'active_model_serializers', ['~> 0.9.0']
|
22
22
|
gem.add_runtime_dependency 'acts_as_list', ['~> 0.3']
|
23
23
|
gem.add_runtime_dependency 'acts-as-taggable-on', ['~> 4.0']
|
24
|
-
gem.add_runtime_dependency 'awesome_nested_set', ['~> 3.
|
24
|
+
gem.add_runtime_dependency 'awesome_nested_set', ['~> 3.0']
|
25
25
|
gem.add_runtime_dependency 'bourbon', ['~> 4.2']
|
26
26
|
gem.add_runtime_dependency 'cancancan', ['~> 1.9']
|
27
27
|
gem.add_runtime_dependency 'coffee-rails', ['~> 4.0']
|
@@ -145,7 +145,10 @@ module Alchemy
|
|
145
145
|
|
146
146
|
def paste_element_from_clipboard
|
147
147
|
@source_element = Element.find(element_from_clipboard['id'])
|
148
|
-
new_attributes = {
|
148
|
+
new_attributes = {
|
149
|
+
parent_element_id: params[:element][:parent_element_id],
|
150
|
+
page_id: @page.id
|
151
|
+
}
|
149
152
|
if @page.can_have_cells?
|
150
153
|
new_attributes = new_attributes.merge({cell_id: find_or_create_cell.try(:id)})
|
151
154
|
end
|
data/app/models/alchemy/cell.rb
CHANGED
@@ -56,7 +56,7 @@ module Alchemy
|
|
56
56
|
private
|
57
57
|
|
58
58
|
def read_yml_file
|
59
|
-
::YAML.safe_load(ERB.new(File.read(yml_file_path)).result,
|
59
|
+
::YAML.safe_load(ERB.new(File.read(yml_file_path)).result, YAML_WHITELIST_CLASSES, [], true) || []
|
60
60
|
end
|
61
61
|
|
62
62
|
def yml_file_path
|
@@ -26,7 +26,7 @@ module Alchemy
|
|
26
26
|
#
|
27
27
|
def read_definitions_file
|
28
28
|
if ::File.exist?(definitions_file_path)
|
29
|
-
::YAML.safe_load(ERB.new(File.read(definitions_file_path)).result,
|
29
|
+
::YAML.safe_load(ERB.new(File.read(definitions_file_path)).result, YAML_WHITELIST_CLASSES, [], true) || []
|
30
30
|
else
|
31
31
|
raise LoadError, "Could not find elements.yml file! Please run `rails generate alchemy:scaffold`"
|
32
32
|
end
|
data/app/models/alchemy/site.rb
CHANGED
@@ -10,7 +10,9 @@
|
|
10
10
|
</li>
|
11
11
|
<% end %>
|
12
12
|
</ul>
|
13
|
-
<div id="cell_for_other_elements"
|
13
|
+
<div id="cell_for_other_elements"
|
14
|
+
class="sortable_cell for_other_elements_cell"
|
15
|
+
data-droppable-elements="<%= @page.element_names_from_definition.join(' ') %>">
|
14
16
|
<%= render partial: 'alchemy/admin/elements/element',
|
15
17
|
collection: @page.elements.not_trashed.not_in_cell %>
|
16
18
|
</div>
|
@@ -18,7 +20,7 @@
|
|
18
20
|
<%= content_tag :div,
|
19
21
|
id: "cell_#{cell.name}",
|
20
22
|
class: ["sortable_cell", "#{cell.name}_cell"].join(' '),
|
21
|
-
data: {'cell-id' => cell.id, '
|
23
|
+
data: {'cell-id' => cell.id, 'droppable-elements' => cell.element_definitions.join(' ')} do %>
|
22
24
|
<%= render partial: 'alchemy/admin/elements/element', collection: elements %>
|
23
25
|
<% end %>
|
24
26
|
<% end %>
|
@@ -11,7 +11,8 @@
|
|
11
11
|
</div>
|
12
12
|
<div id="paste_element_tab">
|
13
13
|
<%= alchemy_form_for([:admin, @element]) do |f| %>
|
14
|
-
<%= f.hidden_field
|
14
|
+
<%= f.hidden_field :page_id %>
|
15
|
+
<%= f.hidden_field :parent_element_id, value: @parent_element.try(:id) %>
|
15
16
|
<div class="input select">
|
16
17
|
<label for="paste_from_clipboard" class="control-label"><%= Alchemy.t("Element") %></label>
|
17
18
|
<%= select_tag 'paste_from_clipboard',
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if can? *navigate_module(navigation) %>
|
2
|
-
<%= content_tag :div, class: main_navigation_css_classes(navigation) do %>
|
2
|
+
<%= content_tag :div, class: main_navigation_css_classes(navigation), data: navigation["data"] do %>
|
3
3
|
<%= link_to url_for_module(alchemy_module) do %>
|
4
4
|
<% if navigation["image"] %>
|
5
5
|
<%= image_tag(navigation["image"]) %>
|
data/lib/alchemy/config.rb
CHANGED
@@ -46,7 +46,8 @@ module Alchemy
|
|
46
46
|
# If it does not exist, or its empty, it returns an empty Hash.
|
47
47
|
#
|
48
48
|
def read_file(file)
|
49
|
-
|
49
|
+
YAML.safe_load(ERB.new(File.read(file)).result, YAML_WHITELIST_CLASSES, [], true) || {}
|
50
|
+
rescue Errno::ENOENT
|
50
51
|
{}
|
51
52
|
end
|
52
53
|
|
data/lib/alchemy/page_layout.rb
CHANGED
@@ -157,7 +157,7 @@ module Alchemy
|
|
157
157
|
#
|
158
158
|
def read_definitions_file
|
159
159
|
if File.exist?(layouts_file_path)
|
160
|
-
YAML.safe_load(ERB.new(File.read(layouts_file_path)).result,
|
160
|
+
YAML.safe_load(ERB.new(File.read(layouts_file_path)).result, YAML_WHITELIST_CLASSES, [], true) || []
|
161
161
|
else
|
162
162
|
raise LoadError, "Could not find page_layouts.yml file! Please run `rails generate alchemy:scaffold`"
|
163
163
|
end
|
data/lib/alchemy/permissions.rb
CHANGED
@@ -35,7 +35,6 @@ module Alchemy
|
|
35
35
|
def alchemy_guest_user_rules
|
36
36
|
can([:show, :download], Alchemy::Attachment) { |a| !a.restricted? }
|
37
37
|
can :see, Alchemy::Page, restricted: false, visible: true
|
38
|
-
can(:display, Alchemy::Picture) { |p| !p.restricted? }
|
39
38
|
|
40
39
|
can :read, Alchemy::Content, Alchemy::Content.available.not_restricted do |c|
|
41
40
|
c.public? && !c.restricted? && !c.trashed?
|
@@ -65,7 +64,6 @@ module Alchemy
|
|
65
64
|
can [:show, :download], Alchemy::Attachment
|
66
65
|
can :read, Alchemy::Page, Alchemy::Page.published, &:public?
|
67
66
|
can :see, Alchemy::Page, restricted: true, visible: true
|
68
|
-
can :display, Alchemy::Picture
|
69
67
|
|
70
68
|
can :read, Alchemy::Content, Alchemy::Content.available do |c|
|
71
69
|
c.public? && !c.trashed?
|
@@ -215,11 +213,6 @@ module Alchemy
|
|
215
213
|
:unlock,
|
216
214
|
:visit,
|
217
215
|
to: :edit_content
|
218
|
-
|
219
|
-
alias_action :show,
|
220
|
-
:thumbnail,
|
221
|
-
:zoom,
|
222
|
-
to: :display
|
223
216
|
end
|
224
217
|
|
225
218
|
# Include the role specific permissions.
|
data/lib/alchemy/version.rb
CHANGED
data/lib/alchemy_cms.rb
CHANGED
@@ -32,7 +32,7 @@ module Alchemy
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def load_alchemy_yaml(name)
|
35
|
-
YAML.safe_load(ERB.new(File.read("#{Rails.root}/config/alchemy/#{name}")).result,
|
35
|
+
YAML.safe_load(ERB.new(File.read("#{Rails.root}/config/alchemy/#{name}")).result, YAML_WHITELIST_CLASSES, [], true)
|
36
36
|
rescue Errno::ENOENT
|
37
37
|
puts "\nERROR: Could not read config/alchemy/#{name} file. Please run: rails generate alchemy:scaffold"
|
38
38
|
end
|
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: 3.6.
|
4
|
+
version: 3.6.7
|
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:
|
16
|
+
date: 2021-04-13 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: active_model_serializers
|
@@ -63,14 +63,14 @@ dependencies:
|
|
63
63
|
requirements:
|
64
64
|
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '3.
|
66
|
+
version: '3.0'
|
67
67
|
type: :runtime
|
68
68
|
prerelease: false
|
69
69
|
version_requirements: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: '3.
|
73
|
+
version: '3.0'
|
74
74
|
- !ruby/object:Gem::Dependency
|
75
75
|
name: bourbon
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
@@ -995,7 +995,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
995
995
|
requirements:
|
996
996
|
- ImageMagick (libmagick), v6.6 or greater.
|
997
997
|
rubyforge_project:
|
998
|
-
rubygems_version: 2.6.
|
998
|
+
rubygems_version: 2.7.6.2
|
999
999
|
signing_key:
|
1000
1000
|
specification_version: 4
|
1001
1001
|
summary: A powerful, userfriendly and flexible CMS for Rails 4
|