Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
1c0d4d3
Merge branch 'stable'
christianlupus Feb 15, 2021
777fac0
[tx-robot] updated from transifex
nextcloud-bot Feb 16, 2021
a2bfd54
Added translatable placeholder for nutritient selection
seyfeb Feb 16, 2021
d77a7dc
Merge pull request #596 from nextcloud/fix/issue495part1
seyfeb Feb 16, 2021
835505a
[tx-robot] updated from transifex
nextcloud-bot Feb 17, 2021
00d278d
[tx-robot] updated from transifex
nextcloud-bot Feb 18, 2021
64d3811
[tx-robot] updated from transifex
nextcloud-bot Feb 19, 2021
a8dd7b5
[tx-robot] updated from transifex
nextcloud-bot Feb 20, 2021
ee74fa8
Bump eslint-config-prettier from 7.2.0 to 8.0.0
dependabot[bot] Feb 22, 2021
36e46c9
[tx-robot] updated from transifex
nextcloud-bot Feb 23, 2021
8c74fe7
Update ESlint config
christianlupus Feb 23, 2021
2c5d2b7
Update changelog
christianlupus Feb 23, 2021
eeb9e1a
Merge pull request #603 from nextcloud/dependabot/npm_and_yarn/eslint…
dependabot[bot] Feb 23, 2021
1544e5a
Deprecate some routes by comments
christianlupus Feb 13, 2021
c0267b9
Deprecation of unknown routes
christianlupus Feb 23, 2021
c139e57
Update changelog
christianlupus Feb 23, 2021
341f444
Merge pull request #580 from nextcloud/dev/cleanup-api
christianlupus Feb 23, 2021
ce31303
Updated workflow file to be correctly indented
christianlupus Feb 23, 2021
0f5ff6d
Apply prettier code styling without any modifications
christianlupus Feb 23, 2021
e40ce55
Manually rework tranlsations to be on one line
christianlupus Feb 23, 2021
4f32225
Add code style checker to workflow
christianlupus Feb 23, 2021
483033a
Update Changelog file
christianlupus Feb 23, 2021
f88a32b
Merge pull request #607 from nextcloud/dev/pretty-vue-files
christianlupus Feb 23, 2021
c571e1e
Automated fixed applied
christianlupus Feb 23, 2021
dcd02e4
Manually corrected some styles from stylelint
christianlupus Feb 23, 2021
2fdc85b
Added stylelint checks to CI scripts
christianlupus Feb 23, 2021
09953ee
Update changelog
christianlupus Feb 23, 2021
eb191f0
Install required packages using npm install for linting
christianlupus Feb 23, 2021
c5af22d
Add error message with useful tips to solve linting issues
christianlupus Feb 23, 2021
d8fd6ff
Merge pull request #608 from nextcloud/dev/stylelint
christianlupus Feb 23, 2021
d45b29d
Increase compatibility level to nextcloud version 21
christianlupus Feb 23, 2021
050b5af
[tx-robot] updated from transifex
nextcloud-bot Feb 24, 2021
1c3d0fd
[tx-robot] updated from transifex
nextcloud-bot Feb 25, 2021
9debbaf
Code cleanup & refactoring
seyfeb Feb 24, 2021
c9a7011
Updated CHANGELOG
seyfeb Feb 25, 2021
95492fe
[tx-robot] updated from transifex
nextcloud-bot Feb 26, 2021
747e532
Updated eslint configuration
seyfeb Feb 25, 2021
fd1e2eb
Changes to make code compatible with eslint settings
seyfeb Feb 25, 2021
036ff21
Added eslint to tests
seyfeb Feb 25, 2021
cc3082f
Merge pull request #615 from nextcloud/maintenance/js
christianlupus Feb 27, 2021
471a602
Disable testing in repos without secrets
christianlupus Feb 27, 2021
5954f92
Updated changelog
christianlupus Feb 27, 2021
ff20188
Merge pull request #620 from christianlupus/fix/nightly
christianlupus Feb 27, 2021
ed6b069
Do not only filter but exclude paths from search
christianlupus Feb 27, 2021
8200283
Updated changelog
christianlupus Feb 27, 2021
2af8d49
Merge pull request #621 from nextcloud/fix/cs-fixer
christianlupus Feb 27, 2021
fd41ddb
[tx-robot] updated from transifex
nextcloud-bot Feb 28, 2021
532d63c
[tx-robot] updated from transifex
nextcloud-bot Mar 1, 2021
c3a4529
[tx-robot] updated from transifex
nextcloud-bot Mar 2, 2021
c228859
adjust to new dbal
icewind1991 Feb 22, 2021
704b265
Usage of polyfill class to cope with backward incompatible change in …
christianlupus Feb 27, 2021
ed464ed
Merge branch 'adjust-dbal' into compatibility/nc21
christianlupus Mar 3, 2021
382cd98
Merge pull request #628 from nextcloud/compatibility/nc21
christianlupus Mar 3, 2021
8a5f536
Support only current NC core versions
christianlupus Mar 3, 2021
2982580
Update changelog
christianlupus Mar 3, 2021
cb98a48
Merge pull request #630 from nextcloud/maintenance/drop-nc18-support
christianlupus Mar 3, 2021
553edca
Bum version in changelog
christianlupus Mar 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,12 @@ extends:
- "plugin:vue/strongly-recommended"
- "plugin:vue/recommended"
- prettier
#- prettier/babel
- prettier/vue

