alchemy_cms 3.4.2 → 3.5.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.codeclimate.yml +9 -3
- data/.teatro.yml +1 -0
- data/.travis.yml +14 -17
- data/CHANGELOG.md +44 -6
- data/Gemfile +7 -4
- data/README.md +60 -10
- data/Rakefile +1 -1
- data/alchemy_cms.gemspec +5 -8
- data/app/assets/javascripts/alchemy/admin.js +2 -0
- data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +1 -0
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +1 -0
- data/app/assets/javascripts/alchemy/alchemy.hotkeys.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +9 -7
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +1 -0
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +11 -7
- data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee +8 -3
- data/app/assets/javascripts/alchemy/alchemy.tooltips.coffee +10 -0
- data/app/assets/javascripts/alchemy/alchemy.uploader.js.coffee +104 -73
- data/app/assets/stylesheets/alchemy/_defaults.scss +1 -4
- data/app/assets/stylesheets/alchemy/_extends.scss +13 -35
- data/app/assets/stylesheets/alchemy/_mixins.scss +82 -18
- data/app/assets/stylesheets/alchemy/_variables.scss +21 -8
- data/app/assets/stylesheets/alchemy/admin.scss +4 -0
- data/app/assets/stylesheets/alchemy/archive.scss +8 -12
- data/app/assets/stylesheets/alchemy/attachments.scss +39 -0
- data/app/assets/stylesheets/alchemy/base.scss +26 -15
- data/app/assets/stylesheets/alchemy/buttons.scss +59 -31
- data/app/assets/stylesheets/alchemy/dashboard.scss +3 -3
- data/app/assets/stylesheets/alchemy/dialogs.scss +10 -8
- data/app/assets/stylesheets/alchemy/elements.scss +65 -41
- data/app/assets/stylesheets/alchemy/errors.scss +7 -0
- data/app/assets/stylesheets/alchemy/flash.scss +1 -1
- data/app/assets/stylesheets/alchemy/form_fields.scss +0 -37
- data/app/assets/stylesheets/alchemy/forms.scss +18 -27
- data/app/assets/stylesheets/alchemy/frame.scss +104 -204
- data/app/assets/stylesheets/alchemy/hints.scss +62 -0
- data/app/assets/stylesheets/alchemy/icon-font.scss +2 -1
- data/app/assets/stylesheets/alchemy/icons.scss +9 -4
- data/app/assets/stylesheets/alchemy/image_library.scss +6 -6
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +6 -4
- data/app/assets/stylesheets/alchemy/lists.scss +0 -1
- data/app/assets/stylesheets/alchemy/menubar.scss +3 -4
- data/app/assets/stylesheets/alchemy/modules.scss +0 -6
- data/app/assets/stylesheets/alchemy/navigation.scss +242 -0
- data/app/assets/stylesheets/alchemy/pagination.scss +3 -3
- data/app/assets/stylesheets/alchemy/print.scss +1 -0
- data/app/assets/stylesheets/alchemy/resource_info.scss +45 -0
- data/app/assets/stylesheets/alchemy/search.scss +72 -1
- data/app/assets/stylesheets/alchemy/selects.scss +38 -44
- data/app/assets/stylesheets/alchemy/sitemap.scss +89 -79
- data/app/assets/stylesheets/alchemy/tables.scss +6 -10
- data/app/assets/stylesheets/alchemy/toolbar.scss +7 -36
- data/app/assets/stylesheets/alchemy/upload.scss +12 -3
- data/app/assets/stylesheets/tinymce/skins/alchemy/content.min.css.scss +6 -3
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.svg +58 -170
- 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 +124 -148
- 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/skin.min.css.scss +426 -144
- data/app/controllers/alchemy/admin/attachments_controller.rb +24 -16
- data/app/controllers/alchemy/admin/clipboard_controller.rb +1 -1
- data/app/controllers/alchemy/admin/essence_files_controller.rb +1 -1
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +9 -8
- data/app/controllers/alchemy/admin/layoutpages_controller.rb +1 -0
- data/app/controllers/alchemy/admin/pages_controller.rb +2 -2
- data/app/controllers/alchemy/admin/resources_controller.rb +2 -2
- data/app/controllers/alchemy/admin/tags_controller.rb +1 -1
- data/app/controllers/alchemy/api/pages_controller.rb +16 -0
- data/app/controllers/alchemy/messages_controller.rb +1 -1
- data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +2 -2
- data/app/helpers/alchemy/admin/attachments_helper.rb +11 -0
- data/app/helpers/alchemy/admin/base_helper.rb +37 -4
- data/app/helpers/alchemy/admin/contents_helper.rb +11 -4
- data/app/helpers/alchemy/admin/elements_helper.rb +0 -19
- data/app/helpers/alchemy/admin/essences_helper.rb +7 -30
- data/app/helpers/alchemy/admin/navigation_helper.rb +13 -51
- data/app/helpers/alchemy/admin/pages_helper.rb +21 -16
- data/app/helpers/alchemy/admin/pictures_helper.rb +9 -0
- data/app/helpers/alchemy/deprecated_pages_helper.rb +54 -0
- data/app/helpers/alchemy/essences_helper.rb +1 -1
- data/app/helpers/alchemy/pages_helper.rb +8 -109
- data/app/helpers/alchemy/url_helper.rb +8 -13
- data/app/models/alchemy/attachment.rb +7 -4
- data/app/models/alchemy/cell.rb +2 -2
- data/app/models/alchemy/content.rb +2 -2
- data/app/models/alchemy/content/factory.rb +12 -9
- data/app/models/alchemy/element.rb +6 -3
- data/app/models/alchemy/essence_file.rb +1 -1
- data/app/models/alchemy/essence_picture.rb +37 -47
- data/app/models/alchemy/essence_picture_view.rb +8 -1
- data/app/models/alchemy/folded_page.rb +3 -2
- data/app/models/alchemy/legacy_page_url.rb +3 -3
- data/app/models/alchemy/page.rb +50 -5
- data/app/models/alchemy/page/fixed_attributes.rb +63 -0
- data/app/models/alchemy/page/page_elements.rb +10 -7
- data/app/models/alchemy/page/page_natures.rb +19 -0
- data/app/models/alchemy/picture.rb +1 -0
- data/app/models/alchemy/picture/transformations.rb +1 -1
- data/app/models/alchemy/picture/url.rb +82 -0
- data/app/serializers/alchemy/page_tree_serializer.rb +29 -8
- data/app/views/alchemy/_edit_mode.html.erb +2 -0
- data/app/views/alchemy/_menubar.html.erb +1 -1
- data/app/views/alchemy/_preview_mode_code.html.erb +6 -0
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_attachment.html.erb +25 -5
- data/app/views/alchemy/admin/attachments/_replace_button.html.erb +26 -0
- data/app/views/alchemy/admin/attachments/index.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/show.html.erb +52 -0
- data/app/views/alchemy/admin/elements/_element_header.html.erb +6 -3
- data/app/views/alchemy/admin/elements/create.js.erb +0 -2
- data/app/views/alchemy/admin/elements/trash.js.erb +0 -1
- data/app/views/alchemy/admin/elements/update.js.erb +0 -2
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +1 -4
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +1 -1
- data/app/views/alchemy/admin/languages/index.html.erb +1 -0
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +26 -27
- data/app/views/alchemy/admin/layoutpages/edit.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_form.html.erb +13 -40
- data/app/views/alchemy/admin/pages/_locked_page.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_page.html.erb +119 -61
- data/app/views/alchemy/admin/pages/_page_for_links.html.erb +4 -2
- data/app/views/alchemy/admin/pages/_page_infos.html.erb +12 -12
- data/app/views/alchemy/admin/pages/_page_status.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_publication_fields.html.erb +35 -0
- data/app/views/alchemy/admin/pages/edit.html.erb +13 -2
- data/app/views/alchemy/admin/pages/index.html.erb +3 -8
- data/app/views/alchemy/admin/pages/info.html.erb +15 -2
- data/app/views/alchemy/admin/pages/sort.js.erb +1 -1
- data/app/views/alchemy/admin/pages/update.js.erb +1 -14
- data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +12 -8
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +4 -4
- data/app/views/alchemy/admin/partials/_search_form.html.erb +1 -1
- data/app/views/alchemy/admin/partials/_sub_navigation.html.erb +9 -6
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_picture.html.erb +1 -6
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +1 -6
- data/app/views/alchemy/admin/pictures/index.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/show.html.erb +1 -6
- data/app/views/alchemy/admin/uploader/_button.html.erb +4 -4
- data/app/views/alchemy/base/500.html.erb +15 -1
- data/app/views/alchemy/essences/_essence_boolean_editor.html.erb +13 -15
- data/app/views/alchemy/essences/_essence_boolean_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_date_editor.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_date_view.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +2 -7
- data/app/views/alchemy/essences/_essence_file_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_html_editor.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_html_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_link_editor.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_link_view.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +47 -49
- data/app/views/alchemy/essences/_essence_picture_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +0 -2
- data/app/views/alchemy/essences/_essence_richtext_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_select_editor.html.erb +27 -29
- data/app/views/alchemy/essences/_essence_select_view.html.erb +1 -3
- data/app/views/alchemy/essences/_essence_text_editor.html.erb +17 -19
- data/app/views/alchemy/essences/_essence_text_view.html.erb +0 -2
- data/app/views/alchemy/pages/_meta_data.html.erb +9 -0
- data/app/views/layouts/alchemy/admin.html.erb +9 -11
- data/bin/alchemy +1 -2
- data/config/alchemy/config.yml +1 -1
- data/config/alchemy/modules.yml +0 -16
- data/config/initializers/dragonfly.rb +0 -18
- data/config/initializers/mini_profiler.rb +6 -0
- data/config/locales/alchemy.de.yml +9 -1
- data/config/locales/alchemy.en.yml +7 -1
- data/config/locales/alchemy.es.yml +6 -0
- data/config/locales/alchemy.fr.yml +2 -0
- data/config/locales/alchemy.it.yml +3 -1
- data/config/locales/alchemy.nl.yml +2 -0
- data/config/locales/alchemy.ru.yml +2 -0
- data/config/routes.rb +3 -8
- data/db/migrate/20160912223112_add_index_to_alchemy_pages_rgt.rb +9 -0
- data/db/migrate/20160927205604_add_foreign_key_indices_and_null_constraints.rb +20 -0
- data/db/migrate/20160928080104_add_foreign_keys.rb +27 -0
- data/lib/alchemy/admin/locale.rb +4 -3
- data/lib/alchemy/engine.rb +2 -4
- data/lib/alchemy/errors.rb +9 -2
- data/lib/alchemy/forms/builder.rb +8 -0
- data/lib/alchemy/modules.rb +20 -19
- data/lib/alchemy/permissions.rb +15 -4
- data/lib/alchemy/resources_helper.rb +4 -2
- data/lib/alchemy/sass_support.rb +9 -0
- data/lib/alchemy/seeder.rb +89 -1
- data/lib/alchemy/test_support/essence_shared_examples.rb +2 -0
- data/lib/alchemy/test_support/factories/attachment_factory.rb +1 -1
- data/lib/alchemy/test_support/factories/content_factory.rb +1 -0
- data/lib/alchemy/test_support/factories/element_factory.rb +1 -0
- data/lib/alchemy/test_support/factories/picture_factory.rb +1 -1
- data/lib/alchemy/test_support/fixtures/image.png +0 -0
- data/lib/alchemy/tinymce.rb +2 -6
- data/lib/alchemy/upgrader.rb +4 -55
- data/lib/alchemy/upgrader/tasks/install_dragonfly_config.rb +14 -0
- data/lib/alchemy/upgrader/three_point_five.rb +32 -0
- data/lib/alchemy/upgrader/three_point_four.rb +2 -8
- data/lib/alchemy/upgrader/three_point_one.rb +30 -30
- data/lib/alchemy/upgrader/three_point_three.rb +31 -31
- data/lib/alchemy/upgrader/three_point_two.rb +25 -25
- data/lib/alchemy/upgrader/three_point_zero.rb +59 -59
- data/lib/alchemy/version.rb +1 -1
- data/lib/rails/generators/alchemy/elements/templates/view.html.erb +1 -1
- data/lib/rails/generators/alchemy/elements/templates/view.html.haml +1 -1
- data/lib/rails/generators/alchemy/elements/templates/view.html.slim +1 -1
- data/lib/rails/generators/alchemy/essence/templates/editor.html.erb +1 -3
- data/lib/rails/generators/alchemy/install/files/_article_view.html.erb +1 -1
- data/lib/rails/generators/alchemy/install/files/application.html.erb +3 -4
- data/lib/rails/generators/alchemy/install/install_generator.rb +4 -0
- data/lib/rails/generators/alchemy/install/templates/dragonfly.rb.tt +35 -0
- data/lib/rails/generators/alchemy/module/module_generator.rb +1 -1
- data/lib/tasks/alchemy/db.rake +6 -0
- data/lib/tasks/alchemy/tidy.rake +85 -0
- data/lib/tasks/alchemy/upgrade.rake +165 -16
- data/vendor/assets/javascripts/clipboard.min.js +7 -0
- data/vendor/assets/javascripts/fileupload/jquery.fileupload-process.js +4 -4
- data/vendor/assets/javascripts/fileupload/jquery.fileupload-validate.js +2 -2
- data/vendor/assets/javascripts/fileupload/jquery.fileupload.js +29 -14
- data/vendor/assets/javascripts/fileupload/jquery.iframe-transport.js +2 -2
- data/vendor/assets/javascripts/tinymce/langs/es.js +2 -2
- data/vendor/assets/javascripts/tinymce/langs/fr.js +1 -1
- data/vendor/assets/javascripts/tinymce/langs/it.js +1 -1
- data/vendor/assets/javascripts/tinymce/langs/nl.js +3 -3
- data/vendor/assets/javascripts/tinymce/tinymce.min.js +15 -12
- metadata +44 -88
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/readme.md +0 -1
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/img/wline.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.ie7.min.css +0 -1
- data/app/controllers/alchemy/pictures_controller.rb +0 -97
- data/app/views/alchemy/admin/elements/_refresh_editor.js.erb +0 -8
- data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/code/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/link/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.min.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/modern/theme.min.js +0 -1
|
@@ -6,6 +6,8 @@ shared_examples_for "an essence" do
|
|
|
6
6
|
let(:content_definition) { {'name' => 'foo'} }
|
|
7
7
|
|
|
8
8
|
it "touches the content after update" do
|
|
9
|
+
element = create(:alchemy_element)
|
|
10
|
+
content = create(:alchemy_content, element: element)
|
|
9
11
|
essence.save
|
|
10
12
|
content.update(essence: essence, essence_type: essence.class.name)
|
|
11
13
|
date = content.updated_at
|
|
@@ -2,7 +2,7 @@ require 'factory_girl'
|
|
|
2
2
|
|
|
3
3
|
FactoryGirl.define do
|
|
4
4
|
factory :alchemy_attachment, class: 'Alchemy::Attachment' do
|
|
5
|
-
file File.new(
|
|
5
|
+
file File.new(Alchemy::Engine.root.join('lib', 'alchemy', 'test_support', 'fixtures', 'image.png'))
|
|
6
6
|
name 'image'
|
|
7
7
|
file_name 'image.png'
|
|
8
8
|
end
|
|
@@ -2,7 +2,7 @@ require 'factory_girl'
|
|
|
2
2
|
|
|
3
3
|
FactoryGirl.define do
|
|
4
4
|
factory :alchemy_picture, class: 'Alchemy::Picture' do
|
|
5
|
-
image_file File.new(
|
|
5
|
+
image_file File.new(Alchemy::Engine.root.join('lib', 'alchemy', 'test_support', 'fixtures', 'image.png'))
|
|
6
6
|
name 'image'
|
|
7
7
|
image_file_name 'image.png'
|
|
8
8
|
upload_hash Time.current.hash
|
|
Binary file
|
data/lib/alchemy/tinymce.rb
CHANGED
|
@@ -32,12 +32,8 @@ module Alchemy
|
|
|
32
32
|
@@init
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
def custom_config_contents(page
|
|
36
|
-
|
|
37
|
-
content_definitions_from_elements(page.element_definitions)
|
|
38
|
-
else
|
|
39
|
-
content_definitions_from_elements(Element.definitions)
|
|
40
|
-
end
|
|
35
|
+
def custom_config_contents(page)
|
|
36
|
+
content_definitions_from_elements(page.descendent_element_definitions)
|
|
41
37
|
end
|
|
42
38
|
|
|
43
39
|
private
|
data/lib/alchemy/upgrader.rb
CHANGED
|
@@ -1,63 +1,12 @@
|
|
|
1
|
-
require 'alchemy/
|
|
1
|
+
require 'alchemy/shell'
|
|
2
2
|
|
|
3
3
|
module Alchemy
|
|
4
|
-
class Upgrader
|
|
5
|
-
|
|
4
|
+
class Upgrader
|
|
5
|
+
extend Alchemy::Shell
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
extend Alchemy::Upgrader::ThreePointThree
|
|
9
|
-
extend Alchemy::Upgrader::ThreePointTwo
|
|
10
|
-
extend Alchemy::Upgrader::ThreePointOne
|
|
11
|
-
extend Alchemy::Upgrader::ThreePointZero
|
|
7
|
+
Dir["#{File.dirname(__FILE__)}/upgrader/*.rb"].each { |f| require f }
|
|
12
8
|
|
|
13
9
|
class << self
|
|
14
|
-
# Runs ugrades
|
|
15
|
-
#
|
|
16
|
-
def run!
|
|
17
|
-
upgrade_tasks.each do |task|
|
|
18
|
-
send(task)
|
|
19
|
-
end
|
|
20
|
-
puts "\n"
|
|
21
|
-
log "Upgrade done!"
|
|
22
|
-
if todos.any?
|
|
23
|
-
display_todos
|
|
24
|
-
log "\nThere are some follow ups to do", :message
|
|
25
|
-
log '-------------------------------', :message
|
|
26
|
-
log "\nPlease follow the TODOs above.", :message
|
|
27
|
-
else
|
|
28
|
-
log "\nThat's it.", :message
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Tasks that should run.
|
|
33
|
-
#
|
|
34
|
-
# Set UPGRADE env variable to only run a specific task.
|
|
35
|
-
#
|
|
36
|
-
# Run +rake alchemy:upgrade:list+ for all available tasks
|
|
37
|
-
#
|
|
38
|
-
def upgrade_tasks
|
|
39
|
-
if ENV['UPGRADE'].present?
|
|
40
|
-
ENV['UPGRADE'].split(',')
|
|
41
|
-
else
|
|
42
|
-
all_upgrade_tasks
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# All available upgrade tasks
|
|
47
|
-
#
|
|
48
|
-
def all_upgrade_tasks
|
|
49
|
-
private_methods - Object.private_methods - superclass.private_methods
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
private
|
|
53
|
-
|
|
54
|
-
# Setup task
|
|
55
|
-
def setup
|
|
56
|
-
Rake::Task['alchemy:install:migrations'].invoke
|
|
57
|
-
Rake::Task['db:migrate'].invoke
|
|
58
|
-
Seeder.seed!
|
|
59
|
-
end
|
|
60
|
-
|
|
61
10
|
def copy_new_config_file
|
|
62
11
|
desc "Copy configuration file."
|
|
63
12
|
config_file = Rails.root.join('config/alchemy/config.yml')
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module Alchemy::Upgrader::Tasks
|
|
2
|
+
class InstallDragonflyConfig < Thor
|
|
3
|
+
include Thor::Actions
|
|
4
|
+
|
|
5
|
+
source_root File.expand_path('../../../rails/generators/alchemy/install/templates',
|
|
6
|
+
File.dirname(__FILE__))
|
|
7
|
+
|
|
8
|
+
no_tasks do
|
|
9
|
+
def install
|
|
10
|
+
template "dragonfly.rb.tt", "config/initializers/dragonfly.rb"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
require_relative 'tasks/install_dragonfly_config'
|
|
2
|
+
|
|
3
|
+
module Alchemy
|
|
4
|
+
class Upgrader::ThreePointFive < Upgrader
|
|
5
|
+
class << self
|
|
6
|
+
def install_dragonfly_config
|
|
7
|
+
desc 'Install dragonfly config into `config/initializers`'
|
|
8
|
+
Alchemy::Upgrader::Tasks::InstallDragonflyConfig.new.install
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def alchemy_3_5_todos
|
|
12
|
+
notice = <<-NOTE
|
|
13
|
+
|
|
14
|
+
Picture rendering switched to Dragonfly middleware
|
|
15
|
+
--------------------------------------------------
|
|
16
|
+
|
|
17
|
+
Alchemy now uses the Dragonfly middleware to render the pictures and
|
|
18
|
+
REMOVED THE LOCAL PICTURE CACHING!
|
|
19
|
+
|
|
20
|
+
This has effect on your production setup and NEEDS FURTHER ACTION in order to
|
|
21
|
+
provide a caching option that works for your setup.
|
|
22
|
+
|
|
23
|
+
Please follow the guidelines about picture caching on the Dragonfly homepage:
|
|
24
|
+
|
|
25
|
+
http://markevans.github.io/dragonfly/cache/
|
|
26
|
+
|
|
27
|
+
NOTE
|
|
28
|
+
todo notice, 'Alchemy v3.5 changes'
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
require_relative 'tasks/install_asset_manifests'
|
|
2
2
|
|
|
3
3
|
module Alchemy
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def install_asset_manifests
|
|
4
|
+
class Upgrader::ThreePointFour < Upgrader
|
|
5
|
+
def self.install_asset_manifests
|
|
8
6
|
desc 'Install asset manifests into `vendor/assets`'
|
|
9
7
|
Alchemy::Upgrader::Tasks::InstallAssetManifests.new.install
|
|
10
8
|
end
|
|
11
|
-
|
|
12
|
-
def alchemy_3_4_todos
|
|
13
|
-
todo "Nothing todo for Alchemy 3.4 |o/", 'Alchemy v3.4 changes'
|
|
14
|
-
end
|
|
15
9
|
end
|
|
16
10
|
end
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
module Alchemy
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
class Upgrader::ThreePointOne < Upgrader
|
|
3
|
+
class << self
|
|
4
|
+
def alchemy_3_1_todos
|
|
5
|
+
notice = <<-NOTE
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
JSON API moved into '/api' namespace
|
|
8
|
+
------------------------------------
|
|
7
9
|
|
|
8
|
-
JSON API
|
|
9
|
-
|
|
10
|
+
The JSON API now lives under /api and not as additional format to default controllers.
|
|
11
|
+
Also the serialization changed into more useful payload.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
Also the serialization changed into more useful payload.
|
|
13
|
+
Please upgrade your API calls to use the new /api namespace.
|
|
13
14
|
|
|
14
|
-
Please upgrade your API calls to use the new /api namespace.
|
|
15
15
|
|
|
16
|
+
TinyMCE default paste behavior changed
|
|
17
|
+
--------------------------------------
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
Text is now always pasted in as plain text. To change this, the user has to
|
|
20
|
+
disable it with the toolbar button, as they had to before to enable it.
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
disable it with the toolbar button, as they had to before to enable it.
|
|
22
|
+
If you have a custom TinyMCE configuration you have to enable this by adding
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
paste_as_text: true
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
into you custom TinyMCE configuration.
|
|
26
27
|
|
|
27
|
-
into you custom TinyMCE configuration.
|
|
28
28
|
|
|
29
|
+
TinyMCE toolbar config has changed
|
|
30
|
+
----------------------------------
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
The 'toolbar' configuration now takes an array of toolbar rows, instead of
|
|
33
|
+
using 'toolbarN' syntax. Please update your TinyMCE configuration.
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
using 'toolbarN' syntax. Please update your TinyMCE configuration.
|
|
35
|
+
Visit http://www.tinymce.com/wiki.php/Configuration:toolbar for more information.
|
|
35
36
|
|
|
36
|
-
Visit http://www.tinymce.com/wiki.php/Configuration:toolbar for more information.
|
|
37
37
|
|
|
38
|
+
ApplicationController patch removed
|
|
39
|
+
-----------------------------------
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
If you have controllers that loads Alchemy content or uses Alchemy helpers in
|
|
42
|
+
the views (i.e. `render_navigation` or `render_elements`) you should
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
the views (i.e. `render_navigation` or `render_elements`) you should
|
|
44
|
+
include Alchemy::ControllerActions
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
in these controllers.
|
|
46
47
|
|
|
47
|
-
in these controllers.
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
NOTE
|
|
50
|
+
todo notice, 'Alchemy v3.1 changes'
|
|
51
|
+
end
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
end
|
|
@@ -2,49 +2,49 @@ require_relative 'tasks/available_contents_upgrader'
|
|
|
2
2
|
require_relative 'tasks/nestable_elements_migration'
|
|
3
3
|
|
|
4
4
|
module Alchemy
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
class Upgrader::ThreePointThree < Upgrader
|
|
6
|
+
class << self
|
|
7
|
+
def convert_available_contents
|
|
8
|
+
desc 'Convert `available_contents` config to `nestable_elements`.'
|
|
9
|
+
Alchemy::Upgrader::Tasks::AvailableContentsUpgrader.new.convert_available_contents
|
|
10
|
+
end
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def migrate_existing_elements
|
|
14
|
-
desc 'Migrate existing elements to `nestable_elements`.'
|
|
15
|
-
Alchemy::Upgrader::Tasks::NestableElementsMigration.new.migrate_existing_elements
|
|
16
|
-
end
|
|
12
|
+
def migrate_existing_elements
|
|
13
|
+
desc 'Migrate existing elements to `nestable_elements`.'
|
|
14
|
+
Alchemy::Upgrader::Tasks::NestableElementsMigration.new.migrate_existing_elements
|
|
15
|
+
end
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
def alchemy_3_3_todos
|
|
18
|
+
notice = <<-NOTE
|
|
20
19
|
|
|
21
|
-
Element's "available_contents" feature removed
|
|
22
|
-
----------------------------------------------
|
|
20
|
+
Element's "available_contents" feature removed
|
|
21
|
+
----------------------------------------------
|
|
23
22
|
|
|
24
|
-
The `available_contents` feature of elements was removed and has been replaced by nestable elements.
|
|
23
|
+
The `available_contents` feature of elements was removed and has been replaced by nestable elements.
|
|
25
24
|
|
|
26
|
-
The automatic updater that just ran updated your `config/alchemy/elements.yml`. A backup was made.
|
|
27
|
-
Nevertheless, you should have a look into it and double check the changes.
|
|
25
|
+
The automatic updater that just ran updated your `config/alchemy/elements.yml`. A backup was made.
|
|
26
|
+
Nevertheless, you should have a look into it and double check the changes.
|
|
28
27
|
|
|
29
|
-
We defined elements for each content type former defined in `available_contents` and put its name
|
|
30
|
-
into a new `nestable_elements` collection in the elements definition.
|
|
28
|
+
We defined elements for each content type former defined in `available_contents` and put its name
|
|
29
|
+
into a new `nestable_elements` collection in the elements definition.
|
|
31
30
|
|
|
32
|
-
We also updated your element view partials so they render the child elements.
|
|
33
|
-
Please review and fix markup, if necessary.
|
|
31
|
+
We also updated your element view partials so they render the child elements.
|
|
32
|
+
Please review and fix markup, if necessary.
|
|
34
33
|
|
|
35
|
-
The code for the available contents buttons and links in the element editor partials were removed
|
|
36
|
-
without replacement, because the nested elements editor partials render automatically.
|
|
34
|
+
The code for the available contents buttons and links in the element editor partials were removed
|
|
35
|
+
without replacement, because the nested elements editor partials render automatically.
|
|
37
36
|
|
|
38
|
-
PLEASE DOUBLE CHECK YOUR ELEMENT PARTIALS AND ADJUST ACCORDINGLY!
|
|
37
|
+
PLEASE DOUBLE CHECK YOUR ELEMENT PARTIALS AND ADJUST ACCORDINGLY!
|
|
39
38
|
|
|
40
|
-
Uploader `allowed_filetypes` setting changed
|
|
41
|
-
--------------------------------------------
|
|
39
|
+
Uploader `allowed_filetypes` setting changed
|
|
40
|
+
--------------------------------------------
|
|
42
41
|
|
|
43
|
-
The name of the model is now namespaced. `alchemy/pictures` instead of just `pictures`.
|
|
44
|
-
Please ensure, to copy the new setting from the `config.yml.defaults` file.
|
|
42
|
+
The name of the model is now namespaced. `alchemy/pictures` instead of just `pictures`.
|
|
43
|
+
Please ensure, to copy the new setting from the `config.yml.defaults` file.
|
|
45
44
|
|
|
46
|
-
NOTE
|
|
47
|
-
|
|
45
|
+
NOTE
|
|
46
|
+
todo notice, 'Alchemy v3.3 changes'
|
|
47
|
+
end
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
end
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
require_relative 'tasks/three_point_two_task'
|
|
2
2
|
|
|
3
3
|
module Alchemy
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
class Upgrader::ThreePointTwo < Upgrader
|
|
5
|
+
class << self
|
|
6
|
+
def upgrade_acts_as_taggable_on_migrations
|
|
7
|
+
desc 'Install and patch acts_as_taggable_on migrations.'
|
|
8
|
+
if !`bundle exec rake railties:install:migrations FROM=acts_as_taggable_on_engine`.empty?
|
|
9
|
+
Alchemy::Upgrader::Tasks::ThreePointTwoTask.new.patch_acts_as_taggable_on_migrations
|
|
10
|
+
end
|
|
11
|
+
`bundle exec rake db:migrate`
|
|
11
12
|
end
|
|
12
|
-
`bundle exec rake db:migrate`
|
|
13
|
-
end
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
def inject_seeder
|
|
15
|
+
desc 'Add Alchemy seeder to `db/seeds.rb` file.'
|
|
16
|
+
Alchemy::Upgrader::Tasks::ThreePointTwoTask.new.inject_seeder
|
|
17
|
+
end
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
def alchemy_3_2_todos
|
|
20
|
+
notice = <<-NOTE
|
|
22
21
|
|
|
23
|
-
Capistrano 2 deploy script removed
|
|
24
|
-
----------------------------------
|
|
22
|
+
Capistrano 2 deploy script removed
|
|
23
|
+
----------------------------------
|
|
25
24
|
|
|
26
|
-
The Capistrano 2 based deploy script has been removed and replaced by an Capistrano 3 extension.
|
|
25
|
+
The Capistrano 2 based deploy script has been removed and replaced by an Capistrano 3 extension.
|
|
27
26
|
|
|
28
|
-
Please update your Gemfile:
|
|
27
|
+
Please update your Gemfile:
|
|
29
28
|
|
|
30
|
-
group :development do
|
|
31
|
-
|
|
32
|
-
end
|
|
29
|
+
group :development do
|
|
30
|
+
gem 'capistrano-alchemy', github: 'AlchemyCMS/capistrano-alchemy', branch: 'master', require: false
|
|
31
|
+
end
|
|
33
32
|
|
|
34
|
-
For more information please visit https://github.com/AlchemyCMS/capistrano-alchemy.
|
|
33
|
+
For more information please visit https://github.com/AlchemyCMS/capistrano-alchemy.
|
|
35
34
|
|
|
36
|
-
NOTE
|
|
37
|
-
|
|
35
|
+
NOTE
|
|
36
|
+
todo notice, 'Alchemy v3.2 changes'
|
|
37
|
+
end
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
end
|
|
@@ -1,92 +1,92 @@
|
|
|
1
1
|
module Alchemy
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
class Upgrader::ThreePointZero < Upgrader
|
|
3
|
+
class << self
|
|
4
|
+
def rename_registered_role_ro_member
|
|
5
|
+
if Alchemy.user_class.column_names.include?('alchemy_roles')
|
|
6
|
+
desc 'Rename the `registered` user role to `member`'
|
|
7
|
+
registered_users = Alchemy.user_class.where("alchemy_roles LIKE '%registered%'")
|
|
8
|
+
if registered_users.any?
|
|
9
|
+
registered_users.each do |user|
|
|
10
|
+
roles = user.read_attribute(:alchemy_roles).sub(/registered/, 'member')
|
|
11
|
+
user.update_column(:alchemy_roles, roles)
|
|
12
|
+
log "Renamed #{user.inspect} role to `member`"
|
|
13
|
+
end
|
|
14
|
+
else
|
|
15
|
+
log 'No users with `registered` role found.', :skip
|
|
14
16
|
end
|
|
15
17
|
else
|
|
16
|
-
log 'No users with `
|
|
18
|
+
log 'No users with `alchemy_roles` database column found.', :skip
|
|
17
19
|
end
|
|
18
|
-
else
|
|
19
|
-
log 'No users with `alchemy_roles` database column found.', :skip
|
|
20
20
|
end
|
|
21
|
-
end
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
def publish_unpublished_public_pages
|
|
23
|
+
desc 'Sets `published_at` of public pages without a `published_at` date set to their `updated_at` value'
|
|
24
|
+
public_pages = Alchemy::Page.published.where('published_at IS NULL')
|
|
25
|
+
if public_pages.any?
|
|
26
|
+
public_pages.each do |page|
|
|
27
|
+
page.update_column(:published_at, page.updated_at)
|
|
28
|
+
log "Sets `published_at` of #{page.name} to #{page.updated_at}"
|
|
29
|
+
end
|
|
30
|
+
else
|
|
31
|
+
log 'No unpublished public pages found.', :skip
|
|
30
32
|
end
|
|
31
|
-
else
|
|
32
|
-
log 'No unpublished public pages found.', :skip
|
|
33
33
|
end
|
|
34
|
-
end
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
def alchemy_3_0_todos
|
|
36
|
+
notice = <<-NOTE
|
|
38
37
|
|
|
39
|
-
Alchemy User Class Removed
|
|
40
|
-
--------------------------
|
|
38
|
+
Alchemy User Class Removed
|
|
39
|
+
--------------------------
|
|
41
40
|
|
|
42
|
-
We removed the users model from Alchemy core!
|
|
41
|
+
We removed the users model from Alchemy core!
|
|
43
42
|
|
|
44
|
-
You have to provide your own user model or
|
|
45
|
-
add the `alchemy-devise` gem to your Gemfile.
|
|
43
|
+
You have to provide your own user model or
|
|
44
|
+
add the `alchemy-devise` gem to your Gemfile.
|
|
46
45
|
|
|
47
|
-
If you want to use the default user class from Alchemy:
|
|
46
|
+
If you want to use the default user class from Alchemy:
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
# Gemfile
|
|
49
|
+
gem 'alchemy-devise'
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
$ bin/rake alchemy_devise:install:migrations db:migrate
|
|
53
52
|
|
|
54
|
-
In order to add your own user class to Alchemy, please
|
|
55
|
-
make shure it meets the API:
|
|
53
|
+
In order to add your own user class to Alchemy, please
|
|
54
|
+
make shure it meets the API:
|
|
56
55
|
|
|
57
|
-
https://github.com/magiclabs/alchemy_cms/blob/master/lib/alchemy/auth_accessors.rb
|
|
56
|
+
https://github.com/magiclabs/alchemy_cms/blob/master/lib/alchemy/auth_accessors.rb
|
|
58
57
|
|
|
59
58
|
|
|
60
|
-
TinyMCE 4 Upgrade
|
|
61
|
-
-----------------
|
|
59
|
+
TinyMCE 4 Upgrade
|
|
60
|
+
-----------------
|
|
62
61
|
|
|
63
|
-
The TinyMCE configuration syntax has changed!
|
|
62
|
+
The TinyMCE configuration syntax has changed!
|
|
64
63
|
|
|
65
|
-
If you have custom TinyMCE confugurations, like a customized toolbar
|
|
66
|
-
then you have to upgrade the syntax to a TinyMCE 4 compatible one.
|
|
64
|
+
If you have custom TinyMCE confugurations, like a customized toolbar
|
|
65
|
+
then you have to upgrade the syntax to a TinyMCE 4 compatible one.
|
|
67
66
|
|
|
68
|
-
Please have a look in the default TinyMCE configuration from Alchemy and
|
|
69
|
-
also read the official TinyMCE documentation in how to upgrade.
|
|
67
|
+
Please have a look in the default TinyMCE configuration from Alchemy and
|
|
68
|
+
also read the official TinyMCE documentation in how to upgrade.
|
|
70
69
|
|
|
71
|
-
Alchemy default TinyMCE config: https://github.com/magiclabs/alchemy_cms/blob/master/lib/alchemy/tinymce.rb#L5-L19
|
|
72
|
-
Offical TinyMCE documentation: http://www.tinymce.com/wiki.php/Configuration
|
|
70
|
+
Alchemy default TinyMCE config: https://github.com/magiclabs/alchemy_cms/blob/master/lib/alchemy/tinymce.rb#L5-L19
|
|
71
|
+
Offical TinyMCE documentation: http://www.tinymce.com/wiki.php/Configuration
|
|
73
72
|
|
|
74
73
|
|
|
75
|
-
Essence Validation Syntax changed
|
|
76
|
-
---------------------------------
|
|
74
|
+
Essence Validation Syntax changed
|
|
75
|
+
---------------------------------
|
|
77
76
|
|
|
78
|
-
The API of the format validations for essences has changed.
|
|
79
|
-
You can now define individual format matchers in the config.yml.
|
|
77
|
+
The API of the format validations for essences has changed.
|
|
78
|
+
You can now define individual format matchers in the config.yml.
|
|
80
79
|
|
|
81
|
-
* `format_as` and `format_with` options has been removed and renamed to simply `format`
|
|
80
|
+
* `format_as` and `format_with` options has been removed and renamed to simply `format`
|
|
82
81
|
|
|
83
|
-
Pleae have a look at this commit:
|
|
84
|
-
https://github.com/AlchemyCMS/alchemy_cms/commit/44866dbebaed00ffa3b77201f93a04616001b955
|
|
82
|
+
Pleae have a look at this commit:
|
|
83
|
+
https://github.com/AlchemyCMS/alchemy_cms/commit/44866dbebaed00ffa3b77201f93a04616001b955
|
|
85
84
|
|
|
86
|
-
for a detailed explanation.
|
|
85
|
+
for a detailed explanation.
|
|
87
86
|
|
|
88
|
-
NOTE
|
|
89
|
-
|
|
87
|
+
NOTE
|
|
88
|
+
todo notice, 'Alchemy v3.0 changes'
|
|
89
|
+
end
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
92
|
end
|