Skip to content

Commit d0c47ff

Browse files
committed
Initial commit
0 parents  commit d0c47ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2394
-0
lines changed

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
extends: '@launchpadlab/eslint-config/es6',
3+
rules: {
4+
'import/no-unresolved': [
5+
'error',
6+
{
7+
ignore: ['^@hotwired/.*', 'controllers'],
8+
},
9+
],
10+
},
11+
}

.git-hooks/pre_commit/prettier.rb

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
module Overcommit
2+
module Hook
3+
module PreCommit
4+
class Prettier < Base
5+
BOLD_RED_COLOR = '1;31'.freeze
6+
PRETTIER_WARNING = '[warn] Code style issues found in the above file(s). Forgot to run Prettier?'.freeze
7+
8+
def run
9+
# Overcommit does not have a default hook for Prettier. To get around this issue, this custom pre-hook needs to be defined
10+
# in order to be able to set the specific rules for files we want to run prettier against.
11+
# References:
12+
# https://github.com/sds/overcommit/blob/master/config/default.yml
13+
# https://github.com/sds/overcommit/issues/614#issuecomment-1058583008
14+
# In the event over-commits decides to add "Prettier" as a default hook we might want to explore that instead.
15+
16+
result = execute(command, args: applicable_files)
17+
output = result.stderr.chomp
18+
has_warning = output.split("\n").any?(PRETTIER_WARNING)
19+
20+
return :fail, warning_message(output) if has_warning
21+
22+
:pass
23+
end
24+
25+
private
26+
27+
def warning_message(message)
28+
"\e[#{BOLD_RED_COLOR}m#{message}\e[0m"
29+
end
30+
end
31+
end
32+
end
33+
end

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
2+
3+
# Mark the database schema as having been generated.
4+
db/schema.rb linguist-generated
5+
6+
# Mark any vendored files as having been vendored.
7+
vendor/* linguist-vendored

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Reviewer Details
2+
<!-- If you're unsure what to include below review the [LPL Pull Request Guidelines](https://github.com/LaunchPadLab/opex-public/blob/master/gists/pull-request-guidelines.md) -->
3+
4+
### Items Addressed
5+
- [Task description](www.asanatask.com)
6+
7+
<!-- If you haven't completed the Asana integration steps from the Project Setup Checklist, remember to add a link to this PR in the comments for each task. If you have completed the integration, this PR will automatically be linked to each task. -->
8+
9+
### QA Login Information
10+
- [Review App](www.reviewapp.com)
11+
- { email } // { password } - { user type }
12+
13+
<!-- Include any extra instructions for login if applicable. -->
14+
15+
### QA Steps
16+
- [ ] This is the first item to QA
17+
18+
### Out of Scope
19+
- Any item that should not be included in QA
20+
21+
### Code / Architecture Questions
22+
- Something you want to highlight to the code reviewer (optional)
23+
24+
## Author Checklist
25+
<!-- Add other helpful project checks as needed -->
26+
- [ ] Review the diff and ensure all changes are relevant, intentional, and address all in-scope requirements
27+
- [ ] Assign a dev reviewer when you're ready for code review
28+
- [ ] Update environment variables as needed on Heroku and `opensesame`
29+
- [ ] Turn on workers on Heroku as needed
30+
- [ ] Assign a product reviewer when you're ready for QA (if applicable)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
pull_request:
3+
types: [opened, closed, reopened, review_requested]
4+
5+
jobs:
6+
create-open-close-comment-in-asana-task-job:
7+
runs-on: ubuntu-latest
8+
if: github.event.action != 'review_requested'
9+
name: Create a comment in Asana Task with current status
10+
steps:
11+
- name: Create an opened, closed, or merged comment
12+
uses: Asana/comment-on-task-github-action@latest
13+
id: createOpenCloseComment
14+
with:
15+
asana-secret: ${{ secrets.ASANA_SECRET }}
16+
comment-text: 'PR: "{{PR_NAME}}" is {{PR_STATE}}!'
17+
- name: Get status
18+
run: echo "Status is ${{ steps.createOpenCloseComment.outputs.status }}"
19+
create-review-requested-comment-in-asana-task-job:
20+
runs-on: ubuntu-latest
21+
if: ${{ github.event.action == 'review_requested' && !contains(github.event.pull_request.labels.*.name, 'internal review') }}
22+
name: Create a comment in Asana Task when ready for review
23+
steps:
24+
- name: Create a review requested comment
25+
uses: Asana/comment-on-task-github-action@latest
26+
id: createReviewRequestedComment
27+
with:
28+
asana-secret: ${{ secrets.ASANA_SECRET }}
29+
comment-text: 'PR: "{{PR_NAME}}" is ready for review!'
30+
- name: Get status
31+
run: echo "Status is ${{ steps.createReviewRequestedComment.outputs.status }}"
32+
- name: Add label
33+
uses: actions-ecosystem/[email protected]
34+
with:
35+
labels: internal review
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on:
2+
pull_request:
3+
types: [opened, reopened, review_requested]
4+
5+
jobs:
6+
create-asana-attachment-job:
7+
runs-on: ubuntu-latest
8+
name: Create pull request attachments on Asana tasks
9+
steps:
10+
- name: Create pull request attachments
11+
uses: Asana/create-app-attachment-github-action@latest
12+
id: postAttachment
13+
with:
14+
asana-secret: ${{ secrets.ASANA_SECRET }}
15+
- name: Log output status
16+
run: echo "Status is ${{ steps.postAttachment.outputs.status }}"

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
2+
#
3+
# If you find yourself ignoring temporary files generated by your text editor
4+
# or operating system, you probably want to add a global ignore instead:
5+
# git config --global core.excludesfile '~/.gitignore_global'
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore all logfiles and tempfiles.
11+
/log/*
12+
/tmp/*
13+
!/log/.keep
14+
!/tmp/.keep
15+
16+
.byebug_history
17+
18+
# NPM
19+
node_modules
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
24+
# Ignore coverage files generated by Simple Cov
25+
coverage
26+
27+
# Ignore application configuration
28+
/config/application.yml
29+
.DS_Store
30+
/public/assets
31+
*.dump
32+
*.rdb
33+
34+
# Ignore master key for decrypting credentials and more.
35+
/config/master.key
36+
/app/assets/builds/*
37+
!/app/assets/builds/.keep
38+
39+
/node_modules

.overcommit.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
PreCommit:
2+
RuboCop:
3+
required_executable: 'bundle'
4+
enabled: true
5+
command: ['bundle', 'exec', 'rubocop', '-A']
6+
on_warn: fail
7+
EsLint:
8+
required_executable: 'yarn'
9+
command: ['yarn', 'eslint', '-f', 'compact', '--max-warnings=0']
10+
include:
11+
- 'app/javascript/**/*'
12+
exclude:
13+
- '**/.*'
14+
enabled: true
15+
on_warn: fail
16+
Prettier:
17+
enabled: true
18+
required_executable: 'yarn'
19+
command: ['yarn', 'prettier', '--', '--write']
20+
include:
21+
- 'app/javascript/**/*'
22+
- '.eslintrc.js'
23+
- 'app/assets/stylesheets/**/*'

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Add paths not to format - Ignore artifacts:

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@launchpadlab/prettier-config"

