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
57 changes: 57 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
rubocop:
runs-on: ubuntu-24.04
env:
BUNDLE_GEMFILE: Gemfile.8.1
steps:
- uses: actions/checkout@v4
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "4.0"
bundler-cache: true
- name: Run RuboCop
run: bundle exec rubocop

test:
runs-on: ubuntu-24.04

strategy:
fail-fast: false
matrix:
include:
- ruby: "2.7"
gemfile: Gemfile.6.1
- ruby: "3.1"
gemfile: Gemfile.7.0
- ruby: "3.2"
gemfile: Gemfile.7.1
- ruby: "3.3"
gemfile: Gemfile.7.2
- ruby: "3.4"
gemfile: Gemfile.8.0
- ruby: "4.0"
gemfile: Gemfile.8.1
- ruby: "4.0"
gemfile: Gemfile.viewcomponent-4

env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}

steps:
- uses: actions/checkout@v4
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake spec
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--require spec_helper
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ inherit_gem:
- config/ext/rails.yml
- config/ext/rspec.yml

plugins:
- rubocop-rspec
- rubocop-rake

AllCops:
TargetRubyVersion: 2.6
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.6
4.0.2
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## [Unreleased]

- Add tests to this gem
- Add CI test matrix for various Rails and Ruby versions
- Add CI job rubocop linting

## [0.3.0] - 2025-09-22

- Support for ViewComponent 4. (ViewComponent 3 support was implicit due to its `ActionView::Base` dependency.)
Expand Down
8 changes: 0 additions & 8 deletions Gemfile

This file was deleted.

1 change: 1 addition & 0 deletions Gemfile
8 changes: 8 additions & 0 deletions Gemfile.6.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source 'https://rubygems.org'

gem 'rails', '~> 6.1.0'
gem 'rspec', '~> 3.12'
gem 'rake'
gem 'gemika', '>= 0.8.1'

gem 'precompiled_assets', path: '.'
182 changes: 182 additions & 0 deletions Gemfile.6.1.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
PATH
remote: .
specs:
precompiled_assets (0.3.0)
railties (>= 6.0.0)

GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.7.10)
actionpack (= 6.1.7.10)
activesupport (= 6.1.7.10)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.7.10)
actionpack (= 6.1.7.10)
activejob (= 6.1.7.10)
activerecord (= 6.1.7.10)
activestorage (= 6.1.7.10)
activesupport (= 6.1.7.10)
mail (>= 2.7.1)
actionmailer (6.1.7.10)
actionpack (= 6.1.7.10)
actionview (= 6.1.7.10)
activejob (= 6.1.7.10)
activesupport (= 6.1.7.10)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.7.10)
actionview (= 6.1.7.10)
activesupport (= 6.1.7.10)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.7.10)
actionpack (= 6.1.7.10)
activerecord (= 6.1.7.10)
activestorage (= 6.1.7.10)
activesupport (= 6.1.7.10)
nokogiri (>= 1.8.5)
actionview (6.1.7.10)
activesupport (= 6.1.7.10)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.7.10)
activesupport (= 6.1.7.10)
globalid (>= 0.3.6)
activemodel (6.1.7.10)
activesupport (= 6.1.7.10)
activerecord (6.1.7.10)
activemodel (= 6.1.7.10)
activesupport (= 6.1.7.10)
activestorage (6.1.7.10)
actionpack (= 6.1.7.10)
activejob (= 6.1.7.10)
activerecord (= 6.1.7.10)
activesupport (= 6.1.7.10)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.7.10)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
base64 (0.3.0)
builder (3.3.0)
concurrent-ruby (1.3.6)
crass (1.0.6)
date (3.5.1)
diff-lcs (1.6.2)
erubi (1.13.1)
gemika (1.0.0)
globalid (1.3.0)
activesupport (>= 6.1)
i18n (1.14.8)
concurrent-ruby (~> 1.0)
logger (1.7.0)
loofah (2.25.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.9.0)
logger
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.1.0)
method_source (1.1.0)
mini_mime (1.1.5)
minitest (5.26.1)
net-imap (0.4.23)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.1)
net-protocol
nio4r (2.7.5)
nokogiri (1.15.7-x86_64-linux)
racc (~> 1.4)
racc (1.8.1)
rack (2.2.23)
rack-test (2.2.0)
rack (>= 1.3)
rails (6.1.7.10)
actioncable (= 6.1.7.10)
actionmailbox (= 6.1.7.10)
actionmailer (= 6.1.7.10)
actionpack (= 6.1.7.10)
actiontext (= 6.1.7.10)
actionview (= 6.1.7.10)
activejob (= 6.1.7.10)
activemodel (= 6.1.7.10)
activerecord (= 6.1.7.10)
activestorage (= 6.1.7.10)
activesupport (= 6.1.7.10)
bundler (>= 1.15.0)
railties (= 6.1.7.10)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.3.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.7.0)
loofah (~> 2.25)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (6.1.7.10)
actionpack (= 6.1.7.10)
activesupport (= 6.1.7.10)
method_source
rake (>= 12.2)
thor (~> 1.0)
rake (13.4.2)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.6)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.8)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.7)
sprockets (4.2.2)
concurrent-ruby (~> 1.0)
logger
rack (>= 2.2.4, < 4)
sprockets-rails (3.5.2)
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
thor (1.5.0)
timeout (0.6.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
websocket-driver (0.8.0)
base64
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.6.18)

PLATFORMS
x86_64-linux

DEPENDENCIES
gemika (>= 0.8.1)
precompiled_assets!
rails (~> 6.1.0)
rake
rspec (~> 3.12)

BUNDLED WITH
2.4.22
8 changes: 8 additions & 0 deletions Gemfile.7.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source 'https://rubygems.org'

gem 'rails', '~> 7.0.0'
gem 'rspec', '~> 3.12'
gem 'rake'
gem 'gemika', '>= 0.8.1'

gem 'precompiled_assets', path: '.'
Loading
Loading