Skip to content

Commit e963ce2

Browse files
committed
Add iro-space plugin with core components and workflows
Introduced the `iro-space` plugin, featuring its foundational library components for color space behavior modeling and key utilities. This includes various behaviors such as categorization, coercion, and opacity, along with a registry, context management, and primitive conversions. Supporting files include tests, workflows, and CI configurations. This addition establishes the framework for advanced color space-related functionalities.
1 parent 3e461d7 commit e963ce2

40 files changed

+945
-0
lines changed

Gemfile.lock

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ PATH
2020
iro-support (~> 0.1)
2121
zeitwerk (~> 2.7)
2222

23+
PATH
24+
remote: iro-space-rb
25+
specs:
26+
iro-space (0.1.0)
27+
iro-core (~> 0.1)
28+
iro-model (~> 0.1)
29+
iro-runtime (~> 0.1)
30+
iro-support (~> 0.1)
31+
2332
PATH
2433
remote: iro-support-rb
2534
specs:
@@ -112,6 +121,7 @@ DEPENDENCIES
112121
iro-core!
113122
iro-model!
114123
iro-runtime!
124+
iro-space!
115125
iro-support!
116126
redcarpet
117127
rspec

iro-gems.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ iro-model:
77
iro-runtime:
88
path: iro-runtime-rb
99
repo: [email protected]:iro-lib/iro-runtime-rb.git
10+
iro-space:
11+
path: iro-space-rb
12+
repo: [email protected]:iro-lib/iro-space-rb.git
1013
iro-support:
1114
path: iro-support-rb
1215
repo: [email protected]:iro-lib/iro-support-rb.git

iro-runtime-rb/lib/iro/runtime/plugin/dsl/color.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ def model(identifier, &)
1212
registry.register(identifier, &)
1313
end
1414
end
15+
16+
def space(identifier, &)
17+
enhance_module('Iro::Space') do
18+
registry.register(identifier, &)
19+
end
20+
end
1521
end
1622
end
1723
end
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-space-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-space-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-space-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-space.rb

iro-space-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-space-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::Space
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)