diff --git a/Manifest.toml b/Manifest.toml index e1c711455..472b1240d 100755 --- a/Manifest.toml +++ b/Manifest.toml @@ -89,10 +89,10 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[JSON]] -deps = ["Dates", "Distributed", "Mmap", "Sockets", "Test", "Unicode"] -git-tree-sha1 = "1f7a25b53ec67f5e9422f1f551ee216503f4a0fa" +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.20.0" +version = "0.21.0" [[JuliaInterpreter]] deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] @@ -162,6 +162,12 @@ git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" version = "1.1.0" +[[Parsers]] +deps = ["Dates", "Test"] +git-tree-sha1 = "db2b35dedab3c0e46dc15996d170af07a5ab91c9" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "0.3.6" + [[Pkg]] deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" diff --git a/Project.toml b/Project.toml index 223747c36..2c21352c4 100755 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Genie" uuid = "c43c736e-a2d1-11e8-161f-af95117fbd1e" authors = ["Adrian Salceanu "] -version = "0.9.7" +version = "0.9.8" [deps] ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" diff --git a/src/Configuration.jl b/src/Configuration.jl index 31e9eb652..6948f5379 100755 --- a/src/Configuration.jl +++ b/src/Configuration.jl @@ -3,7 +3,7 @@ Core genie configuration / settings functionality. """ module Configuration -const GENIE_VERSION = v"0.9.7" +const GENIE_VERSION = v"0.9.8" using Genie, YAML diff --git a/src/FileTemplates.jl b/src/FileTemplates.jl index 426dffad3..38185986c 100755 --- a/src/FileTemplates.jl +++ b/src/FileTemplates.jl @@ -55,7 +55,7 @@ function newchannel(channel_name::String) :: String """ module $(channel_name)Channel - using Genie.WebChannels, Genie.Router + using Genie.WebChannels, Genie.Router, Genie.Helpers function subscribe() diff --git a/src/WebChannels.jl b/src/WebChannels.jl index 4b27f1dcc..eb2b2464b 100755 --- a/src/WebChannels.jl +++ b/src/WebChannels.jl @@ -257,19 +257,17 @@ function message(channel::ChannelName, msg::String, payload::Union{Dict,Nothing} end -""" -Send message `msg` to `client`. -""" -function message(client::ChannelClient, msg::String) :: Int - write(client.client, msg) -end - - """ Writes `msg` to web socket for `client`. """ +function message(ws::HTTP.WebSockets.WebSocket, msg::String) :: Int + write(ws, msg) +end function message(client::ClientId, msg::String) :: Int - write(CLIENTS[client].client, msg) + message(CLIENTS[client].client, msg) +end +function message(client::ChannelClient, msg::String) :: Int + message(client.client, msg) end end