Skip to content

Commit 99a5321

Browse files
authored
Initial commit
0 parents  commit 99a5321

File tree

296 files changed

+31273
-0
lines changed

Some content is hidden

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

296 files changed

+31273
-0
lines changed

.browserslistrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
defaults
2+

.editorconfig

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
# EditorConfig helps developers define and maintain consistent
3+
# coding styles between different editors and IDEs
4+
# editorconfig.org
5+
6+
root = true
7+
8+
[*]
9+
10+
# We recommend you to keep these unchanged
11+
end_of_line = lf
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true
15+
16+
# Change these settings to your own preference
17+
indent_style = space
18+
indent_size = 4
19+
20+
[*.md]
21+
trim_trailing_whitespace = false
22+

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/node_modules/*
2+
/public/*
3+
postcss.config.js

.eslintrc.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
module.exports = {
3+
env: {
4+
browser: true,
5+
commonjs: true,
6+
es6: true,
7+
jquery: true
8+
},
9+
extends: [
10+
'airbnb-base'
11+
],
12+
globals: {
13+
Atomics: 'readonly',
14+
SharedArrayBuffer: 'readonly',
15+
},
16+
parserOptions: {
17+
ecmaVersion: 2018,
18+
},
19+
rules: {
20+
indent: ['error', 4],
21+
'linebreak-style': ['error', 'unix'],
22+
},
23+
};
24+

.github/workflows/linters.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Code Linters
2+
on:
3+
- pull_request
4+
- workflow_dispatch
5+
6+
jobs:
7+
pronto:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
- name: Setup Ruby
15+
uses: ruby/setup-ruby@v1
16+
with:
17+
bundler-cache: true
18+
- name: Install pronto
19+
run: bundle install --without default development test production
20+
- name: Run Pronto
21+
run: bundle exec pronto run -f github_combined_status github_pr_review -c origin/${{ github.base_ref }}
22+
env:
23+
PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
24+
PRONTO_GITHUB_ACCESS_TOKEN: "${{ github.token }}"

.github/workflows/specs.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: All Specs
2+
on:
3+
- push
4+
- pull_request
5+
- workflow_dispatch
6+
7+
jobs:
8+
# TODO: Environment variables?
9+
build:
10+
runs-on: '${{ matrix.os }}'
11+
strategy:
12+
matrix:
13+
os:
14+
- ubuntu-18.04
15+
steps:
16+
- name: Cache multiple paths
17+
uses: actions/cache@v2
18+
with:
19+
path: |-
20+
node_modules
21+
vendor/bundle
22+
key: '${{ runner.os }}-${{ hashFiles(''TODO'') }}'
23+
- uses: actions/checkout@v2
24+
- uses: actions/setup-node@v3
25+
with:
26+
node-version: 12.13.1
27+
- uses: ruby/setup-ruby@v1
28+
with:
29+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
30+
- run: gem install bundler:2.1.4
31+
- run: npm install -g [email protected]
32+
- run: bundle install
33+
- run: yarn install
34+
- run: bundle exec rake db:setup
35+
- run: bundle exec rake db:test:prepare
36+
- run: bundle exec rspec
37+
- run: bundle exec cucumber

.gitignore

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
2+
*.rbc
3+
capybara-*.html
4+
.rspec
5+
/db/*.sqlite3
6+
/db/*.sqlite3-journal
7+
/db/*.sqlite3-[0-9]*
8+
/public/system
9+
/coverage/
10+
/spec/tmp
11+
*.orig
12+
rerun.txt
13+
pickle-email-*.html
14+
15+
# Ignore all logfiles and tempfiles.
16+
/log/*
17+
/tmp/*
18+
!/log/.keep
19+
!/tmp/.keep
20+
21+
# Note: It is not OK to publish secrets in repo, use figaro instead.
22+
config/initializers/secret_token.rb
23+
config/master.key
24+
25+
# Only include if you have production secrets in this file, which is no longer a Rails default
26+
# config/secrets.yml
27+
28+
# dotenv, dotenv-rails
29+
# TODO Comment out these rules if environment variables can be committed
30+
.env
31+
.env.*
32+
33+
## Environment normalization:
34+
/.bundle
35+
/vendor/bundle
36+
37+
# these should all be checked in to normalize the environment:
38+
# Gemfile.lock, .ruby-version, .ruby-gemset
39+
40+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
41+
.rvmrc
42+
43+
# Ignore erb files generated by rails_real_favicon
44+
# Instead use `bundle exec rails haml:erb2haml app/views/application/_favicon.html.erb` to convert to haml.
45+
app/views/application/_favicon.html.erb
46+
47+
# if using bower-rails ignore default bower_components path bower.json files
48+
/vendor/assets/bower_components
49+
*.bowerrc
50+
bower.json
51+
52+
# Ignore pow environment settings
53+
.powenv
54+
55+
# Ignore Byebug command history file.
56+
.byebug_history
57+
58+
# Ignore node_modules
59+
/node_modules
60+
61+
# Use yarn instead of npm
62+
package-lock.json
63+
64+
# Ignore precompiled javascript packs
65+
/public/packs
66+
/public/packs-test
67+
/public/assets
68+
69+
# Ignore yarn files
70+
/yarn-error.log
71+
yarn-debug.log*
72+
.yarn-integrity
73+
74+
# Ignore uploaded files in development
75+
/storage/*
76+
!/storage/.keep
77+
/public/uploads
78+
79+
80+
# Ignore master key for decrypting credentials and more.
81+
/config/master.key

.haml-lint.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
linters:
3+
LineLength:
4+
max: 120
5+
severity: error
6+
Indentation: # For consistency with default rubocop rules.
7+
character: space
8+
width: 4
9+
severity: error
10+
exclude:
11+
- 'node_modules/**/*'
12+
- 'vendor/**/*'
13+

