Skip to content

Commit a645023

Browse files
authored
Merge pull request #318 from joyofrails/chore/dev-setup
Update dev setup
2 parents 4db9cb2 + 3a2d911 commit a645023

File tree

15 files changed

+48
-97
lines changed

15 files changed

+48
-97
lines changed

.githooks/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Using githooks
2+
3+
This repository provides an optional pre-commit hook to run `lint-staged` on project files, install via NPM.
4+
5+
To set up the git hooks locally:
6+
7+
```
8+
git config --local core.hooksPath .githooks
9+
```
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
32

43
npx lint-staged

.github/workflows/verify.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,20 @@ jobs:
9898
RAILS_ENV: test
9999
run: bin/rspec
100100

101-
- name: Upload coverage reports to Codecov
102-
uses: codecov/[email protected]
101+
- name: Upload coverage results
102+
uses: actions/upload-artifact@v4
103+
if: always()
103104
with:
104-
token: ${{ secrets.CODECOV_TOKEN }}
105+
name: coverage-report
106+
path: coverage
107+
108+
- name: Keep screenshots from failed system tests
109+
uses: actions/upload-artifact@v4
110+
if: failure()
111+
with:
112+
name: screenshots
113+
path: ${{ github.workspace }}/tmp/capybara
114+
if-no-files-found: ignore
105115

106116
setup:
107117
name: Setup
@@ -183,11 +193,6 @@ jobs:
183193
run: |
184194
npm run test -- --watch=false
185195
186-
- name: Upload coverage reports to Codecov
187-
uses: codecov/[email protected]
188-
with:
189-
token: ${{ secrets.CODECOV_TOKEN }}
190-
191196
assets:
192197
name: Assets
193198
runs-on: ubuntu-latest

Brewfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

Brewfile.lock.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,33 @@
22

33
[![Build Status](https://github.com/joyofrails/joyofrails.com/actions/workflows/verify.yml/badge.svg)](https://github.com/joyofrails/joyofrails.com/actions)
44
[![Deploy Status](https://github.com/joyofrails/joyofrails.com/actions/workflows/deploy.yml/badge.svg)](https://github.com/joyofrails/joyofrails.com/actions)
5-
[![Code Coverage](https://codecov.io/gh/joyofrails/joyofrails.com/graph/badge.svg?token=PRKDIXWQ7I)](https://codecov.io/gh/joyofrails/joyofrails.com)
65

76
A place to learn and celebrate the joy of using Ruby on Rails
87

9-
https://www.joyofrails.com
8+
https://joyofrails.com
9+
10+
Made with joy by @rossta
1011

1112
## Overview
1213

1314
Building a Rails application to help people learn more about building Rails applications.
1415

15-
- One Person Framework: Rails provides all one person needs to build a robust frontend experience with [Hotwire](https://hotwired.dev/).
16-
- Minimal moving pieces: Prefer SQLite as a database. Single server hosting.
17-
- Vanilla Rails: Rely on Rails conventions. Avoid needless abstractions. Introduce gems judiciously (or for educational value).
16+
- Rails 8 with Active Record, [Solid Queue](https://github.com/rails/solid_queue), [Solid Cache](https://github.com/rails/solid_cache), and [Solid Cable](https://github.com/rails/solid_cable)
17+
- [SQLite](https://sqlite.org/) as a database
18+
- [Hotwire](https://hotwired.dev/) for interactivity
19+
- Asset pipeline with [Vite](https://vite.dev/), via [Vite Ruby](https://vite-ruby.netlify.app/), and [Propshaft](https://github.com/rails/propshaft)
20+
- Markdown, ERb, and [Phlex](https://www.phlex.fun/) for HTML
1821

1922
## Development
2023

2124
### Requirements
2225

23-
- Ruby, see `.ruby-version`
24-
25-
Use a Ruby version manager to install and manage Ruby versions, such as
26-
27-
- [chruby](https://github.com/postmodern/chruby)
28-
- [asdf](https://asdf-vm.com/)
29-
- [rvm](https://rvm.io/)
30-
- [rbenv](https://github.com/rbenv/rbenv)
31-
32-
To use YJIT, Rust must first be installed and be found on `PATH`:
33-
34-
1. See https://www.rust-lang.org/tools/install for instructions on installing Rust
35-
2. Then install the correct version of Ruby using preferred version manager:
36-
37-
- [Node](https://nodejs.org/en/), see `.node-version`, `brew install node` or use NVM
38-
- A process manager for Procfile-based applications, either
39-
40-
- [foreman](https://github.com/ddollar/foreman) - installs automatically, unless using
41-
- [overmind](https://github.com/DarthSim/overmind)
26+
- [Ruby](https://www.ruby-lang.org/en/), see `.ruby-version`
27+
- [Node](https://nodejs.org/en/), see `.node-version`
4228

4329
### Setup
4430

45-
Run the installation script to get the application set up. It is intended to be idempotent and can be run multiple times:
31+
Run setup script to install dependencies and initialize the database.
4632

4733
```
4834
bin/setup
@@ -70,12 +56,24 @@ Run Jest tests
7056
npm run test
7157
```
7258

59+
Linting
60+
61+
```
62+
bin/lint
63+
```
64+
7365
Run the following to run all tests
7466

7567
```
7668
bin/verify
7769
```
7870

71+
## Docs
72+
73+
- [CONTRIBUTING.md](./docs/CONTRIBUTING.md)
74+
- [SECURITY.md](./docs/SECURITY.md)
75+
- [CODE_OF_CONDUCT.md](./docs/CODE_OF_CONDUCT.md)
76+
7977
## License
8078

8179
Copyright 2024 Ross Kaffenberger under the [BSD 3 Clause License](https://opensource.org/license/bsd-3-clause).

app/content/models/sitepress_slash_page.rb

Lines changed: 0 additions & 9 deletions
This file was deleted.

codecov.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

db/seeds/development/pages.rb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
[
2-
SitepressArticle,
3-
SitepressSlashPage
4-
].each do |sitepress_collection|
5-
sitepress_collection.all.each do |sitepress_resource|
6-
Page.find_or_create_by!(request_path: sitepress_resource.request_path)
7-
end
1+
SitepressPage.all.each do |sitepress_resource|
2+
Page.find_or_create_by!(request_path: sitepress_resource.request_path)
83
end
File renamed without changes.

0 commit comments

Comments
 (0)