Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Roytman Piccoli authored and Roytman Piccoli committed Feb 17, 2022
0 parents commit a51fb04
Show file tree
Hide file tree
Showing 4,775 changed files with 461,796 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 9 additions & 0 deletions .buildkite/pipeline.containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
steps:
- command: ./scripts/build_containers.sh
label: ":hammer: Build containers!"
key: build-containers
plugins:
- docker-login#v2.0.1:
username: forem+buildkite
password-env: QUAY_LOGIN_PASSWORD
server: quay.io
77 changes: 77 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
version: "2"
checks:
argument-count:
enabled: true
config:
threshold: 4
complex-logic:
enabled: true
config:
threshold: 4
file-lines:
enabled: true
config:
threshold: 250
method-complexity:
enabled: false
config:
threshold: 5
method-count:
enabled: true
config:
threshold: 20
method-lines:
enabled: true
config:
threshold: 50
nested-control-flow:
enabled: true
config:
threshold: 4
return-statements:
enabled: true
config:
threshold: 4
similar-code:
enabled: true
config:
threshold: #language-specific defaults. overrides affect all languages.
identical-code:
enabled: true
config:
threshold: #language-specific defaults. overrides affect all languages.
plugins:
rubocop:
enabled: true
channel: rubocop-1-10
brakeman:
enabled: true
eslint:
enabled: true
channel: "eslint-6"
exclude_patterns:
- "app/javascript/**/index.js" # exclude barrel files
duplication:
enabled: true
config:
count_threshold: 3
exclude_patterns:
- "**/*.test.js"
- "**/*.test.jsx"
- "**/.eslintrc.js"
- "**/__stories__/"
- "**/__tests__/"
- "*.js"
- "app/assets/javascripts/lib/"
- "bin/"
- "config/"
- "db/"
- "dist/"
- "features/"
- "lib/tasks/"
- "node_modules/"
- "script/"
- "spec/"
- "test/"
- "tests/"
- "vendor/"
61 changes: 61 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.dockerignore
.gitignore
logs/
tmp/
node_modules/

##################################
#
# rest is COPIED from .gitignore
#
##################################

# Ignore bundler config.
/.bundle
vendor/bundle

# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/tmp
.DS_Store
.swp
.approvals
.torus.json
coverage
/tags

