alchemy_cms 4.0.3 → 4.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/alchemy_cms.gemspec +1 -1
- data/app/controllers/alchemy/admin/elements_controller.rb +4 -1
- data/app/views/alchemy/admin/elements/new.html.erb +2 -1
- data/lib/alchemy/tasks/tidy.rb +9 -1
- data/lib/alchemy/version.rb +1 -1
- data/lib/tasks/alchemy/tidy.rake +6 -0
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4789f71b73e8e1c28df8895f5fd37a5b90871f18454aa06e4a43b1d7449ecdfb
|
4
|
+
data.tar.gz: df714e6c16fef1e84749c65c3a43b2105a45d90d11a90f633bef27980766c6c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08acde8f5cde62a637166deb21acf95dc5496be094aaf6655403e386f4b1a8b3796ca9b45376c9013a13673a0758159d151590208350da4fec5bbca544b217c4'
|
7
|
+
data.tar.gz: 2722b7268f01d730a2ae343189c5e145b786ae39dfdce80d61889776870c3e4badace52e97a888b483e236229f8a19a86b10dc8a8914a329c1213d51154053ea
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 4.0.4 (2018-09-05)
|
4
|
+
|
5
|
+
- Allow Kaminari 1.x [#1467](https://github.com/AlchemyCMS/alchemy_cms/pull/1467) ([tvdeyen](https://github.com/tvdeyen))
|
6
|
+
|
7
|
+
## 4.0.3 (2018-05-14)
|
8
|
+
|
9
|
+
- Add must_revalidate to cache-control header [#1340](https://github.com/AlchemyCMS/alchemy_cms/pull/1340) ([afdev82](https://github.com/afdev82))
|
10
|
+
|
11
|
+
## 4.0.2 (2018-05-08)
|
12
|
+
|
13
|
+
- Fix draggable trash item feature [#1429](https://github.com/AlchemyCMS/alchemy_cms/pull/1429) ([tvdeyen](https://github.com/tvdeyen))
|
14
|
+
- Allow CanCanCan 2.x [#1418](https://github.com/AlchemyCMS/alchemy_cms/pull/1418) ([tvdeyen](https://github.com/tvdeyen))
|
15
|
+
|
16
|
+
## 4.0.1 (2018-04-23)
|
17
|
+
|
18
|
+
- Add more classes to YAML.safe_load [#1414](https://github.com/AlchemyCMS/alchemy_cms/pull/1414) ([tvdeyen](https://github.com/tvdeyen))
|
19
|
+
|
3
20
|
## 4.0.0 (2017-11-06)
|
4
21
|
|
5
22
|
* Fixes image cropping issues [#1320](https://github.com/AlchemyCMS/alchemy_cms/pull/1320) and [#1321](https://github.com/AlchemyCMS/alchemy_cms/pull/1321) by [tvdeyen](https://github.com/tvdeyen)
|
data/alchemy_cms.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |gem|
|
|
30
30
|
gem.add_runtime_dependency 'handlebars_assets', ['~> 0.23']
|
31
31
|
gem.add_runtime_dependency 'jquery-rails', ['~> 4.0']
|
32
32
|
gem.add_runtime_dependency 'jquery-ui-rails', ['~> 5.0.0']
|
33
|
-
gem.add_runtime_dependency 'kaminari', ['
|
33
|
+
gem.add_runtime_dependency 'kaminari', ['>= 0.15', '< 2.0']
|
34
34
|
gem.add_runtime_dependency 'originator', ['~> 3.1']
|
35
35
|
gem.add_runtime_dependency 'non-stupid-digest-assets', ['~> 1.0.8']
|
36
36
|
gem.add_runtime_dependency 'rails', ['~> 5.0', '< 6.0']
|
@@ -147,7 +147,10 @@ module Alchemy
|
|
147
147
|
|
148
148
|
def paste_element_from_clipboard
|
149
149
|
@source_element = Element.find(element_from_clipboard['id'])
|
150
|
-
new_attributes = {
|
150
|
+
new_attributes = {
|
151
|
+
parent_element_id: create_element_params[:parent_element_id],
|
152
|
+
page_id: @page.id
|
153
|
+
}
|
151
154
|
if @page.can_have_cells?
|
152
155
|
new_attributes = new_attributes.merge({cell_id: find_or_create_cell.try(:id)})
|
153
156
|
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',
|
data/lib/alchemy/tasks/tidy.rb
CHANGED
@@ -117,12 +117,20 @@ module Alchemy
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
+
def remove_duplicate_folded_pages
|
121
|
+
Alchemy::FoldedPage.select(:page_id, :user_id).group(:page_id, :user_id).having("count(*) > 1").each do |duplicate_page|
|
122
|
+
duplicate_page_ids = Alchemy::FoldedPage.where(duplicate_page.attributes.except("id")).pluck(:id)
|
123
|
+
duplicate_page_ids_except_oldest = duplicate_page_ids.reject { |i| i == duplicate_page_ids.min }
|
124
|
+
Alchemy::FoldedPage.where(id: duplicate_page_ids_except_oldest).delete_all
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
120
128
|
private
|
121
129
|
|
122
130
|
def destroy_orphaned_records(records, class_name)
|
123
131
|
records.each do |record|
|
124
132
|
log "Destroy orphaned #{class_name}: #{record.inspect}"
|
125
|
-
record.destroy
|
133
|
+
record.reload.try(:destroy)
|
126
134
|
end
|
127
135
|
end
|
128
136
|
end
|
data/lib/alchemy/version.rb
CHANGED
data/lib/tasks/alchemy/tidy.rake
CHANGED
@@ -8,6 +8,7 @@ namespace :alchemy do
|
|
8
8
|
Rake::Task['alchemy:tidy:element_positions'].invoke
|
9
9
|
Rake::Task['alchemy:tidy:content_positions'].invoke
|
10
10
|
Rake::Task['alchemy:tidy:remove_orphaned_records'].invoke
|
11
|
+
Rake::Task['alchemy:tidy:remove_duplicate_folded_pages'].invoke
|
11
12
|
end
|
12
13
|
|
13
14
|
desc "Creates missing cells for pages."
|
@@ -56,5 +57,10 @@ namespace :alchemy do
|
|
56
57
|
task remove_orphaned_contents: [:environment] do
|
57
58
|
Alchemy::Tidy.remove_orphaned_contents
|
58
59
|
end
|
60
|
+
|
61
|
+
desc "Remove duplicate folded pages."
|
62
|
+
task remove_duplicate_folded_pages: [:environment] do
|
63
|
+
Alchemy::Tidy.remove_duplicate_folded_pages
|
64
|
+
end
|
59
65
|
end
|
60
66
|
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: 4.0.
|
4
|
+
version: 4.0.4
|
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: 2018-05
|
16
|
+
date: 2018-09-05 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: active_model_serializers
|
@@ -199,16 +199,22 @@ dependencies:
|
|
199
199
|
name: kaminari
|
200
200
|
requirement: !ruby/object:Gem::Requirement
|
201
201
|
requirements:
|
202
|
-
- - "
|
202
|
+
- - ">="
|
203
203
|
- !ruby/object:Gem::Version
|
204
204
|
version: '0.15'
|
205
|
+
- - "<"
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '2.0'
|
205
208
|
type: :runtime
|
206
209
|
prerelease: false
|
207
210
|
version_requirements: !ruby/object:Gem::Requirement
|
208
211
|
requirements:
|
209
|
-
- - "
|
212
|
+
- - ">="
|
210
213
|
- !ruby/object:Gem::Version
|
211
214
|
version: '0.15'
|
215
|
+
- - "<"
|
216
|
+
- !ruby/object:Gem::Version
|
217
|
+
version: '2.0'
|
212
218
|
- !ruby/object:Gem::Dependency
|
213
219
|
name: originator
|
214
220
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1008,7 +1014,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1008
1014
|
requirements:
|
1009
1015
|
- ImageMagick (libmagick), v6.6 or greater.
|
1010
1016
|
rubyforge_project:
|
1011
|
-
rubygems_version: 2.7.
|
1017
|
+
rubygems_version: 2.7.7
|
1012
1018
|
signing_key:
|
1013
1019
|
specification_version: 4
|
1014
1020
|
summary: A powerful, userfriendly and flexible CMS for Rails 4
|