Skip to content

Commit cb65900

Browse files
Boilerplate, CI (#3)
* **run_all_unit_tests.sh** : ~ updated to latest (from https://github.com/synesissoftware/misc-dev-scripts) * boilerplate: markdown files * boilerplate: .gitattributes * boilerplate: LICENSE * boilerplate: .vscode/settings.json * boilerplate: .vimrc * boilerplate: build_gem.cmd, build_gem.sh, generate_rdoc.cmd, generate_rdoc.sh * boilerplate: LICENSE * bolierplate: updating Gemfile * boilerplate: placeholder markdown files * boilerplate: .gitignore * version dependencies * boilerplate: .ruby-version-exclusions * Add canonical AUTHORS, FAQ, NEWS, and TODO markdown skeletons * Complete CHANGES.md through early 0.0.x releases * Add ruby.yml CI badge and switch Gemfile to gemspec * chore: dependencies * gemspec updates * chore: AUTHORS.md * fix: gemspec metadata * added/updated Rakefile * chore: CONTRIBUTING.md, INSTALL.md, SECURITY.md * chore: rake in Gemfile * fix: Add frozen lib/ strings and standardise Ruby gem boilerplate * standard CI for all projects * standard .editorconfig and dependabot for all projects * TODO.md * examples * CHANGES.md * NEWS.md * README.md * spacing
1 parent 8860e6c commit cb65900

56 files changed

Lines changed: 1057 additions & 249 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.editorconfig‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
root = true
2+
3+
# Language indent/EOL/charset overlap with .vscode/settings.json.
4+
# Rulers, renderWhitespace, detectIndentation, mergeEditor, and
5+
# cmake.configureOnOpen cannot be expressed here — they stay in settings.json.
6+
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_size = 2
11+
indent_style = tab
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
# [bat]
16+
[*.{bat,cmd}]
17+
end_of_line = crlf
18+
indent_size = 4
19+
indent_style = space
20+
21+
# [c]
22+
[*.{c,h}]
23+
indent_size = 4
24+
indent_style = space
25+
26+
# [cmake]
27+
[{CMakeLists.txt,*.cmake}]
28+
indent_size = 4
29+
indent_style = tab
30+
31+
# [cpp]
32+
[*.{cpp,cxx,hpp,hxx}]
33+
indent_size = 4
34+
indent_style = space
35+
36+
# [json]
37+
[*.json]
38+
indent_size = 2
39+
indent_style = space
40+
41+
# [markdown]
42+
[*.md]
43+
indent_size = 2
44+
indent_style = space
45+
trim_trailing_whitespace = false
46+
47+
# [ruby]
48+
[*.{gemspec,rb}]
49+
indent_size = 2
50+
indent_style = space
51+
52+
[{Gemfile,Rakefile}]
53+
indent_size = 2
54+
indent_style = space
55+
56+
# [shellscript]
57+
[*.{bash,sh,zsh}]
58+
indent_size = 2
59+
indent_style = space
60+
61+
# [yaml]
62+
[*.{yaml,yml}]
63+
indent_size = 2
64+
indent_style = space

‎.gitattributes‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# .gitattributes — Ruby (GitHub-hosted)
2+
#
3+
# Sources: GitHub Docs (line endings), git-scm gitattributes (diff=ruby),
4+
# gitattributes/gitattributes Common.gitattributes + Web (*.rb),
5+
# github-linguist overrides.
6+
7+
# Default: detect text, normalize to LF in the repository
8+
* text=auto
9+
10+
# --- Source ---
11+
*.gemspec text eol=lf diff=ruby
12+
*.rake text eol=lf diff=ruby
13+
*.rb text eol=lf diff=ruby
14+
*.ru text eol=lf diff=ruby
15+
Gemfile text eol=lf diff=ruby
16+
Rakefile text eol=lf diff=ruby
17+
Capfile text eol=lf diff=ruby
18+
Guardfile text eol=lf diff=ruby
19+
*.erb text
20+
*.haml text
21+
*.slim text
22+
23+
# --- Lock / config ---
24+
Gemfile.lock text
25+
*.gemspec.lock text -diff
26+
*.yml text
27+
*.yaml text
28+
*.toml text
29+
*.json text
30+
31+
# --- Scripts ---
32+
*.bash text eol=lf
33+
*.bat text eol=crlf
34+
*.cmd text eol=crlf
35+
*.ps1 text eol=crlf
36+
*.sh text eol=lf
37+
*.zsh text eol=lf
38+
39+
# --- Docs / meta ---
40+
*.adoc text
41+
*.markdown text diff=markdown
42+
*.md text diff=markdown
43+
*.txt text
44+
AUTHORS text
45+
CHANGELOG text
46+
CHANGES text
47+
CONTRIBUTING text
48+
COPYING text
49+
LICENSE text
50+
NEWS text
51+
README text
52+
TODO text
53+
.gitattributes text
54+
.gitignore text
55+
56+
# --- Binary ---
57+
*.gem binary
58+
*.so binary
59+
60+
# --- Archives / images (common) ---
61+
*.gif binary
62+
*.gz binary
63+
*.ico binary
64+
*.jpeg binary
65+
*.jpg binary
66+
*.png binary
67+
*.tar binary
68+
*.zip binary
69+
70+
# --- GitHub Linguist ---
71+
**/vendor/bundle/** linguist-vendored
72+
**/vendor/cache/** linguist-vendored
73+
**/coverage/** linguist-generated
74+
**/doc/** linguist-documentation
75+
**/pkg/** linguist-generated

‎.github/dependabot.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- directory: /
4+
package-ecosystem: bundler
5+
schedule:
6+
interval: weekly
7+
- directory: /
8+
package-ecosystem: github-actions
9+
schedule:
10+
interval: weekly

‎.github/workflows/ruby.yml‎

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7+
8+
#
9+
# Created: 15th August 2026
10+
# Updated: 15th August 2026
11+
#
12+
13+
name: Ruby
14+
15+
on:
16+
push:
17+
branches:
18+
- master
19+
- dev
20+
- boilerplate
21+
- idiomatic
22+
- rc1
23+
- rc2
24+
- rc3
25+
pull_request:
26+
27+
permissions:
28+
contents: read
29+
30+
defaults:
31+
run:
32+
shell: bash
33+
34+
jobs:
35+
test:
36+
37+
strategy:
38+
fail-fast: false
39+
40+
matrix:
41+
os:
42+
- macos-latest
43+
- ubuntu-latest
44+
- windows-latest
45+
46+
ruby-version:
47+
# - head
48+
- '3.4'
49+
- '3.3'
50+
- '3.2'
51+
- '3.1'
52+
- '3.0'
53+
- '2.7'
54+
- '2.6'
55+
56+
include:
57+
- os: ubuntu-latest
58+
ruby-version: '2.5'
59+
- os: ubuntu-latest
60+
ruby-version: '2.4'
61+
- os: ubuntu-latest
62+
ruby-version: '2.0'
63+
- os: windows-latest
64+
ruby-version: mingw
65+
66+
runs-on: ${{ matrix.os }}
67+
68+
steps:
69+
- name: Checking out code
70+
uses: actions/checkout@v4
71+
72+
- name: Remove Gemfile.lock
73+
run: rm -f Gemfile.lock
74+
75+
- name: Set up Ruby v${{ matrix.ruby-version }}
76+
uses: ruby/setup-ruby@v1
77+
with:
78+
ruby-version: ${{ matrix.ruby-version }}
79+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
80+
81+
- name: Show Ruby version
82+
run: ruby -v
83+
84+
- name: Run tests
85+
run: bundle exec rake test
86+
87+
- name: Gem build and install smoke
88+
shell: bash
89+
run: |
90+
gem build libpath.gemspec
91+
gem install --local libpath-ruby-*.gem
92+
ruby -e "require 'libpath/version'; abort('VERSION missing') unless defined?(LibPath::VERSION); puts LibPath::VERSION"
93+
94+
warnings:
95+
96+
name: Warnings
97+
98+
runs-on: ubuntu-latest
99+
100+
steps:
101+
- name: Checking out code
102+
uses: actions/checkout@v4
103+
104+
- name: Remove Gemfile.lock
105+
run: rm -f Gemfile.lock
106+
107+
- name: Set up Ruby
108+
uses: ruby/setup-ruby@v1
109+
with:
110+
ruby-version: '3.3'
111+
bundler-cache: true
112+
113+
- name: Show Ruby version
114+
run: ruby -v
115+
116+
- name: Run unit tests with warnings
117+
run: ./run_all_unit_tests.sh --lib --warnings

‎.gitignore‎

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,50 @@
1-
21
# directories (by name)
32

4-
/.bundle/
53
/.bzr/
4+
/.bundle/
65
/.config/
7-
/.git/
86
/.svn/
7+
/.yardoc/
8+
9+
/_yardoc/
910

1011
/InstalledFiles/
1112
/build/
1213
/coverage/
1314
/doc/
1415
/lib/bundler/man/
16+
/old-gems/
1517
/pkg/
1618
/rdoc/
19+
/scratch/
1720
/spec/reports/
1821
/test/tmp/
1922
/test/version_tmp/
2023
/tmp/
2124
/vendor/bundle/
2225

23-
2426
# directories (by pattern)
2527

26-
InstalledFiles
27-
coverage
28-
pkg
29-
rdoc
30-
31-
3228
# files (by name)
3329

3430
.DS_Store
35-
.bundle
36-
.config
3731
.repl_history
3832
.ruby-version
3933
.rvmrc
40-
.yardoc
41-
42-
_yardoc
43-
44-
Gemfile.lock
4534

35+
/spec/examples.txt
4636

4737
# files (by pattern)
4838

39+
*~
4940
*.*~
5041
.dat*
42+
*.b64
43+
*.bridgesupport
5144
*.gem
5245
*.rbc
5346
*.scc
5447
*.suo
5548
*.swp
49+
*.tmp
5650
*.zip
57-

‎.ruby-version-exclusions‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,2 @@
1+
1.8.7-p375
12
1.9.3-p551
2-
#2.0.0-p648
3-
#2.1.10
4-
#2.2.10
5-
#2.3.8
6-
#2.4.1
7-
#2.5.3
8-
#2.6.1
9-

‎.sis/project_name.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
libpath.Ruby

0 commit comments

Comments
 (0)