Skip to content

Commit

Permalink
update deps and bit/byte naming change
Browse files Browse the repository at this point in the history
  • Loading branch information
rawhat committed Nov 12, 2023
1 parent 08508cb commit 0be1d06
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions gleam.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ repository = { type = "github", user = "rawhat", repo = "glisten" }
gleam = ">= 0.32.0"

[dependencies]
gleam_stdlib = "~> 0.30"
gleam_otp = "~> 0.7"
gleam_erlang = "~> 0.22"
gleam_stdlib = "~> 0.32"
gleam_otp = "~> 0.8"
gleam_erlang = "~> 0.23"

[dev-dependencies]
gleeunit = "~> 0.10"
gleeunit = "~> 1.0"
16 changes: 8 additions & 8 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# You typically do not need to edit this file

packages = [
{ name = "gleam_erlang", version = "0.22.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "367D8B41A7A86809928ED1E7E55BFD0D46D7C4CF473440190F324AFA347109B4" },
{ name = "gleam_otp", version = "0.7.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_erlang"], otp_app = "gleam_otp", source = "hex", outer_checksum = "ED7381E90636E18F5697FD7956EECCA635A3B65538DC2BE2D91A38E61DCE8903" },
{ name = "gleam_stdlib", version = "0.30.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "704258528887F95075FFED7AAE1CCF836A9B88E3AADA2F69F9DA15815F94A4F9" },
{ name = "gleeunit", version = "0.11.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "1397E5C4AC4108769EE979939AC39BF7870659C5AFB714630DEEEE16B8272AD5" },
{ name = "gleam_erlang", version = "0.23.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "DA7A8E5540948DE10EB01B530869F8FF2FF6CAD8CFDA87626CE6EF63EBBF87CB" },
{ name = "gleam_otp", version = "0.8.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "gleam_otp", source = "hex", outer_checksum = "18EF8242A5E54BA92F717C7222F03B3228AEE00D1F286D4C56C3E8C18AA2588E" },
{ name = "gleam_stdlib", version = "0.32.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "ABF00CDCCB66FABBCE351A50060964C4ACE798F95A0D78622C8A7DC838792577" },
{ name = "gleeunit", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "D3682ED8C5F9CAE1C928F2506DE91625588CC752495988CBE0F5653A42A6F334" },
]

[requirements]
gleam_erlang = { version = "~> 0.22" }
gleam_otp = { version = "~> 0.7" }
gleam_stdlib = { version = "~> 0.30" }
gleeunit = { version = "~> 0.10" }
gleam_erlang = { version = "~> 0.23" }
gleam_otp = { version = "~> 0.8" }
gleam_stdlib = { version = "~> 0.32" }
gleeunit = { version = "~> 1.0" }
4 changes: 2 additions & 2 deletions src/glisten/handler.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub fn start(
atom.create_from_string("tcp"),
fn(_sock, data) {
data
|> dynamic.bit_string
|> dynamic.bit_array
|> result.unwrap(<<>>)
|> ReceiveMessage
},
Expand All @@ -94,7 +94,7 @@ pub fn start(
atom.create_from_string("ssl"),
fn(_sock, data) {
data
|> dynamic.bit_string
|> dynamic.bit_array
|> result.unwrap(<<>>)
|> ReceiveMessage
},
Expand Down
8 changes: 4 additions & 4 deletions test/glisten_test.gleam
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import gleam/bit_builder
import gleam/bytes_builder
import gleam/dynamic
import gleam/erlang/process
import gleam/option.{None}
Expand Down Expand Up @@ -41,7 +41,7 @@ pub fn it_echoes_messages_test() {

let client = tcp_client.connect()
let assert Ok(_) =
tcp.send(client, bit_builder.from_bit_string(<<"hi mom":utf8>>))
tcp.send(client, bytes_builder.from_bit_array(<<"hi mom":utf8>>))
let assert Ok(Response(resp)) = process.receive(client_subject, 200)

should.equal(resp, <<"hi mom":utf8>>)
Expand All @@ -55,7 +55,7 @@ pub fn it_accepts_from_the_pool_test() {
fn(msg, state, conn) {
let assert Packet(msg) = msg
let assert Ok(_) =
tcp.send(conn.socket, bit_builder.from_bit_string(msg))
tcp.send(conn.socket, bytes_builder.from_bit_array(msg))
actor.continue(state)
},
)
Expand All @@ -72,7 +72,7 @@ pub fn it_accepts_from_the_pool_test() {
)
let client = tcp_client.connect()
let assert Ok(_) =
tcp.send(client, bit_builder.from_bit_string(<<"hi mom":utf8>>))
tcp.send(client, bytes_builder.from_bit_array(<<"hi mom":utf8>>))
let assert Ok(#(_tcp, _port, msg)) =
process.select(client_selector, 200)
process.send(client_sender, msg)
Expand Down

0 comments on commit 0be1d06

Please sign in to comment.