Skip to content

Commit 3e461d7

Browse files
committed
Add iro-model plugin with core components and workflows
Introduced the new `iro-model` plugin featuring its core library components for defining, manipulating, and validating model structures. Includes initial support for linear, circular, and opponent component types, alongside build workflows, linting, and testing. This lays the groundwork for model-driven behavior implementations.
1 parent 8aefcde commit 3e461d7

File tree

41 files changed

+1177
-30
lines changed

Some content is hidden

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

41 files changed

+1177
-30
lines changed

Gemfile.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ PATH
55
iro-runtime (~> 0.1)
66
iro-support (~> 0.1)
77

8+
PATH
9+
remote: iro-model-rb
10+
specs:
11+
iro-model (0.1.0)
12+
iro-core (~> 0.1)
13+
iro-runtime (~> 0.1)
14+
iro-support (~> 0.1)
15+
816
PATH
917
remote: iro-runtime-rb
1018
specs:
@@ -102,6 +110,7 @@ PLATFORMS
102110
DEPENDENCIES
103111
github-markup
104112
iro-core!
113+
iro-model!
105114
iro-runtime!
106115
iro-support!
107116
redcarpet

iro-core-rb/lib/iro-core.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
inflect 'lru_store' => 'LRUStore'
1212
end
1313

14-
on_load 'Iro::XYZ' do
14+
on_plugin 'iro-xyz' do
1515
enhance_module 'Iro::Reference::White' do
1616
constants.each do |constant_name|
1717
override_constant(constant_name) { |original| Iro::XYZ.from_intermediate(*original) }

iro-gems.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
iro-core:
22
path: iro-core-rb
33
repo: [email protected]:iro-lib/iro-core-rb.git
4+
iro-model:
5+
path: iro-model-rb
6+
repo: [email protected]:iro-lib/iro-model-rb.git
47
iro-runtime:
58
path: iro-runtime-rb
69
repo: [email protected]:iro-lib/iro-runtime-rb.git
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
labels:
9+
- dependabot
10+
- dependencies
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
13+
lint:
14+
name: Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Setup project
18+
uses: actions/checkout@v4
19+
- name: Setup ruby
20+
uses: ruby/setup-ruby@v1
21+
with:
22+
bundler-cache: true
23+
ruby-version: 3.2
24+
- name: Lint ruby
25+
run: bundle exec rubocop
26+
27+
test:
28+
name: Test (ruby ${{ matrix.ruby_version }})
29+
env:
30+
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Setup project
34+
uses: actions/checkout@v4
35+
- name: Setup ruby
36+
uses: ruby/setup-ruby@v1
37+
with:
38+
bundler-cache: true
39+
ruby-version: ${{ matrix.ruby_version }}
40+
- name: Run RSpec
41+
run: bundle exec rspec
42+
- name: Report Coverage
43+
if: env.CODACY_PROJECT_TOKEN != ''
44+
shell: bash
45+
run: bash <(curl -Ls https://coverage.codacy.com/get.sh)
46+
strategy:
47+
matrix:
48+
ruby_version:
49+
- 3.2
50+
- 3.3
51+
- 3.4
52+
53+
package:
54+
name: Package
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Setup project
58+
uses: actions/checkout@v4
59+
- name: Setup ruby
60+
uses: ruby/setup-ruby@v1
61+
with:
62+
bundler-cache: true
63+
ruby-version: 3.2
64+
- name: Package gem
65+
run: bin/build

iro-model-rb/.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
*.gem
2+
*.rbc
3+
/.config
4+
/coverage/
5+
/InstalledFiles
6+
/logs/
7+
/pkg/
8+
/spec/reports/
9+
/spec/examples.txt
10+
/test/tmp/
11+
/test/version_tmp/
12+
/tmp/
13+
14+
# Used by dotenv library to load environment variables.
15+
# .env
16+
17+
# Ignore Byebug command history file.
18+
.byebug_history
19+
20+
## Documentation cache and generated files:
21+
/.yardoc/
22+
/_yardoc/
23+
/doc/
24+
/rdoc/
25+
26+
## Environment normalization:
27+
/.bundle/
28+
/vendor/bundle
29+
/lib/bundler/man/
30+
31+
# for a library or gem, you might want to ignore these files since the code is
32+
# intended to run in multiple environments; otherwise, check them in:
33+
Gemfile.lock
34+
# .ruby-version
35+
# .ruby-gemset
36+
37+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
38+
.rvmrc
39+
40+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
41+
.rubocop-https?--*

iro-model-rb/.rspec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
--require spec_helper
2+
--format documentation
3+
--order rand
4+
--color

iro-model-rb/.rubocop.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
inherit_from:
2+
# TODO: change this to a remote url
3+
- ../.rubocop.yml
4+
5+
Naming/FileName:
6+
Exclude:
7+
- lib/iro-model.rb

iro-model-rb/.ruby-version

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

iro-model-rb/.yardopts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
lib/**/*.rb
2+
--title Iro::Model
3+
--readme README.md
4+
--no-private
5+
--protected
6+
--markup markdown
7+
--markup-provider redcarpet
8+
--embed-mixins
9+
--files LICENSE

0 commit comments

Comments
 (0)