Skip to content

Commit

Permalink
Merge branch 'master' into fix-encoded-image-opts-with-indifferent-ac…
Browse files Browse the repository at this point in the history
…cess
  • Loading branch information
mickenorlen authored May 20, 2020
2 parents 3aa57fa + 73963dd commit e72f781
Show file tree
Hide file tree
Showing 469 changed files with 7,310 additions and 6,063 deletions.
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults
39 changes: 37 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
MYSQL_PASSWORD: password
MYSQL_DATABASE: alchemy_cms_dummy_test
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- uses: actions/checkout@v1
- name: Set up Ruby
Expand Down Expand Up @@ -85,11 +85,21 @@ jobs:
timeout-minutes: 10
run: |
bundle install --jobs 4 --retry 3 --path vendor/bundle
- name: Restore node modules cache
id: yarn-cache
uses: actions/cache@preview
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install yarn
run: yarn install
- name: Prepare database
run: |
bundle exec rake alchemy:spec:prepare
- name: Run tests & publish code coverage
uses: paambaati/[email protected].5
uses: paambaati/[email protected].7
env:
CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
with:
Expand All @@ -99,3 +109,28 @@ jobs:
with:
name: Screenshots
path: spec/dummy/tmp/screenshots
Jest:
runs-on: ubuntu-latest
env:
NODE_ENV: test
steps:
- uses: actions/checkout@v1
- name: Restore node modules cache
uses: actions/cache@preview
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install yarn
run: yarn install
- name: Run jest
run: yarn jest
- name: Run jest & publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
with:
coverageLocations:
./coverage/lcov.info:lcov
coverageCommand: yarn jest --collectCoverage --coverageDirectory=coverage
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ spec/dummy/public/assets
.ruby-version
.env
.rspec
node_modules
yarn-error.log
yarn-debug.log*
.yarn-integrity
yarn.lock
/public/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"trailingComma": "none",
"vueIndentScriptAndStyle": true,
"arrowParens": "always"
}
18 changes: 15 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Relaxed.Ruby.Style

AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.4
Exclude:
- 'bin/rspec'
- 'vendor/**/*'
- 'spec/dummy/db/**/*'
- 'spec/dummy/config/**/*'
- 'alchemy_cms.gemspec'
- 'Rakefile'
- 'node_modules/**/*'

# Really, rubocop?
Bundler/OrderedGems:
Expand Down Expand Up @@ -220,8 +221,19 @@ Style/SpecialGlobalVars:
StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars

Style/StringLiterals:
Enabled: false
StyleGuide: http://relaxed.ruby.style/#stylestringliterals
EnforcedStyle: double_quotes

Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes

Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma

Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma

Style/WhileUntilModifier:
Enabled: false
Expand Down
45 changes: 23 additions & 22 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
# frozen_string_literal: true
source 'https://rubygems.org'
source "https://rubygems.org"

gemspec

rails_version = ENV.fetch('RAILS_VERSION', 6.0).to_f
gem 'rails', "~> #{rails_version}.0"
rails_version = ENV.fetch("RAILS_VERSION", 6.0).to_f
gem "rails", "~> #{rails_version}.0"

if ENV['DB'].nil? || ENV['DB'] == 'sqlite'
gem 'sqlite3', rails_version > 5.0 ? '~> 1.4.1' : '~> 1.3.6'
if ENV["DB"].nil? || ENV["DB"] == "sqlite"
gem "sqlite3", "~> 1.4.1"
end
gem 'mysql2', '~> 0.5.1' if ENV['DB'] == 'mysql'
gem 'pg', '~> 1.0' if ENV['DB'] == 'postgresql'
gem "mysql2", "~> 0.5.1" if ENV["DB"] == "mysql"
gem "pg", "~> 1.0" if ENV["DB"] == "postgresql"

group :development, :test do
if ENV['GITHUB_ACTIONS']
gem 'sassc', '~> 2.1.0' # https://github.com/sass/sassc-ruby/issues/146
if ENV["GITHUB_ACTIONS"]
gem "sassc", "~> 2.3.0" # https://github.com/sass/sassc-ruby/issues/146
else
gem 'launchy'
gem 'annotate'
gem 'bumpy'
gem 'yard'
gem 'redcarpet'
gem 'pry-byebug'
gem 'rubocop', '~> 0.80.1', require: false
gem 'listen'
gem 'localeapp', '~> 3.0', require: false
gem 'dotenv', '~> 2.2'
gem 'github_fast_changelog', require: false
gem 'active_record_query_trace', require: false
gem 'rack-mini-profiler', require: false
gem "launchy"
gem "annotate"
gem "bumpy"
gem "yard"
gem "redcarpet"
gem "pry-byebug"
gem "rubocop", "~> 0.82.0", require: false
gem "listen"
gem "localeapp", "~> 3.0", require: false
gem "dotenv", "~> 2.2"
gem "github_fast_changelog", require: false
gem "active_record_query_trace", require: false
gem "rack-mini-profiler", require: false
gem "rufo", require: false
end
end
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ or visit the existing demo at https://alchemy-demo.herokuapp.com

## 🚂 Rails Version

