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
64 changes: 64 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
root = true

# Language indent/EOL/charset overlap with .vscode/settings.json.
# Rulers, renderWhitespace, detectIndentation, mergeEditor, and
# cmake.configureOnOpen cannot be expressed here — they stay in settings.json.

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

# [bat]
[*.{bat,cmd}]
end_of_line = crlf
indent_size = 4
indent_style = space

# [c]
[*.{c,h}]
indent_size = 4
indent_style = space

# [cmake]
[{CMakeLists.txt,*.cmake}]
indent_size = 4
indent_style = tab

# [cpp]
[*.{cpp,cxx,hpp,hxx}]
indent_size = 4
indent_style = space

# [json]
[*.json]
indent_size = 2
indent_style = space

# [markdown]
[*.md]
indent_size = 2
indent_style = space
trim_trailing_whitespace = false

# [ruby]
[*.{gemspec,rb}]
indent_size = 2
indent_style = space

[{Gemfile,Rakefile}]
indent_size = 2
indent_style = space

# [shellscript]
[*.{bash,sh,zsh}]
indent_size = 2
indent_style = space

# [yaml]
[*.{yaml,yml}]
indent_size = 2
indent_style = space
75 changes: 75 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# .gitattributes — Ruby (GitHub-hosted)
#
# Sources: GitHub Docs (line endings), git-scm gitattributes (diff=ruby),
# gitattributes/gitattributes Common.gitattributes + Web (*.rb),
# github-linguist overrides.

# Default: detect text, normalize to LF in the repository
* text=auto

# --- Source ---
*.gemspec text eol=lf diff=ruby
*.rake text eol=lf diff=ruby
*.rb text eol=lf diff=ruby
*.ru text eol=lf diff=ruby
Gemfile text eol=lf diff=ruby
Rakefile text eol=lf diff=ruby
Capfile text eol=lf diff=ruby
Guardfile text eol=lf diff=ruby
*.erb text
*.haml text
*.slim text

# --- Lock / config ---
Gemfile.lock text
*.gemspec.lock text -diff
*.yml text
*.yaml text
*.toml text
*.json text

# --- Scripts ---
*.bash text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.sh text eol=lf
*.zsh text eol=lf

# --- Docs / meta ---
*.adoc text
*.markdown text diff=markdown
*.md text diff=markdown
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
LICENSE text
NEWS text
README text
TODO text
.gitattributes text
.gitignore text

# --- Binary ---
*.gem binary
*.so binary

# --- Archives / images (common) ---
*.gif binary
*.gz binary
*.ico binary
*.jpeg binary
*.jpg binary
*.png binary
*.tar binary
*.zip binary

