alchemy_cms 6.1.8 โ 6.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/app/models/alchemy/page.rb +2 -0
- data/app/models/concerns/alchemy/picture_thumbnails.rb +4 -0
- data/app/views/alchemy/admin/resources/_per_page_select.html.erb +1 -1
- data/lib/alchemy/tasks/usage.rb +5 -4
- data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +20 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/non_stupid_digest_assets.rb +1 -1
- data/lib/tasks/alchemy/usage.rake +5 -1
- data/package.json +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce51fd15f81d2687ad1836dc8ee9afddad2864304d2e5306b06513145b37b921
|
4
|
+
data.tar.gz: ae782a4d9044f4a9ae0e996ab6e4cabf0c8e12f0181bde99459a75dfef797dd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4d5c04accf616f6d709fc72e01402d92c00299fffcefe5e1d9f1ef9acb59111c202ebbf95f5b956cfe04f5acac02aa56bdb986a9f0a80b31a3a6172ce5f2367
|
7
|
+
data.tar.gz: 70c89a614cf5b039c74c869ced699f422f71c4fae5781b714469ef016ace6703a5ff4176003dafb83a386f48b3a80fab419b2abfe2a2978b00a92789f1c34b2b
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 6.1.10 (2024-08-21)
|
4
|
+
|
5
|
+
- [6.1-stable] Fix combining search filters and pagination [#2983](https://github.com/AlchemyCMS/alchemy_cms/pull/2983) ([tvdeyen](https://github.com/tvdeyen))
|
6
|
+
- [6.1-stable] Merge pull request #2556 from mamhoff/fix-nan-ratio-error [#2581](https://github.com/AlchemyCMS/alchemy_cms/pull/2581) ([alchemycms-bot](https://github.com/alchemycms-bot))
|
7
|
+
|
8
|
+
## 6.1.9 (2023-08-29)
|
9
|
+
|
10
|
+
- [6.1-stable] Merge pull request #2571 from tvdeyen/fix-non-stupid-digest-assets [#2573](https://github.com/AlchemyCMS/alchemy_cms/pull/2573) ([github-actions](https://github.com/apps/github-actions))
|
11
|
+
- [6.1] Show if element is using contents or ingredients [#2568](https://github.com/AlchemyCMS/alchemy_cms/pull/2568) ([tvdeyen](https://github.com/tvdeyen))
|
12
|
+
|
3
13
|
## 6.1.8 (2023-07-31)
|
4
14
|
|
5
15
|
- [v6.1] Use selenium-webdriver instead of webdrivers gem [#2531](https://github.com/AlchemyCMS/alchemy_cms/pull/2531) ([mamhoff](https://github.com/mamhoff))
|
data/app/models/alchemy/page.rb
CHANGED
@@ -121,6 +121,8 @@ module Alchemy
|
|
121
121
|
has_one :draft_version, -> { drafts }, class_name: "Alchemy::PageVersion"
|
122
122
|
has_one :public_version, -> { published }, class_name: "Alchemy::PageVersion", autosave: -> { persisted? }
|
123
123
|
|
124
|
+
has_many :page_essences, class_name: "Alchemy::EssencePage", foreign_key: :page_id, inverse_of: :ingredient_association, dependent: :nullify
|
125
|
+
|
124
126
|
before_validation :set_language,
|
125
127
|
if: -> { language.nil? }
|
126
128
|
|
@@ -115,6 +115,8 @@ module Alchemy
|
|
115
115
|
return nil unless settings[:crop] && settings[:size]
|
116
116
|
|
117
117
|
mask = inferred_dimensions_from_string(settings[:size])
|
118
|
+
return if mask.nil?
|
119
|
+
|
118
120
|
zoom = thumbnail_zoom_factor(mask)
|
119
121
|
return nil if zoom.zero?
|
120
122
|
|
@@ -150,6 +152,8 @@ module Alchemy
|
|
150
152
|
width, height = dimensions_from_string(string)
|
151
153
|
ratio = image_file_width.to_f / image_file_height.to_i
|
152
154
|
|
155
|
+
return if ratio.nan?
|
156
|
+
|
153
157
|
if width.zero? && ratio.is_a?(Float)
|
154
158
|
width = height * ratio
|
155
159
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= form_tag url_for, method: :get, class: 'per-page-select-form' do |f| %>
|
2
2
|
<% search_filter_params.reject { |k, _| k == 'page' || k == 'per_page' }.each do |key, value| %>
|
3
|
-
<% if value.
|
3
|
+
<% if value.respond_to?(:keys) %>
|
4
4
|
<% value.each do |k, v| %>
|
5
5
|
<%= hidden_field_tag "#{key}[#{k}]", v, id: nil %>
|
6
6
|
<% end %>
|
data/lib/alchemy/tasks/usage.rb
CHANGED
@@ -11,10 +11,11 @@ module Alchemy
|
|
11
11
|
.group(:name)
|
12
12
|
.order("count DESC, name ASC")
|
13
13
|
.map { |e| {"name" => e.name, "count" => e.count} }
|
14
|
-
Alchemy::Element.definitions.
|
15
|
-
res
|
16
|
-
|
17
|
-
|
14
|
+
Alchemy::Element.definitions.map do |definition|
|
15
|
+
count = res.find { |r| r["name"] == definition["name"] }&.fetch("count") || 0
|
16
|
+
definition["count"] = count
|
17
|
+
definition
|
18
|
+
end.sort_by { |r| -1 * r["count"] }
|
18
19
|
end
|
19
20
|
|
20
21
|
def pages_count_by_type
|
@@ -385,6 +385,26 @@ RSpec.shared_examples_for "having picture thumbnails" do
|
|
385
385
|
size: "160x120",
|
386
386
|
)
|
387
387
|
end
|
388
|
+
|
389
|
+
context "with settings indicating free height" do
|
390
|
+
let(:settings) do
|
391
|
+
{
|
392
|
+
crop: true,
|
393
|
+
size: "800x"
|
394
|
+
}
|
395
|
+
end
|
396
|
+
|
397
|
+
it "returns default thumbnail options" do
|
398
|
+
is_expected.to eq(
|
399
|
+
crop: true,
|
400
|
+
crop_from: nil,
|
401
|
+
crop_size: nil,
|
402
|
+
flatten: true,
|
403
|
+
format: "jpg",
|
404
|
+
size: "160x120"
|
405
|
+
)
|
406
|
+
end
|
407
|
+
end
|
388
408
|
end
|
389
409
|
end
|
390
410
|
|
data/lib/alchemy/version.rb
CHANGED
@@ -30,7 +30,11 @@ namespace :alchemy do
|
|
30
30
|
puts " ----------------------"
|
31
31
|
puts "\n"
|
32
32
|
results.each do |row|
|
33
|
-
|
33
|
+
ingredients = row.key?("ingredients") ? "uses ingredients โ
" : nil
|
34
|
+
contents = row.key?("contents") ? "still uses contents โผ๏ธ" : nil
|
35
|
+
type = ingredients || contents
|
36
|
+
suffix = type ? " ยท #{type}" : nil
|
37
|
+
puts " #{number_with_delimiter(row["count"])} ๐ #{row["name"]}#{suffix}"
|
34
38
|
end
|
35
39
|
puts "\n = #{number_with_delimiter(Alchemy::Element.count)} elements in total."
|
36
40
|
else
|
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.1.
|
4
|
+
version: 6.1.10
|
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: 2024-08-21 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: actionmailer
|
@@ -1528,7 +1528,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1528
1528
|
version: '0'
|
1529
1529
|
requirements:
|
1530
1530
|
- ImageMagick (libmagick), v6.6 or greater.
|
1531
|
-
rubygems_version: 3.
|
1531
|
+
rubygems_version: 3.5.11
|
1532
1532
|
signing_key:
|
1533
1533
|
specification_version: 4
|
1534
1534
|
summary: A powerful, userfriendly and flexible CMS for Rails
|