**This version of AlchemyCMS runs with all versions of Rails 5 and Rails 6**
**This version of AlchemyCMS runs with Rails 5.2 and Rails 6.0**

* For a Rails 5.0 or 5.1 compatible version use the [`4.5-stable` branch](https://github.com/AlchemyCMS/alchemy_cms/tree/4.5-stable).
* For a Rails 4.2 compatible version use the [`3.6-stable` branch](https://github.com/AlchemyCMS/alchemy_cms/tree/3.6-stable).
* For a Rails 4.0/4.1 compatible version use the [`3.1-stable` branch](https://github.com/AlchemyCMS/alchemy_cms/tree/3.1-stable).
* For a Rails 3.2 compatible version use the [`2.8-stable` branch](https://github.com/AlchemyCMS/alchemy_cms/tree/2.8-stable).
Expand Down
9 changes: 5 additions & 4 deletions alchemy_cms.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Gem::Specification.new do |gem|
gem.version = Alchemy::VERSION
gem.platform = Gem::Platform::RUBY
gem.authors = ['Thomas von Deyen', 'Robin Boening', 'Marc Schettke', 'Hendrik Mans', 'Carsten Fregin', 'Martin Meyerhoff']
gem.email = ['[email protected]']
gem.email = ['[email protected]']
gem.homepage = 'https://alchemy-cms.com'
gem.summary = 'A powerful, userfriendly and flexible CMS for Rails 5'
gem.description = 'Alchemy is a powerful, userfriendly and flexible Rails 5 CMS.'
gem.summary = 'A powerful, userfriendly and flexible CMS for Rails'
gem.description = 'Alchemy is a powerful, userfriendly and flexible Rails CMS.'
gem.requirements << 'ImageMagick (libmagick), v6.6 or greater.'
gem.required_ruby_version = '>= 2.3.0'
gem.license = 'BSD New'
Expand All @@ -32,7 +32,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency 'kaminari', ['~> 1.1']
gem.add_runtime_dependency 'originator', ['~> 3.1']
gem.add_runtime_dependency 'non-stupid-digest-assets', ['~> 1.0.8']
gem.add_runtime_dependency 'rails', ['>= 5.0.0', '< 6.1']
gem.add_runtime_dependency 'rails', ['>= 5.2.0', '< 6.1']
gem.add_runtime_dependency 'ransack', ['>= 1.8', '< 3.0']
gem.add_runtime_dependency 'request_store', ['~> 1.2']
gem.add_runtime_dependency 'responders', ['>= 2.0', '< 4.0']
Expand All @@ -41,6 +41,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency 'simple_form', ['>= 4.0', '< 6']
gem.add_runtime_dependency 'sprockets', ['>= 3.0', '< 5']
gem.add_runtime_dependency 'turbolinks', ['>= 2.5']
gem.add_runtime_dependency 'webpacker', ['>= 4.0', '< 6']

gem.add_development_dependency 'capybara', ['~> 3.0']
gem.add_development_dependency 'capybara-screenshot', ['~> 1.0']
Expand Down
6 changes: 1 addition & 5 deletions app/assets/javascripts/alchemy/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
//= require requestAnimationFrame
//= require select2
//= require handlebars
//= require sortable/Sortable.min
//= require alchemy/templates
//= require alchemy/alchemy.base
//= require alchemy/alchemy.utils
//= require alchemy/alchemy.autocomplete
//= require alchemy/alchemy.browser
//= require alchemy/alchemy.buttons
Expand All @@ -34,21 +32,19 @@
//= require alchemy/alchemy.growler
//= require alchemy/alchemy.gui
//= require alchemy/alchemy.hotkeys
//= require alchemy/alchemy.i18n
//= require alchemy/alchemy.image_cropper
//= require alchemy/alchemy.image_overlay
//= require alchemy/alchemy.string_extension
//= require alchemy/alchemy.link_dialog
//= require alchemy/alchemy.list_filter
//= require alchemy/alchemy.initializer
//= require alchemy/alchemy.node_tree
//= require alchemy/alchemy.page_sorter
//= require alchemy/alchemy.uploader
//= require alchemy/alchemy.preview_window
//= require alchemy/alchemy.sitemap
//= require alchemy/alchemy.spinner
//= require alchemy/alchemy.tinymce
//= require alchemy/alchemy.tooltips
//= require alchemy/alchemy.translations
//= require alchemy/alchemy.trash_window
//= require alchemy/page_select
//= require alchemy/node_select
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ Alchemy.ElementEditors =
if data.message == 'Alchemy.focusElementEditor'
$element = $("#element_#{data.element_id}")
Alchemy.ElementEditors.focusElement($element)
else
console.warn 'Unknown message received!', data

onClickBody: (e) ->
element = $(e.target).parents('.element-editor')[0]
Expand Down
32 changes: 0 additions & 32 deletions app/assets/javascripts/alchemy/alchemy.i18n.js.coffee

This file was deleted.

66 changes: 0 additions & 66 deletions app/assets/javascripts/alchemy/alchemy.node_tree.js

This file was deleted.

29 changes: 0 additions & 29 deletions app/assets/javascripts/alchemy/alchemy.translations.js.coffee

This file was deleted.

Loading

0 comments on commit e72f781

Please sign in to comment.