-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Introduce suspenders:install:web
and application template
#1152
Introduce suspenders:install:web
and application template
#1152
Conversation
lib/install/web.rb
Outdated
|
||
after_bundle do | ||
gem_group :development, :test do | ||
gem "suspenders", github: "thoughtbot/suspenders", branch: "suspenders-3-0-0-web-generator" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to update this once we release a new version and merge into main
.
ad39dce
to
f823f17
Compare
81a5cee
to
4c7d901
Compare
5b3778b
to
a6e3706
Compare
Creates CI template to be run via [GitHub Actions][ga] based on a [similar template][ci template] that will be generated in an upcoming Release of Rails. Because this generator can be run in an existing application, we add conditional checks for some jobs. However, this generator is intended to be run as part of our holistic `suspenders:install:web` which will be introduced in #1152. Once Rails is released to contain a CI template, we will need to consider how we want to handle conflicts between its file and ours, but for now, we do not need to worry about that. [ga]: https://docs.github.com/en/actions [ci template]: rails/rails#50508 --- **To Do** - [ ] Consider returning early and raising if the application is not using PostgreSQL.
Creates CI template to be run via [GitHub Actions][ga] based on a [similar template][ci template] that will be generated in an upcoming Release of Rails. Raises if the application is not using PostgreSQL, since our CI template assumes that adapter. Because this generator can be run in an existing application, we add conditional checks for some jobs. However, this generator is intended to be run as part of our holistic `suspenders:install:web` which will be introduced in #1152. Once Rails is released to contain a CI template, we will need to consider how we want to handle conflicts between its file and ours, but for now, we do not need to worry about that. [ga]: https://docs.github.com/en/actions [ci template]: rails/rails#50508 --- **To Do** - [ ] Consider returning early and raising if the application is not using PostgreSQL.
Creates CI template to be run via [GitHub Actions][ga] based on a [similar template][ci template] that will be generated in an upcoming Release of Rails. Raises if the application is not using PostgreSQL, since our CI template assumes that adapter. Because this generator can be run in an existing application, we add conditional checks for some jobs. However, this generator is intended to be run as part of our holistic `suspenders:install:web` which will be introduced in #1152. Once Rails is released to contain a CI template, we will need to consider how we want to handle conflicts between its file and ours, but for now, we do not need to worry about that. [ga]: https://docs.github.com/en/actions [ci template]: rails/rails#50508 --- **To Do** - [ ] Consider returning early and raising if the application is not using PostgreSQL.
Creates CI template to be run via [GitHub Actions][ga] based on a [similar template][ci template] that will be generated in an upcoming Release of Rails. Raises if the application is not using PostgreSQL, since our CI template assumes that adapter. Because this generator can be run in an existing application, we add conditional checks for some jobs. However, this generator is intended to be run as part of our holistic `suspenders:install:web` which will be introduced in #1152. Once Rails is released to contain a CI template, we will need to consider how we want to handle conflicts between its file and ours, but for now, we do not need to worry about that. [ga]: https://docs.github.com/en/actions [ci template]: rails/rails#50508 --- **To Do** - [ ] Consider returning early and raising if the application is not using PostgreSQL.
Creates CI template to be run via [GitHub Actions][ga] based on a [similar template][ci template] that will be generated in an upcoming Release of Rails. Raises if the application is not using PostgreSQL, since our CI template assumes that adapter. Because this generator can be run in an existing application, we add conditional checks for some jobs. However, this generator is intended to be run as part of our holistic `suspenders:install:web` which will be introduced in #1152. Once Rails is released to contain a CI template, we will need to consider how we want to handle conflicts between its file and ours, but for now, we do not need to worry about that. [ga]: https://docs.github.com/en/actions [ci template]: rails/rails#50508
Creates CI template to be run via [GitHub Actions][ga] based on a [similar template][ci template] that will be generated in an upcoming Release of Rails. Raises if the application is not using PostgreSQL, since our CI template assumes that adapter. Because this generator can be run in an existing application, we add conditional checks for some jobs. However, this generator is intended to be run as part of our holistic `suspenders:install:web` which will be introduced in #1152. Once Rails is released to contain a CI template, we will need to consider how we want to handle conflicts between its file and ours, but for now, we do not need to worry about that. [ga]: https://docs.github.com/en/actions [ci template]: rails/rails#50508
Creates CI template to be run via [GitHub Actions][ga] based on a [similar template][ci template] that will be generated in an upcoming Release of Rails. Also create a [Dependabot][dependabot] file based off the [the upcoming release][ci template]. Raises if the application is not using PostgreSQL, since our CI template assumes that adapter. Because this generator can be run in an existing application, we add conditional checks for some jobs. However, this generator is intended to be run as part of our holistic `suspenders:install:web` which will be introduced in #1152. Once Rails is released to contain a CI template, we will need to consider how we want to handle conflicts between its file and ours, but for now, we do not need to worry about that. [ga]: https://docs.github.com/en/actions [ci template]: rails/rails#50508 [dependabot]: https://docs.github.com/en/code-security/dependabot/working-with-dependabot
Creates CI template to be run via [GitHub Actions][ga] based on a [similar template][ci template] that will be generated in an upcoming Release of Rails. Also create a [Dependabot][dependabot] file based off the [the upcoming release][ci template]. Raises if the application is not using PostgreSQL, since our CI template assumes that adapter. Because this generator can be run in an existing application, we add conditional checks for some jobs. However, this generator is intended to be run as part of our holistic `suspenders:install:web` which will be introduced in #1152. Once Rails is released to contain a CI template, we will need to consider how we want to handle conflicts between its file and ours, but for now, we do not need to worry about that. [ga]: https://docs.github.com/en/actions [ci template]: rails/rails#50508 [dependabot]: https://docs.github.com/en/code-security/dependabot/working-with-dependabot
Creates CI template to be run via [GitHub Actions][ga] based on a [similar template][ci template] that will be generated in an upcoming Release of Rails. Also create a [Dependabot][dependabot] file based off the [the upcoming release][ci template]. Raises if the application is not using PostgreSQL, since our CI template assumes that adapter. Because this generator can be run in an existing application, we add conditional checks for some jobs. However, this generator is intended to be run as part of our holistic `suspenders:install:web` which will be introduced in #1152. Once Rails is released to contain a CI template, we will need to consider how we want to handle conflicts between its file and ours, but for now, we do not need to worry about that. [ga]: https://docs.github.com/en/actions [ci template]: rails/rails#50508 [dependabot]: https://docs.github.com/en/code-security/dependabot/working-with-dependabot
a6e3706
to
9212177
Compare
Supports #1152 We found that we needed to run this generator last in `suspenders:install:web` to ensure any potential violation was resolved. Instead, we'll just make that the responsibility of `suspenders:install:web`.
Supports #1152 We found that we needed to run this generator last in `suspenders:install:web` to ensure any potential violation was resolved. Instead, we'll just make that the responsibility of `suspenders:install:web`.
Supports #1152 We found that we needed to run this generator last in `suspenders:install:web` to ensure any potential violation was resolved. Instead, we'll just make that the responsibility of `suspenders:install:web`.
Supports #1152 We found that we needed to run this generator last in `suspenders:install:web` to ensure any potential violation was resolved. Instead, we'll just make that the responsibility of `suspenders:install:web`.
Supports #1152 We found that we needed to run this generator last in `suspenders:install:web` to ensure any potential violation was resolved. Instead, we'll just make that the responsibility of `suspenders:install:web`.
6c96ab8
to
d20038b
Compare
452255d
to
45bb82e
Compare
d667618
to
412c3aa
Compare
412c3aa
to
dbe5c6e
Compare
generate "suspenders:email" | ||
generate "suspenders:factories" | ||
generate "suspenders:inline_svg" | ||
generate "suspenders:lint" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to figure this out:
❯ yarn run lint
yarn run v1.22.17
$ run-p lint:eslint lint:stylelint lint:prettier
$ eslint --max-warnings=0 --no-error-on-unmatched-pattern 'app/javascript/**/*.js'
$ prettier --check '**/*' --ignore-unknown
$ stylelint 'app/assets/stylesheets/**/*.css'
Checking formatting...
.github/workflows/ci.yaml
Oops! Something went wrong! :(
ESLint: 9.0.0
Error: Could not find config file.
at locateConfigFileToUse (/Users/polito/Desktop/suspenders_qa_0/node_modules/eslint/lib/eslint/eslint.js:349:21)
at async calculateConfigArray (/Users/polito/Desktop/suspenders_qa_0/node_modules/eslint/lib/eslint/eslint.js:384:49)
at async ESLint.lintFiles (/Users/polito/Desktop/suspenders_qa_0/node_modules/eslint/lib/eslint/eslint.js:814:25)
at async Object.execute (/Users/polito/Desktop/suspenders_qa_0/node_modules/eslint/lib/cli.js:461:23)
at async main (/Users/polito/Desktop/suspenders_qa_0/node_modules/eslint/bin/eslint.js:165:22)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
app/assets/stylesheets/application.postcss.cssERROR: "lint:eslint" exited with 2.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relates to eslint/eslint#18287
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can merge this commit without a solution for the above, since that can be addressed separately, and is not related to with commit.
dbe5c6e
to
e0f4c00
Compare
Create generator to invoke all necessary generators. We add it to the `install` namespace to provide flexibility should we add other installation options, such as ones for API Only applications. Introduces [template][] as a means to invoke `suspenders:install:web` when creating a new application. This serves as an alternative to the system executable that was removed. We call `db:prepare` in the template to ensure `bin/setup` works as expected. This is because we overrode that file to use `dev:prime`, which assume the database has been created. [template]: https://guides.rubyonrails.org/rails_application_templates.html
e0f4c00
to
c7accb4
Compare
Creates CI template to be run via [GitHub Actions][ga] based on a [similar template][ci template] that will be generated in an upcoming Release of Rails. Also create a [Dependabot][dependabot] file based off the [the upcoming release][ci template]. Raises if the application is not using PostgreSQL, since our CI template assumes that adapter. Because this generator can be run in an existing application, we add conditional checks for some jobs. However, this generator is intended to be run as part of our holistic `suspenders:install:web` which will be introduced in #1152. Once Rails is released to contain a CI template, we will need to consider how we want to handle conflicts between its file and ours, but for now, we do not need to worry about that. [ga]: https://docs.github.com/en/actions [ci template]: rails/rails#50508 [dependabot]: https://docs.github.com/en/code-security/dependabot/working-with-dependabot
Supports #1152 We found that we needed to run this generator last in `suspenders:install:web` to ensure any potential violation was resolved. Instead, we'll just make that the responsibility of `suspenders:install:web`.
…#1152) Create generator to invoke all necessary generators. We add it to the `install` namespace to provide flexibility should we add other installation options, such as ones for API Only applications. Introduces [template][] as a means to invoke `suspenders:install:web` when creating a new application. This serves as an alternative to the system executable that was removed. We call `db:prepare` in the template to ensure `bin/setup` works as expected. This is because we overrode that file to use `dev:prime`, which assume the database has been created. [template]: https://guides.rubyonrails.org/rails_application_templates.html
Create generator to invoke all necessary generators. We add it to the
install
namespace to provide flexibility should we add other installation options, such
as ones for API Only applications.
Introduces template as a means to invoke
suspenders:install:web
whencreating a new application. This serves as an alternative to the system
executable that was removed.
We call
db:prepare
in the template to ensurebin/setup
works as expected.This is because we overrode that file to use
dev:prime
, which assume thedatabase has been created.
How to test this pull request
Generate a new Rails application:
Run the setup script
cd suspenders_qa bin/setup
Generate a scaffold to create data:
Run rake and lint and note the output:
bundle exec rake yarn run lint
To Do
README
and other templates