diff --git a/.gitignore b/.gitignore index 2a83245..340fefd 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,32 @@ spec/dummy/db/*.sqlite3-journal spec/dummy/log/*.log spec/dummy/tmp/ spec/dummy/.sass-cache +spec/dummy/.browserslistrc +spec/dummy/app/assets/stylesheets/alchemy/ +spec/dummy/app/javascript/ +spec/dummy/app/views/alchemy/elements/ +spec/dummy/app/views/layouts/ +spec/dummy/babel.config.js +spec/dummy/bin/webpack +spec/dummy/bin/webpack-dev-server +spec/dummy/config/alchemy/config.yml +spec/dummy/config/alchemy/elements.yml +spec/dummy/config/alchemy/menus.yml +spec/dummy/config/alchemy/page_layouts.yml +spec/dummy/config/initializers/dragonfly.rb +spec/dummy/config/locales/alchemy.en.yml +spec/dummy/config/webpack/ +spec/dummy/config/webpacker.yml +spec/dummy/node_modules/ +spec/dummy/package.json +spec/dummy/postcss.config.js +spec/dummy/vendor/assets/stylesheets/ +spec/dummy/app/assets/stylesheets/application.css +spec/dummy/yarn.lock +spec/dummy/db/migrate/ +spec/dummy/db/schema.rb +spec/dummy/public/alchemy-packs/ +spec/dummy/public/packs-test Gemfile.lock /coverage/ /rdoc/ diff --git a/.travis.yml b/.travis.yml index a9ef2c8..6638e81 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,20 @@ language: ruby -dist: bionic -services: - - mysql -addons: - postgresql: "10" +dist: trusty sudo: false -cache: bundler +cache: + bundler: true rvm: - 2.5.5 - - 2.6.3 -branches: - only: - - master -before_install: - - gem install bundler -before_script: bundle exec rake alchemy:spec:prepare -script: bundle exec rspec -after_success: bundle exec codeclimate-test-reporter + - 2.6.6 + - 2.7.0 env: - - DB=mysql - - DB=postgresql + matrix: + - ALCHEMY_BRANCH=4.4-stable + - ALCHEMY_BRANCH=4.5-stable + - ALCHEMY_BRANCH=4.6-stable + - ALCHEMY_BRANCH=master +matrix: + fast_finish: true + allow_failures: + - env: ALCHEMY_BRANCH=master +script: bundle exec rake diff --git a/Gemfile b/Gemfile index 554d004..f44529d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,24 +1,16 @@ source "https://rubygems.org" -gemspec - -gem 'rails', '~> 6.0.0' -gem 'alchemy_cms', github: 'AlchemyCMS/alchemy_cms', branch: 'master' -gem 'sassc-rails' +alchemy_branch = ENV.fetch("ALCHEMY_BRANCH", "master") +gem "alchemy_cms", github: "AlchemyCMS/alchemy_cms", branch: alchemy_branch -unless ENV['CI'] - gem 'pry' - gem 'spring-commands-rspec' - gem 'launchy' - gem 'github_fast_changelog', require: false - gem 'listen', require: false -end +# Specify your gem's dependencies in alchemy-solidus.gemspec +gemspec group :test do - gem 'sqlite3' if ENV['DB'].nil? || ENV['DB'] == 'sqlite' - gem 'mysql2' if ENV['DB'] == 'mysql' - gem 'pg', '~> 1.0' if ENV['DB'] == 'postgresql' - if ENV['TRAVIS'] - gem "codeclimate-test-reporter", '~> 1.0', require: false + gem "sqlite3" if ENV["DB"].nil? || ENV["DB"] == "sqlite" + gem "mysql2" if ENV["DB"] == "mysql" + gem "pg", "~> 1.0" if ENV["DB"] == "postgresql" + if ENV["TRAVIS"] + gem "codeclimate-test-reporter", "~> 1.0", require: false end end diff --git a/Rakefile b/Rakefile index c517cd0..ba08822 100644 --- a/Rakefile +++ b/Rakefile @@ -33,7 +33,9 @@ namespace :alchemy do system <<-BASH cd spec/dummy export RAILS_ENV=test -bin/rake db:create db:environment:set db:migrate +bin/rake railties:install:migrations +bin/rake db:drop db:create db:migrate +bin/rails g alchemy:install --force bin/rails g alchemy:devise:install --force cd - BASH diff --git a/spec/dummy/app/assets/stylesheets/application.css b/spec/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index 3192ec8..0000000 --- a/spec/dummy/app/assets/stylesheets/application.css +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the top of the - * compiled file, but it's generally better to create a new file per style scope. - * - *= require_self - *= require_tree . - */ diff --git a/spec/dummy/app/views/layouts/application.html.erb b/spec/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 2075c25..0000000 --- a/spec/dummy/app/views/layouts/application.html.erb +++ /dev/null @@ -1,12 +0,0 @@ - - - - <%= render 'alchemy/pages/meta_data' %> - <%= stylesheet_link_tag 'application' %> - - - <%= yield %> - <%= render 'alchemy/preview_mode_code' %> - <%= render 'alchemy/menubar' %> - - diff --git a/spec/dummy/config/alchemy/config.yml b/spec/dummy/config/alchemy/config.yml deleted file mode 100644 index bed71fc..0000000 --- a/spec/dummy/config/alchemy/config.yml +++ /dev/null @@ -1,194 +0,0 @@ -# encoding: UTF-8 -# -# == This is the global Alchemy configuration file -# - -# === Require SSL for login form and all admin modules -# -# NOTE: You have to create a SSL certificate on your server to make this work -# -require_ssl: false - -# === Auto Log Out Time -# -# The amount of time of inactivity in minutes after which the user is kicked out of his current session. -# -# NOTE: This is only active in production environments -# -auto_logout_time: 30 - -# === Redirect Options -# -# redirect_to_public_child [Boolean] # Alchemy redirects to the first public child page found, if a page is not visible. -# -redirect_to_public_child: true - -# === Page caching -# -# Enable/Disable page caching globally. -# -# NOTE: You can enable/disable page caching for single Alchemy::PageLayouts in the page_layout.yml file. -# -cache_pages: true - -# === Sitemap -# -# Alchemy creates a XML, Google compatible, sitemap for you. -# -# The url is: http://your-domain.tld/sitemap.xml -# -# ==== Config Options: -# -# show_root [Boolean] # Show language root page in sitemap? -# show_flag [Boolean] # Enables the Checkbox in Page#update overlay. So your customer can set the visibility of pages in the sitemap. -# -sitemap: - show_root: true - show_flag: false - -# === URL nesting -# -# Since Alchemy 2.6.0, page urls are nested, respectively to their tree position. -# -# Disable +url_nesting+ to get slug only urls. -# -# NOTE: After changing the url_nesting, you should run one of these convert rake tasks: -# -# rake alchemy:convert:urlnames:to_nested -# rake alchemy:convert:urlnames:to_slug -# -url_nesting: true - -# === Picture rendering settings -# -# Alchemy uses Dragonfly to render images. Use {size: "XXXxYYY", crop: BOOLEAN [true]} to resize images. -# -# See http://markevans.github.com/dragonfly for further infos. -# -# ==== Options: -# -# output_image_jpg_quality [Integer] # If image gets rendered as JPG this is the quality setting for it. (Default 85) -# preprocess_image_resize [String] # Use this option to resize images to that value. Downsizing example: '1000x1000>' (Default nil) -# image_output_format [String] # The global image output format setting. (Default +original+) -# -# NOTE: You can always override the output format in the options of your Essence. I.E. {format: 'gif'} -# -output_image_jpg_quality: 85 -preprocess_image_resize: -image_output_format: original - -# This is used by the seeder to create the default site. -default_site: - name: Default Site - host: '*' - -# This is the default language when a new site gets created. -default_language: - code: de - name: Deutsch - page_layout: intro - frontpage_name: Intro - -# === Mailer Settings: -# -# To send emails via contact forms, you can create your form fields here and set which fields are to be validated. -# -# === Validating fields: -# -# Pass the field name as a symbol and a message_id (will be translated) to :validate_fields: -# -# ==== Options: -# -# page_layout_name: [String] # A +Alchemy::PageLayout+ name. Used to render the contactform on a page with this layout. -# fields: [Array] # An Array of fieldnames. -# validate_fields: [Array] # An Array of fieldnames to be validated on presence. -# -# ==== Translating validation messages: -# -# The validation messages are passed through ::I18n.t so you can translate it in your language yml file. -# -# ==== Example: -# -# de: -# activemodel: -# attributes: -# alchemy/message: -# firstname: Vorname -# -mailer: - page_layout_name: contact - forward_to_page: false - mail_success_page: thanks - mail_from: your.mail@your-domain.com - mail_to: your.mail@your-domain.com - subject: A new contact form message - fields: [salutation, firstname, lastname, address, zip, city, phone, email, message] - validate_fields: [lastname, email] - -# === User roles -# -# You can add own user roles. -# -# Further documentation for the auth system used please visit: -# -# https://github.com/ryanb/cancan/wiki -# -# ==== Translating User roles -# -# Userroles can be translated inside your the language yml file under: -# -# alchemy: -# user_roles: -# rolename: Name of the role -# -user_roles: [member, author, editor, admin] - -# === Uploader Settings -# -# upload_limit [Integer] # Set an amount of files upload limit of files which can be uploaded at once. Set 0 for unlimited. -# file_size_limit* [Integer] # Set a file size limit in mega bytes for a per file limit. -# -# *) Allow filetypes to upload. Pass * to allow all kind of files. -# -uploader: - upload_limit: 50 - file_size_limit: 100 - allowed_filetypes: - alchemy/attachments: - - '*' - alchemy/pictures: - - jpg - - jpeg - - gif - - png - - svg - -# === Link Target Options -# -# Values for the link target selectbox inside the page link overlay. -# The value gets attached as a data-link-target attribute to the link. -# -# == Example: -# -# Open all links set to overlay inside an jQuery UI Dialog Window. -# -# jQuery(a[data-link-target="overlay"]).dialog(); -# -link_target_options: [blank] - -# Should pages that redirect to an external url open the link in a new tab/window? -open_external_links_in_new_tab: true - -# === Format matchers -# -# Named aliases for regular expressions that can be used in various places. -# The most common use case is the format validation of essences, or attribute validations of your individual models. -# -# == Example: -# -# validates_format_of :url, with: Alchemy::Config.get('format_matchers')['url'] -# -format_matchers: - email: !ruby/regexp '/\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/' - url: !ruby/regexp '/\A[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?\z/ix' - link_url: !ruby/regexp '/^(mailto:|\/|[a-z]+:\/\/)/' diff --git a/spec/dummy/config/alchemy/elements.yml b/spec/dummy/config/alchemy/elements.yml deleted file mode 100644 index 67fb3a3..0000000 --- a/spec/dummy/config/alchemy/elements.yml +++ /dev/null @@ -1,3 +0,0 @@ -# == In this configuration you setup Alchemy´s element layouts. -# -# For further informations please see http://guides.alchemy-cms.com/create_elements.html diff --git a/spec/dummy/config/alchemy/page_layouts.yml b/spec/dummy/config/alchemy/page_layouts.yml deleted file mode 100644 index 0aaefec..0000000 --- a/spec/dummy/config/alchemy/page_layouts.yml +++ /dev/null @@ -1,7 +0,0 @@ -# == This file defines the page_layouts for new pages. -# -# For further informations please see http://guides.alchemy-cms.com/create_page_layouts.html - -- name: intro - unique: true - elements: [] diff --git a/spec/dummy/config/initializers/dragonfly.rb b/spec/dummy/config/initializers/dragonfly.rb deleted file mode 100644 index 0ad1f7a..0000000 --- a/spec/dummy/config/initializers/dragonfly.rb +++ /dev/null @@ -1,35 +0,0 @@ -# AlchemyCMS Dragonfly configuration. -# -# Consider using some kind of caching solution for image processing. -# For small projects, we have good experience with Rack::Cache. -# -# Larger installations should consider using a CDN, start reading -# http://markevans.github.io/dragonfly/cache/ -# -# A complete reference can be found at -# http://markevans.github.io/dragonfly/configuration/ -# -# Pictures -# -Dragonfly.app(:alchemy_pictures).configure do - dragonfly_url nil - plugin :imagemagick - plugin :svg - secret '7baeb2d2b1ae338fbcd45a8163421e7df7956f73f6a6ea097d0c6e4a8a8d4323' - url_format '/pictures/:job/:name.:ext' - - datastore :file, - root_path: Rails.root.join('uploads/pictures').to_s, - server_root: Rails.root.join('public'), - store_meta: false -end - -# Mount as middleware -Rails.application.middleware.use Dragonfly::Middleware, :alchemy_pictures - -# Attachments -Dragonfly.app(:alchemy_attachments).configure do - datastore :file, - root_path: Rails.root.join('uploads/attachments').to_s, - store_meta: false -end diff --git a/spec/dummy/db/migrate/20131015124700_create_alchemy_users.rb b/spec/dummy/db/migrate/20131015124700_create_alchemy_users.rb deleted file mode 120000 index 6069750..0000000 --- a/spec/dummy/db/migrate/20131015124700_create_alchemy_users.rb +++ /dev/null @@ -1 +0,0 @@ -../../../../db/migrate/20131015124700_create_alchemy_users.rb \ No newline at end of file diff --git a/spec/dummy/db/migrate/20131018201539_alchemy_two_point_six.alchemy.rb b/spec/dummy/db/migrate/20131018201539_alchemy_two_point_six.alchemy.rb deleted file mode 100644 index 6541f0d..0000000 --- a/spec/dummy/db/migrate/20131018201539_alchemy_two_point_six.alchemy.rb +++ /dev/null @@ -1,306 +0,0 @@ -# This migration comes from alchemy (originally 20130827094554) -# This is a compressed migration for creating all Alchemy 2.6 tables at once. -# -# === Notice -# -# In order to upgrade from an old version of Alchemy, you have to run all migrations from -# each version you missed up to the version you want to upgrade to, before running this migration. -# -class AlchemyTwoPointSix < ActiveRecord::Migration[4.2] - def up - # Do not run if Alchemy tables are already present - return if table_exists?(:alchemy_pages) - - create_table "alchemy_attachments", :force => true do |t| - t.string "name" - t.string "file_name" - t.string "file_mime_type" - t.integer "file_size" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "cached_tag_list" - t.string "file_uid" - end - - add_index "alchemy_attachments", ["file_uid"], :name => "index_alchemy_attachments_on_file_uid" - - create_table "alchemy_cells", :force => true do |t| - t.integer "page_id" - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "alchemy_contents", :force => true do |t| - t.string "name" - t.string "essence_type" - t.integer "essence_id" - t.integer "element_id" - t.integer "position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "creator_id" - t.integer "updater_id" - end - - add_index "alchemy_contents", ["element_id", "position"], :name => "index_contents_on_element_id_and_position" - - create_table "alchemy_elements", :force => true do |t| - t.string "name" - t.integer "position" - t.integer "page_id" - t.boolean "public", :default => true - t.boolean "folded", :default => false - t.boolean "unique", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "creator_id" - t.integer "updater_id" - t.integer "cell_id" - t.text "cached_tag_list" - end - - add_index "alchemy_elements", ["page_id", "position"], :name => "index_elements_on_page_id_and_position" - - create_table "alchemy_elements_alchemy_pages", :id => false, :force => true do |t| - t.integer "element_id" - t.integer "page_id" - end - - create_table "alchemy_essence_booleans", :force => true do |t| - t.boolean "value" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "creator_id" - t.integer "updater_id" - end - - add_index "alchemy_essence_booleans", ["value"], :name => "index_alchemy_essence_booleans_on_value" - - create_table "alchemy_essence_dates", :force => true do |t| - t.datetime "date" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "alchemy_essence_files", :force => true do |t| - t.integer "attachment_id" - t.string "title" - t.string "css_class" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "alchemy_essence_htmls", :force => true do |t| - t.text "source" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "alchemy_essence_links", :force => true do |t| - t.string "link" - t.string "link_title" - t.string "link_target" - t.string "link_class_name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "creator_id" - t.integer "updater_id" - end - - create_table "alchemy_essence_pictures", :force => true do |t| - t.integer "picture_id" - t.string "caption" - t.string "title" - t.string "alt_tag" - t.string "link" - t.string "link_class_name" - t.string "link_title" - t.string "css_class" - t.string "link_target" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "crop_from" - t.string "crop_size" - t.string "render_size" - end - - create_table "alchemy_essence_richtexts", :force => true do |t| - t.text "body" - t.text "stripped_body" - t.boolean "do_not_index", :default => false - t.boolean "public" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "alchemy_essence_selects", :force => true do |t| - t.string "value" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "creator_id" - t.integer "updater_id" - end - - add_index "alchemy_essence_selects", ["value"], :name => "index_alchemy_essence_selects_on_value" - - create_table "alchemy_essence_texts", :force => true do |t| - t.text "body" - t.string "link" - t.string "link_title" - t.string "link_class_name" - t.boolean "public", :default => false - t.boolean "do_not_index", :default => false - t.string "link_target" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "alchemy_folded_pages", :force => true do |t| - t.integer "page_id" - t.integer "user_id" - t.boolean "folded", :default => false - end - - create_table "alchemy_languages", :force => true do |t| - t.string "name" - t.string "language_code" - t.string "frontpage_name" - t.string "page_layout", :default => "intro" - t.boolean "public", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "creator_id" - t.integer "updater_id" - t.boolean "default", :default => false - t.string "country_code", :default => "", :null => false - t.integer "site_id" - end - - add_index "alchemy_languages", ["language_code", "country_code"], :name => "index_alchemy_languages_on_language_code_and_country_code" - add_index "alchemy_languages", ["language_code"], :name => "index_alchemy_languages_on_language_code" - add_index "alchemy_languages", ["site_id"], :name => "index_alchemy_languages_on_site_id" - - create_table "alchemy_legacy_page_urls", :force => true do |t| - t.string "urlname", :null => false - t.integer "page_id", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "alchemy_legacy_page_urls", ["urlname"], :name => "index_alchemy_legacy_page_urls_on_urlname" - - create_table "alchemy_pages", :force => true do |t| - t.string "name" - t.string "urlname" - t.string "title" - t.string "language_code" - t.boolean "language_root" - t.string "page_layout" - t.text "meta_keywords" - t.text "meta_description" - t.integer "lft" - t.integer "rgt" - t.integer "parent_id" - t.integer "depth" - t.boolean "visible", :default => false - t.boolean "public", :default => false - t.boolean "locked", :default => false - t.integer "locked_by" - t.boolean "restricted", :default => false - t.boolean "robot_index", :default => true - t.boolean "robot_follow", :default => true - t.boolean "sitemap", :default => true - t.boolean "layoutpage", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "creator_id" - t.integer "updater_id" - t.integer "language_id" - t.text "cached_tag_list" - end - - add_index "alchemy_pages", ["language_id"], :name => "index_pages_on_language_id" - add_index "alchemy_pages", ["parent_id", "lft"], :name => "index_pages_on_parent_id_and_lft" - add_index "alchemy_pages", ["urlname"], :name => "index_pages_on_urlname" - - create_table "alchemy_pictures", :force => true do |t| - t.string "name" - t.string "image_file_name" - t.integer "image_file_width" - t.integer "image_file_height" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "creator_id" - t.integer "updater_id" - t.string "upload_hash" - t.text "cached_tag_list" - t.string "image_file_uid" - t.integer "image_file_size" - end - - create_table "alchemy_sites", :force => true do |t| - t.string "host" - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "public", :default => false - t.text "aliases" - t.boolean "redirect_to_primary_host" - end - - add_index "alchemy_sites", ["host", "public"], :name => "alchemy_sites_public_hosts_idx" - add_index "alchemy_sites", ["host"], :name => "index_alchemy_sites_on_host" - - create_table "events", :force => true do |t| - t.string "name" - t.string "hidden_name" - t.datetime "starts_at" - t.datetime "ends_at" - t.text "description" - t.decimal "entrance_fee", :precision => 6, :scale => 2 - t.boolean "published" - t.integer "location_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "locations", :force => true do |t| - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "taggings", :force => true do |t| - t.integer "tag_id" - t.integer "taggable_id" - t.string "taggable_type" - t.integer "tagger_id" - t.string "tagger_type" - t.string "context" - t.datetime "created_at" - end - - add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" - add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" - - create_table "tags", :force => true do |t| - t.string "name" - end - - end -end diff --git a/spec/dummy/db/migrate/20131018201540_remove_do_not_index_from_alchemy_essence_texts.alchemy.rb b/spec/dummy/db/migrate/20131018201540_remove_do_not_index_from_alchemy_essence_texts.alchemy.rb deleted file mode 100644 index 9c20e2b..0000000 --- a/spec/dummy/db/migrate/20131018201540_remove_do_not_index_from_alchemy_essence_texts.alchemy.rb +++ /dev/null @@ -1,6 +0,0 @@ -# This migration comes from alchemy (originally 20130828121054) -class RemoveDoNotIndexFromAlchemyEssenceTexts < ActiveRecord::Migration[4.2] - def up - remove_column :alchemy_essence_texts, :do_not_index - end -end diff --git a/spec/dummy/db/migrate/20131018201541_remove_do_not_index_from_alchemy_essence_richtexts.alchemy.rb b/spec/dummy/db/migrate/20131018201541_remove_do_not_index_from_alchemy_essence_richtexts.alchemy.rb deleted file mode 100644 index 6c21468..0000000 --- a/spec/dummy/db/migrate/20131018201541_remove_do_not_index_from_alchemy_essence_richtexts.alchemy.rb +++ /dev/null @@ -1,6 +0,0 @@ -# This migration comes from alchemy (originally 20130828121120) -class RemoveDoNotIndexFromAlchemyEssenceRichtexts < ActiveRecord::Migration[4.2] - def up - remove_column :alchemy_essence_richtexts, :do_not_index - end -end diff --git a/spec/dummy/db/migrate/20131225232042_add_alchemy_roles_to_alchemy_users.rb b/spec/dummy/db/migrate/20131225232042_add_alchemy_roles_to_alchemy_users.rb deleted file mode 120000 index 6d67b0f..0000000 --- a/spec/dummy/db/migrate/20131225232042_add_alchemy_roles_to_alchemy_users.rb +++ /dev/null @@ -1 +0,0 @@ -../../../../db/migrate/20131225232042_add_alchemy_roles_to_alchemy_users.rb \ No newline at end of file diff --git a/spec/dummy/db/migrate/20141119205155_add_published_at_to_alchemy_pages.alchemy.rb b/spec/dummy/db/migrate/20141119205155_add_published_at_to_alchemy_pages.alchemy.rb deleted file mode 100644 index abcaf10..0000000 --- a/spec/dummy/db/migrate/20141119205155_add_published_at_to_alchemy_pages.alchemy.rb +++ /dev/null @@ -1,6 +0,0 @@ -# This migration comes from alchemy (originally 20130918201742) -class AddPublishedAtToAlchemyPages < ActiveRecord::Migration[4.2] - def change - add_column :alchemy_pages, :published_at, :timestamp - end -end diff --git a/spec/dummy/db/migrate/20141119205156_add_missing_unique_indices_to_tags_and_taggings.alchemy.rb b/spec/dummy/db/migrate/20141119205156_add_missing_unique_indices_to_tags_and_taggings.alchemy.rb deleted file mode 100644 index a9687e7..0000000 --- a/spec/dummy/db/migrate/20141119205156_add_missing_unique_indices_to_tags_and_taggings.alchemy.rb +++ /dev/null @@ -1,22 +0,0 @@ -# This migration comes from alchemy (originally 20140107192720) -class AddMissingUniqueIndicesToTagsAndTaggings < ActiveRecord::Migration[4.2] - - def self.up - add_index :tags, :name, unique: true - - remove_index :taggings, :tag_id - remove_index :taggings, [:taggable_id, :taggable_type, :context] - add_index :taggings, - [:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type], - unique: true, name: 'taggings_idx' - end - - def self.down - remove_index :tags, :name - - remove_index :taggings, name: 'tagging_idx' - add_index :taggings, :tag_id - add_index :taggings, [:taggable_id, :taggable_type, :context] - end - -end diff --git a/spec/dummy/db/migrate/20141119205157_add_taggings_counter_cache_to_tags.alchemy.rb b/spec/dummy/db/migrate/20141119205157_add_taggings_counter_cache_to_tags.alchemy.rb deleted file mode 100644 index 3eb436c..0000000 --- a/spec/dummy/db/migrate/20141119205157_add_taggings_counter_cache_to_tags.alchemy.rb +++ /dev/null @@ -1,18 +0,0 @@ -# This migration comes from alchemy (originally 20140701160159) -class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[4.2] - def self.up - add_column :tags, :taggings_count, :integer, default: 0 - - # inserted by Alchemy CMS upgrader - return unless defined?(ActsAsTaggableOn) - - ActsAsTaggableOn::Tag.reset_column_information - ActsAsTaggableOn::Tag.find_each do |tag| - ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings) - end - end - - def self.down - remove_column :tags, :taggings_count - end -end diff --git a/spec/dummy/db/migrate/20141119205158_add_missing_taggable_index.alchemy.rb b/spec/dummy/db/migrate/20141119205158_add_missing_taggable_index.alchemy.rb deleted file mode 100644 index fc96471..0000000 --- a/spec/dummy/db/migrate/20141119205158_add_missing_taggable_index.alchemy.rb +++ /dev/null @@ -1,10 +0,0 @@ -# This migration comes from alchemy (originally 20140701160225) -class AddMissingTaggableIndex < ActiveRecord::Migration[4.2] - def self.up - add_index :taggings, [:taggable_id, :taggable_type, :context] - end - - def self.down - remove_index :taggings, [:taggable_id, :taggable_type, :context] - end -end diff --git a/spec/dummy/db/migrate/20141209144532_add_indexes_to_alchemy_users.rb b/spec/dummy/db/migrate/20141209144532_add_indexes_to_alchemy_users.rb deleted file mode 120000 index 208e099..0000000 --- a/spec/dummy/db/migrate/20141209144532_add_indexes_to_alchemy_users.rb +++ /dev/null @@ -1 +0,0 @@ -../../../../db/migrate/20141209144532_add_indexes_to_alchemy_users.rb \ No newline at end of file diff --git a/spec/dummy/db/migrate/20160322214808_add_parent_element_id_to_alchemy_elements.alchemy.rb b/spec/dummy/db/migrate/20160322214808_add_parent_element_id_to_alchemy_elements.alchemy.rb deleted file mode 100644 index 56a421b..0000000 --- a/spec/dummy/db/migrate/20160322214808_add_parent_element_id_to_alchemy_elements.alchemy.rb +++ /dev/null @@ -1,7 +0,0 @@ -# This migration comes from alchemy (originally 20150608204610) -class AddParentElementIdToAlchemyElements < ActiveRecord::Migration[4.2] - def change - add_column :alchemy_elements, :parent_element_id, :integer - add_index :alchemy_elements, [:page_id, :parent_element_id] - end -end diff --git a/spec/dummy/db/migrate/20160322214809_add_link_text_to_alchemy_essence_files.alchemy.rb b/spec/dummy/db/migrate/20160322214809_add_link_text_to_alchemy_essence_files.alchemy.rb deleted file mode 100644 index 6a40118..0000000 --- a/spec/dummy/db/migrate/20160322214809_add_link_text_to_alchemy_essence_files.alchemy.rb +++ /dev/null @@ -1,6 +0,0 @@ -# This migration comes from alchemy (originally 20150729151825) -class AddLinkTextToAlchemyEssenceFiles < ActiveRecord::Migration[4.2] - def change - add_column :alchemy_essence_files, :link_text, :string - end -end diff --git a/spec/dummy/db/migrate/20160518190421_add_locale_to_alchemy_languages.alchemy.rb b/spec/dummy/db/migrate/20160518190421_add_locale_to_alchemy_languages.alchemy.rb deleted file mode 100644 index a4002ee..0000000 --- a/spec/dummy/db/migrate/20160518190421_add_locale_to_alchemy_languages.alchemy.rb +++ /dev/null @@ -1,8 +0,0 @@ -# This migration comes from alchemy (originally 20150906195818) -class AddLocaleToAlchemyLanguages < ActiveRecord::Migration[4.2] - def change - add_column :alchemy_languages, :locale, :string - execute \ - "UPDATE #{Alchemy::Language.table_name} SET locale = language_code WHERE locale IS NULL;" - end -end diff --git a/spec/dummy/db/migrate/20160518190425_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb b/spec/dummy/db/migrate/20160518190425_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb deleted file mode 100644 index 13cd359..0000000 --- a/spec/dummy/db/migrate/20160518190425_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +++ /dev/null @@ -1,34 +0,0 @@ -# This migration comes from acts_as_taggable_on_engine (originally 1) -class ActsAsTaggableOnMigration < ActiveRecord::Migration[4.2] - def self.up - # inserted by Alchemy CMS upgrader - return if table_exists?(:tags) - - create_table :tags do |t| - t.string :name - end - - create_table :taggings do |t| - t.references :tag - - # You should make sure that the column created is - # long enough to store the required class names. - t.references :taggable, polymorphic: true - t.references :tagger, polymorphic: true - - # Limit is created to prevent MySQL error on index - # length for MyISAM table type: http://bit.ly/vgW2Ql - t.string :context, limit: 128 - - t.datetime :created_at - end - - add_index :taggings, :tag_id - add_index :taggings, [:taggable_id, :taggable_type, :context] - end - - def self.down - drop_table :taggings - drop_table :tags - end -end diff --git a/spec/dummy/db/migrate/20160518190426_add_missing_unique_indices.acts_as_taggable_on_engine.rb b/spec/dummy/db/migrate/20160518190426_add_missing_unique_indices.acts_as_taggable_on_engine.rb deleted file mode 100644 index 38bbce4..0000000 --- a/spec/dummy/db/migrate/20160518190426_add_missing_unique_indices.acts_as_taggable_on_engine.rb +++ /dev/null @@ -1,23 +0,0 @@ -# This migration comes from acts_as_taggable_on_engine (originally 2) -class AddMissingUniqueIndices < ActiveRecord::Migration[4.2] - def self.up - # inserted by Alchemy CMS upgrader - return if index_exists?(:tags, :name) - - add_index :tags, :name, unique: true - - remove_index :taggings, :tag_id - remove_index :taggings, [:taggable_id, :taggable_type, :context] - add_index :taggings, - [:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type], - unique: true, name: 'taggings_idx' - end - - def self.down - remove_index :tags, :name - - remove_index :taggings, name: 'taggings_idx' - add_index :taggings, :tag_id - add_index :taggings, [:taggable_id, :taggable_type, :context] - end -end diff --git a/spec/dummy/db/migrate/20160518190427_change_collation_for_tag_names.acts_as_taggable_on_engine.rb b/spec/dummy/db/migrate/20160518190427_change_collation_for_tag_names.acts_as_taggable_on_engine.rb deleted file mode 100644 index 6d0ab30..0000000 --- a/spec/dummy/db/migrate/20160518190427_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +++ /dev/null @@ -1,13 +0,0 @@ -# This migration comes from acts_as_taggable_on_engine (originally 5) -# This migration is added to circumvent issue #623 and have special characters -# work properly -class ChangeCollationForTagNames < ActiveRecord::Migration[4.2] - def up - # inserted by Alchemy CMS upgrader - return unless defined?(ActsAsTaggableOn) - - if ActsAsTaggableOn::Utils.using_mysql? - execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;") - end - end -end diff --git a/spec/dummy/db/migrate/20160614164602_add_timebased_publishing_columns_to_pages.alchemy.rb b/spec/dummy/db/migrate/20160614164602_add_timebased_publishing_columns_to_pages.alchemy.rb deleted file mode 100644 index 793f70f..0000000 --- a/spec/dummy/db/migrate/20160614164602_add_timebased_publishing_columns_to_pages.alchemy.rb +++ /dev/null @@ -1,33 +0,0 @@ -# This migration comes from alchemy (originally 20160108174834) -class AddTimebasedPublishingColumnsToPages < ActiveRecord::Migration[4.2] - def up - add_column :alchemy_pages, :public_on, :datetime - add_column :alchemy_pages, :public_until, :datetime - add_index :alchemy_pages, [:public_on, :public_until] - - update <<-SQL.strip_heredoc - UPDATE alchemy_pages - SET public_on = published_at - WHERE published_at IS NOT NULL AND public=#{ActiveRecord::Base.connection.quoted_true} - SQL - - remove_column :alchemy_pages, :public - end - - def down - add_column :alchemy_pages, :public, :boolean, default: false - current_time = ActiveRecord::Base.connection.quoted_date(Time.current) - - update <<-SQL.strip_heredoc - UPDATE alchemy_pages - SET public = ( - public_on IS NOT NULL AND public_on < '#{current_time}' - AND (public_until > '#{current_time}' OR public_until IS NULL) - ) - SQL - - remove_index :alchemy_pages, [:public_on, :public_until] - remove_column :alchemy_pages, :public_on - remove_column :alchemy_pages, :public_until - end -end diff --git a/spec/dummy/db/migrate/20160614164603_add_image_file_format_to_alchemy_pictures.alchemy.rb b/spec/dummy/db/migrate/20160614164603_add_image_file_format_to_alchemy_pictures.alchemy.rb deleted file mode 100644 index 515dbeb..0000000 --- a/spec/dummy/db/migrate/20160614164603_add_image_file_format_to_alchemy_pictures.alchemy.rb +++ /dev/null @@ -1,22 +0,0 @@ -# This migration comes from alchemy (originally 20160422195310) -class AddImageFileFormatToAlchemyPictures < ActiveRecord::Migration[4.2] - def up - add_column :alchemy_pictures, :image_file_format, :string - - say_with_time "Storing file format of existing pictures" do - Alchemy::Picture.all.each do |pic| - begin - format = pic.image_file.identify('-ping -format "%m"') - pic.update_column('image_file_format', format.to_s.downcase) - rescue Dragonfly::Job::Fetch::NotFound => e - say(e.message, true) - end - end - Alchemy::Picture.count - end - end - - def down - remove_column :alchemy_pictures, :image_file_format - end -end diff --git a/spec/dummy/db/migrate/20160627081901_change_alchemy_pages_locked_to_locked_at.alchemy.rb b/spec/dummy/db/migrate/20160627081901_change_alchemy_pages_locked_to_locked_at.alchemy.rb deleted file mode 100644 index 6f50f98..0000000 --- a/spec/dummy/db/migrate/20160627081901_change_alchemy_pages_locked_to_locked_at.alchemy.rb +++ /dev/null @@ -1,23 +0,0 @@ -# This migration comes from alchemy (originally 20160617224938) -class ChangeAlchemyPagesLockedToLockedAt < ActiveRecord::Migration[4.2] - def up - add_column :alchemy_pages, :locked_at, :datetime - update <<-SQL.strip_heredoc - UPDATE alchemy_pages - SET locked_at = updated_at - WHERE locked=#{ActiveRecord::Base.connection.quoted_true} - SQL - remove_column :alchemy_pages, :locked - add_index :alchemy_pages, [:locked_at, :locked_by] - end - - def down - add_column :alchemy_pages, :locked, :boolean - update <<-SQL.strip_heredoc - UPDATE alchemy_pages - SET locked=#{ActiveRecord::Base.connection.quoted_true} - WHERE locked_at IS NOT NULL - SQL - remove_column :alchemy_pages, :locked_at - end -end diff --git a/spec/dummy/db/migrate/20161106124022_add_index_to_alchemy_pages_rgt.alchemy.rb b/spec/dummy/db/migrate/20161106124022_add_index_to_alchemy_pages_rgt.alchemy.rb deleted file mode 100644 index 6f6a6e0..0000000 --- a/spec/dummy/db/migrate/20161106124022_add_index_to_alchemy_pages_rgt.alchemy.rb +++ /dev/null @@ -1,10 +0,0 @@ -# This migration comes from alchemy (originally 20160912223112) -class AddIndexToAlchemyPagesRgt < ActiveRecord::Migration[4.2] - def up - add_index :alchemy_pages, :rgt - end - - def down - remove_index :alchemy_pages, :rgt - end -end diff --git a/spec/dummy/db/migrate/20161106124023_add_foreign_key_indices_and_null_constraints.alchemy.rb b/spec/dummy/db/migrate/20161106124023_add_foreign_key_indices_and_null_constraints.alchemy.rb deleted file mode 100644 index aca02bf..0000000 --- a/spec/dummy/db/migrate/20161106124023_add_foreign_key_indices_and_null_constraints.alchemy.rb +++ /dev/null @@ -1,21 +0,0 @@ -# This migration comes from alchemy (originally 20160927205604) -class AddForeignKeyIndicesAndNullConstraints < ActiveRecord::Migration[4.2] - def change - change_column_null :alchemy_cells, :page_id, false, 0 - change_column_null :alchemy_contents, :element_id, false, 0 - change_column_null :alchemy_contents, :essence_id, false, 0 - change_column_null :alchemy_contents, :essence_type, false, 'Alchemy::EssenceText' - change_column_null :alchemy_elements, :page_id, false, 0 - change_column_null :alchemy_folded_pages, :page_id, false, 0 - change_column_null :alchemy_folded_pages, :user_id, false, 0 - change_column_null :alchemy_languages, :site_id, false, 0 - - add_index :alchemy_cells, :page_id - add_index :alchemy_contents, [:essence_id, :essence_type], unique: true - add_index :alchemy_elements, :cell_id - add_index :alchemy_essence_files, :attachment_id - add_index :alchemy_essence_pictures, :picture_id - add_index :alchemy_folded_pages, [:page_id, :user_id], unique: true - add_index :alchemy_legacy_page_urls, :page_id - end -end diff --git a/spec/dummy/db/migrate/20161106124024_add_foreign_keys.alchemy.rb b/spec/dummy/db/migrate/20161106124024_add_foreign_keys.alchemy.rb deleted file mode 100644 index d653fa5..0000000 --- a/spec/dummy/db/migrate/20161106124024_add_foreign_keys.alchemy.rb +++ /dev/null @@ -1,28 +0,0 @@ -# This migration comes from alchemy (originally 20160928080104) -class AddForeignKeys < ActiveRecord::Migration[4.2] - def change - add_foreign_key :alchemy_cells, :alchemy_pages, - column: :page_id, - on_update: :cascade, - on_delete: :cascade, - name: :alchemy_cells_page_id_fkey - - add_foreign_key :alchemy_contents, :alchemy_elements, - column: :element_id, - on_update: :cascade, - on_delete: :cascade, - name: :alchemy_contents_element_id_fkey - - add_foreign_key :alchemy_elements, :alchemy_pages, - column: :page_id, - on_update: :cascade, - on_delete: :cascade, - name: :alchemy_elements_page_id_fkey - - add_foreign_key :alchemy_elements, :alchemy_cells, - column: :cell_id, - on_update: :cascade, - on_delete: :cascade, - name: :alchemy_elements_cell_id_fkey - end -end diff --git a/spec/dummy/db/migrate/20161106124026_add_missing_indexes.acts_as_taggable_on_engine.rb b/spec/dummy/db/migrate/20161106124026_add_missing_indexes.acts_as_taggable_on_engine.rb deleted file mode 100644 index cf95258..0000000 --- a/spec/dummy/db/migrate/20161106124026_add_missing_indexes.acts_as_taggable_on_engine.rb +++ /dev/null @@ -1,13 +0,0 @@ -# This migration comes from acts_as_taggable_on_engine (originally 6) -class AddMissingIndexes < ActiveRecord::Migration[4.2] - def change - add_index :taggings, :tag_id - add_index :taggings, :taggable_id - add_index :taggings, :taggable_type - add_index :taggings, :tagger_id - add_index :taggings, :context - - add_index :taggings, [:tagger_id, :tagger_type] - add_index :taggings, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy' - end -end diff --git a/spec/dummy/db/migrate/20180226170403_remove_cached_tag_list_from_alchemy_users.rb b/spec/dummy/db/migrate/20180226170403_remove_cached_tag_list_from_alchemy_users.rb deleted file mode 100644 index fae3da9..0000000 --- a/spec/dummy/db/migrate/20180226170403_remove_cached_tag_list_from_alchemy_users.rb +++ /dev/null @@ -1,5 +0,0 @@ -class RemoveCachedTagListFromAlchemyUsers < ActiveRecord::Migration[5.0] - def change - remove_column :alchemy_users, :cached_tag_list, :text - end -end diff --git a/spec/dummy/db/migrate/20180301103349_alchemy_four_point_zero.alchemy.rb b/spec/dummy/db/migrate/20180301103349_alchemy_four_point_zero.alchemy.rb deleted file mode 100644 index cad0d6e..0000000 --- a/spec/dummy/db/migrate/20180301103349_alchemy_four_point_zero.alchemy.rb +++ /dev/null @@ -1,391 +0,0 @@ -# This migration comes from alchemy (originally 20180226123013) -class AlchemyFourPointZero < ActiveRecord::Migration[5.0] - def up - unless table_exists?(:alchemy_attachments) - create_table :alchemy_attachments do |t| - t.string "name" - t.string "file_name" - t.string "file_mime_type" - t.integer "file_size" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.text "cached_tag_list" - t.string "file_uid" - t.index ["file_uid"], name: "index_alchemy_attachments_on_file_uid" - end - end - - unless table_exists?(:alchemy_cells) - create_table :alchemy_cells do |t| - t.integer "page_id", null: false - t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["page_id"], name: "index_alchemy_cells_on_page_id" - end - end - - unless table_exists?(:alchemy_contents) - create_table :alchemy_contents do |t| - t.string "name" - t.string "essence_type", null: false - t.integer "essence_id", null: false - t.integer "element_id", null: false - t.integer "position" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.index ["element_id", "position"], name: "index_contents_on_element_id_and_position" - t.index ["essence_id", "essence_type"], name: "index_alchemy_contents_on_essence_id_and_essence_type", unique: true - end - end - - unless table_exists?(:alchemy_elements) - create_table :alchemy_elements do |t| - t.string "name" - t.integer "position" - t.integer "page_id", null: false - t.boolean "public", default: true - t.boolean "folded", default: false - t.boolean "unique", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.integer "cell_id" - t.text "cached_tag_list" - t.integer "parent_element_id" - t.index ["cell_id"], name: "index_alchemy_elements_on_cell_id" - t.index ["page_id", "parent_element_id"], name: "index_alchemy_elements_on_page_id_and_parent_element_id" - t.index ["page_id", "position"], name: "index_elements_on_page_id_and_position" - end - end - - unless table_exists?(:alchemy_elements_alchemy_pages) - create_table :alchemy_elements_alchemy_pages, id: false do |t| - t.integer "element_id" - t.integer "page_id" - end - end - - unless table_exists?(:alchemy_essence_booleans) - create_table :alchemy_essence_booleans do |t| - t.boolean "value" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.index ["value"], name: "index_alchemy_essence_booleans_on_value" - end - end - - unless table_exists?(:alchemy_essence_dates) - create_table :alchemy_essence_dates do |t| - t.datetime "date" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - end - - unless table_exists?(:alchemy_essence_files) - create_table :alchemy_essence_files do |t| - t.integer "attachment_id" - t.string "title" - t.string "css_class" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "link_text" - t.index ["attachment_id"], name: "index_alchemy_essence_files_on_attachment_id" - end - end - - unless table_exists?(:alchemy_essence_htmls) - create_table :alchemy_essence_htmls do |t| - t.text "source" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - end - - unless table_exists?(:alchemy_essence_links) - create_table :alchemy_essence_links do |t| - t.string "link" - t.string "link_title" - t.string "link_target" - t.string "link_class_name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - end - end - - unless table_exists?(:alchemy_essence_pictures) - create_table :alchemy_essence_pictures do |t| - t.integer "picture_id" - t.string "caption" - t.string "title" - t.string "alt_tag" - t.string "link" - t.string "link_class_name" - t.string "link_title" - t.string "css_class" - t.string "link_target" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "crop_from" - t.string "crop_size" - t.string "render_size" - t.index ["picture_id"], name: "index_alchemy_essence_pictures_on_picture_id" - end - end - - unless table_exists?(:alchemy_essence_richtexts) - create_table :alchemy_essence_richtexts do |t| - t.text "body" - t.text "stripped_body" - t.boolean "public" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - end - - unless table_exists?(:alchemy_essence_selects) - create_table :alchemy_essence_selects do |t| - t.string "value" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.index ["value"], name: "index_alchemy_essence_selects_on_value" - end - end - - unless table_exists?(:alchemy_essence_texts) - create_table :alchemy_essence_texts do |t| - t.text "body" - t.string "link" - t.string "link_title" - t.string "link_class_name" - t.boolean "public", default: false - t.string "link_target" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - end - - unless table_exists?(:alchemy_folded_pages) - create_table :alchemy_folded_pages do |t| - t.integer "page_id", null: false - t.integer "user_id", null: false - t.boolean "folded", default: false - t.index ["page_id", "user_id"], name: "index_alchemy_folded_pages_on_page_id_and_user_id", unique: true - end - end - - unless table_exists?(:alchemy_languages) - create_table :alchemy_languages do |t| - t.string "name" - t.string "language_code" - t.string "frontpage_name" - t.string "page_layout", default: "intro" - t.boolean "public", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.boolean "default", default: false - t.string "country_code", default: "", null: false - t.integer "site_id", null: false - t.string "locale" - t.index ["language_code", "country_code"], name: "index_alchemy_languages_on_language_code_and_country_code" - t.index ["language_code"], name: "index_alchemy_languages_on_language_code" - t.index ["site_id"], name: "index_alchemy_languages_on_site_id" - end - end - - unless table_exists?(:alchemy_legacy_page_urls) - create_table :alchemy_legacy_page_urls do |t| - t.string "urlname", null: false - t.integer "page_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["page_id"], name: "index_alchemy_legacy_page_urls_on_page_id" - t.index ["urlname"], name: "index_alchemy_legacy_page_urls_on_urlname" - end - end - - unless table_exists?(:alchemy_pages) - create_table :alchemy_pages do |t| - t.string "name" - t.string "urlname" - t.string "title" - t.string "language_code" - t.boolean "language_root" - t.string "page_layout" - t.text "meta_keywords" - t.text "meta_description" - t.integer "lft" - t.integer "rgt" - t.integer "parent_id" - t.integer "depth" - t.boolean "visible", default: false - t.integer "locked_by" - t.boolean "restricted", default: false - t.boolean "robot_index", default: true - t.boolean "robot_follow", default: true - t.boolean "sitemap", default: true - t.boolean "layoutpage", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.integer "language_id" - t.text "cached_tag_list" - t.datetime "published_at" - t.datetime "public_on" - t.datetime "public_until" - t.datetime "locked_at" - t.index ["language_id"], name: "index_pages_on_language_id" - t.index ["locked_at", "locked_by"], name: "index_alchemy_pages_on_locked_at_and_locked_by" - t.index ["parent_id", "lft"], name: "index_pages_on_parent_id_and_lft" - t.index ["public_on", "public_until"], name: "index_alchemy_pages_on_public_on_and_public_until" - t.index ["rgt"], name: "index_alchemy_pages_on_rgt" - t.index ["urlname"], name: "index_pages_on_urlname" - end - end - - unless table_exists?(:alchemy_pictures) - create_table :alchemy_pictures do |t| - t.string "name" - t.string "image_file_name" - t.integer "image_file_width" - t.integer "image_file_height" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.string "upload_hash" - t.text "cached_tag_list" - t.string "image_file_uid" - t.integer "image_file_size" - t.string "image_file_format" - end - end - - unless table_exists?(:alchemy_sites) - create_table :alchemy_sites do |t| - t.string "host" - t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.boolean "public", default: false - t.text "aliases" - t.boolean "redirect_to_primary_host" - t.index ["host", "public"], name: "alchemy_sites_public_hosts_idx" - t.index ["host"], name: "index_alchemy_sites_on_host" - end - end - - unless table_exists?(:taggings) - create_table :taggings do |t| - t.integer "tag_id" - t.string "taggable_type" - t.integer "taggable_id" - t.string "tagger_type" - t.integer "tagger_id" - t.string "context", limit: 128 - t.datetime "created_at" - t.index ["context"], name: "index_taggings_on_context" - t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true - t.index ["tag_id"], name: "index_taggings_on_tag_id" - t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context" - t.index ["taggable_id", "taggable_type", "tagger_id", "context"], name: "taggings_idy" - t.index ["taggable_id"], name: "index_taggings_on_taggable_id" - t.index ["taggable_type"], name: "index_taggings_on_taggable_type" - t.index ["tagger_id", "tagger_type"], name: "index_taggings_on_tagger_id_and_tagger_type" - t.index ["tagger_id"], name: "index_taggings_on_tagger_id" - end - end - - unless table_exists?(:tags) - create_table :tags do |t| - t.string "name" - t.integer "taggings_count", default: 0 - t.index ["name"], name: "index_tags_on_name", unique: true - end - end - - unless foreign_key_exists?(:alchemy_cells, column: :page_id) - add_foreign_key :alchemy_cells, :alchemy_pages, - column: :page_id, - on_update: :cascade, - on_delete: :cascade, - name: :alchemy_cells_page_id_fkey - end - - unless foreign_key_exists?(:alchemy_contents, column: :element_id) - add_foreign_key :alchemy_contents, :alchemy_elements, - column: :element_id, - on_update: :cascade, - on_delete: :cascade, - name: :alchemy_contents_element_id_fkey - end - - unless foreign_key_exists?(:alchemy_elements, column: :page_id) - add_foreign_key :alchemy_elements, :alchemy_pages, - column: :page_id, - on_update: :cascade, - on_delete: :cascade, - name: :alchemy_elements_page_id_fkey - end - - unless foreign_key_exists?(:alchemy_elements, column: :cell_id) - add_foreign_key :alchemy_elements, :alchemy_cells, - column: :cell_id, - on_update: :cascade, - on_delete: :cascade, - name: :alchemy_elements_cell_id_fkey - end - end - - def down - drop_table(:alchemy_attachments) if table_exists?(:alchemy_attachments) - drop_table(:alchemy_cells) if table_exists?(:alchemy_cells) - drop_table(:alchemy_contents) if table_exists?(:alchemy_contents) - drop_table(:alchemy_elements) if table_exists?(:alchemy_elements) - drop_table(:alchemy_elements_alchemy_pages) if table_exists?(:alchemy_elements_alchemy_pages) - drop_table(:alchemy_essence_booleans) if table_exists?(:alchemy_essence_booleans) - drop_table(:alchemy_essence_dates) if table_exists?(:alchemy_essence_dates) - drop_table(:alchemy_essence_files) if table_exists?(:alchemy_essence_files) - drop_table(:alchemy_essence_htmls) if table_exists?(:alchemy_essence_htmls) - drop_table(:alchemy_essence_links) if table_exists?(:alchemy_essence_links) - drop_table(:alchemy_essence_pictures) if table_exists?(:alchemy_essence_pictures) - drop_table(:alchemy_essence_richtexts) if table_exists?(:alchemy_essence_richtexts) - drop_table(:alchemy_essence_selects) if table_exists?(:alchemy_essence_selects) - drop_table(:alchemy_essence_texts) if table_exists?(:alchemy_essence_texts) - drop_table(:alchemy_folded_pages) if table_exists?(:alchemy_folded_pages) - drop_table(:alchemy_languages) if table_exists?(:alchemy_languages) - drop_table(:alchemy_legacy_page_urls) if table_exists?(:alchemy_legacy_page_urls) - drop_table(:alchemy_pages) if table_exists?(:alchemy_pages) - drop_table(:alchemy_pictures) if table_exists?(:alchemy_pictures) - drop_table(:alchemy_sites) if table_exists?(:alchemy_sites) - drop_table(:taggings) if table_exists?(:taggings) - drop_table(:tags) if table_exists?(:tags) - end -end diff --git a/spec/dummy/db/migrate/20180301103350_migrate_tags_to_gutentag.alchemy.rb b/spec/dummy/db/migrate/20180301103350_migrate_tags_to_gutentag.alchemy.rb deleted file mode 100644 index aaeef83..0000000 --- a/spec/dummy/db/migrate/20180301103350_migrate_tags_to_gutentag.alchemy.rb +++ /dev/null @@ -1,38 +0,0 @@ -# This migration comes from alchemy (originally 20180227224537) -class MigrateTagsToGutentag < ActiveRecord::Migration[5.0] - def change - remove_index :taggings, :taggable_id - remove_column :taggings, :tagger_id, :integer - remove_index :taggings, :taggable_type - remove_column :taggings, :tagger_type, :string - remove_index :taggings, column: [:taggable_id, :taggable_type, :context], name: 'index_taggings_on_taggable_id_and_taggable_type_and_context' - remove_column :taggings, :context, :string, limit: 128 - if index_exists? :taggings, [:tag_id, :taggable_id, :taggable_type], unique: true, name: 'taggings_idx' - rename_index :taggings, 'taggings_idx', 'unique_taggings' - else - add_index :taggings, [:taggable_type, :taggable_id, :tag_id], unique: true, name: 'unique_taggings' - end - if index_exists? :taggings, [:taggable_id, :taggable_type], name: 'taggings_idy' - rename_index :taggings, 'taggings_idy', 'index_gutentag_taggings_on_taggable_id_and_taggable_type' - else - add_index :taggings, [:taggable_type, :taggable_id] - end - add_column :taggings, :updated_at, :datetime - change_column_null :taggings, :tag_id, false - change_column_null :taggings, :taggable_id, false - change_column_null :taggings, :taggable_type, false - change_column_null :taggings, :created_at, false, Time.current - change_column_null :taggings, :updated_at, false, Time.current - rename_table :taggings, :gutentag_taggings - - change_column_null :tags, :name, false - add_index :tags, :taggings_count - rename_table :tags, :gutentag_tags - - %i(alchemy_attachments alchemy_elements alchemy_pages alchemy_pictures).each do |table| - if column_exists? table, :cached_tag_list - remove_column table, :cached_tag_list - end - end - end -end diff --git a/spec/dummy/db/migrate/20190424075603_add_fixed_to_alchemy_elements.alchemy.rb b/spec/dummy/db/migrate/20190424075603_add_fixed_to_alchemy_elements.alchemy.rb deleted file mode 100644 index 65837b5..0000000 --- a/spec/dummy/db/migrate/20190424075603_add_fixed_to_alchemy_elements.alchemy.rb +++ /dev/null @@ -1,7 +0,0 @@ -# This migration comes from alchemy (originally 20180519204655) -class AddFixedToAlchemyElements < ActiveRecord::Migration[5.0] - def change - add_column :alchemy_elements, :fixed, :boolean, default: false, null: false - add_index :alchemy_elements, :fixed - end -end diff --git a/spec/dummy/db/schema.rb b/spec/dummy/db/schema.rb deleted file mode 100644 index 683d46e..0000000 --- a/spec/dummy/db/schema.rb +++ /dev/null @@ -1,345 +0,0 @@ -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# This file is the source Rails uses to define your schema when running `rails -# db:schema:load`. When creating a new database, `rails db:schema:load` tends to -# be faster and is potentially less error prone than running all of your -# migrations from scratch. Old migrations may fail to apply correctly if those -# migrations use external dependencies or application code. -# -# It's strongly recommended that you check this file into your version control system. - -ActiveRecord::Schema.define(version: 2019_04_24_075603) do - - create_table "alchemy_attachments", force: :cascade do |t| - t.string "name" - t.string "file_name" - t.string "file_mime_type" - t.integer "file_size" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "file_uid" - t.index ["file_uid"], name: "index_alchemy_attachments_on_file_uid" - end - - create_table "alchemy_cells", force: :cascade do |t| - t.integer "page_id", null: false - t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["page_id"], name: "index_alchemy_cells_on_page_id" - end - - create_table "alchemy_contents", force: :cascade do |t| - t.string "name" - t.string "essence_type", null: false - t.integer "essence_id", null: false - t.integer "element_id", null: false - t.integer "position" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.index ["element_id", "position"], name: "index_contents_on_element_id_and_position" - t.index ["essence_id", "essence_type"], name: "index_alchemy_contents_on_essence_id_and_essence_type", unique: true - end - - create_table "alchemy_elements", force: :cascade do |t| - t.string "name" - t.integer "position" - t.integer "page_id", null: false - t.boolean "public", default: true - t.boolean "folded", default: false - t.boolean "unique", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.integer "cell_id" - t.integer "parent_element_id" - t.boolean "fixed", default: false, null: false - t.index ["cell_id"], name: "index_alchemy_elements_on_cell_id" - t.index ["fixed"], name: "index_alchemy_elements_on_fixed" - t.index ["page_id", "parent_element_id"], name: "index_alchemy_elements_on_page_id_and_parent_element_id" - t.index ["page_id", "position"], name: "index_elements_on_page_id_and_position" - end - - create_table "alchemy_elements_alchemy_pages", id: false, force: :cascade do |t| - t.integer "element_id" - t.integer "page_id" - end - - create_table "alchemy_essence_booleans", force: :cascade do |t| - t.boolean "value" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.index ["value"], name: "index_alchemy_essence_booleans_on_value" - end - - create_table "alchemy_essence_dates", force: :cascade do |t| - t.datetime "date" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "alchemy_essence_files", force: :cascade do |t| - t.integer "attachment_id" - t.string "title" - t.string "css_class" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "link_text" - t.index ["attachment_id"], name: "index_alchemy_essence_files_on_attachment_id" - end - - create_table "alchemy_essence_htmls", force: :cascade do |t| - t.text "source" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "alchemy_essence_links", force: :cascade do |t| - t.string "link" - t.string "link_title" - t.string "link_target" - t.string "link_class_name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - end - - create_table "alchemy_essence_pictures", force: :cascade do |t| - t.integer "picture_id" - t.string "caption" - t.string "title" - t.string "alt_tag" - t.string "link" - t.string "link_class_name" - t.string "link_title" - t.string "css_class" - t.string "link_target" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "crop_from" - t.string "crop_size" - t.string "render_size" - t.index ["picture_id"], name: "index_alchemy_essence_pictures_on_picture_id" - end - - create_table "alchemy_essence_richtexts", force: :cascade do |t| - t.text "body" - t.text "stripped_body" - t.boolean "public" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "alchemy_essence_selects", force: :cascade do |t| - t.string "value" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.index ["value"], name: "index_alchemy_essence_selects_on_value" - end - - create_table "alchemy_essence_texts", force: :cascade do |t| - t.text "body" - t.string "link" - t.string "link_title" - t.string "link_class_name" - t.boolean "public", default: false - t.string "link_target" - t.integer "creator_id" - t.integer "updater_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "alchemy_folded_pages", force: :cascade do |t| - t.integer "page_id", null: false - t.integer "user_id", null: false - t.boolean "folded", default: false - t.index ["page_id", "user_id"], name: "index_alchemy_folded_pages_on_page_id_and_user_id", unique: true - end - - create_table "alchemy_languages", force: :cascade do |t| - t.string "name" - t.string "language_code" - t.string "frontpage_name" - t.string "page_layout", default: "intro" - t.boolean "public", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.boolean "default", default: false - t.string "country_code", default: "", null: false - t.integer "site_id", null: false - t.string "locale" - t.index ["language_code", "country_code"], name: "index_alchemy_languages_on_language_code_and_country_code" - t.index ["language_code"], name: "index_alchemy_languages_on_language_code" - t.index ["site_id"], name: "index_alchemy_languages_on_site_id" - end - - create_table "alchemy_legacy_page_urls", force: :cascade do |t| - t.string "urlname", null: false - t.integer "page_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["page_id"], name: "index_alchemy_legacy_page_urls_on_page_id" - t.index ["urlname"], name: "index_alchemy_legacy_page_urls_on_urlname" - end - - create_table "alchemy_pages", force: :cascade do |t| - t.string "name" - t.string "urlname" - t.string "title" - t.string "language_code" - t.boolean "language_root" - t.string "page_layout" - t.text "meta_keywords" - t.text "meta_description" - t.integer "lft" - t.integer "rgt" - t.integer "parent_id" - t.integer "depth" - t.boolean "visible", default: false - t.integer "locked_by" - t.boolean "restricted", default: false - t.boolean "robot_index", default: true - t.boolean "robot_follow", default: true - t.boolean "sitemap", default: true - t.boolean "layoutpage", default: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.integer "language_id" - t.datetime "published_at" - t.datetime "public_on" - t.datetime "public_until" - t.datetime "locked_at" - t.index ["language_id"], name: "index_pages_on_language_id" - t.index ["locked_at", "locked_by"], name: "index_alchemy_pages_on_locked_at_and_locked_by" - t.index ["parent_id", "lft"], name: "index_pages_on_parent_id_and_lft" - t.index ["public_on", "public_until"], name: "index_alchemy_pages_on_public_on_and_public_until" - t.index ["rgt"], name: "index_alchemy_pages_on_rgt" - t.index ["urlname"], name: "index_pages_on_urlname" - end - - create_table "alchemy_pictures", force: :cascade do |t| - t.string "name" - t.string "image_file_name" - t.integer "image_file_width" - t.integer "image_file_height" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.string "upload_hash" - t.string "image_file_uid" - t.integer "image_file_size" - t.string "image_file_format" - end - - create_table "alchemy_sites", force: :cascade do |t| - t.string "host" - t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.boolean "public", default: false - t.text "aliases" - t.boolean "redirect_to_primary_host" - t.index ["host", "public"], name: "alchemy_sites_public_hosts_idx" - t.index ["host"], name: "index_alchemy_sites_on_host" - end - - create_table "alchemy_users", force: :cascade do |t| - t.string "firstname" - t.string "lastname" - t.string "login" - t.string "email" - t.string "language" - t.string "encrypted_password", limit: 128, default: "", null: false - t.string "password_salt", limit: 128, default: "", null: false - t.integer "sign_in_count", default: 0, null: false - t.integer "failed_attempts", default: 0, null: false - t.datetime "last_request_at" - t.datetime "current_sign_in_at" - t.datetime "last_sign_in_at" - t.string "current_sign_in_ip" - t.string "last_sign_in_ip" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "creator_id" - t.integer "updater_id" - t.string "reset_password_token" - t.datetime "reset_password_sent_at" - t.string "alchemy_roles", default: "member" - t.index ["alchemy_roles"], name: "index_alchemy_users_on_alchemy_roles" - t.index ["email"], name: "index_alchemy_users_on_email", unique: true - t.index ["firstname"], name: "index_alchemy_users_on_firstname" - t.index ["lastname"], name: "index_alchemy_users_on_lastname" - t.index ["login"], name: "index_alchemy_users_on_login", unique: true - t.index ["reset_password_token"], name: "index_alchemy_users_on_reset_password_token", unique: true - end - - create_table "events", force: :cascade do |t| - t.string "name" - t.string "hidden_name" - t.datetime "starts_at" - t.datetime "ends_at" - t.text "description" - t.decimal "entrance_fee", precision: 6, scale: 2 - t.boolean "published" - t.integer "location_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "gutentag_taggings", force: :cascade do |t| - t.integer "tag_id", null: false - t.integer "taggable_id", null: false - t.string "taggable_type", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["tag_id", "taggable_id", "taggable_type"], name: "unique_taggings", unique: true - t.index ["tag_id"], name: "index_gutentag_taggings_on_tag_id" - t.index ["taggable_id", "taggable_type"], name: "index_gutentag_taggings_on_taggable_id_and_taggable_type" - end - - create_table "gutentag_tags", force: :cascade do |t| - t.string "name", null: false - t.integer "taggings_count", default: 0 - t.index ["name"], name: "index_gutentag_tags_on_name", unique: true - t.index ["taggings_count"], name: "index_gutentag_tags_on_taggings_count" - end - - create_table "locations", force: :cascade do |t| - t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - add_foreign_key "alchemy_cells", "alchemy_pages", column: "page_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "alchemy_contents", "alchemy_elements", column: "element_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "alchemy_elements", "alchemy_cells", column: "cell_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "alchemy_elements", "alchemy_pages", column: "page_id", on_update: :cascade, on_delete: :cascade -end diff --git a/spec/dummy/vendor/assets/stylesheets/alchemy/admin/all.css b/spec/dummy/vendor/assets/stylesheets/alchemy/admin/all.css deleted file mode 100644 index 33fd75a..0000000 --- a/spec/dummy/vendor/assets/stylesheets/alchemy/admin/all.css +++ /dev/null @@ -1,12 +0,0 @@ -/* - * This is the AlchemyCMS stylesheet manifest that'll be compiled into alchemy/admin/all.css - * - * In order to override existing styles or add custom styles to Alchemy's admin interface just - * require the files here. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. - * - *= require alchemy/admin - *= require alchemy/admin/alchemy-devise - */