# --- GitHub Linguist ---
**/vendor/bundle/** linguist-vendored
**/vendor/cache/** linguist-vendored
**/coverage/** linguist-generated
**/doc/** linguist-documentation
**/pkg/** linguist-generated
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- directory: /
package-ecosystem: bundler
schedule:
interval: weekly
- directory: /
package-ecosystem: github-actions
schedule:
interval: weekly
29 changes: 20 additions & 9 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

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

name: Ruby

on:
push:
branches:
- boilerplate
- master
- dev
- boilerplate
- idiomatic
- master
- rc1
- rc2
- rc3
Expand Down Expand Up @@ -70,13 +70,20 @@ jobs:
uses: actions/checkout@v4

- name: Remove Gemfile.lock
shell: bash
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
# Bundler 4 honours Gemfile `lockfile false`, so no Gemfile.lock
# is written. bundler-cache cats that file after `bundle lock`
# and fails on Windows 3.2+ (setup-ruby installs Bundler ~> 4).
bundler-cache: false

- name: Install gems
run: bundle install

- name: Show Ruby version
run: ruby -v
Expand All @@ -89,7 +96,7 @@ jobs:
run: |
gem build woad.gemspec
gem install --local woad-*.gem
ruby -e "require 'woad'; abort('VERSION missing') unless defined?(Woad::VERSION); puts Woad::VERSION"
ruby -e "require 'woad/version'; abort('VERSION missing') unless defined?(Woad::VERSION); puts Woad::VERSION"

warnings:

Expand All @@ -102,16 +109,20 @@ jobs:
uses: actions/checkout@v4

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

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

- name: Install gems
run: bundle install

- name: Show Ruby version
run: ruby -v

- name: Require library with warnings
run: ruby -w -Ilib -e "require 'woad'"
- name: Run unit tests with warnings
run: ./run_all_unit_tests.sh --lib --warnings
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# directories (by name)

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

/_build/
/_yardoc/

/InstalledFiles/
Expand Down Expand Up @@ -34,6 +36,8 @@
.ruby-version
.rvmrc

Gemfile.lock

/spec/examples.txt


Expand Down
1 change: 1 addition & 0 deletions .sis/project_name.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
woad.Ruby
6 changes: 3 additions & 3 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

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

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


Contributions are welcomed.
Expand Down
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# woad.Ruby - Changes <!-- omit in toc -->


## 0.0.2 - 19th August 2026

* **EXAMPLES.md** catalog and **examples/print_status**;
* reordered **README.md** (canonical sections; **Examples**; **Dependencies** Efferent / Afferent); dropped GitHub-release badge;
* expanded **woad.gemspec** `spec.summary` to the README tagline; packaged **AUTHORS**, **CHANGES**, **CONTRIBUTING**, **EXAMPLES**, **FAQ**, **INSTALL**, **NEWS**, **SECURITY**, and **TODO**;
* **woad.gemspec**: `required_ruby_version` is the range `>= 2.0` (dropped `< 5`); **Gemfile.lock** and **.ruby-version** excluded from `spec.files`;
* **Gemfile** sets `lockfile false` when Bundler supports it; **.gitignore** includes **Gemfile.lock**; CI uses `bundler-cache: false` because Bundler 4 then writes no lockfile and **ruby/setup-ruby** cache cats **Gemfile.lock**;
* CI **Warnings** job now runs on Ruby **3.4** via **run_all_unit_tests.sh** `--lib --warnings`;
* added **run_all_unit_tests.sh** (from https://github.com/synesissoftware/misc-dev-scripts) that skips **tput** when **$TERM** is unset or stdout is not a TTY;
* library source **Home:** URL now uses `https`;


## 0.0.1 - 15th August 2026

* SGR colour and reset codes (`RESET`, `FG_*`, `BG_*`, including bright variants);
Expand Down
36 changes: 36 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# woad.Ruby - Contributing <!-- omit in toc -->


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

- [Defects and features](#defects-and-features)
- [Pull requests](#pull-requests)
- [Tests](#tests)
- [License](#license)


## Defects and features

Open an issue on https://github.com/synesissoftware/woad.Ruby/issues.


## Pull requests

Pull requests are welcome on https://github.com/synesissoftware/woad.Ruby. Keep diffs local to the change; match existing indentation (2 spaces in Ruby) and the Synesis markdown set (**README.md**, **CHANGES.md**, **NEWS.md**, **TODO.md**, **INSTALL.md**, **CONTRIBUTING.md**, **SECURITY.md**).


## Tests

```
bundle exec rake test
```

or `./run_all_unit_tests.sh`.


## License

Contributions are accepted under the 3-clause BSD license. See [LICENSE](./LICENSE).


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

|Name|Source & Description|Summary|
|---|---|---|
|**print_status**|[examples/print_status.rb](./examples/print_status.rb)<br/>[examples/print_status.md](./examples/print_status.md)|Prints sample status words with **woad** SGR colour constants|


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

The FAQ list is under (constant) development. If you post a question on the
[Issues](https://github.com/synesissoftware/woad.Ruby/issues) forum
it will be used to create one.


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

- [Q1: "How do I install this library?"](#q1-how-do-i-install-this-library)


# FAQs: <!-- omit in toc -->


## Q1: "How do I install this library?"

Install via **gem**:

```
gem install woad
```

See [README.md](./README.md) for usage.



<!-- ########################### end of file ########################### -->
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

source "https://rubygems.org"

# Suppress lockfile on Bundler 4+ (gem: do not pin the graph). No-op on
# Bundler that lacks the DSL (Ruby 2.x CI). Do not combine with
# ruby/setup-ruby `bundler-cache: true` — that action cats Gemfile.lock
# after `bundle lock` and fails when no file is written (Windows 3.2+,
# where setup-ruby installs Bundler ~> 4).
lockfile false if respond_to?(:lockfile)

gemspec

# rake 13 requires Ruby >= 2.3
Expand Down
Loading
Loading