Skip to content

Commit d75cba2

Browse files
authored
cloud_py_api 0.1.2 (#51)
* Fixed typo in function name * cloud_py_api 0.1.2 * Minor js issues fixes * Adjusted setting description * Minor js changes
1 parent 7838146 commit d75cba2

File tree

11 files changed

+65
-41
lines changed

11 files changed

+65
-41
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.1.2 - 2023-01-17]
6+
7+
### Added
8+
9+
- Added check of sha256 pre-compiled binary checksum
10+
11+
### Fixed
12+
13+
- Fixed incorrect pre-compiled binary download (for Alpine-based systems)
14+
- Fixed escape colon symbol in logs file names
15+
516
## [0.1.1 - 2022-12-23]
617

718
### Changed

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You can support us in several ways:
3434
[![Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/cloud_py_api/donate)
3535
]]>
3636
</description>
37-
<version>0.1.1</version>
37+
<version>0.1.2</version>
3838
<licence>agpl</licence>
3939
<author mail="andrey18106x@gmail.com" homepage="https://github.com/andrey18106">Andrey Borysenko</author>
4040
<author mail="bigcat88@icloud.com" homepage="https://github.com/bigcat88">Alexander Piskun</author>

js/cloud_py_api-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/cloud_py_api-main.js.LICENSE.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
* Released under the MIT License.
1919
*/
2020

21+
/*!
22+
* escape-html
23+
* Copyright(c) 2012-2013 TJ Holowaychuk
24+
* Copyright(c) 2015 Andreas Lubbe
25+
* Copyright(c) 2015 Tiancheng "Timothy" Gu
26+
* MIT Licensed
27+
*/
28+
29+
/*! @license DOMPurify 2.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.3/LICENSE */
30+
2131
/*! For license information please see NcCheckboxRadioSwitch.js.LICENSE.txt */
2232

2333
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

js/cloud_py_api-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Migration/data/AppInitialData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class AppInitialData {
5050
"value" => 536870912,
5151
"displayName" => "Remote/Encrypted file size limit to process",
5252
"title" => "",
53-
"description" => "Maximum file size for requesting from php core. Used when file hosts on remote NC instance or have encrypted flag. Must be less then total available RAM size.",
53+
"description" => "Maximum file size (in GBytes) for requesting from php core. Used when file hosts on remote NC instance or have encrypted flag. Must be less then total available RAM size.",
5454
"helpUrl" => "https://cloud-py-api.readthedocs.io/{todo-url:/settings/setting_name}"
5555
],
5656
[
@@ -89,7 +89,7 @@ private function _stringsForL10N(): void {
8989
$this->l10n->t("Full path to python interpreter");
9090
$this->l10n->t("Absolute path to the python runnable (e.g. \"/usr/bin/python3\"). Can be obtained by `which python3` command. Used when pre-compiled binaries option is not selected.");
9191
$this->l10n->t("Remote/Encrypted file size limit to process");
92-
$this->l10n->t("Maximum file size for requesting from php core. Used when file hosts on remote NC instance or have encrypted flag. Must be less then total available RAM size.");
92+
$this->l10n->t("Maximum file size (in GBytes) for requesting from php core. Used when file hosts on remote NC instance or have encrypted flag. Must be less then total available RAM size.");
9393
$this->l10n->t("Use path to PHP interpreter for Python from settings");
9494
$this->l10n->t("Determine whether to use path from settings or detect it automatically (may not work with some unusual PHP install locations). Used in Python part.");
9595
$this->l10n->t("Full path to PHP interpreter for Python");

lib/Service/UtilsService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public function isVideosSupported(): bool {
189189
return $result;
190190
}
191191

192-
public function isMusliLinux(): bool {
192+
public function isMuslLinux(): bool {
193193
exec('ldd --version 2>&1', $output, $result_code);
194194
if (count($output) > 0 && str_contains($output[0], 'musl')) {
195195
return true;
@@ -404,7 +404,7 @@ public function addChmodX(array $binariesFolder, string $file_name): bool {
404404
* @return string part of binary name
405405
*/
406406
public function getBinaryName(): string {
407-
if (!$this->isMusliLinux()) {
407+
if (!$this->isMuslLinux()) {
408408
$binaryName = 'manylinux_' . $this->getOsArch();
409409
} else {
410410
$binaryName = 'musllinux_' . $this->getOsArch();

package-lock.json

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cloud_py_api",
33
"description": "Nextcloud Python API (Framework)",
4-
"version": "0.1.1",
4+
"version": "0.1.2",
55
"keywords": [
66
"nextcloud",
77
"python",

src/components/settings/AdminSettings.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ export default {
138138
return axios.put(generateUrl('/apps/cloud_py_api/api/v1/settings'), { settings }).then(res => {
139139
if (res.data.success) {
140140
this.settings = res.data.updated_settings
141+
this.settings.forEach(setting => {
142+
this.mappedSettings[setting.name] = setting
143+
})
141144
}
142145
return res
143146
})
@@ -165,10 +168,10 @@ export default {
165168
})
166169
},
167170
fromBytesToGBytes(bytes) {
168-
return bytes / Math.pow(1024, 3)
171+
return (bytes / Math.pow(1024, 3)).toFixed(1)
169172
},
170173
fromGBytesToBytes(GBytes) {
171-
return GBytes * Math.pow(1024, 3)
174+
return (GBytes * Math.pow(1024, 3)).toFixed(0)
172175
},
173176
updateRemoteFilesizeLimit() {
174177
this.mappedSettings.remote_filesize_limit.value = this.fromGBytesToBytes(Number(this.remote_filesize_limit))

tests/Unit/Service/UtilsServiceTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ function ($command, &$output, &$result_code) {
186186
$this->assertEquals($expected, $result, 'Should return videos processing availability');
187187
}
188188

189-
public function testIsMusliLinux() {
189+
public function testIsMuslLinux() {
190190
$expected = false;
191191
$exec = $this->getFunctionMock('\OCA\Cloud_Py_API\Service', 'exec');
192192
$exec->expects($this->any())
@@ -197,11 +197,11 @@ function ($command, &$output, &$result_code) {
197197
$result_code = 1;
198198
}
199199
);
200-
$result = $this->utils->isMusliLinux();
200+
$result = $this->utils->isMuslLinux();
201201
$this->assertEquals($expected, $result, 'Should return bool is musllinux');
202202
}
203203

204-
public function testIsMusliLinuxWithOverride() {
204+
public function testIsMuslLinuxWithOverride() {
205205
$expected = true;
206206
$exec = $this->getFunctionMock('\OCA\Cloud_Py_API\Service', 'exec');
207207
$exec->expects($this->any())
@@ -212,7 +212,7 @@ function ($command, &$output, &$result_code) {
212212
$result_code = 1;
213213
}
214214
);
215-
$result = $this->utils->isMusliLinux();
215+
$result = $this->utils->isMuslLinux();
216216
$this->assertEquals($expected, $result, 'Should return true bool is musllinux');
217217
}
218218

0 commit comments

Comments
 (0)