globals:
OC:
t:

rules:
no-plusplus:
- error
- allowForLoopAfterthoughts: true
14 changes: 14 additions & 0 deletions .github/workflows/build-test-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,21 @@ jobs:
- "7.3"
- "8"
steps:
- name: Check if secret is known
shell: bash
id: check
run: |
echo "::set-output name=skip::false"
if [ -z "${{ secrets.DOCKER_HUB_TOKEN }}" ]; then
echo "::set-output name=skip::true"
fi
if [ -z "${{ secrets.DOCKER_HUB_USERNAME }}" ]; then
echo "::set-output name=skip::true"
fi

- name: Checkout the app
uses: actions/checkout@v2
if: ${{ steps.check.outputs.skip == 'false' }}

- name: Build and push the image
shell: bash
Expand All @@ -31,3 +44,4 @@ jobs:
export COMPOSE_DOCKER_CLI_BUILD=1 &&
PHP_VERSION=${{ matrix.phpVersion }}
./run-locally.sh --pull --create-images --push-images
if: ${{ steps.check.outputs.skip == 'false' }}
92 changes: 63 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,64 @@ on:
jobs:

php-lint:
name: Run PHP Linter and Code Style checker
runs-on: ubuntu-latest
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Get PHP version
shell: bash
run: php -v
- name: Install Composer
shell: bash
run: >-
wget https://github.com/composer/getcomposer.org/raw/master/web/installer -O - -q |
php -- --quiet
- name: Install packages
shell: bash
run: composer install
- name: Run linter
shell: bash
run: composer lint:lint
- name: Run code style checker
shell: bash
env:
PHP_CS_FIXER_IGNORE_ENV: 1
run: composer cs:check
name: Run PHP Linter and Code Style checker
runs-on: ubuntu-latest
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Get PHP version
shell: bash
run: php -v

- name: Install Composer
shell: bash
run: >-
wget https://github.com/composer/getcomposer.org/raw/master/web/installer -O - -q |
php -- --quiet

- name: Install PHP packages
shell: bash
run: composer install
- name: Install Node packages
shell: bash
run: npm -q install

- name: Run PHP linter
shell: bash
run: composer lint:lint
- name: Run PHP code style checker
shell: bash
env:
PHP_CS_FIXER_IGNORE_ENV: 1
run: composer cs:check

- name: Check for formatting issues with vue files (prettier)
shell: bash
run: >-
npm run prettier || {
echo '::error ::The prettier style checker failed.
Please run `npm run prettier-fix` in order to correct this.';
exit 1;
}

- name: Check for issues with vue and js files (eslint)
shell: bash
run: >-
npm run eslint || {
echo '::error ::The eslint style checker failed.
Please run `npm run eslint-fix` in order to correct this.';
exit 1;
}

- name: Check for formatting issues with CSS files (stylelint)
shell: bash
run: >-
npm run stylelint || {
echo '::error ::The stylelint checker failed.
Please run `npm run stylelint-fix` to help solving these issues if possible.';
exit 1;
}


unit-tests:
name: Run the unittests
Expand All @@ -47,7 +81,7 @@ jobs:
- pgsql
- sqlite
coreVersion:
- stable20
- stable21
phpVersion:
- "7"
httpServer:
Expand All @@ -57,26 +91,26 @@ jobs:
include:
# Test different core versions additionally
- database: mysql
coreVersion: stable18
coreVersion: stable19
phpVersion: "7"
httpServer: "apache"
mayFail: false
- database: mysql
coreVersion: stable19
coreVersion: stable20
phpVersion: "7"
httpServer: "apache"
mayFail: false

# Test different PHP versions additionally
- database: mysql
coreVersion: stable20
coreVersion: stable21
phpVersion: "7.3"
httpServer: "apache"
mayFail: false

# Test different HTTP server
- database: mysql
coreVersion: stable20
coreVersion: stable21
phpVersion: "7"
httpServer: "nginx"
mayFail: false
Expand Down
12 changes: 6 additions & 6 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ $config = new Config();
$config
->getFinder()
->ignoreVCSIgnored(true)
->notPath('build')
->notPath('l10n')
->exclude('build')
->exclude('l10n')
// ->notPath('lib/Vendor')
->notPath('src')
->notPath('node_modules')
->notPath('vendor')
->notPath('.github')
->exclude('src')
->exclude('node_modules')
->exclude('vendor')
->exclude('.github')
->in(__DIR__);
return $config;

