Skip to content
Open
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
16 changes: 9 additions & 7 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ on: [push, pull_request]

jobs:
build:
name: Vite Plugin Ruby
name: ${{ matrix.package }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [20]
node: [22, 24]
package: [vite-plugin-ruby, vite-plugin-rails]

runs-on: ${{ matrix.os }}

Expand All @@ -18,17 +20,17 @@ jobs:

- uses: pnpm/action-setup@v4
with:
version: 9
version: 10

- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ matrix.node }}

- run: pnpm -C vite-plugin-ruby install --frozen-lockfile
- run: pnpm install --frozen-lockfile

- name: Build
run: pnpm -C vite-plugin-ruby build
- name: Build all workspace packages
run: pnpm -r build

- name: Test
run: pnpm -C vite-plugin-ruby test
run: pnpm -C ${{ matrix.package }} test --run
22 changes: 15 additions & 7 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,30 @@ jobs:
matrix:
os: [ubuntu-latest]
ruby: [
"3.1",
"3.2",
"3.3",
"3.4",
]
gemfile: [
"Gemfile-rails.7.0.x",
"Gemfile-rails.7.1.x",
"Gemfile-rails.7.2.x",
"Gemfile-rails.8.0.x",
"Gemfile-rails.8.1.x",
]
experimental: [false]
include:
- ruby: "3.4"
- ruby: "4.0"
os: ubuntu-latest
gemfile: "Gemfile-rails.8.0.x"
gemfile: "Gemfile-rails.8.1.x"
experimental: true
- ruby: "3.4"
os: ubuntu-latest
gemfile: Gemfile-rails-edge
experimental: true
- ruby: "4.0"
os: ubuntu-latest
gemfile: Gemfile-rails-edge
experimental: true

env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
Expand All @@ -41,7 +46,10 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Enable corepack (yarn/pnpm shims for test_app)
run: corepack enable

- uses: ruby/setup-ruby@v1
with:
Expand All @@ -52,8 +60,8 @@ jobs:
run: bin/rake test

- name: Upload coverage to Qlty
if: ${{ contains(github.ref, 'main') }}
uses: qltysh/qlty-action/coverage@main
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: qltysh/qlty-action/coverage@a19242102d17e497f437d7466aa01b528537e899 # v2.2.0
with:
token: ${{secrets.QLTY_COVERAGE_TOKEN}}
files: coverage/.resultset.json
6 changes: 3 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ require:
- rubocop-minitest

inherit_gem:
standard: config/ruby-3.0.yml
standard: config/ruby-3.3.yml

inherit_mode:
merge:
- Exclude

AllCops:
TargetRubyVersion: 3.0
TargetRubyVersion: 3.3
SuggestExtensions: false
NewCops: enable
Exclude:
Expand Down
2 changes: 1 addition & 1 deletion examples/hanami_bookshelf/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.1.1
ruby-3.4.5
2 changes: 1 addition & 1 deletion examples/hanami_bookshelf/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

ruby '3.1.1'
ruby '3.4.5'

gem 'rake'
gem 'hanami'
Expand Down
4 changes: 2 additions & 2 deletions examples/hanami_bookshelf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"name": "vite-hanami-demo",
"private": true,
"engines": {
"node": "15.x",
"node": ">=22.12.0",
"yarn": "1.x"
},
"devDependencies": {
"sass": "^1.35.2",
"vite": "^3.0.0",
"vite": "^8.0.0",
"vite-plugin-ruby": "^3.0.8"
}
}
2 changes: 1 addition & 1 deletion examples/padrino_blog_tutorial/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
gem 'rake'
gem 'haml'
gem 'puma'
gem 'padrino', '0.15.0'
gem 'padrino', '0.16.1'
gem 'vite_padrino', path: '../../vite_padrino'
gem 'vite_ruby', path: '../../vite_ruby'
gem 'pry-byebug'
4 changes: 2 additions & 2 deletions examples/padrino_blog_tutorial/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"devDependencies": {
"vite": "^3.0.0",
"vite-plugin-ruby":"^3.0.8"
"vite": "^8.0.0",
"vite-plugin-ruby": "^3.0.8"
},
"dependencies": {
"bulma": "^0.9.2"
Expand Down
6 changes: 3 additions & 3 deletions examples/rails/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"dev": "vite"
},
"engines": {
"node": "22",
"pnpm": "9"
"node": ">=22",
"pnpm": ">=9"
},
"dependencies": {
"@bugsnag/js": "^7.20.2",
Expand All @@ -30,7 +30,7 @@
"vite": "^8.0.0",
"vite-plugin-bugsnag": "^2.0.2",
"vite-plugin-rails": "^0.6.0",
"vite-plugin-ruby": "^5.2.0",
"vite-plugin-ruby": "^5.2.1",
"vite-plugin-windicss": "^1.8.10"
}
}
84 changes: 43 additions & 41 deletions examples/rails/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions examples/rails/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import rails from 'vite-plugin-rails'
import WindiCSS from 'vite-plugin-windicss'
import BugsnagPlugins from './plugins/bugsnag'

const administratorAssetsPath = process.env.ADMINISTRATOR_ASSETS_PATH

export default defineConfig({
plugins: [
BugsnagPlugins,
Expand All @@ -26,13 +28,13 @@ export default defineConfig({
],
// Example: Importing assets from arbitrary paths.
resolve: {
alias: {
'@administrator/': `${process.env.ADMINISTRATOR_ASSETS_PATH}/`,
},
alias: administratorAssetsPath
? { '@administrator/': `${administratorAssetsPath}/` }
: {},
},
server: {
fs: {
allow: [process.env.ADMINISTRATOR_ASSETS_PATH!],
allow: administratorAssetsPath ? [administratorAssetsPath] : [],
},
},
})
7 changes: 7 additions & 0 deletions gemfiles/Gemfile-rails.8.1.x
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'

gem 'rails', '~> 8.1.0'

gemspec path: '../vite_ruby'
gemspec path: '../vite_rails'
gemspec path: '../vite_plugin_legacy'
Loading