Skip to content

Commit

Permalink
chore: Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
custompro98 committed Jul 16, 2024
1 parent 3de1f5c commit 02c971f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gleam.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "glibsql"
version = "0.5.1"
version = "0.6.0"

# Fill out these fields if you intend to generate HTML documentation or publish
# your project to the Hex package manager.
Expand Down
4 changes: 2 additions & 2 deletions src/glibsql/http.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ pub fn build(
)
|> http_request.set_header("Content-Type", "application/json")
|> http_request.set_header("Accept", "application/json")
|> http_request.set_header("User-Agent", "glibsql/0.5.1")
|> http_request.set_header("User-Agent", "glibsql/0.6.0")
|> http_request.set_body(build_json(request)),
)
}
Expand Down Expand Up @@ -353,7 +353,7 @@ fn json_parse(json: String) {
Ok(dynamic_value)
}

@external(javascript, "glibsql_http_ffi.mjs", "decode")
@external(javascript, "../glibsql_http_ffi.mjs", "decode")
fn decode_string(json: String) -> Result(dynamic.Dynamic, Nil)

pub fn decode_response(response: String) -> Result(HttpResponse, Nil) {
Expand Down
12 changes: 6 additions & 6 deletions test/glibsql/http_test.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn builder_custom_host_test() {
|> http_request.set_header("Authorization", "Bearer token")
|> http_request.set_header("Content-Type", "application/json")
|> http_request.set_header("Accept", "application/json")
|> http_request.set_header("User-Agent", "glibsql/0.5.1")
|> http_request.set_header("User-Agent", "glibsql/0.6.0")
|> http_request.set_body("{\"baton\":null,\"requests\":[]}")

glibsql.new_request()
Expand All @@ -36,7 +36,7 @@ pub fn builder_no_statements_test() {
|> http_request.set_header("Authorization", "Bearer token")
|> http_request.set_header("Content-Type", "application/json")
|> http_request.set_header("Accept", "application/json")
|> http_request.set_header("User-Agent", "glibsql/0.5.1")
|> http_request.set_header("User-Agent", "glibsql/0.6.0")
|> http_request.set_body("{\"baton\":null,\"requests\":[]}")

glibsql.new_request()
Expand All @@ -57,7 +57,7 @@ pub fn builder_single_statement_test() {
|> http_request.set_header("Authorization", "Bearer token")
|> http_request.set_header("Content-Type", "application/json")
|> http_request.set_header("Accept", "application/json")
|> http_request.set_header("User-Agent", "glibsql/0.5.1")
|> http_request.set_header("User-Agent", "glibsql/0.6.0")
|> http_request.set_body(
"{\"baton\":null,\"requests\":[{\"type\":\"execute\",\"stmt\":{\"sql\":\"SELECT * FROM users\"}},{\"type\":\"close\"}]}",
)
Expand All @@ -82,7 +82,7 @@ pub fn builder_many_statement_test() {
|> http_request.set_header("Authorization", "Bearer token")
|> http_request.set_header("Content-Type", "application/json")
|> http_request.set_header("Accept", "application/json")
|> http_request.set_header("User-Agent", "glibsql/0.5.1")
|> http_request.set_header("User-Agent", "glibsql/0.6.0")
|> http_request.set_body(
"{\"baton\":null,\"requests\":[{\"type\":\"execute\",\"stmt\":{\"sql\":\"SELECT * FROM users\"}},{\"type\":\"execute\",\"stmt\":{\"sql\":\"SELECT * FROM posts\"}},{\"type\":\"close\"}]}",
)
Expand All @@ -108,7 +108,7 @@ pub fn builder_clear_statements_test() {
|> http_request.set_header("Authorization", "Bearer token")
|> http_request.set_header("Content-Type", "application/json")
|> http_request.set_header("Accept", "application/json")
|> http_request.set_header("User-Agent", "glibsql/0.5.1")
|> http_request.set_header("User-Agent", "glibsql/0.6.0")
|> http_request.set_body("{\"baton\":null,\"requests\":[]}")

glibsql.new_request()
Expand All @@ -133,7 +133,7 @@ pub fn builder_baton_test() {
|> http_request.set_header("Authorization", "Bearer token")
|> http_request.set_header("Content-Type", "application/json")
|> http_request.set_header("Accept", "application/json")
|> http_request.set_header("User-Agent", "glibsql/0.5.1")
|> http_request.set_header("User-Agent", "glibsql/0.6.0")
|> http_request.set_body(
"{\"baton\":\"baton\",\"requests\":[{\"type\":\"close\"}]}",
)
Expand Down

0 comments on commit 02c971f

Please sign in to comment.