Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suspenders 3.0.0 #1135

Merged
merged 71 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
0ff6cc0
Suspenders 3.0.0
stevepolitodesign Oct 14, 2023
6bd58f2
Introduce test helpers
stevepolitodesign Oct 19, 2023
84e0c95
Introduce `mocha`
stevepolitodesign Oct 27, 2023
5a6b6e4
Introduce `suspenders:accessibility` generator (#1137)
stevepolitodesign Nov 3, 2023
5ff19c5
Introduce `./bin/rails` to fix broken test runner (#1139)
stevepolitodesign Nov 9, 2023
47bef29
Introduce `suspenders:inline_svg` generator (#1140)
crackofdusk Nov 13, 2023
dbb1f98
./bin/rails -> bin/rails (#1141)
Nov 13, 2023
04ea752
Use "ruby" as the PLATFORM for Gemfile.lock (#1142)
Nov 14, 2023
4f20aa8
Introduce `suspenders:factories` generator (#1136)
stevepolitodesign Nov 17, 2023
6f1ec09
Remove implementation detail from `NEWS`
stevepolitodesign Nov 17, 2023
74603ad
Introduce `suspenders:advisories` generator (#1138)
stevepolitodesign Nov 28, 2023
1a03e95
Introduce `suspenders:styles` generator (#1145)
stevepolitodesign Nov 28, 2023
6bed72e
Modify `suspenders:styles` (#1146)
stevepolitodesign Nov 28, 2023
cb5dff8
Introduce suspenders:jobs generator (#1147)
laicuRoot Dec 6, 2023
81e0e68
Fix stylelint violations (#1150)
stevepolitodesign Dec 11, 2023
fe5fc93
Introduce 'suspenders:lint` generator (#1148)
stevepolitodesign Dec 11, 2023
551d60b
Introduce `suspenders:rake` generator (#1144)
stevepolitodesign Dec 12, 2023
8628dcb
Fix stylelint violations when using Tailwind (#1153)
stevepolitodesign Dec 12, 2023
51dcd4b
Introduce `suspenders:views` generator (#1154)
stevepolitodesign Jan 10, 2024
b065ae9
Introduce `suspenders:setup` generator (#1157)
stevepolitodesign Feb 16, 2024
c16e593
Clean up `suspenders:setup` (#1159)
stevepolitodesign Feb 16, 2024
63fa9cd
Introduce `suspenders:tasks` generator (#1160)
stevepolitodesign Feb 20, 2024
647bb4c
Introduce `suspenders:db:migrate` task (#1161)
stevepolitodesign Feb 20, 2024
fc8793d
Introduce `suspenders:email` generator (#1162)
stevepolitodesign Feb 28, 2024
9f624b1
Update front-end linting dependencies (#1163)
stevepolitodesign Mar 1, 2024
3b3712d
Disable Turbo's InstantClick (#1164)
stevepolitodesign Mar 8, 2024
0da07ad
Introduce `suspenders:testing` generator (#1156)
stevepolitodesign Mar 8, 2024
f3f4480
Setup Generator: Remove call to `test:prepare` (#1166)
stevepolitodesign Mar 21, 2024
39efb28
Lint Generator: Remove generated test/spec files (#1167)
stevepolitodesign Mar 21, 2024
8b8ecb9
Testing Generator: Improvements (#1168)
stevepolitodesign Mar 21, 2024
7866a7b
Styles Generator: Drop support for Tailwind (#1169)
stevepolitodesign Mar 22, 2024
87d1f5a
Lint Generator: Introduce `.prettierignore` (#1170)
stevepolitodesign Mar 22, 2024
52e99e9
Introduce `suspenders:prerequisites` generator (#1171)
stevepolitodesign Mar 22, 2024
5f90074
Introduce `suspenders:ci` generator (#1172)
stevepolitodesign Mar 23, 2024
eb6b1c1
CI Generator: Fix indentation and linting violations. (#1173)
stevepolitodesign Mar 23, 2024
ec2e811
Fix linting violations (#1175)
stevepolitodesign Mar 25, 2024
c7d3550
Fix additional linting violations (#1176)
stevepolitodesign Mar 25, 2024
97f1883
Fix missing linting violation (#1177)
stevepolitodesign Mar 25, 2024
e7926f1
Lint Generator: No longer fix violations after invocation (#1174)
stevepolitodesign Mar 25, 2024
a40d457
CI: Breakout jobs and support Ruby 3.3.0 (#1178)
stevepolitodesign Mar 26, 2024
f76fb25
Lint Generator: Handling missing `package.json` (#1179)
stevepolitodesign Mar 26, 2024
f6c6f45
Introduce `suspenders:cleanup:organize_gemfile` task (#1181)
stevepolitodesign Apr 2, 2024
667b7ae
Introduce `suspenders:production:environment` generator (#1151)
crackofdusk Apr 5, 2024
5a733e0
Introduce `suspenders:test:environment` generator (#1182)
stevepolitodesign Apr 5, 2024
7d666ca
Introduce `suspenders:development:environment` generator (#1149)
crackofdusk Apr 5, 2024
56b316c
Clean Up: Use `Environments` namespace (#1184)
stevepolitodesign Apr 5, 2024
1c9134f
Test Cleanup: Improve test setup (#1183)
stevepolitodesign Apr 5, 2024
8edaa4b
AccessibilityGenerator: Update gem declaration (#1185)
stevepolitodesign Apr 8, 2024
473e483
Rakefile: Conditionally require local dependencies (#1186)
stevepolitodesign Apr 9, 2024
08be1dd
Dynamically generate README (#1187)
stevepolitodesign Apr 13, 2024
c694b2a
Test Cleanup: Refactor tests to use helper (#1188)
stevepolitodesign Apr 13, 2024
e8eb46a
Introduce `suspenders:install:web` generator and application template…
stevepolitodesign Apr 14, 2024
5b133e7
Styles Generator: Install `postcss-url` (#1191)
stevepolitodesign Apr 19, 2024
f62c516
Lint Generator: Account for breaking changes in ESLint (#1192)
stevepolitodesign Apr 19, 2024
7952880
Test Cleanup: Update bundle assertions (#1193)
stevepolitodesign Apr 19, 2024
5433da2
Test Cleanup: Remove generator description tests (#1194)
stevepolitodesign Apr 19, 2024
ea9553c
Generated README: Titleize app name (#1195)
stevepolitodesign Apr 22, 2024
2c8616a
Jobs Generator: Remove obsolete configuration (#1197)
stevepolitodesign Apr 24, 2024
fc1c08e
Generators: Update descriptions (#1198)
stevepolitodesign Apr 26, 2024
a3e5a77
Documentation: Update README and CONTRIBUTING (#1199)
stevepolitodesign Apr 26, 2024
f9a702a
Install Generator: Generate `CONTRIBUTING.md` (#1196)
stevepolitodesign Apr 26, 2024
a175e7a
README: Update installation script
stevepolitodesign May 2, 2024
a38f247
NEWS: Document introduction of application template
stevepolitodesign May 2, 2024
4def0ae
LICENSE: Remove year and duplicate file
stevepolitodesign May 2, 2024
7bf6e82
Prerequisites: Use system version of Node (#1201)
stevepolitodesign May 7, 2024
69e5fd7
Prerequisites: Raise if Node version unsupported (#1202)
stevepolitodesign May 8, 2024
47199bf
Documentation: List requirements
stevepolitodesign May 8, 2024
1b1795a
Account for TOCTOU bug
stevepolitodesign May 9, 2024
aceb0e2
Depend on Ruby 3.3.1
stevepolitodesign May 9, 2024
088c1b9
Test: Suppress Node warnings
stevepolitodesign May 9, 2024
721f387
Template: Point gem to `main`
stevepolitodesign May 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
64 changes: 22 additions & 42 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,35 @@
name: CI

on:
workflow_dispatch:
push:
branches:
- main

pull_request:
paths-ignore:
- 'docs/**'
- '**.md'

jobs:
test:

lint:
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Lint
run: bin/rails standard

test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set git configuration
run: |
git config --global init.defaultBranch main
git config --global user.name 'GitHub Actions'
git config --global user.email 'microsoft@example.com'

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: false

- name: Install dependencies
run: bundle install

- name: Run tests
run: bin/rake
env:
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/dummy_app_test"
DEBUG: 1
SPEC_OPTS: "--no-color -f d"
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Run tests
run: bin/rails test
15 changes: 10 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
*.gem
*.swp
Gemfile.lock
/.bundle
/tmp
/.bundle/
/doc/
/log/*.log
/pkg/
/tmp/
/test/dummy/db/*.sqlite3
/test/dummy/db/*.sqlite3-*
/test/dummy/log/*.log
/test/dummy/storage/
/test/dummy/tmp/
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.3.0
stevepolitodesign marked this conversation as resolved.
Show resolved Hide resolved
79 changes: 45 additions & 34 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,70 @@
# Contributing

We love pull requests from everyone. By participating in this project, you
agree to abide by the thoughtbot [code of conduct].
We love contributions from everyone.
By participating in this project,
you agree to abide by the thoughtbot [code of conduct].

[code of conduct]: https://thoughtbot.com/open-source-code-of-conduct
[code of conduct]: https://thoughtbot.com/open-source-code-of-conduct

Fork the repo:
We expect everyone to follow the code of conduct
anywhere in thoughtbot's project codebases,
issue trackers, chatrooms, and mailing lists.

git clone git@github.com:thoughtbot/suspenders.git
## Contributing Code

Set up your machine:
Fork the repo.

./bin/setup
Run the setup script.

Make sure the tests pass:
```
./bin/setup
```

rake
Make sure the tests pass:

Make your change. Write tests. Follow our [style guide][style]. Make the tests
pass:
```
bin/rails test
```

[style]: https://github.com/thoughtbot/guides/blob/main/ruby/README.md
Make sure there are no linting violations:

rake
```
bin/rails standard
```

Mention how your changes affect the project to other developers and users in
the `NEWS.md` file.
Make your change, with new passing tests.

Write a [good commit message][commit].
Push to your fork.
[Submit a pull request][pr].
Mention how your changes affect the project to other developers and users in the
`NEWS.md` file.

[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[pr]: https://github.com/thoughtbot/suspenders/compare/
Push to your fork. Write a [good commit message][commit]. Submit a pull request.

If [Hound] catches style violations, fix them.
[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

[hound]: https://houndci.com
Others will give constructive feedback.
This is a time for discussion and improvements,
and making the necessary changes will be required before we can
merge the contribution.

Wait for us. We try to at least comment on pull requests within one business
day. We may suggest changes.
## Testing Generators

## Generators
There is a smaller dummy application at `test/dummy`. This application is used
as a mounting point for the engine, to make testing the engine extremely simple.

All new contributions must be within the generator framework, as described in
[our goals](GOALS.md).
There are a number of [assertions][] and [helpers][] that make testing
generators easier.

## Versions
[assertions]: https://api.rubyonrails.org/classes/Rails/Generators/Testing/Assertions.html
[helpers]: https://api.rubyonrails.org/classes/Rails/Generators/Testing/Behavior.html

To update the Ruby version, change `.ruby-version`.
## Publishing to RubyGems

If you see this error while running tests:
When the gem is ready to be shared as a formal release, it can be
[published][published] to RubyGems.

```
Your Ruby version is XXX, but your Gemfile specified YYY (Bundler::RubyVersionMismatch)
```
[published]: https://guides.rubyonrails.org/plugins.html#publishing-your-gem

Try removing the `tmp/` directory and re-running the tests.
1. Bump the version number in `Suspenders::VERSION`
2. Run `bundle exec rake build`
3. Run `bundle exec rake install`
4. Run `bundle exec rake release`