Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6cca2c7
add mlt support
CommanderStorm Jan 19, 2026
f888876
Apply suggestion from @CommanderStorm
CommanderStorm Jan 19, 2026
78360a1
fix naming issues
CommanderStorm Jan 19, 2026
eebc2bd
fix clippy issues
CommanderStorm Jan 19, 2026
87b1022
make mock_sources error better to understand
CommanderStorm Jan 19, 2026
0654358
chore(fmt): apply pre-commit formatting fixes
pre-commit-ci[bot] Jan 19, 2026
ba9f1e3
make the naming make a bit more sense
CommanderStorm Jan 19, 2026
d04e295
add aproper mlt test
CommanderStorm Jan 19, 2026
34a0298
made the formatting nicer
CommanderStorm Jan 19, 2026
6945953
make the detection a bit less crude
CommanderStorm Jan 19, 2026
c3c4041
chore(fmt): apply pre-commit formatting fixes
pre-commit-ci[bot] Jan 19, 2026
8d19d5a
improve the detection logic
CommanderStorm Jan 19, 2026
4180676
update docs
CommanderStorm Jan 19, 2026
051c35c
implement proper format detection
CommanderStorm Jan 19, 2026
99e4b69
clippy fixes
CommanderStorm Jan 19, 2026
84e9f61
apply change upstream
CommanderStorm Jan 19, 2026
2aa8087
chore: update blessed test snapshots across all components
autofix-ci[bot] Jan 19, 2026
145a09f
Update martin-tile-utils/src/lib.rs
CommanderStorm Jan 19, 2026
a9c6925
Update martin-tile-utils/src/lib.rs
CommanderStorm Jan 19, 2026
a51c464
Update martin/tests/mb_server_test.rs
CommanderStorm Jan 19, 2026
98ac34e
Apply suggestion from @CommanderStorm
CommanderStorm Jan 19, 2026
e2613bc
chore(fmt): apply pre-commit formatting fixes
pre-commit-ci[bot] Jan 19, 2026
6883420
fix clippy suggetion
CommanderStorm Jan 19, 2026
9aca97b
made blessing martin-tile-utils part of the blessing workflow
CommanderStorm Jan 19, 2026
950cef6
try a different blessing
CommanderStorm Jan 19, 2026
e29a85a
Merge branch 'main' into mlt-support
CommanderStorm Jan 19, 2026
04dd4f1
bless tests
CommanderStorm Jan 19, 2026
fe6c796
make the decoding for mlt more explicit
CommanderStorm Jan 25, 2026
980c610
chore(fmt): apply pre-commit formatting fixes
pre-commit-ci[bot] Jan 26, 2026
6a59755
Merge branch 'main' into mlt-support
CommanderStorm Jan 26, 2026
f556edf
fix clippy lint
CommanderStorm Jan 26, 2026
4657dd2
Update martin-tile-utils/src/lib.rs
CommanderStorm Jan 26, 2026
13330a6
Update martin-tile-utils/src/lib.rs
CommanderStorm Jan 26, 2026
572c52b
Update martin-tile-utils/src/lib.rs
CommanderStorm Jan 26, 2026
a8fd76e
make a few things more ideomatic
CommanderStorm Jan 27, 2026
281459b
apply requested renaming
CommanderStorm Jan 27, 2026
4536583
fix clippy linsts
CommanderStorm Jan 27, 2026
d5b731d
chore(fmt): apply pre-commit formatting fixes
pre-commit-ci[bot] Jan 27, 2026
3d02db1
Apply suggestion from @CommanderStorm
CommanderStorm Jan 27, 2026
8853666
fix the way blessing works again
CommanderStorm Jan 27, 2026
0c13ffe
bless the output
CommanderStorm Jan 27, 2026
96d422b
fix another blessing issue
CommanderStorm Jan 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 3 additions & 16 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ bless:
set -euo pipefail

echo "Blessing unit tests"
for target in restart clean-test bless-insta-martin bless-insta-martin-core bless-insta-martin-tile-utils bless-insta-mbtiles bless-frontend; do
for target in restart clean-test bless-insta bless-frontend; do
echo "::group::just $target"
{{quote(just_executable())}} $target
echo "::endgroup::"
Expand All @@ -84,21 +84,8 @@ bless-frontend:
npm run test:update-snapshots

# Run integration tests and save its output as the new expected output
bless-insta-martin *args: (cargo-install 'cargo-insta')
cargo insta test --accept --all-targets --package martin {{args}}

# Run integration tests and save its output as the new expected output
bless-insta-martin-core *args: (cargo-install 'cargo-insta')
cargo insta test --accept --all-targets --package martin-core {{args}}

# Run integration tests and save its output as the new expected output
bless-insta-martin-tile-utils *args: (cargo-install 'cargo-insta')
cargo insta test --accept --all-targets --package martin-tile-utils {{args}}

# Run integration tests and save its output as the new expected output
bless-insta-mbtiles *args: (cargo-install 'cargo-insta')
#rm -rf mbtiles/tests/snapshots
cargo insta test --accept --all-targets --package mbtiles {{args}}
bless-insta *args: (cargo-install 'cargo-insta')
cargo insta test --accept --all-targets --workspace {{args}}

# Bless integration tests
bless-int:
Expand Down
2 changes: 2 additions & 0 deletions martin-tile-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ homepage.workspace = true
brotli.workspace = true
flate2.workspace = true
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true

[dev-dependencies]
approx.workspace = true
Expand Down
9 changes: 8 additions & 1 deletion martin-tile-utils/src/decoders.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::io::{Read as _, Write as _};

use flate2::read::GzDecoder;
use flate2::read::{GzDecoder, ZlibDecoder};
use flate2::write::GzEncoder;

pub fn decode_gzip(data: &[u8]) -> Result<Vec<u8>, std::io::Error> {
Expand All @@ -10,6 +10,13 @@ pub fn decode_gzip(data: &[u8]) -> Result<Vec<u8>, std::io::Error> {
Ok(decompressed)
}

pub fn decode_zlib(data: &[u8]) -> Result<Vec<u8>, std::io::Error> {
let mut decoder = ZlibDecoder::new(data);
let mut decompressed = Vec::new();
decoder.read_to_end(&mut decompressed)?;
Ok(decompressed)
}

pub fn encode_gzip(data: &[u8]) -> Result<Vec<u8>, std::io::Error> {
let mut encoder = GzEncoder::new(Vec::new(), flate2::Compression::default());
encoder.write_all(data)?;
Expand Down
Loading
Loading