alchemy_cms 5.0.0 → 5.0.1
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/.travis.yml +48 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +2 -2
- data/README.md +1 -1
- data/app/models/alchemy/essence_picture_view.rb +5 -1
- data/lib/alchemy/version.rb +1 -1
- metadata +3 -3
- data/.github/workflows/ci.yml +0 -134
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6917c640c04335035e6dc96c947904226222acd26dec111b81da71496b40505e
|
|
4
|
+
data.tar.gz: d5e33e37d5d5cbacbbb6c3729468548155add079b131524880bdd9c8ff8fd35f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e73a121ef1c1eee8c0dc065a585509cc55f3eeb457e89f4356ab112a6c8347e1209bb6b37f7f865a1f3589f3f4aae07158a8e842874e735e46ebbb1566a689c7
|
|
7
|
+
data.tar.gz: d82eb3375db6a20ac410051da9e476b50193b1a72337660a87bc8931d56b674369bb4f1bc9909511b85183f16949a854cdbed6301884db8c59c1016a8b6fa53d
|
data/.travis.yml
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
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=
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 5.0.1 (2020-09-29)
|
|
2
|
+
|
|
3
|
+
- Better image alt text support [#1940](https://github.com/AlchemyCMS/alchemy_cms/pull/1940) ([tvdeyen](https://github.com/tvdeyen))
|
|
4
|
+
|
|
1
5
|
## 5.0.0 (2020-07-17)
|
|
2
6
|
|
|
3
7
|
- Do not convert JPEG images into JPG [#1904](https://github.com/AlchemyCMS/alchemy_cms/pull/1904) ([tvdeyen](https://github.com/tvdeyen))
|
data/Gemfile
CHANGED
|
@@ -10,10 +10,10 @@ if ENV["DB"].nil? || ENV["DB"] == "sqlite"
|
|
|
10
10
|
gem "sqlite3", "~> 1.4.1"
|
|
11
11
|
end
|
|
12
12
|
gem "mysql2", "~> 0.5.1" if ENV["DB"] == "mysql"
|
|
13
|
-
gem "pg",
|
|
13
|
+
gem "pg", "~> 1.0" if ENV["DB"] == "postgresql"
|
|
14
14
|
|
|
15
15
|
group :development, :test do
|
|
16
|
-
if ENV["
|
|
16
|
+
if ENV["TRAVIS"]
|
|
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
|
[](http://badge.fury.io/rb/alchemy_cms)
|
|
4
|
-
[](https://travis-ci.com/AlchemyCMS/alchemy_cms)
|
|
5
5
|
[](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/maintainability)
|
|
6
6
|
[](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/test_coverage)
|
|
7
7
|
[](https://depfu.com/github/AlchemyCMS/alchemy_cms?project_id=4600)
|
|
@@ -55,7 +55,7 @@ module Alchemy
|
|
|
55
55
|
def img_tag
|
|
56
56
|
@_img_tag ||= image_tag(
|
|
57
57
|
essence.picture_url(options.except(*DEFAULT_OPTIONS.keys)), {
|
|
58
|
-
alt:
|
|
58
|
+
alt: alt_text,
|
|
59
59
|
title: essence.title.presence,
|
|
60
60
|
class: caption ? nil : essence.css_class.presence,
|
|
61
61
|
srcset: srcset.join(", ").presence,
|
|
@@ -79,5 +79,9 @@ module Alchemy
|
|
|
79
79
|
width.present? ? "#{url} #{width}w" : "#{url} #{height}h"
|
|
80
80
|
end
|
|
81
81
|
end
|
|
82
|
+
|
|
83
|
+
def alt_text
|
|
84
|
+
essence.alt_tag.presence || html_options.delete(:alt) || essence.picture.name&.humanize
|
|
85
|
+
end
|
|
82
86
|
end
|
|
83
87
|
end
|
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.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas von Deyen
|
|
@@ -13,7 +13,7 @@ authors:
|
|
|
13
13
|
autorequire:
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
|
-
date: 2020-
|
|
16
|
+
date: 2020-09-29 00:00:00.000000000 Z
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
19
19
|
name: active_model_serializers
|
|
@@ -596,7 +596,6 @@ 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"
|
|
600
599
|
- ".github/workflows/greetings.yml"
|
|
601
600
|
- ".github/workflows/stale.yml"
|
|
602
601
|
- ".gitignore"
|
|
@@ -604,6 +603,7 @@ files:
|
|
|
604
603
|
- ".localeapp/config.rb"
|
|
605
604
|
- ".prettierrc"
|
|
606
605
|
- ".rubocop.yml"
|
|
606
|
+
- ".travis.yml"
|
|
607
607
|
- ".yardopts"
|
|
608
608
|
- CHANGELOG.md
|
|
609
609
|
- CODE_OF_CONDUCT.md
|
data/.github/workflows/ci.yml
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
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@v1
|
|
47
|
-
- name: Set up Ruby
|
|
48
|
-
uses: actions/setup-ruby@v1
|
|
49
|
-
with:
|
|
50
|
-
ruby-version: ${{ matrix.ruby }}
|
|
51
|
-
- name: Restore apt cache
|
|
52
|
-
id: apt-cache
|
|
53
|
-
uses: actions/cache@preview
|
|
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@preview
|
|
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@preview
|
|
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.5.7
|
|
101
|
-
env:
|
|
102
|
-
CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
|
|
103
|
-
with:
|
|
104
|
-
coverageCommand: bundle exec rspec
|
|
105
|
-
- uses: actions/upload-artifact@master
|
|
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@v1
|
|
116
|
-
- name: Restore node modules cache
|
|
117
|
-
uses: actions/cache@preview
|
|
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
|
|
127
|
-
- name: Run jest & publish code coverage
|
|
128
|
-
uses: paambaati/codeclimate-action@v2.5.7
|
|
129
|
-
env:
|
|
130
|
-
CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
|
|
131
|
-
with:
|
|
132
|
-
coverageLocations:
|
|
133
|
-
./coverage/lcov.info:lcov
|
|
134
|
-
coverageCommand: yarn jest --collectCoverage --coverageDirectory=coverage
|