forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Ecosystem] Create Rails Community Platform API Server
Closes: aptos-labs#652
- Loading branch information
Showing
119 changed files
with
3,743 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Discord oauth secrets | ||
DISCORD_CLIENT_ID= | ||
DISCORD_CLIENT_SECRET= | ||
|
||
# Github oauth secrets | ||
GITHUB_CLIENT_ID= | ||
GITHUB_CLIENT_SECRET= | ||
|
||
# PG DB connection | ||
RAILS_MAX_THREADS=5 | ||
COMMUNITY_DB_USER= | ||
COMMUNITY_DB_PASS= | ||
COMMUNITY_DB_HOST=localhost | ||
COMMUNITY_DB_PORT= | ||
|
||
# What is the external domain of this site? Used for email links, oauth, etc | ||
SITE_DOMAIN=localhost | ||
|
||
RAILS_ENV=dev | ||
|
||
SECRET_KEY_BASE=18ff7d41b9da02d394434e2eb140611516707334b7d7a7e15cf8b567061f30e9400a82e61aa772b9e6ccb72853932769d03bbbb9d78f62333c8f7adb95cc727d |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# See https://git-scm.com/docs/gitattributes for more about git attribute files. | ||
|
||
# Mark the database schema as having been generated. | ||
db/schema.rb linguist-generated | ||
|
||
# Mark any vendored files as having been vendored. | ||
vendor/* linguist-vendored |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# See https://help.github.com/articles/ignoring-files for more about ignoring files. | ||
# | ||
# If you find yourself ignoring temporary files generated by your text editor | ||
# or operating system, you probably want to add a global ignore instead: | ||
# git config --global core.excludesfile '~/.gitignore_global' | ||
|
||
# Ignore bundler config. | ||
/.bundle | ||
|
||
# Ignore the default SQLite database. | ||
/db/*.sqlite3 | ||
/db/*.sqlite3-* | ||
|
||
# Ignore all logfiles and tempfiles. | ||
/log/* | ||
/tmp/* | ||
!/log/.keep | ||
!/tmp/.keep | ||
|
||
# Ignore pidfiles, but keep the directory. | ||
/tmp/pids/* | ||
!/tmp/pids/ | ||
!/tmp/pids/.keep | ||
|
||
# Ignore uploaded files in development. | ||
/storage/* | ||
!/storage/.keep | ||
/tmp/storage/* | ||
!/tmp/storage/ | ||
!/tmp/storage/.keep | ||
|
||
/public/assets | ||
|
||
# Ignore master key for decrypting credentials and more. | ||
/config/master.key | ||
|
||
# Never commit this dangerous file :-) | ||
.env |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
AllCops: | ||
NewCops: enable | ||
|
||
Metrics/MethodLength: | ||
Max: 50 | ||
|
||
Metrics/BlockLength: | ||
Max: 80 | ||
|
||
Metrics/CyclomaticComplexity: | ||
Max: 12 | ||
|
||
Metrics/PerceivedComplexity: | ||
Max: 12 | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Metrics/AbcSize: | ||
Max: 100 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.1.2 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# frozen_string_literal: true | ||
|
||
# Copyright (c) Aptos | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
source 'https://rubygems.org' | ||
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | ||
|
||
ruby '3.1.2' | ||
|
||
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" | ||
gem 'rails', '~> 7.0.2', '>= 7.0.2.3' | ||
|
||
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] | ||
gem 'sprockets-rails' | ||
|
||
# Use pg as the database for Active Record | ||
gem 'dotenv-rails' | ||
gem 'pg' | ||
|
||
# Use the Puma web server [https://github.com/puma/puma] | ||
gem 'puma', '~> 5.0' | ||
|
||
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] | ||
gem 'importmap-rails' | ||
|
||
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] | ||
gem 'turbo-rails' | ||
|
||
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] | ||
gem 'stimulus-rails' | ||
|
||
# Build JSON APIs with ease [https://github.com/rails/jbuilder] | ||
gem 'jbuilder' | ||
|
||
gem 'activeadmin' | ||
gem 'cancancan' | ||
gem 'devise' | ||
gem 'kaminari' | ||
gem 'rails_state_machine' | ||
|
||
# Oauth | ||
gem 'omniauth' | ||
gem 'omniauth-discord' | ||
gem 'omniauth-github' | ||
gem 'omniauth-rails_csrf_protection' | ||
|
||
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible | ||
gem 'rack-cors' | ||
|
||
# Use Redis adapter to run Action Cable in production | ||
# gem "redis", "~> 4.0" | ||
|
||
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] | ||
# gem "kredis" | ||
|
||
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] | ||
# gem "bcrypt", "~> 3.1.7" | ||
|
||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem | ||
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby] | ||
|
||
# Reduces boot times through caching; required in config/boot.rb | ||
gem 'bootsnap', require: false | ||
|
||
# Use Sass to process CSS | ||
gem 'sassc-rails' | ||
|
||
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] | ||
# gem "image_processing", "~> 1.2" | ||
|
||
group :development, :test do | ||
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem | ||
gem 'debug', platforms: %i[mri mingw x64_mingw] | ||
|
||
# linting/formatting | ||
gem 'rubocop', require: false | ||
gem 'rubocop-rails' | ||
# security lints | ||
gem 'brakeman' | ||
|
||
# Testing | ||
gem 'database_cleaner' | ||
gem 'factory_bot_rails' | ||
gem 'faker' | ||
gem 'rspec-rails' | ||
end | ||
|
||
group :development do | ||
# Use console on exceptions pages [https://github.com/rails/web-console] | ||
gem 'web-console' | ||
|
||
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] | ||
# gem "rack-mini-profiler" | ||
|
||
# Speed up commands on slow machines / big apps [https://github.com/rails/spring] | ||
# gem "spring" | ||
end | ||
|
||
group :test do | ||
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] | ||
gem 'capybara' | ||
gem 'selenium-webdriver' | ||
gem 'webdrivers' | ||
end |
Oops, something went wrong.