.rubocop.yml

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# This file defines all the linter rules for the project.
2+
# See the list of the rules which are called "cops"
3+
# https://docs.rubocop.org/rubocop/cops.html
4+
# https://docs.rubocop.org/rubocop-rails/cops_rails.html
5+
6+
# These configurations are *largely* the rubocop defaults.
7+
# We've relaxed some configurations that may be harder to meet while
8+
# you are learning.
9+
10+
# rubocop allows us to go simply beyond code formatting and also focus on
11+
# best practices, like code complexity.
12+
13+
require:
14+
- rubocop-rails
15+
- rubocop-rspec
16+
17+
AllCops:
18+
NewCops: enable
19+
TargetRubyVersion: 2.6
20+
Exclude:
21+
- bin/*
22+
- config/routes.rb
23+
- db/schema.rb
24+
- db/seed_data.rb
25+
- db/seeds.rb
26+
- features/step_definitions/web_steps.rb
27+
- features/support/paths.rb
28+
- features/support/selectors.rb
29+
- Guardfile
30+
- lib/tasks/cucumber.rake
31+
- node_modules/**/*
32+
- vendor/**/*
33+
34+
Layout/EndOfLine:
35+
EnforcedStyle: lf
36+
37+
Lint/AmbiguousRegexpLiteral:
38+
Exclude:
39+
- features/step_definitions/*
40+
41+
Style/CommentAnnotation:
42+
Keywords:
43+
- CS169
44+
- ACTION-MAP
45+
- TODO
46+
- HACK
47+
- REVIEW
48+
49+
Rails:
50+
Enabled: true
51+
52+
Gemspec/RequiredRubyVersion:
53+
Enabled: true
54+
55+
Layout/EmptyLineAfterGuardClause:
56+
Enabled: true
57+
58+
# No space makes the method definition shorter and differentiates
59+
# from a regular assignment.
60+
Layout/SpaceAroundEqualsInParameterDefault:
61+
EnforcedStyle: no_space
62+
63+
# Most readable form.
64+
Layout/HashAlignment:
65+
EnforcedHashRocketStyle: table
66+
EnforcedColonStyle: table
67+
68+
Layout/LineLength:
69+
Max: 120
70+
71+
Lint/RaiseException:
72+
Enabled: true
73+
74+
Lint/StructNewOverride:
75+
Enabled: true
76+
77+
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsabcsize
78+
Metrics/AbcSize:
79+
Max: 30
80+
Enabled: true
81+
82+
Metrics/BlockLength:
83+
IgnoredMethods:
84+
- describe
85+
- context
86+
- shared_examples
87+
- namespace
88+
- ActiveRecord::Schema.define
89+
90+
# Skips style of child classes and modules.
91+
Style/ClassAndModuleChildren:
92+
Enabled: false
93+
94+
Style/CollectionMethods:
95+
Enabled: true
96+
PreferredMethods:
97+
reduce: "inject"
98+
99+
Style/Documentation:
100+
Enabled: false
101+
102+
Style/HashEachMethods:
103+
Enabled: true
104+
AutoCorrect: false # Unsafe autocorrect
105+
106+
Style/HashTransformKeys:
107+
Enabled: true
108+
AutoCorrect: false # Unsafe autocorrect
109+
110+
Style/HashTransformValues:
111+
Enabled: true
112+
AutoCorrect: false # Unsafe autocorrect
113+
114+
# Mixing the styles looks just silly.
115+
Style/HashSyntax:
116+
EnforcedStyle: ruby19_no_mixed_keys
117+
118+
# has_key? and has_value? are far more readable than key? and value?
119+
Style/PreferredHashMethods:
120+
EnforcedStyle: verbose
121+
122+
Metrics/MethodLength:
123+
Max: 20
124+
125+
RSpec/InstanceVariable:
126+
Enabled: false
127+
128+
RSpec/DescribeClass:
129+
Exclude:
130+
- spec/linters/*
131+
132+
# Ideally, you'd want no more than 2.
133+
RSpec/MultipleExpectations:
134+
Max: 4
135+
136+
RSpec/RepeatedExample:
137+
Enabled: false

.ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.6.6

0 commit comments

Comments
 (0)