Introduce suspenders:install:web and application template#1152
Merged
stevepolitodesign merged 1 commit intosuspenders-3-0-0from Apr 14, 2024
Merged
Introduce suspenders:install:web and application template#1152stevepolitodesign merged 1 commit intosuspenders-3-0-0from
suspenders:install:web and application template#1152stevepolitodesign merged 1 commit intosuspenders-3-0-0from
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" |
Contributor
Author
There was a problem hiding this comment.
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
stevepolitodesign
added a commit
that referenced
this pull request
Mar 22, 2024
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.
stevepolitodesign
added a commit
that referenced
this pull request
Mar 23, 2024
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.
stevepolitodesign
added a commit
that referenced
this pull request
Mar 23, 2024
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.
stevepolitodesign
added a commit
that referenced
this pull request
Mar 23, 2024
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.
stevepolitodesign
added a commit
that referenced
this pull request
Mar 23, 2024
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
stevepolitodesign
added a commit
that referenced
this pull request
Mar 23, 2024
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
stevepolitodesign
added a commit
that referenced
this pull request
Mar 23, 2024
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
stevepolitodesign
added a commit
that referenced
this pull request
Mar 23, 2024
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
stevepolitodesign
added a commit
that referenced
this pull request
Mar 23, 2024
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
stevepolitodesign
added a commit
that referenced
this pull request
Mar 25, 2024
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`.
stevepolitodesign
added a commit
that referenced
this pull request
Mar 25, 2024
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`.
stevepolitodesign
added a commit
that referenced
this pull request
Mar 25, 2024
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`.
stevepolitodesign
added a commit
that referenced
this pull request
Mar 25, 2024
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`.
stevepolitodesign
added a commit
that referenced
this pull request
Mar 25, 2024
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" |
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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
stevepolitodesign
added a commit
that referenced
this pull request
May 10, 2024
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
stevepolitodesign
added a commit
that referenced
this pull request
May 10, 2024
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`.
stevepolitodesign
added a commit
that referenced
this pull request
May 10, 2024
…#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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Create generator to invoke all necessary generators. We add it to the
installnamespace 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:webwhencreating a new application. This serves as an alternative to the system
executable that was removed.
We call
db:preparein the template to ensurebin/setupworks 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/setupGenerate a scaffold to create data:
Run rake and lint and note the output:
bundle exec rake yarn run lintTo Do
READMEand other templates