box_drawing-0.1.2/.gitignore00006440000000000000000000000040132543047720014174 0ustar0000000000000000 /target/ **/*.rs.bk Cargo.lock box_drawing-0.1.2/.gitlab-ci.yml00006440000000000000000000001676132600104520014642 0ustar0000000000000000# This file is a template, and might need editing before it works on your project. # Official language image. Look for the different tagged releases at: # https://hub.docker.com/r/library/rust/tags/ image: "rust:latest" # Optional: Pick zero or more services to be used on all builds. # Only needed when using a docker container to run your tests in. # Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-a-service #services: # - mysql:latest # - redis:latest # - postgres:latest # Optional: Install a C compiler, cmake and git into the container. # You will often need this when you (or any of your dependencies) depends on C code. #before_script: #- apt-get update -yqq #- apt-get install -yqq --no-install-recommends build-essential # Use cargo to test the project test:cargo: script: - rustc --version && cargo --version # Print version info for debugging - cargo test --all --verbose box_drawing-0.1.2/Cargo.toml.orig00006440000000000000000000000726132622570200015076 0ustar0000000000000000[package] name = "box_drawing" version = "0.1.2" authors = ["Agent Alfa "] license = "MIT" description = "A very simple library containing constants for UTF-8 box drawing." repository = "https://gitlab.com/chronos.alfa/box_drawing.git" keywords = ["utf8","drawing","box","ascii","tui"] categories = ["command-line-interface","command-line-utilities", "gui"] [dependencies] [badges] gitlab = {repository = "chronos.alfa/box_drawing"}box_drawing-0.1.2/Cargo.toml0000644000000017260010362 0ustar00# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g. crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] name = "box_drawing" version = "0.1.2" authors = ["Agent Alfa "] description = "A very simple library containing constants for UTF-8 box drawing." keywords = ["utf8", "drawing", "box", "ascii", "tui"] categories = ["command-line-interface", "command-line-utilities", "gui"] license = "MIT" repository = "https://gitlab.com/chronos.alfa/box_drawing.git" [dependencies] [badges.gitlab] repository = "chronos.alfa/box_drawing" box_drawing-0.1.2/LICENSE00006440000000000000000000002102132600104520013174 0ustar0000000000000000MIT License Copyright (c) 2018 Chronos Alfa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. box_drawing-0.1.2/src/arc.rs00006440000000000000000000000210132622557160014107 0ustar0000000000000000pub const DOWN_RIGHT:&str = "╭"; pub const DOWN_LEFT:&str = "╮"; pub const UP_LEFT:&str = "╯"; pub const UP_RIGHT:&str = "╰";box_drawing-0.1.2/src/double.rs00006440000000000000000000000604132600104520014603 0ustar0000000000000000pub const HORIZONTAL:&str="═"; pub const VERTICAL:&str="║"; pub const DOWN_RIGHT:&str="╔"; pub const DOWN_LEFT:&str="╗"; pub const UP_RIGHT:&str="╚"; pub const UP_LEFT:&str="╝"; pub const VERTICAL_RIGHT:&str="╠"; pub const VERTICAL_LEFT:&str="╣"; pub const DOWN_HORIZONTAL:&str="╦"; pub const UP_HORIZONTAL:&str="╩"; pub const VERTICAL_HORIZONTAL:&str="╬";box_drawing-0.1.2/src/heavy.rs00006440000000000000000000000604132600104520014445 0ustar0000000000000000pub const HORIZONTAL:&str="━"; pub const VERTICAL:&str="┃"; pub const DOWN_RIGHT:&str="┏"; pub const DOWN_LEFT:&str="┓"; pub const UP_RIGHT:&str="┗"; pub const UP_LEFT:&str="┛"; pub const VERTICAL_RIGHT:&str="┣"; pub const VERTICAL_LEFT:&str="┫"; pub const DOWN_HORIZONTAL:&str="┳"; pub const UP_HORIZONTAL:&str="┻"; pub const VERTICAL_HORIZONTAL:&str="╋";box_drawing-0.1.2/src/lib.rs00006440000000000000000000000734132622557160014123 0ustar0000000000000000#[cfg(test)] mod tests; /// This module contains light borders /// #Example /// ``` /// use box_drawing::light; /// let expected = "┌─┐"; /// let actual = format!("{}{}{}", light::DOWN_RIGHT, light::HORIZONTAL, light::DOWN_LEFT); /// assert_eq!(expected, actual); /// ``` pub mod light; /// This module contains heavy (bold) borders pub mod heavy; /// This module contains doubled borders pub mod double; /// Contains rounded corners pub mod arc;box_drawing-0.1.2/src/light.rs00006440000000000000000000000604132600104520014440 0ustar0000000000000000pub const HORIZONTAL:&str="─"; pub const VERTICAL:&str="│"; pub const DOWN_RIGHT:&str="┌"; pub const DOWN_LEFT:&str="┐"; pub const UP_RIGHT:&str="└"; pub const UP_LEFT:&str="┘"; pub const VERTICAL_RIGHT:&str="├"; pub const VERTICAL_LEFT:&str="┤"; pub const DOWN_HORIZONTAL:&str="┬"; pub const UP_HORIZONTAL:&str="┴"; pub const VERTICAL_HORIZONTAL:&str="┼";box_drawing-0.1.2/src/tests.rs00006440000000000000000000001472132622557160014517 0ustar0000000000000000#[test] fn light_showcase() { let expected = "┌─┐"; let actual = format!("{}{}{}", ::light::DOWN_RIGHT, ::light::HORIZONTAL, ::light::DOWN_LEFT); assert_eq!(expected, actual); } #[test] fn heavy_showcase() { let expected = "┏━┓"; let actual = format!("{}{}{}", ::heavy::DOWN_RIGHT, ::heavy::HORIZONTAL, ::heavy::DOWN_LEFT); assert_eq!(expected, actual); } #[test] fn double_showcase() { let expected = "╔═╗"; let actual = format!("{}{}{}", ::double::DOWN_RIGHT, ::double::HORIZONTAL, ::double::DOWN_LEFT); assert_eq!(expected, actual); } #[test] fn arc_corners() { let expected = "╰╯╭╮"; let actual = format!("{}{}{}{}", ::arc::UP_RIGHT, ::arc::UP_LEFT, ::arc::DOWN_RIGHT, ::arc::DOWN_LEFT); assert_eq!(expected, actual); }