Commits on Source (4)
This diff is collapsed.
[package]
name = "ruled-labels"
version = "0.4.0"
version = "0.5.0"
edition = "2021"
license-file = "LICENSE"
description = "Utility to check labels"
......
# Ruled Labels
![badge](https://github.com/chevdor/ruled_labels/actions/workflows/quick-check.yml/badge.svg?branch=master)
<figure>
<img src="https://github.com/chevdor/ruled_labels/actions/workflows/quick-check.yml/badge.svg?branch=master" alt="badge" />
</figure>
## Intro
......
......@@ -16,6 +16,7 @@ GEM
PLATFORMS
x86_64-darwin-20
x86_64-darwin-22
DEPENDENCIES
asciidoctor-revealjs
......@@ -23,4 +24,4 @@ DEPENDENCIES
tilt (~> 2.0)
BUNDLED WITH
2.2.33
2.4.6
......@@ -64,14 +64,14 @@ slides:
just -d doc/slides --justfile doc/slides/justfile present
# Build and tag the docker images
docker_build:
docker build -t {{ CLI_NAME }} -t chevdor/{{ CLI_NAME }} -t chevdor/{{ CLI_NAME }}:{{ VERSION }} .
docker images | grep {{ CLI_NAME }}
# Push the docker image
docker_push:
docker push chevdor/{{ CLI_NAME }}
docker push chevdor/{{ CLI_NAME }}:{{ VERSION }}
container_build:
podman build -t {{ CLI_NAME }} -t docker.io/chevdor/{{ CLI_NAME }} -t docker.io/chevdor/{{ CLI_NAME }}:{{ VERSION }} .
podman images | grep {{ CLI_NAME }}
# Push the podman image
container_push:
podman push docker.io/chevdor/{{ CLI_NAME }}
podman push docker.io/chevdor/{{ CLI_NAME }}:{{ VERSION }}
git_tag:
git tag v{{ VERSION }} -f
......
......@@ -251,10 +251,39 @@ mod test_label_id {
assert_eq!("B0", LabelId::from_str("B0").unwrap().to_string());
}
#[test]
fn test_misc() {
assert_eq!("B0", LabelId::from_str("B0 - foo").unwrap().to_string());
assert_eq!("B0", LabelId::from_str("B0-foo").unwrap().to_string());
assert_eq!("B0", LabelId::from_str("B0 -foo").unwrap().to_string());
assert_eq!("B0", LabelId::from_str("B0- foo").unwrap().to_string());
assert_eq!("B0", LabelId::from_str("B0 - foo").unwrap().to_string());
assert_eq!("B0", LabelId::from_str("B0 - foo bar").unwrap().to_string());
assert_eq!("B0", LabelId::from_str("B0 - foo bar 😊😊😊").unwrap().to_string());
}
#[test]
fn test_from_str() {
let id = LabelId::from_str("B1").unwrap();
assert_eq!('B', id.letter);
assert_eq!(1, id.number);
}
#[test]
fn test_b42() {
assert_eq!("B42", LabelId::from_str("B42").unwrap().to_string());
assert_eq!("B42", LabelId::from_str("B0042").unwrap().to_string());
assert_eq!("B42", LabelId::from_str("b0042").unwrap().to_string());
}
#[test]
fn test_b255() {
assert_eq!("B255", LabelId::from_str("B255").unwrap().to_string());
}
#[test]
#[should_panic]
fn test_b256() {
let _ = LabelId::from_str("B256");
}
}