-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
357af3d
commit 483c1be
Showing
5 changed files
with
221 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
From 124eccba73fa986f9d9ceffa7a8a69bd97eae218 Mon Sep 17 00:00:00 2001 | ||
From 85c987757fe9a259a370c79333b3e57ef820dcf5 Mon Sep 17 00:00:00 2001 | ||
From: AffectedArc07 <[email protected]> | ||
Date: Wed, 13 Oct 2021 22:04:30 +0100 | ||
Date: Tue, 24 Oct 2023 21:44:45 +0100 | ||
Subject: [PATCH] Paradise Version Changes | ||
|
||
|
||
diff --git a/Cargo.lock b/Cargo.lock | ||
index ab158a2..f77d99f 100644 | ||
index afdaa60..b276d34 100644 | ||
--- a/Cargo.lock | ||
+++ b/Cargo.lock | ||
@@ -1999,7 +1999,7 @@ dependencies = [ | ||
@@ -2166,7 +2166,7 @@ dependencies = [ | ||
|
||
[[package]] | ||
name = "rust-g" | ||
-version = "1.2.0" | ||
+version = "1.2.0-P" | ||
-version = "3.0.0" | ||
+version = "3.0.0-P" | ||
dependencies = [ | ||
"aho-corasick", | ||
"base64", | ||
diff --git a/Cargo.toml b/Cargo.toml | ||
index 121c252..b2166a7 100644 | ||
index 958fbd4..e3965dd 100644 | ||
--- a/Cargo.toml | ||
+++ b/Cargo.toml | ||
@@ -1,15 +1,15 @@ | ||
[package] | ||
name = "rust-g" | ||
edition = "2021" | ||
-version = "1.2.0" | ||
+version = "1.2.0-P" | ||
-version = "3.0.0" | ||
+version = "3.0.0-P" | ||
authors = [ | ||
"Bjorn Neergaard <[email protected]>", | ||
"Tad Hardesty <[email protected]>", | ||
|
@@ -41,5 +41,5 @@ index 121c252..b2166a7 100644 | |
[lib] | ||
crate-type = ["cdylib"] | ||
-- | ||
2.35.2.windows.1 | ||
2.41.0.windows.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
From a7d7ad5361239e00852692abc39c8404383290e4 Mon Sep 17 00:00:00 2001 | ||
From 95c923ce48d5a3a8944ca26375715f1802b11f52 Mon Sep 17 00:00:00 2001 | ||
From: AffectedArc07 <[email protected]> | ||
Date: Wed, 13 Oct 2021 22:04:37 +0100 | ||
Date: Tue, 24 Oct 2023 21:48:34 +0100 | ||
Subject: [PATCH] Paradise Logging Changes | ||
|
||
|
||
|
@@ -14,7 +14,7 @@ index 1faadc8..bbc8fe6 100644 | |
+#define rustg_log_write(fname, text) RUSTG_CALL(RUST_G, "log_write")(fname, text) | ||
+/proc/rustg_log_close_all() return RUSTG_CALL(RUST_G, "log_close_all")() | ||
diff --git a/src/log.rs b/src/log.rs | ||
index 9bd019b..6722353 100644 | ||
index 4184945..d3eb7aa 100644 | ||
--- a/src/log.rs | ||
+++ b/src/log.rs | ||
@@ -14,7 +14,7 @@ thread_local! { | ||
|
@@ -32,25 +32,25 @@ index 9bd019b..6722353 100644 | |
|
||
- if rest.first().map(|x| &**x) == Some("false") { | ||
- // Write the data to the file with no accoutrements. | ||
- write!(file, "{}", data)?; | ||
- write!(file, "{data}")?; | ||
- } else { | ||
- // write first line, timestamped | ||
- let mut iter = data.split('\n'); | ||
- if let Some(line) = iter.next() { | ||
- write!(file, "[{}] {}\n", Utc::now().format("%F %T%.3f"), line)?; | ||
- writeln!(file, "[{}] {}", Utc::now().format("%F %T%.3f"), line)?; | ||
- } | ||
- | ||
- // write remaining lines | ||
- for line in iter { | ||
- write!(file, " - {}\n", line)?; | ||
- writeln!(file, " - {line}")?; | ||
- } | ||
+ // write all lines timestamped | ||
+ let iter = data.split('\n'); | ||
+ for line in iter { | ||
+ write!(file, "[{}] {}\n", Utc::now().format("%FT%T"), line)?; | ||
+ writeln!(file, "[{}] {}", Utc::now().format("%FT%T"), line)?; | ||
} | ||
|
||
Ok(()) | ||
-- | ||
2.35.2.windows.1 | ||
2.41.0.windows.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,21 @@ | ||
From 81098ac672c0e1f44dfb7d511453439c4799ed54 Mon Sep 17 00:00:00 2001 | ||
From edf520da0a3f4c4b9141cde63918b23dcc3f6dac Mon Sep 17 00:00:00 2001 | ||
From: AffectedArc07 <[email protected]> | ||
Date: Thu, 14 Oct 2021 15:50:14 +0100 | ||
Subject: [PATCH] Paradise HTTP Module Tweaks | ||
|
||
|
||
diff --git a/dmsrc/http.dm b/dmsrc/http.dm | ||
index eba7d68..fdcf7a7 100644 | ||
index eba7d68..c880334 100644 | ||
--- a/dmsrc/http.dm | ||
+++ b/dmsrc/http.dm | ||
@@ -1,5 +1,5 @@ | ||
-// HTTP Operations // | ||
- | ||
+// HTTP Operations // | ||
+ | ||
#define RUSTG_HTTP_METHOD_GET "get" | ||
#define RUSTG_HTTP_METHOD_PUT "put" | ||
#define RUSTG_HTTP_METHOD_DELETE "delete" | ||
@@ -9,3 +9,5 @@ | ||
#define rustg_http_request_blocking(method, url, body, headers, options) RUSTG_CALL(RUST_G, "http_request_blocking")(method, url, body, headers, options) | ||
#define rustg_http_request_async(method, url, body, headers, options) RUSTG_CALL(RUST_G, "http_request_async")(method, url, body, headers, options) | ||
#define rustg_http_check_request(req_id) RUSTG_CALL(RUST_G, "http_check_request")(req_id) | ||
+/proc/rustg_create_async_http_client() return RUSTG_CALL(RUST_G, "start_http_client")() | ||
+/proc/rustg_close_async_http_client() return RUSTG_CALL(RUST_G, "shutdown_http_client")() | ||
diff --git a/src/http.rs b/src/http.rs | ||
index 5da2ff1..426f869 100644 | ||
index 43f891e..135b2c2 100644 | ||
--- a/src/http.rs | ||
+++ b/src/http.rs | ||
@@ -1,8 +1,8 @@ | ||
|
@@ -36,7 +28,7 @@ index 5da2ff1..426f869 100644 | |
|
||
// ---------------------------------------------------------------------------- | ||
// Interface | ||
@@ -78,7 +78,9 @@ fn setup_http_client() -> reqwest::blocking::Client { | ||
@@ -75,7 +75,9 @@ fn setup_http_client() -> reqwest::blocking::Client { | ||
Client::builder().default_headers(headers).build().unwrap() | ||
} | ||
|
||
|
@@ -47,7 +39,7 @@ index 5da2ff1..426f869 100644 | |
|
||
// ---------------------------------------------------------------------------- | ||
// Request construction and execution | ||
@@ -95,38 +97,56 @@ fn construct_request( | ||
@@ -92,38 +94,56 @@ fn construct_request( | ||
headers: &str, | ||
options: &str, | ||
) -> Result<RequestPrep> { | ||
|
@@ -135,7 +127,7 @@ index 5da2ff1..426f869 100644 | |
}) | ||
} | ||
|
||
@@ -158,3 +178,17 @@ fn submit_request(prep: RequestPrep) -> Result<String> { | ||
@@ -155,3 +175,17 @@ fn submit_request(prep: RequestPrep) -> Result<String> { | ||
|
||
Ok(serde_json::to_string(&resp)?) | ||
} | ||
|
@@ -174,5 +166,5 @@ index 16b5009..9b5d5c5 100644 | |
req, | ||
unzip_directory: dir_copy, | ||
-- | ||
2.35.2.windows.1 | ||
2.41.0.windows.3 | ||
|
Oops, something went wrong.