mirror of
https://github.com/davidallendj/gdpm.git
synced 2025-12-20 03:27:02 -07:00
Added CI script, updated dependencies, and fixed bugs
-Added CI yaml file for workflows -Added `doctest` as dependency -Added test target executable to CMakeLists.txt -Renamed `bin` scripts to remove `gdpm*` prefix -Updated `SQLite 3` dependency in CMakeLists.txt -Implement basic unit testing in `tests/basic.cpp` -Fixed issue with handling `fmt` strings
This commit is contained in:
parent
e36f0aee79
commit
e048a762b2
22 changed files with 169 additions and 38 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "constants.hpp"
|
||||
#include "error.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
|
|
@ -9,7 +10,7 @@
|
|||
|
||||
|
||||
namespace gdpm::config{
|
||||
struct config_context{
|
||||
struct context{
|
||||
std::string username;
|
||||
std::string password;
|
||||
std::string path;
|
||||
|
|
@ -24,10 +25,11 @@ namespace gdpm::config{
|
|||
bool enable_file_logging;
|
||||
int verbose;
|
||||
};
|
||||
std::string to_json(const config_context& params);
|
||||
config_context load(std::filesystem::path path, int verbose = 0);
|
||||
int save(const config_context& config, int verbose = 0);
|
||||
config_context make_context(const std::string& username = GDPM_CONFIG_USERNAME, const std::string& password = GDPM_CONFIG_PASSWORD, const std::string& path = GDPM_CONFIG_PATH, const std::string& token = GDPM_CONFIG_TOKEN, const std::string& godot_version = GDPM_CONFIG_GODOT_VERSION, const std::string& packages_dir = GDPM_CONFIG_LOCAL_PACKAGES_DIR, const std::string& tmp_dir = GDPM_CONFIG_LOCAL_TMP_DIR, const std::set<std::string>& remote_sources = {GDPM_CONFIG_REMOTE_SOURCES}, size_t threads = GDPM_CONFIG_THREADS, size_t timeout = 0, bool enable_sync = GDPM_CONFIG_ENABLE_SYNC, bool enable_file_logging = GDPM_CONFIG_ENABLE_FILE_LOGGING, int verbose = GDPM_CONFIG_VERBOSE);
|
||||
std::string to_json(const context& params);
|
||||
context load(std::filesystem::path path, int verbose = 0);
|
||||
gdpm::error load(std::filesystem:: path, context& config, int verbose = 0);
|
||||
gdpm::error save(std::filesystem::path path, const context& config, int verbose = 0);
|
||||
context make_context(const std::string& username = GDPM_CONFIG_USERNAME, const std::string& password = GDPM_CONFIG_PASSWORD, const std::string& path = GDPM_CONFIG_PATH, const std::string& token = GDPM_CONFIG_TOKEN, const std::string& godot_version = GDPM_CONFIG_GODOT_VERSION, const std::string& packages_dir = GDPM_CONFIG_LOCAL_PACKAGES_DIR, const std::string& tmp_dir = GDPM_CONFIG_LOCAL_TMP_DIR, const std::set<std::string>& remote_sources = {GDPM_CONFIG_REMOTE_SOURCES}, size_t threads = GDPM_CONFIG_THREADS, size_t timeout = 0, bool enable_sync = GDPM_CONFIG_ENABLE_SYNC, bool enable_file_logging = GDPM_CONFIG_ENABLE_FILE_LOGGING, int verbose = GDPM_CONFIG_VERBOSE);
|
||||
|
||||
extern config_context config;
|
||||
extern context config;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue