Skip to content
GitLab
Explore
Sign in
parity
Mirrored projects
ruled_labels
Compare revisions
21426965ec323ced40c11614e27bec35607fb724 to 2081dc35d9c84a4715a4e6b4d011e3f125844e88
Commits on Source (4)
New tests and deps update
· b71fe821
Chevdor
authored
Feb 16, 2023
b71fe821
Deps update for new version
· 96f2eae5
Chevdor
authored
Apr 21, 2023
96f2eae5
Update doc
· bbba36c7
Chevdor
authored
Apr 21, 2023
bbba36c7
Merge pull request #3 from chevdor/master
· 2081dc35
Chevdor
authored
Apr 24, 2023
Small update and deps refresh
2081dc35
Expand all
Hide whitespace changes
Inline
Side-by-side
Cargo.lock
View file @
2081dc35
This diff is collapsed.
Click to expand it.
Cargo.toml
View file @
2081dc35
[package]
name
=
"ruled-labels"
version
=
"0.
4
.0"
version
=
"0.
5
.0"
edition
=
"2021"
license-file
=
"LICENSE"
description
=
"Utility to check labels"
...
...
README.md
View file @
2081dc35
# 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
...
...
doc/slides/Gemfile.lock
View file @
2081dc35
...
...
@@ -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
justfile
View file @
2081dc35
...
...
@@ -64,14 +64,14 @@ slides:
just -d doc/slides --justfile doc/slides/justfile present
# Build and tag the docker images
dock
er_build:
docker
build -t {{ CLI_NAME }} -t chevdor/{{ CLI_NAME }} -t chevdor/{{ CLI_NAME }}:{{ VERSION }} .
docker
images | grep {{ CLI_NAME }}
# Push the
docker
image
dock
er_push:
docker push
chevdor/{{ CLI_NAME }}
docker push
chevdor/{{ CLI_NAME }}:{{ VERSION }}
contain
er_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
contain
er_push:
podman push docker.io/
chevdor/{{ CLI_NAME }}
podman push docker.io/
chevdor/{{ CLI_NAME }}:{{ VERSION }}
git_tag:
git tag v{{ VERSION }} -f
...
...
src/rllib/parsed_label.rs
View file @
2081dc35
...
...
@@ -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"
);
}
}