1 change: 1 addition & 0 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ rules:
- attribute
"selector-max-id": 1
"max-nesting-depth": 2
"selector-max-compound-selectors": 4

extends:
- stylelint-config-standard
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
## [Unreleased]

## 0.8.2 - 2021-03-03

### Fixed
- Added translation for nutritient-value label placeholder
[#596](https://github.com/nextcloud/cookbook/pull/596) @seyfeb
- Updated dependency of eslint-config-prettier
[#603](https://github.com/nextcloud/cookbook/pull/603) @christianlupus
- Enforce basic code styling using prettier in vue files
[#607](https://github.com/nextcloud/cookbook/pull/607) @christianlupus
- Enforce CSS styling using stylelint
[#608](https://github.com/nextcloud/cookbook/pull/608) @christianlupus
- More code styling, cleanup & minor bugfixes
[#615](https://github.com/nextcloud/cookbook/pull/615) @seyfeb
- Avoid daily issues in personal forks due to missing secrets
[#620](https://github.com/nextcloud/cookbook/pull/620) @christianlupus
- Avoid descending of CS_fixer into non-code folders
[#621](https://github.com/nextcloud/cookbook/pull/621) @christianlupus
- Fixed compatiblity with Nextcloud 21
[#605](https://github.com/nextcloud/cookbook/pull/605) @icewind1991

## Deprecated
- Obsolete routes to old user interface, see `appinfo/routes.php`
[#580](https://github.com/nextcloud/cookbook/pull/580) @christianlupus

## Removed
- Dropped support for NC core version <= 18
[#630](https://github.com/nextcloud/cookbook/pull/630) @christianlupus

## 0.8.1 - 2021-02-15

### Added
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/cookbook/stable/img/screenshot-small.jpg">https://raw.githubusercontent.com/nextcloud/cookbook/stable/img/screenshot-small.jpg</screenshot>
<dependencies>
<php min-version="7.2"/>
<nextcloud min-version="17" max-version="20"/>
<nextcloud min-version="19" max-version="21"/>
</dependencies>
<navigations>
<navigation>
Expand Down
16 changes: 9 additions & 7 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,9 @@
*/
['name' => 'main#getApiVersion', 'url' => '/api/version', 'verb' => 'GET'],
['name' => 'main#index', 'url' => '/', 'verb' => 'GET'],
['name' => 'main#home', 'url' => '/home', 'verb' => 'GET'],
['name' => 'main#keywords', 'url' => '/keywords', 'verb' => 'GET'],
['name' => 'main#categories', 'url' => '/categories', 'verb' => 'GET'],
['name' => 'main#error', 'url' => '/error', 'verb' => 'GET'],
['name' => 'main#create', 'url' => '/recipes/create', 'verb' => 'GET'],
['name' => 'main#new', 'url' => '/recipes/create', 'verb' => 'POST'],
['name' => 'main#import', 'url' => '/import', 'verb' => 'POST'],
['name' => 'main#edit', 'url' => '/recipes/{id}/edit', 'verb' => 'GET', 'requirements' => ['id' => '\d+']],
['name' => 'main#update', 'url' => '/recipes/{id}/edit', 'verb' => 'PUT', 'requirements' => ['id' => '\d+']],
['name' => 'main#recipe', 'url' => '/recipes/{id}', 'verb' => 'GET', 'requirements' => ['id' => '\d+']],
['name' => 'recipe#image', 'url' => '/recipes/{id}/image', 'verb' => 'GET', 'requirements' => ['id' => '\d+']],
['name' => 'config#reindex', 'url' => '/reindex', 'verb' => 'POST'],
['name' => 'config#list', 'url' => '/config', 'verb' => 'GET'],
Expand All @@ -35,6 +28,15 @@
['name' => 'main#categoryUpdate', 'url' => '/api/category/{category}', 'verb' => 'PUT'],
['name' => 'main#tags', 'url' => '/api/tags/{keywords}', 'verb' => 'GET'],
['name' => 'main#search', 'url' => '/api/search/{query}', 'verb' => 'GET'],
/* Unknown usage */
/* Deprecated routes */
['name' => 'main#new', 'url' => '/recipes/create', 'verb' => 'POST'],
['name' => 'main#update', 'url' => '/recipes/{id}/edit', 'verb' => 'PUT', 'requirements' => ['id' => '\d+']],
['name' => 'main#home', 'url' => '/home', 'verb' => 'GET'],
['name' => 'main#error', 'url' => '/error', 'verb' => 'GET'],
['name' => 'main#create', 'url' => '/recipes/create', 'verb' => 'GET'],
['name' => 'main#edit', 'url' => '/recipes/{id}/edit', 'verb' => 'GET', 'requirements' => ['id' => '\d+']],
['name' => 'main#recipe', 'url' => '/recipes/{id}', 'verb' => 'GET', 'requirements' => ['id' => '\d+']],
],

/* API resources */
Expand Down
4 changes: 2 additions & 2 deletions l10n/af.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ OC.L10N.register(
"cookbook",
{
"Home" : "Tuis",
"Filter" : "Filter",
"Search" : "Soek",
"Save changes" : "Bewaar veranderinge",
"Loading…" : "Laai…",
"Page not found" : "Blad nie gevind nie",
"Filter" : "Filter",
"Search" : "Soek",
"Category" : "Kategorie",
"Add" : "Voeg by",
"Name" : "Naam",
Expand Down
4 changes: 2 additions & 2 deletions l10n/af.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{ "translations": {
"Home" : "Tuis",
"Filter" : "Filter",
"Search" : "Soek",
"Save changes" : "Bewaar veranderinge",
"Loading…" : "Laai…",
"Page not found" : "Blad nie gevind nie",
"Filter" : "Filter",
"Search" : "Soek",
"Category" : "Kategorie",
"Add" : "Voeg by",
"Name" : "Naam",
Expand Down
4 changes: 2 additions & 2 deletions l10n/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ OC.L10N.register(
"cookbook",
{
"Home" : "الرئيسية",
"Filter" : "فلتر",
"Search" : "البحث",
"Save changes" : "حفظ التعديلات",
"Loading…" : "التحميل جارٍ…",
"Filter" : "فلتر",
"Search" : "البحث",
"Category" : "الفئة",
"Uncategorized recipes" : "وصفات غير مصنفة",
"Add" : "إضافة",
Expand Down
4 changes: 2 additions & 2 deletions l10n/ar.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ "translations": {
"Home" : "الرئيسية",
"Filter" : "فلتر",
"Search" : "البحث",
"Save changes" : "حفظ التعديلات",
"Loading…" : "التحميل جارٍ…",
"Filter" : "فلتر",
"Search" : "البحث",
"Category" : "الفئة",
"Uncategorized recipes" : "وصفات غير مصنفة",
"Add" : "إضافة",
Expand Down
4 changes: 2 additions & 2 deletions l10n/ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ OC.L10N.register(
"cookbook",
{
"Home" : "Aniciu",
"Filter" : "Peñerar",
"Search" : "Search",
"Save changes" : "Guardar camudancies",
"Loading…" : "Cargando...",
"Page not found" : "Nun s'alcontró la páxina",
"Filter" : "Peñerar",
"Search" : "Search",
"Category" : "Estaya",
"Add" : "Amestar",
"Name" : "Nome",
Expand Down
4 changes: 2 additions & 2 deletions l10n/ast.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{ "translations": {
"Home" : "Aniciu",
"Filter" : "Peñerar",
"Search" : "Search",
"Save changes" : "Guardar camudancies",
"Loading…" : "Cargando...",
"Page not found" : "Nun s'alcontró la páxina",
"Filter" : "Peñerar",
"Search" : "Search",
"Category" : "Estaya",
"Add" : "Amestar",
"Name" : "Nome",
Expand Down
4 changes: 2 additions & 2 deletions l10n/bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ OC.L10N.register(
"cookbook",
{
"Home" : "Начало",
"Filter" : "Филтър",
"Search" : "Търсене",
"Save changes" : "Запиши промените",
"Loading…" : "Зареждане…",
"Page not found" : "Страницата не е намерена",
"Filter" : "Филтър",
"Search" : "Търсене",
"Category" : "Категория",
"Add" : "Добави",
"Name" : "Име",
Expand Down
4 changes: 2 additions & 2 deletions l10n/bg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{ "translations": {
"Home" : "Начало",
"Filter" : "Филтър",
"Search" : "Търсене",
"Save changes" : "Запиши промените",
"Loading…" : "Зареждане…",
"Page not found" : "Страницата не е намерена",
"Filter" : "Филтър",
"Search" : "Търсене",
"Category" : "Категория",
"Add" : "Добави",
"Name" : "Име",
Expand Down
4 changes: 2 additions & 2 deletions l10n/br.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ OC.L10N.register(
"cookbook",
{
"Home" : "Degemer",
"Filter" : "Filtre",
"Search" : "Klask",
"Save changes" : "Enrollañ ar cheñchamantoù",
"Loading…" : "O Kargañ...",
"Filter" : "Filtre",
"Search" : "Klask",
"Add" : "Ouzhpennañ",
"Name" : "Anv",
"Description" : "Diskrivadur",
Expand Down
Loading