Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
117 changes: 117 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

#
# Created: 15th August 2026
# Updated: 15th August 2026
#

name: Ruby

on:
push:
branches:
- boilerplate
- dev
- idiomatic
- master
- rc1
- rc2
- rc3
pull_request:

permissions:
contents: read

defaults:
run:
shell: bash

jobs:
test:

strategy:
fail-fast: false

matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest

ruby-version:
# - head
- '3.4'
- '3.3'
- '3.2'
- '3.1'
- '3.0'
- '2.7'
- '2.6'

include:
- os: ubuntu-latest
ruby-version: '2.5'
- os: ubuntu-latest
ruby-version: '2.4'
- os: ubuntu-latest
ruby-version: '2.0'
- os: windows-latest
ruby-version: mingw

runs-on: ${{ matrix.os }}

steps:
- name: Checking out code
uses: actions/checkout@v4

- name: Remove Gemfile.lock
run: rm -f Gemfile.lock

- name: Set up Ruby v${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Show Ruby version
run: ruby -v

- name: Run tests
run: bundle exec rake test

- name: Gem build and install smoke
shell: bash
run: |
gem build woad.gemspec
gem install --local woad-*.gem
ruby -e "require 'woad'; abort('VERSION missing') unless defined?(Woad::VERSION); puts Woad::VERSION"

warnings:

name: Warnings

runs-on: ubuntu-latest

steps:
- name: Checking out code
uses: actions/checkout@v4

- name: Remove Gemfile.lock
run: rm -f Gemfile.lock

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true

- name: Show Ruby version
run: ruby -v

- name: Require library with warnings
run: ruby -w -Ilib -e "require 'woad'"
53 changes: 53 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# directories (by name)

/.bzr/
/.bundle/
/.config/
/.svn/
/.yardoc/

/_yardoc/

/InstalledFiles/
/build/
/coverage/
/doc/
/lib/bundler/man/
/old-gems/
/pkg/
/rdoc/
/scratch/
/spec/reports/
/test/tmp/
/test/version_tmp/
/tmp/
/vendor/bundle/


# directories (by pattern)


# files (by name)

.DS_Store
.repl_history
.ruby-version
.rvmrc

/spec/examples.txt


# files (by pattern)

*~
*.*~
.dat*
*.b64
*.bridgesupport
*.gem
*.rbc
*.scc
*.suo
*.swp
*.tmp
*.zip
21 changes: 21 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# woad.Ruby - Authors <!-- omit in toc -->


## Major Contributors

| Name | GitHub |
| ----------- | --------------------------------- |
| Matt Wilson | [mwsis](https://github.com/mwsis) |


## Defect reports, fixes and suggestions (for which we are very grateful)

| Name | GitHub |
| ------- | ------ |
| \<none> | |


Contributions are welcomed.


<!-- ########################### end of file ########################### -->
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# woad.Ruby - Changes <!-- omit in toc -->


## 0.0.0 - 15th August 2026

* initial project scaffolding;
* **Ruby** **2.0+** compatibility;


<!-- ########################### end of file ########################### -->
16 changes: 16 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec

# rake 13 requires Ruby >= 2.3
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.3")

gem "rake", '~> 13.0'
else

gem "rake", '~> 12.3'
end

gem "test-unit", '~> 3.0'
30 changes: 30 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
woad.Ruby - BSD 3-Clause License

Copyright (c) 2026, Matthew Wilson and Synesis Information Systems
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
92 changes: 91 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,91 @@
# woad.Ruby
# woad.Ruby <!-- omit in toc -->

Minimal ANSI terminal colour codes, for Ruby

![Language](https://img.shields.io/badge/Ruby-CC342D?style=flat&logo=ruby&logoColor=white)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Gem Version](https://badge.fury.io/rb/woad.svg)](https://badge.fury.io/rb/woad)
[![GitHub release](https://img.shields.io/github/v/release/synesissoftware/woad.Ruby.svg)](https://github.com/synesissoftware/woad.Ruby/releases/latest)
[![Last Commit](https://img.shields.io/github/last-commit/synesissoftware/woad.Ruby)](https://github.com/synesissoftware/woad.Ruby/commits/master)
[![Ruby](https://github.com/synesissoftware/woad.Ruby/actions/workflows/ruby.yml/badge.svg)](https://github.com/synesissoftware/woad.Ruby/actions/workflows/ruby.yml)


## Table of Contents <!-- omit in toc -->

- [Introduction](#introduction)
- [Installation](#installation)
- [Components](#components)
- [Project Information](#project-information)
- [Where to get help](#where-to-get-help)
- [Contribution guidelines](#contribution-guidelines)
- [Dependencies](#dependencies)
- [Development Dependencies](#development-dependencies)
- [Related projects](#related-projects)
- [License](#license)


## Introduction

**woad** provides the smallest useful set of fixed ANSI SGR colour sequences for library authors. It is not a console or TUI framework.

**woad.Ruby** is the **Ruby** implementation. It supports **Ruby 2.0** through **3.x**.


## Installation

Install via **gem** as in:

```
gem install woad
```

or add it to your `Gemfile`.

Use via **require**, as in:

```Ruby
require 'woad'
```


## Components

**woad.Ruby** currently ships the **`Woad`** root module and version metadata (`require 'woad'`). Colour codes, TTY/stream gating, and Windows virtual-terminal opt-in are not implemented in this 0.0.0 skeleton.


## Project Information


### Where to get help

[GitHub Page](https://github.com/synesissoftware/woad.Ruby "GitHub Page")


### Contribution guidelines

Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/woad.Ruby.


### Dependencies

* \<none>


#### Development Dependencies

* [**rake**](https://github.com/ruby/rake)
* [**test-unit**](https://github.com/test-unit/test-unit)


### Related projects

* [**woad.Python**](https://github.com/synesissoftware/woad.Python/)
* [**woad.Rust**](https://github.com/synesissoftware/woad.Rust/)


### License

**woad.Ruby** is released under the 3-clause BSD license. See [LICENSE](./LICENSE) for details.


<!-- ########################### end of file ########################### -->
21 changes: 21 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

# Rakefile for woad.Ruby

require 'rake/testtask'


Rake::TestTask.new do |tt|

tt.libs << 'lib'
tt.libs << 'test'
tt.name = 'test'
tt.test_files = FileList['test/**/tc_*.rb']
tt.verbose = true
end


task :default => :test


# ############################## end of file ############################# #
21 changes: 21 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# woad.Ruby - TODO <!-- omit in toc -->


## Functional improvements

* [ ] SGR colour and reset codes;
* [ ] TTY-conditional colour codes (process and per-stream);
* [ ] Windows virtual-terminal gating (OS build + `GetConsoleMode`);


## Performance improvements

* \<none>


## Packaging improvements

* \<none>


<!-- ########################### end of file ########################### -->
Loading
Loading