alchemy_cms 3.4.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -1
- data/app/models/alchemy/cell.rb +1 -1
- data/app/models/alchemy/essence_picture_view.rb +1 -1
- data/app/views/alchemy/essences/_essence_file_view.html.erb +5 -2
- data/db/migrate/20160422195310_add_image_file_format_to_alchemy_pictures.rb +1 -1
- data/lib/alchemy/version.rb +1 -1
- data/lib/rails/generators/alchemy/views/views_generator.rb +1 -1
- data/lib/tasks/alchemy/upgrade.rake +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6fc47d58933cda5c1c866649f035dbcecd8bd62
|
4
|
+
data.tar.gz: 8dd063a59cf51bd55d0c0b591c0ab921dbe35152
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5b9541605a0518258fddbf65dc47c1a2630b0fbb1227fb744dd922466d199060823cf71ad00a633b87c96a759db4f50dbd5d414f8ce77db4fa1cbc6676f0ec6
|
7
|
+
data.tar.gz: 87329505d7091fb39591e2eacd4a0a9859df62bd8317dd92b1fb183b4cbfb5e571a31fe37d05891e12e3e79b74b99189a9511bf28cd672afb352c4788b71ea71
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 3.4.1 (2016-08-31)
|
4
|
+
|
5
|
+
__Fixed Bugs__
|
6
|
+
|
7
|
+
* Remove trailing new lines in the AddImageFileFormatToAlchemyPictures migration. (#1107)
|
8
|
+
If you migrated already, use the `alchemy:upgrade:fix_picture_format` rake task.
|
9
|
+
* Don't overwrite the fallback options when rendering a picture (#1113)
|
10
|
+
* Fixes the messages mailer views generator (#1118)
|
11
|
+
|
3
12
|
## 3.4.0 (2016-08-02)
|
4
13
|
|
5
14
|
__New Features__
|
@@ -44,7 +53,12 @@ __Fixed Bugs__
|
|
44
53
|
* Generators don't delete directories any more (#850)
|
45
54
|
* Some elements crashed the backend's JS when being saved (#1091)
|
46
55
|
|
47
|
-
## 3.3.
|
56
|
+
## 3.3.3 (2016-08-31)
|
57
|
+
|
58
|
+
* Fix bug that rendered duplicate nested elements within a cell (#1100)
|
59
|
+
* Merge `html_options` in EssenceFile view (#1115)
|
60
|
+
|
61
|
+
## 3.3.2 (2016-08-02)
|
48
62
|
|
49
63
|
* Use relative url for page preview frame in order to prevent cross origin errors (#1076)
|
50
64
|
|
data/app/models/alchemy/cell.rb
CHANGED
@@ -28,7 +28,7 @@ module Alchemy
|
|
28
28
|
belongs_to :page
|
29
29
|
validates_uniqueness_of :name, scope: 'page_id'
|
30
30
|
validates_format_of :name, with: /\A[a-z0-9_-]+\z/
|
31
|
-
has_many :elements, -> { order(:position) }, dependent: :destroy
|
31
|
+
has_many :elements, -> { where(parent_element_id: nil).order(:position) }, dependent: :destroy
|
32
32
|
|
33
33
|
class << self
|
34
34
|
def definitions
|
@@ -14,7 +14,7 @@ module Alchemy
|
|
14
14
|
|
15
15
|
def initialize(content, options = {}, html_options = {})
|
16
16
|
@content = content
|
17
|
-
@options = DEFAULT_OPTIONS.
|
17
|
+
@options = DEFAULT_OPTIONS.merge(content.settings).merge(options)
|
18
18
|
@html_options = html_options
|
19
19
|
@essence = content.essence
|
20
20
|
@picture = essence.picture
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<%- cache(content) do -%>
|
2
2
|
<%- if attachment = content.ingredient -%>
|
3
|
+
<%- html_options = local_assigns.fetch(:html_options, {}) -%>
|
3
4
|
<%= link_to(
|
4
5
|
content.essence.link_text.presence ||
|
5
6
|
content.settings_value(:link_text, local_assigns.fetch(:options, {})) ||
|
@@ -9,8 +10,10 @@
|
|
9
10
|
name: attachment.urlname,
|
10
11
|
format: attachment.suffix
|
11
12
|
),
|
12
|
-
|
13
|
-
|
13
|
+
{
|
14
|
+
class: content.essence.css_class.presence,
|
15
|
+
title: content.essence.title.presence
|
16
|
+
}.merge(html_options)
|
14
17
|
) -%>
|
15
18
|
<%- end -%>
|
16
19
|
<%- end -%>
|
@@ -6,7 +6,7 @@ class AddImageFileFormatToAlchemyPictures < ActiveRecord::Migration
|
|
6
6
|
Alchemy::Picture.all.each do |pic|
|
7
7
|
begin
|
8
8
|
format = pic.image_file.identify('-ping -format "%m"')
|
9
|
-
pic.update_column('image_file_format', format.to_s.downcase)
|
9
|
+
pic.update_column('image_file_format', format.to_s.chomp.downcase)
|
10
10
|
rescue Dragonfly::Job::Fetch::NotFound => e
|
11
11
|
say(e.message, true)
|
12
12
|
end
|
data/lib/alchemy/version.rb
CHANGED
@@ -3,7 +3,7 @@ require 'rails'
|
|
3
3
|
module Alchemy
|
4
4
|
module Generators
|
5
5
|
class ViewsGenerator < ::Rails::Generators::Base
|
6
|
-
ALCHEMY_VIEWS = %w(breadcrumb language_links
|
6
|
+
ALCHEMY_VIEWS = %w(breadcrumb language_links messages_mailer navigation)
|
7
7
|
|
8
8
|
desc "Generates Alchemy views for #{ALCHEMY_VIEWS.to_sentence}."
|
9
9
|
|
@@ -22,5 +22,11 @@ namespace :alchemy do
|
|
22
22
|
puts "No upgrades available."
|
23
23
|
end
|
24
24
|
end
|
25
|
+
|
26
|
+
task fix_picture_format: [:environment] do
|
27
|
+
Alchemy::Picture.find_each do |picture|
|
28
|
+
picture.update_column(:image_file_format, picture.image_file_format.to_s.chomp)
|
29
|
+
end
|
30
|
+
end
|
25
31
|
end
|
26
32
|
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.4.
|
4
|
+
version: 3.4.1
|
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: 2016-08-
|
16
|
+
date: 2016-08-31 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: actionpack-page_caching
|