From 5f4d35812cc3742122b5ba34c4086dd714b8757f Mon Sep 17 00:00:00 2001 From: Matt Petro Date: Fri, 8 Jul 2022 13:09:29 -0400 Subject: [PATCH 1/3] Remove unneeded files --- .github/workflows/codeql-analysis.yml | 70 --------------------------- .gitlab-ci.yml | 59 ---------------------- .nvmrc | 1 - .ruby-version | 1 - .travis.yml | 53 -------------------- 5 files changed, 184 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml delete mode 100644 .gitlab-ci.yml delete mode 100644 .nvmrc delete mode 100644 .ruby-version delete mode 100644 .travis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 1f504d52..00000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,70 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '45 1 * * 6' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript', 'ruby' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://git.io/codeql-language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 997a4900..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,59 +0,0 @@ -cache: - untracked: true - paths: - - vendor/ruby - - node_modules - -variables: - RAILS_ENV: test - RAILS_GROUPS: build - POSTGRES_DB: nice_marmot - -linter: - image: atomicjolt/atomicjolt-ci:ruby-2.5.9-node-10.24.1-yarn-1.10.1 - only: - - merge_requests - except: - - master - before_script: - - yarn - - bundle install --path vendor - - "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow" - script: - - PRONTO_GITLAB_API_ENDPOINT=https://gitlab.com/api/v4/ bundle exec pronto run -r eslint rubocop -f gitlab_mr -c origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME --exit-code - - -rspec: - image: atomicjolt/atomicjolt-ci:ruby-2.5.9-node-10.24.1-yarn-1.10.1 - only: - - master - - /.*\..*/ - - merge_requests - services: - - postgres:9.5.0 - before_script: - - cp config/secrets.yml.example config/secrets.yml - - cp config/ci.database.yml config/database.yml - - cp .env.example .env - - yarn - - bundle install --path vendor - - bundle exec rails db:create - - bundle exec rails db:schema:load - script: - - bundle exec rspec - -jest: - image: atomicjolt/atomicjolt-ci:ruby-2.5.9-node-10.24.1-yarn-1.10.1 - only: - - master - - /.*\..*/ - - merge_requests - before_script: - - cp .env.example .env - - yarn - script: - - yarn test - -include: - - template: Dependency-Scanning.gitlab-ci.yml - - template: Security/SAST.gitlab-ci.yml diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index ed9f5a0a..00000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -14.18.2 diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index a603bb50..00000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.7.5 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 444869e4..00000000 --- a/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ -language: ruby -sudo: required -dist: trusty - -env: - - CXX=g++-4.8 RAILS_GROUPS=build - -addons: - postgresql: "13.4" - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.8 - -cache: - bundler: true - directories: - - node_modules - - client/node_modules - - client/apps/hello_world/node_modules - -branches: - only: - - master - - staging - - stable - -services: - - postgresql - -before_install: - - cp config/secrets.yml.example config/secrets.yml - - cp config/ci.database.yml config/database.yml - - cp .env.example .env - - nvm install 14.18.2 - - nvm use 14.18.2 - - npm install -g yarn - -install: - - bundle install --path vendor/bundle - - yarn - -before_script: - - export CHROME_BIN=chromium-browser - - "export DISPLAY=:99.0" - - "sh -e /etc/init.d/xvfb start" - - bundle exec rails db:create - - bundle exec rails db:schema:load - -script: - - ./bin/ci - - yarn test From 966c41c2d3217287e045456a37438c127ef1544e Mon Sep 17 00:00:00 2001 From: Matt Petro Date: Fri, 8 Jul 2022 13:09:55 -0400 Subject: [PATCH 2/3] Fix typo --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index e9e7db8d..12e8838c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -81,7 +81,7 @@ def copy_attributes # https://web.archive.org/web/20210719115534/https://www.jamesridgway.co.uk/implementing-a-two-step-otp-u2f-login-workflow-with-rails-and-devise/ # - # Generate an OTP secret it it does not already exist + # Generate an OTP secret if it does not already exist def generate_two_factor_secret_if_missing! return unless otp_secret.nil? update!(otp_secret: User.generate_otp_secret) From 133795d2c5d773ca92d098b46c3bf7d801d41770 Mon Sep 17 00:00:00 2001 From: Matt Petro Date: Fri, 8 Jul 2022 13:18:55 -0400 Subject: [PATCH 3/3] Remove framework defaults We've been removing these in the past, so removing this one as well. --- .../new_framework_defaults_7_0.rb | 117 ------------------ 1 file changed, 117 deletions(-) delete mode 100644 config/initializers/new_framework_defaults_7_0.rb diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb deleted file mode 100644 index a579326e..00000000 --- a/config/initializers/new_framework_defaults_7_0.rb +++ /dev/null @@ -1,117 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file eases your Rails 7.0 framework defaults upgrade. -# -# Uncomment each configuration one by one to switch to the new default. -# Once your application is ready to run with all new defaults, you can remove -# this file and set the `config.load_defaults` to `7.0`. -# -# Read the Guide for Upgrading Ruby on Rails for more info on each option. -# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html - -# `button_to` view helper will render `