Skip to content

Commit

Permalink
Bump to 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AffectedArc07 committed Oct 24, 2023
1 parent 357af3d commit 483c1be
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 221 deletions.
2 changes: 1 addition & 1 deletion apply_patches.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

basedir=`pwd`
tg_tag="1.2.0"
tg_tag="3.0.0"

echo "Checking for TG rust-g repo.."
if [ ! -d "./tg-rust-g" ]
Expand Down
20 changes: 10 additions & 10 deletions paradise-rust-g-patches/0001-Paradise-Version-Changes.patch
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]>",
Expand All @@ -41,5 +41,5 @@ index 121c252..b2166a7 100644
[lib]
crate-type = ["cdylib"]
--
2.35.2.windows.1
2.41.0.windows.3

16 changes: 8 additions & 8 deletions paradise-rust-g-patches/0002-Paradise-Logging-Changes.patch
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


Expand All @@ -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! {
Expand All @@ -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

22 changes: 7 additions & 15 deletions paradise-rust-g-patches/0005-Paradise-HTTP-Module-Tweaks.patch
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 @@
Expand All @@ -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()
}

Expand All @@ -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> {
Expand Down Expand Up @@ -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)?)
}
Expand Down Expand Up @@ -174,5 +166,5 @@ index 16b5009..9b5d5c5 100644
req,
unzip_directory: dir_copy,
--
2.35.2.windows.1
2.41.0.windows.3

Loading

0 comments on commit 483c1be

Please sign in to comment.