.rails_template_version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5.8.3

.rspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--require spec_helper
2+
--color
3+
--format documentation

.rubocop.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
require:
2+
- rubocop-performance
3+
4+
AllCops:
5+
TargetRubyVersion: 3.3.3
6+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
7+
# to ignore them, so only the ones explicitly set in this file are enabled.
8+
DisabledByDefault: false
9+
NewCops: enable
10+
SuggestExtensions: false
11+
Exclude:
12+
- "**/templates/**/*"
13+
- "**/vendor/**/*"
14+
- "bin/**/*"
15+
- "config/**/*"
16+
- "config.ru"
17+
- "db/**/*"
18+
- "actionpack/lib/action_dispatch/journey/parser.rb"
19+
- "railties/test/fixtures/tmp/**/*"
20+
- "actionmailbox/test/dummy/**/*"
21+
- "actiontext/test/dummy/**/*"
22+
- "**/node_modules/**/*"
23+
24+
Performance:
25+
Enabled: true
26+
Exclude:
27+
- "**/test/**/*"
28+
29+
Lint:
30+
Enabled: true
31+
32+
Style/FrozenStringLiteralComment:
33+
Enabled: false
34+
35+
Style/Documentation:
36+
Enabled: false
37+
38+
Layout/EmptyLinesAroundClassBody:
39+
Enabled: false
40+
41+
Layout/EmptyLinesAroundModuleBody:
42+
Enabled: false
43+
44+
Layout/LineLength:
45+
Enabled: false # or explicit Max: 160 for example
46+
47+
Lint/AmbiguousBlockAssociation:
48+
Enabled: false
49+
50+
Metrics/BlockLength:
51+
Exclude:
52+
- "spec/**/*"
53+
54+
Style/TrailingCommaInHashLiteral:
55+
Enabled: false

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.1.3

