remove YAML

master
Nicolò Balzarotti 2018-11-08 14:31:43 +01:00
parent 98ce81a32d
commit 0e8367757c
5 changed files with 8 additions and 16 deletions

View File

@ -13,12 +13,6 @@ git-tree-sha1 = "b530fbeb6f41ab5a83fbe3db1fcbe879334bcd2d"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.4.2"
[[Codecs]]
deps = ["Test"]
git-tree-sha1 = "70885e5e038cba1c4c17a84ad6c40756e10a4fb5"
uuid = "19ecbf4d-ef7c-5e4b-b54a-0a0ff23c5aed"
version = "0.5.0"
[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "ae262fa91da6a74e8937add6b613f58cd56cdad4"
@ -144,9 +138,3 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
[[YAML]]
deps = ["Codecs", "Compat", "Pkg"]
git-tree-sha1 = "3bde77cee95cce0c0b9b18813d85e18e8ed4f415"
uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
version = "0.3.2"

View File

@ -11,4 +11,3 @@ Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Nettle = "49dea1ee-f6fa-5aa6-9a11-8816cee7d4b9"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
URIParser = "30578b45-9adc-5946-b283-645ec420af67"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"

View File

@ -2,7 +2,6 @@ module MatrixChat
using HTTP
using JSON
using YAML
using Nettle
using Dates

View File

@ -742,9 +742,14 @@ function repl_init(repl)
return
end
function load_config_file(; configfile::String = expanduser("~/matrix/config.yaml"))
function load_config_file(; configfile::String = expanduser("~/matrix/config.jl"))
if isfile(configfile)
config = YAML.load_file(configfile)
config = try
include(configfile)
catch e
@error "Malformed config file!"
throw(e)
end
else
# First run, create a new user/login and create the config file
@error "First run not implemented!"

View File

@ -26,6 +26,7 @@ function new_user(s::MatrixServer,
parsed = String(raw_response.body)
write("$(username).json", parsed)
parsed = JSON.json(parsed)
MatrixUser(s,
parsed["user_id"], parsed["access_token"],
parsed["device_id"])