# Ignore public uploads
/public/uploads/*
/public/c/*
/public/i/*
/public/assets/*

# Ignore node_modules
node_modules/

# Generated js bundles
/app/assets/javascripts/generated/*
latest.dump
.byebug_history

# Ignore application configuration
/public/packs
/public/packs-test
/node_modules

# Ignore storybook static site generation
storybook-static/
yarn-error.log

# Ignore package-lock.json because we use yarn
package-lock.json

#Jetbrains Tools
.idea/

#sitemap
/public/sitemap.xml.gz

# Development container gem storage location
.gems
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
168 changes: 168 additions & 0 deletions .env_sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# Development options

# App core values
APP_DOMAIN="localhost:3000"
APP_PROTOCOL="http://"
FOREM_OWNER_SECRET="secret"

# Community Related Variables
COMMUNITY_NAME="DEV(local)"

# Email related variables
DEFAULT_EMAIL="[email protected]"

# Service timeout length
RACK_TIMEOUT_WAIT_TIMEOUT=100_000
RACK_TIMEOUT_SERVICE_TIMEOUT=100_000

# Heroku release slug used to bust caches on deploys
HEROKU_RELEASE_CREATED_AT=""
HEROKU_SLUG_COMMIT=""

# Redis caching storage
REDIS_URL="redis://localhost:6379"

# Redis sessions storage
REDIS_SESSIONS_URL="redis://localhost:6379"
SESSION_KEY="_Dev_Community_Session"
# two weeks in seconds
SESSION_EXPIRY_SECONDS=1209600

# Redis Sidekiq storage
REDIS_SIDEKIQ_URL="redis://localhost:6379"

# Redis Devices/Rpush storage
REDIS_RPUSH_URL="redis://localhost:6379"

# OpenResty
OPENRESTY_URL=""

# SSL config
FORCE_SSL_IN_RAILS="not applicable in dev"

# Postgres DB
# Used when creating a db instance `rails db:create`
DATABASE_NAME="Forem_development"
# This takes precedence over `DATABASE_NAME` if they don't match
DATABASE_URL="postgresql://localhost:5432/Forem_development"
# Specifies the number of Puma threads
RAILS_MAX_THREADS=5
# Specifies the number of `workers` to boot in clustered mode.
WEB_CONCURRENCY=2
# The number of concurrent connections to Postgres. If unset the value of RAILS_MAX_THREADS will be used in it's place.
DATABASE_POOL_SIZE=5
DATABASE_NAME_TEST=Forem_test
# Differentiate test db from dev db. Test DB is wiped on each test run.
DATABASE_URL_TEST="postgresql://localhost:5432/Forem_test"

# Rails
# Set to 'production' when deploying for security and performance.
RAILS_ENV="development"

# Node
# Set to 'production' when deploying for security and performance.
NODE_ENV="development"

################################################
######### Optional 3rd Party Services ##########
################################################

# Honeybadger for error tracking
# (https://docs.honeybadger.io/lib/ruby/getting-started/introduction.html)
HONEYBADGER_API_KEY="Optional"
HONEYBADGER_JS_API_KEY="Optional"

# AWS for images storages
AWS_ID=
AWS_SECRET=
AWS_BUCKET_NAME=
AWS_UPLOAD_REGION=

# AWS for video storage
AWS_S3_INPUT_BUCKET="Optional"
AWS_S3_VIDEO_ID="Optional"
AWS_S3_VIDEO_KEY="Optional"

# Buffer for sending to buffer
# This is legacy, as Buffer no longer supports this functionality for NEW accounts.
# DEV is still using this for now.
# (https://buffer.com/developers/api)
BUFFER_ACCESS_TOKEN="Optional"
BUFFER_FACEBOOK_ID="Optional"
BUFFER_LINKEDIN_ID="Optional"
BUFFER_PROFILE_ID=0
BUFFER_TWITTER_ID="Optional"
BUFFER_LISTINGS_PROFILE="Optional"

# Cloudinary for image resizing and cache??
# (https://cloudinary.com/documentation/rails_integration)
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_SECURE=

# HTML/CSS to Image for generating social preview images
# (https://docs.htmlcsstoimage.com/example-code/ruby)
HCTI_API_USER_ID="Optional"
HCTI_API_KEY="Optional"

# Fastly for edge caching
# (https://docs.fastly.com/api/)
FASTLY_API_KEY=""
FASTLY_SERVICE_ID=""

# Honeycomb for monitoring and observability
# (https://www.honeycomb.io/)
HONEYCOMB_API_KEY=""

# Google analytics
# (https://developers.google.com/analytics/devguides/reporting/core/v4)
# When blank don't render Google Analytics.
GA_TRACKING_ID=""

# Mailchimp for mails
# (https://mailchimp.com/developer/)
MAILCHIMP_API_KEY="Optional-valid"

# Google recaptcha (Optional)
# (https://developers.google.com/recaptcha/intro)
RECAPTCHA_SECRET=
RECAPTCHA_SITE=

# Slack for customer alerts
# (https://api.slack.com/)
SLACK_CHANNEL=""
SLACK_DEPLOY_CHANNEL=""
SLACK_WEBHOOK_URL=""

# For video calling in DEV Connect
# (https://www.twilio.com/docs/video)
TWILIO_ACCOUNT_SID="Optional"
TWILIO_VIDEO_API_KEY="Optional"
TWILIO_VIDEO_API_SECRET="Optional"

# For Twitch live stream integration
# (https://dev.twitch.tv/docs)
TWITCH_CLIENT_ID="Optional"
TWITCH_CLIENT_SECRET="Optional"
TWITCH_WEBHOOK_SECRET="Optional"

# For calling the Stack Exchange API
# (https://api.stackexchange.com/docs)
STACK_EXCHANGE_APP_KEY=""

# For calling the Github API
# (https://docs.github.com/)
GITHUB_KEY="Optional"
GITHUB_SECRET="Optional"

# For SMTP configuration
SMTP_ADDRESS=
SMTP_PORT=
SMTP_DOMAIN=
SMTP_USER_NAME=
SMTP_PASSWORD=
SMTP_AUTHENTICATION=

# Disable simplecov coverage testing when running rspec locally
COVERAGE="false"
46 changes: 46 additions & 0 deletions .erb-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
linters:
ErbSafety:
# TODO: [@rhymes] re-enable this and fix the violations,
# see https://github.com/Shopify/erb-lint#ErbSafety
enabled: false
SelfClosingTag:
enabled: false
ParserErrors:
exclude:
- '**/app/views/pages/_editor_guide_text.html.erb'
SpaceInHtmlTag:
exclude:
- '**/app/views/pages/_editor_guide_text.html.erb'
AllowedScriptType:
enabled: true
allowed_types:
- 'text/javascript'
- 'text/x-tmpl'
- 'application/ld+json'
allow_blank: true
disallow_inline_scripts: false
Rubocop:
enabled: true
rubocop_config:
inherit_from:
- .rubocop.yml
Layout/InitialIndentation:
Enabled: false
Layout/LineLength:
Max: 289
Exclude:
- '**/app/views/comments/_comment_proper.html.erb'
Layout/TrailingEmptyLines:
Enabled: false
Lint/UselessAssignment:
Enabled: false
Rails/OutputSafety:
Enabled: false
Exclude:
- '**/app/views/feedback_messages/index.html.erb'
- '**/app/views/layouts/_styles.html.erb'
- '**/app/views/liquid_embeds/show.html.erb'
- '**/app/views/moderations/mod.html.erb'
- '**/app/views/pages/onboarding.html.erb'
- '**/app/views/partnerships/show.html.erb'
- '**/app/views/partnerships/index.html.erb'
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package.json
app/assets/javascripts/lib/
app/javascript/storybook-static/
Loading

0 comments on commit a51fb04

Please sign in to comment.