Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexBTurchyn committed May 31, 2023
0 parents commit 97c462e
Show file tree
Hide file tree
Showing 159 changed files with 10,987 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .erb-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
EnableDefaultLinters: true
linters:
ErbSafety:
enabled: false
HardCodedString:
enabled: false
Rubocop:
enabled: true
rubocop_config:
inherit_from:
- .rubocop.yml
Layout/InitialIndentation:
Enabled: false
Layout/LineLength:
Enabled: false
Layout/TrailingEmptyLines:
Enabled: false
Layout/TrailingWhitespace:
Enabled: false
Naming/FileName:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Lint/UselessAssignment:
Enabled: false
Rails/OutputSafety:
Enabled: false
Style/NestedTernaryOperator:
Enabled: false
Style/ZeroLengthPredicate:
Enabled: false
17 changes: 17 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": [
"standard",
"plugin:vue/vue3-recommended"
],
"env": {
"browser": true
},
"rules": {
"vue/no-deprecated-html-element-is": 0,
"vue/no-mutating-props": 0
},
"parserOptions": {
"ecmaVersion": 2022,
"parser": "@babel/eslint-parser"
}
}
25 changes: 25 additions & 0 deletions .github/workflows/erblint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Erblint
on: [push]
jobs:
erblint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
- name: Cache gems
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Install gems
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 4
- name: Run Erblint
run: bundle exec erblint ./app
28 changes: 28 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ESLint
on: [push]
jobs:
eslint:
name: Run ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 16.13.1
- name: Cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: |
yarn install
- name: Run eslint
run: |
./node_modules/eslint/bin/eslint.js "app/javascript/**/*.js"
65 changes: 65 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Rspec
on: push

jobs:
verify:
name: Build
runs-on: ubuntu-latest

services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: docuseal_test
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.1
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 16.13.1
- name: Install Chrome
uses: browser-actions/setup-chrome@latest
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
- name: Cache gems
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Install dependencies
env:
RAILS_ENV: test
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 4
yarn install
- name: Run
env:
RAILS_ENV: test
NODE_ENV: test
COVERAGE: true
DATABASE_URL: postgres://postgres:postgres@localhost:5432/docuseal_test
run: |
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake assets:precompile
bundle exec rspec
25 changes: 25 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Rubocop
on: [push]
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
- name: Cache gems
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Install gems
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 4
- name: Run RuboCop
run: bundle exec rubocop
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/.bundle

/db/*.sqlite3
/db/*.sqlite3-*

/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep

/public/assets

/config/master.key

/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity

.env
.DS_Store

/coverage
/docuseal-attachments
55 changes: 55 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
require:
- rubocop-performance
- rubocop-rails
- rubocop-rspec

AllCops:
NewCops: enable
Exclude:
- db/schema.rb
- node_modules/**/*
- bin/*
TargetRubyVersion: '3.2'

Metrics/BlockLength:
Exclude:
- Rakefile
- '**/*.rake'
- spec/**/*
- config/environments/**/*
- config/routes.rb

Style/Documentation:
Enabled: false

Lint/MissingSuper:
Enabled: false

Metrics/MethodLength:
Max: 20
Exclude:
- 'db/migrate/**'

Metrics/CyclomaticComplexity:
Max: 10

Metrics/PerceivedComplexity:
Max: 10

Metrics/AbcSize:
Max: 35

RSpec/NestedGroups:
Max: 6

RSpec/MultipleExpectations:
Max: 7

RSpec/ExampleLength:
Max: 15

Rails/I18nLocaleTexts:
Enabled: false

Rails/ApplicationController:
Enabled: false
58 changes: 58 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# frozen_string_literal: true

source 'https://rubygems.org'

ruby '3.2.2'

gem 'audited'
gem 'aws-sdk-s3'
gem 'azure-storage-blob'
gem 'bootsnap', require: false
gem 'combine_pdf'
gem 'devise'
gem 'faraday'
gem 'geoip'
gem 'google-cloud-storage'
gem 'image_processing'
gem 'lograge'
gem 'oj'
gem 'pagy'
gem 'pg'
gem 'premailer-rails'
gem 'puma'
gem 'rails'
gem 'ruby-vips'
gem 'shakapacker'
gem 'sqlite3'
gem 'strip_attributes'
gem 'turbo-rails'
gem 'tzinfo-data'
gem 'zip'

group :development, :test do
gem 'annotate'
gem 'better_html'
gem 'bullet'
gem 'debug'
gem 'erb_lint', require: false
gem 'factory_bot_rails'
gem 'faker'
gem 'pry-rails'
gem 'rspec-rails'
gem 'rubocop', require: false
gem 'rubocop-performance', require: false
gem 'rubocop-rails', require: false
gem 'rubocop-rspec', require: false
gem 'simplecov', require: false
end

group :development do
gem 'letter_opener_web'
gem 'web-console'
end

group :test do
gem 'capybara'
gem 'cuprite'
gem 'webmock'
end
Loading

0 comments on commit 97c462e

Please sign in to comment.