.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: ruby
2+
cache:
3+
- bundler
4+
# - yarn
5+
services:
6+
- postgresql
7+
before_install:
8+
- nvm install --lts
9+
before_script:
10+
- bundle install --jobs=3 --retry=3
11+
# - yarn
12+
- bundle exec rake db:create
13+
- bundle exec rake db:schema:load
14+
script:
15+
- bundle exec rspec
16+
notifications:
17+
email: false

Gemfile

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
source 'https://rubygems.org'
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3+
4+
ruby '3.1.3'
5+
6+
require_relative 'config/initializers/file_exists'
7+
gem 'bcrypt', '~> 3.1'
8+
gem 'decanter', '~> 4.0'
9+
gem 'factory_bot_rails', '~> 6.4'
10+
gem 'faker', '~> 3.3'
11+
gem 'figaro', '~> 1.2'
12+
gem 'jsonapi-serializer', '~> 2.2'
13+
gem 'lp_token_auth', '~> 2.0'
14+
gem 'paper_trail', '~> 15.1'
15+
gem 'rack-cors', '~> 2.0'
16+
gem 'rails', '~> 7.1.3'
17+
gem 'rails_util', github: 'launchpadlab/rails_util'
18+
gem 'redis'
19+
gem 'rubocop'
20+
gem 'rubocop-performance'
21+
gem 'sentry-rails', '~> 5.17'
22+
gem 'sentry-ruby', '~> 5.17'
23+
gem 'sentry-sidekiq', '~> 5.17'
24+
gem 'sidekiq', '~> 7.2'
25+
gem 'token_master', '~> 1.0'
26+
27+
gem 'pg', '~> 1.1'
28+
29+
gem 'puma', '~> 6.4.2'
30+
31+
gem 'cssbundling-rails'
32+
33+
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
34+
35+
gem 'bootsnap', require: false
36+
37+
group :development, :test do
38+
gem 'pry', '~> 0.14.2'
39+
gem 'rspec-rails', '~> 6.0.0'
40+
41+
gem 'debug', platforms: %i[mri mingw x64_mingw]
42+
end
43+
44+
group :development do
45+
gem 'better_errors'
46+
gem 'binding_of_caller'
47+
gem 'bullet', '~> 7.1'
48+
gem 'letter_opener'
49+
gem 'overcommit'
50+
end
51+
52+
group :test do
53+
gem 'database_cleaner-active_record'
54+
gem 'database_cleaner-redis'
55+
gem 'rspec-collection_matchers'
56+
gem 'shoulda-matchers', '~> 6.2'
57+
end

0 commit comments

Comments
 (0)