From e041289b121e4c007591a2d685791e0773fb4e82 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Thu, 8 Sep 2022 23:16:50 +0300 Subject: [PATCH] tallboy example --- .editorconfig | 71 ++++++++++++++++++++++++++++++++++++++++++++++ tallboy/shard.yml | 18 ++++++++++++ tallboy/tallboy.cr | 13 +++++++++ 3 files changed, 102 insertions(+) create mode 100644 .editorconfig create mode 100644 tallboy/shard.yml create mode 100644 tallboy/tallboy.cr diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7675716 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,71 @@ +# EditorConfig is awesome: https://EditorConfig.org +root = true + +# for all projects +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +# Python +[*.py] +indent_style = space +indent_size = 4 + +# PHP +[*.php] +indent_style = space +indent_size = 4 + +# Crystal +[*.cr] +indent_style = space +indent_size = 2 + +# C +[{*.c,*.h}] +indent_style = space +indent_size = 4 + +# Web Sites +[{*.html,*.css,*.json}] +indent_style = tab +indent_size = 4 + +[humans.txt] +indent_style = tab +indent_size = 2 + +# Markdown +[*.md] +trim_trailing_whitespace = false + +# Other +[Makefile] +indent_style = tab +indent_size = 4 + +[.gitconfig] +indent_style = tab +indent_size = 4 + +# JavaScript +[*.js] +indent_style = space +indent_size = 2 + +[package.json] +indent_style = space +indent_size = 2 + +## for this repo +[~/SSH/config] +indent_style = tab +indent_size = 4 + +[~/SublimeText/*.sublime-*] +indent_style = tab +indent_size = 4 diff --git a/tallboy/shard.yml b/tallboy/shard.yml new file mode 100644 index 0000000..e08fd53 --- /dev/null +++ b/tallboy/shard.yml @@ -0,0 +1,18 @@ +name: tallboy +version: 0.1.0 + +# authors: +# - name + +# description: | +# Short description of tallboy + +dependencies: + tallboy: + github: epoch/tallboy + +# development_dependencies: +# webmock: +# github: manastech/webmock.cr + +# license: MIT diff --git a/tallboy/tallboy.cr b/tallboy/tallboy.cr new file mode 100644 index 0000000..1372bd6 --- /dev/null +++ b/tallboy/tallboy.cr @@ -0,0 +1,13 @@ +require "tallboy" + +table = Tallboy.table do + header ["Favorite Artist", "Rank"] + row ["Eyes Set to Kill", "First love)"] + row ["Adept", "Самые крутые"] + row ["Caliban", "Second"] + row ["билборды", "New Love!1"] +end + +puts table +puts table.render(:ascii) +puts table.render(:markdown)