-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 31c20cc
Showing
78 changed files
with
2,306 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,17 @@ | ||
.git | ||
.github | ||
.gitignore | ||
README.md | ||
|
||
log | ||
test | ||
vendor | ||
openshift/ | ||
coverage/ | ||
.bundle | ||
.ruby-version | ||
|
||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
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,17 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "bundler" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
allow: | ||
- dependency-type: direct | ||
- dependency-type: indirect | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,51 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
verify: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres:14 | ||
env: | ||
POSTGRES_USER: parser | ||
POSTGRES_DB: parser_test | ||
POSTGRES_PASSWORD: postgres | ||
ports: ["5432:5432"] | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
options: --entrypoint redis-server | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install dependent libraries | ||
run: sudo apt-get install libpq-dev | ||
- name: Set up Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 15 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.1.2 | ||
bundler-cache: true | ||
|
||
- name: Run tests | ||
env: | ||
RAILS_ENV: test | ||
POSTGRES_DB: parser_test | ||
POSTGRES_USER: parser | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_HOST: localhost | ||
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} | ||
run: bundle exec rake db:create db:migrate test |
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,31 @@ | ||
# 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 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 |
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,25 @@ | ||
# Development | ||
|
||
## Setup | ||
|
||
todo | ||
|
||
## Tests | ||
|
||
todo | ||
|
||
## Background tasks | ||
|
||
todo | ||
|
||
## Docker | ||
|
||
todo | ||
|
||
## Adding an ecosystem | ||
|
||
todo | ||
|
||
## Deployment | ||
|
||
todo |
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,42 @@ | ||
FROM ruby:3.1.2-alpine | ||
|
||
ENV APP_ROOT /usr/src/app | ||
ENV DATABASE_PORT 5432 | ||
WORKDIR $APP_ROOT | ||
|
||
# ============================================= | ||
# System layer | ||
|
||
# Will invalidate cache as soon as the Gemfile changes | ||
COPY Gemfile Gemfile.lock $APP_ROOT/ | ||
|
||
# * Setup system | ||
# * Install Ruby dependencies | ||
RUN apk add --update \ | ||
build-base \ | ||
netcat-openbsd \ | ||
git \ | ||
nodejs \ | ||
postgresql-dev \ | ||
tzdata \ | ||
curl-dev \ | ||
libc6-compat \ | ||
&& rm -rf /var/cache/apk/* \ | ||
&& gem update --system \ | ||
&& gem install bundler foreman \ | ||
&& bundle config --global frozen 1 \ | ||
&& bundle config set without 'test' \ | ||
&& bundle install --jobs 2 | ||
|
||
# ======================================================== | ||
# Application layer | ||
|
||
# Copy application code | ||
COPY . $APP_ROOT | ||
|
||
# Precompile assets for a production environment. | ||
# This is done to include assets in production images on Dockerhub. | ||
RUN RAILS_ENV=production bundle exec rake assets:precompile | ||
|
||
# Startup | ||
CMD ["bin/docker-start"] |
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,44 @@ | ||
source "https://rubygems.org" | ||
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | ||
|
||
ruby "3.1.2" | ||
|
||
gem "rails", "~> 7.0.2", ">= 7.0.2.4" | ||
gem "sprockets-rails" | ||
gem "pg", "~> 1.1" | ||
gem "puma", "~> 5.0" | ||
gem "jbuilder" | ||
gem "redis", "~> 4.0" | ||
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ] | ||
gem "bootsnap", require: false | ||
gem "sassc-rails" | ||
gem "faraday" | ||
gem "faraday-retry" | ||
gem "faraday-gzip" | ||
gem "faraday-follow_redirects" | ||
gem "sidekiq" | ||
gem "sidekiq-unique-jobs" | ||
gem "bibliothecary" | ||
gem "pghero" | ||
gem "pg_query" | ||
gem 'bootstrap' | ||
gem "rack-attack" | ||
gem "rack-attack-rate-limit", require: "rack/attack/rate-limit" | ||
gem 'rack-cors' | ||
gem 'rswag-api' | ||
gem 'rswag-ui' | ||
|
||
group :development, :test do | ||
gem "debug", platforms: %i[ mri mingw x64_mingw ] | ||
end | ||
|
||
group :development do | ||
gem "web-console" | ||
end | ||
|
||
group :test do | ||
gem "shoulda" | ||
gem "webmock" | ||
gem "mocha" | ||
gem "rails-controller-testing" | ||
end |
Oops, something went wrong.