1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00

updated version check worker

This commit is contained in:
Sylvain 2020-01-14 16:16:25 +01:00
parent bb48a13f83
commit a564ec62b5
2 changed files with 10 additions and 2 deletions

View File

@ -9,7 +9,15 @@ class VersionCheckWorker
res = FabHub.fab_manager_version_check
setting_ver = Setting.find_or_initialize_by(name: 'hub_last_version')
setting_ver.value = { version: res['last_version']['semver'], security: res['last_version']['security'], status: res['up_to_date'] }.to_json.to_s
value = {
security: res['status']['security'],
up_to_date: res['status']['up_to_date']
}
if res['upgrade_to']
value['version'] = res['upgrade_to']['semver']
value['url'] = res['upgrade_to']['url']
end
setting_ver.value = value.to_json.to_s
setting_ver.save!
setting_key = Setting.find_or_initialize_by(name: 'hub_public_key')

View File

@ -1,6 +1,6 @@
{
"name": "fab-manager",
"version": "4.3.0-dev",
"version": "4.0.0-dev",
"description": "FabManager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.",
"keywords": [
"fablab",