alchemy_cms 5.0.1 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +126 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/app/serializers/alchemy/page_tree_serializer.rb +4 -4
- data/lib/alchemy/version.rb +1 -1
- metadata +6 -7
- data/.travis.yml +0 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d6a2d7c3149b60f8beaeb06b0cd5b8042f4c8df1f6bf3f9599d3563b98195fb
|
4
|
+
data.tar.gz: 18e8ece0618b97099513220ba3368d120bd171c23a3847d7872d1aa4ff19f11e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 298f71d8ae111b2ce297523f44832bb7ef268dda68e5297df41a1a6bea250ddbe0f90ea9370ac0b0c8095c64ffdfab0463b4a7289a8afa2a48ff4a9df1e84414
|
7
|
+
data.tar.gz: c02cd508bbd728d2553716964b24958dd1c25a8cbba1c5c77ba3293df67c0d4c4246e732d20b9d704b4c289a92204626d6722383015c1f7c0e84be0f22ade17b
|
@@ -0,0 +1,126 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
RSpec:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
fail-fast: false
|
10
|
+
matrix:
|
11
|
+
rails:
|
12
|
+
- '5.2'
|
13
|
+
- '6.0'
|
14
|
+
ruby:
|
15
|
+
- '2.5.x'
|
16
|
+
- '2.6.x'
|
17
|
+
database:
|
18
|
+
- mysql
|
19
|
+
- postgresql
|
20
|
+
env:
|
21
|
+
DB: ${{ matrix.database }}
|
22
|
+
DB_USER: alchemy_user
|
23
|
+
DB_PASSWORD: password
|
24
|
+
DB_HOST: '127.0.0.1'
|
25
|
+
RAILS_ENV: test
|
26
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
27
|
+
services:
|
28
|
+
postgres:
|
29
|
+
image: postgres:11
|
30
|
+
env:
|
31
|
+
POSTGRES_USER: alchemy_user
|
32
|
+
POSTGRES_PASSWORD: password
|
33
|
+
POSTGRES_DB: alchemy_cms_dummy_test
|
34
|
+
ports: ['5432:5432']
|
35
|
+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
36
|
+
mysql:
|
37
|
+
image: mysql:latest
|
38
|
+
ports: ['3306:3306']
|
39
|
+
env:
|
40
|
+
MYSQL_USER: alchemy_user
|
41
|
+
MYSQL_PASSWORD: password
|
42
|
+
MYSQL_DATABASE: alchemy_cms_dummy_test
|
43
|
+
MYSQL_ROOT_PASSWORD: password
|
44
|
+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
|
45
|
+
steps:
|
46
|
+
- uses: actions/checkout@v2.3.4
|
47
|
+
- name: Set up Ruby
|
48
|
+
uses: actions/setup-ruby@v1.1.2
|
49
|
+
with:
|
50
|
+
ruby-version: ${{ matrix.ruby }}
|
51
|
+
- name: Restore apt cache
|
52
|
+
id: apt-cache
|
53
|
+
uses: actions/cache@v2.1.3
|
54
|
+
with:
|
55
|
+
path: /home/runner/apt/cache
|
56
|
+
key: ${{ runner.os }}-apt-${{ matrix.database }}
|
57
|
+
restore-keys: |
|
58
|
+
${{ runner.os }}-apt-
|
59
|
+
- name: Install Postgres headers
|
60
|
+
if: matrix.database == 'postgresql'
|
61
|
+
run: |
|
62
|
+
mkdir -p /home/runner/apt/cache
|
63
|
+
sudo apt update -qq
|
64
|
+
sudo apt install -qq --fix-missing libpq-dev -o dir::cache::archives="/home/runner/apt/cache"
|
65
|
+
sudo chown -R runner /home/runner/apt/cache
|
66
|
+
- name: Install MySQL headers
|
67
|
+
if: matrix.database == 'mysql'
|
68
|
+
run: |
|
69
|
+
mkdir -p /home/runner/apt/cache
|
70
|
+
sudo apt update -qq
|
71
|
+
sudo apt install -qq --fix-missing libmysqlclient-dev -o dir::cache::archives="/home/runner/apt/cache"
|
72
|
+
sudo chown -R runner /home/runner/apt/cache
|
73
|
+
- name: Install bundler
|
74
|
+
run: |
|
75
|
+
gem install bundler
|
76
|
+
- name: Restore Ruby Gems cache
|
77
|
+
id: cache
|
78
|
+
uses: actions/cache@v2.1.3
|
79
|
+
with:
|
80
|
+
path: vendor/bundle
|
81
|
+
key: ${{ runner.os }}-bundle-${{ matrix.ruby }}-${{ matrix.rails }}-${{ matrix.database }}-${{ hashFiles('**/Gemfile') }}
|
82
|
+
restore-keys: |
|
83
|
+
${{ runner.os }}-bundle-
|
84
|
+
- name: Install bundle
|
85
|
+
timeout-minutes: 10
|
86
|
+
run: |
|
87
|
+
bundle install --jobs 4 --retry 3 --path vendor/bundle
|
88
|
+
- name: Restore node modules cache
|
89
|
+
id: yarn-cache
|
90
|
+
uses: actions/cache@v2.1.3
|
91
|
+
with:
|
92
|
+
path: spec/dummy/node_modules
|
93
|
+
key: ${{ runner.os }}-yarn-dummy-${{ hashFiles('./package.json') }}
|
94
|
+
restore-keys: |
|
95
|
+
${{ runner.os }}-yarn-dummy-
|
96
|
+
- name: Prepare database
|
97
|
+
run: |
|
98
|
+
bundle exec rake alchemy:spec:prepare
|
99
|
+
- name: Run tests & publish code coverage
|
100
|
+
uses: paambaati/codeclimate-action@v2.7.5
|
101
|
+
env:
|
102
|
+
CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
|
103
|
+
with:
|
104
|
+
coverageCommand: bundle exec rspec
|
105
|
+
- uses: actions/upload-artifact@main
|
106
|
+
if: failure()
|
107
|
+
with:
|
108
|
+
name: Screenshots
|
109
|
+
path: spec/dummy/tmp/screenshots
|
110
|
+
Jest:
|
111
|
+
runs-on: ubuntu-latest
|
112
|
+
env:
|
113
|
+
NODE_ENV: test
|
114
|
+
steps:
|
115
|
+
- uses: actions/checkout@v2.3.4
|
116
|
+
- name: Restore node modules cache
|
117
|
+
uses: actions/cache@v2.1.3
|
118
|
+
with:
|
119
|
+
path: node_modules
|
120
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('./package.json') }}
|
121
|
+
restore-keys: |
|
122
|
+
${{ runner.os }}-yarn-
|
123
|
+
- name: Install yarn
|
124
|
+
run: yarn install
|
125
|
+
- name: Run jest
|
126
|
+
run: yarn jest
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 5.0.2 (2020-12-18)
|
2
|
+
|
3
|
+
- Fix page sorting [#1984](https://github.com/AlchemyCMS/alchemy_cms/pull/1984) ([tvdeyen](https://github.com/tvdeyen))
|
4
|
+
|
1
5
|
## 5.0.1 (2020-09-29)
|
2
6
|
|
3
7
|
- Better image alt text support [#1940](https://github.com/AlchemyCMS/alchemy_cms/pull/1940) ([tvdeyen](https://github.com/tvdeyen))
|
data/Gemfile
CHANGED
@@ -13,7 +13,7 @@ gem "mysql2", "~> 0.5.1" if ENV["DB"] == "mysql"
|
|
13
13
|
gem "pg", "~> 1.0" if ENV["DB"] == "postgresql"
|
14
14
|
|
15
15
|
group :development, :test do
|
16
|
-
if ENV["
|
16
|
+
if ENV["GITHUB_ACTIONS"]
|
17
17
|
gem "sassc", "~> 2.4.0" # https://github.com/sass/sassc-ruby/issues/146
|
18
18
|
else
|
19
19
|
gem "launchy"
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# AlchemyCMS
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/alchemy_cms.svg)](http://badge.fury.io/rb/alchemy_cms)
|
4
|
-
[![Build Status](https://
|
4
|
+
[![Build Status](https://github.com/AlchemyCMS/alchemy_cms/workflows/CI/badge.svg?branch=main)](https://github.com/AlchemyCMS/alchemy_cms/actions)
|
5
5
|
[![Maintainability](https://api.codeclimate.com/v1/badges/196c56c56568ed24a697/maintainability)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/maintainability)
|
6
6
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/196c56c56568ed24a697/test_coverage)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/test_coverage)
|
7
7
|
[![Depfu](https://badges.depfu.com/badges/ebe56d2dd7b7044a8ae700cc81212a8e/overview.svg)](https://depfu.com/github/AlchemyCMS/alchemy_cms?project_id=4600)
|
@@ -40,7 +40,7 @@ module Alchemy
|
|
40
40
|
|
41
41
|
level = path.count + base_level
|
42
42
|
|
43
|
-
path.last[:children] << page_hash(page,
|
43
|
+
path.last[:children] << page_hash(page, level, folded)
|
44
44
|
end
|
45
45
|
|
46
46
|
tree
|
@@ -48,7 +48,7 @@ module Alchemy
|
|
48
48
|
|
49
49
|
protected
|
50
50
|
|
51
|
-
def page_hash(page,
|
51
|
+
def page_hash(page, level, folded)
|
52
52
|
p_hash = {
|
53
53
|
id: page.id,
|
54
54
|
name: page.name,
|
@@ -59,8 +59,8 @@ module Alchemy
|
|
59
59
|
urlname: page.urlname,
|
60
60
|
url_path: page.url_path,
|
61
61
|
level: level,
|
62
|
-
root: page.
|
63
|
-
root_or_leaf: page.
|
62
|
+
root: page.root?,
|
63
|
+
root_or_leaf: page.root? || page.leaf?,
|
64
64
|
children: [],
|
65
65
|
}
|
66
66
|
|
data/lib/alchemy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -10,10 +10,10 @@ authors:
|
|
10
10
|
- Hendrik Mans
|
11
11
|
- Carsten Fregin
|
12
12
|
- Martin Meyerhoff
|
13
|
-
autorequire:
|
13
|
+
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2020-
|
16
|
+
date: 2020-12-18 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: active_model_serializers
|
@@ -596,6 +596,7 @@ files:
|
|
596
596
|
- ".github/ISSUE_TEMPLATE/Bug_report.md"
|
597
597
|
- ".github/ISSUE_TEMPLATE/Feature_request.md"
|
598
598
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
599
|
+
- ".github/workflows/ci.yml"
|
599
600
|
- ".github/workflows/greetings.yml"
|
600
601
|
- ".github/workflows/stale.yml"
|
601
602
|
- ".gitignore"
|
@@ -603,7 +604,6 @@ files:
|
|
603
604
|
- ".localeapp/config.rb"
|
604
605
|
- ".prettierrc"
|
605
606
|
- ".rubocop.yml"
|
606
|
-
- ".travis.yml"
|
607
607
|
- ".yardopts"
|
608
608
|
- CHANGELOG.md
|
609
609
|
- CODE_OF_CONDUCT.md
|
@@ -1268,9 +1268,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1268
1268
|
version: '0'
|
1269
1269
|
requirements:
|
1270
1270
|
- ImageMagick (libmagick), v6.6 or greater.
|
1271
|
-
rubygems_version: 3.
|
1272
|
-
signing_key:
|
1271
|
+
rubygems_version: 3.1.4
|
1272
|
+
signing_key:
|
1273
1273
|
specification_version: 4
|
1274
1274
|
summary: A powerful, userfriendly and flexible CMS for Rails
|
1275
1275
|
test_files: []
|
1276
|
-
...
|
data/.travis.yml
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
os: linux
|
3
|
-
dist: bionic
|
4
|
-
services:
|
5
|
-
- mysql
|
6
|
-
addons:
|
7
|
-
postgresql: "10"
|
8
|
-
cache:
|
9
|
-
bundler: true
|
10
|
-
yarn: true
|
11
|
-
directories:
|
12
|
-
- /home/travis/.webdrivers/
|
13
|
-
rvm:
|
14
|
-
- 2.6.6
|
15
|
-
- 2.7.1
|
16
|
-
|
17
|
-
before_script:
|
18
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
19
|
-
- chmod +x ./cc-test-reporter
|
20
|
-
- ./cc-test-reporter before-build
|
21
|
-
- nvm use 12
|
22
|
-
|
23
|
-
script: bundle exec rake
|
24
|
-
|
25
|
-
after_script:
|
26
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
27
|
-
|
28
|
-
jobs:
|
29
|
-
include:
|
30
|
-
- language: node_js
|
31
|
-
node_js: 12
|
32
|
-
install: yarn install
|
33
|
-
script: yarn jest --coverage
|
34
|
-
env: NODE_ENV=test
|
35
|
-
before_script: skip
|
36
|
-
after_script: skip
|
37
|
-
|
38
|
-
env:
|
39
|
-
global:
|
40
|
-
CC_TEST_REPORTER_ID=bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
|
41
|
-
jobs:
|
42
|
-
- DB=mysql RAILS_VERSION=5.2
|
43
|
-
- DB=mysql RAILS_VERSION=6.0
|
44
|
-
- DB=postgresql RAILS_VERSION=5.2
|
45
|
-
- DB=postgresql RAILS_VERSION=6.0
|
46
|
-
notifications:
|
47
|
-
slack:
|
48
|
-
secure: QzOFw1Ph69pzwWBFgtIVkOnjbcRxB9HPRQ+RYjK+2tg+fsbiTJ+wYgHcZL49tPYcLAls4kymkFWzWBF3PCAXJMfKgUCqXzdQ2FuJC/JoVRTLll4wDnZFPG33jsm5tVznmycZ3ma4+ZWfJQ+C+elEBOba6v1kG9eGIy6sH2cvXfE=
|