Skip to content

Commit

Permalink
Merge pull request #3226 from DMPRoadmap/development
Browse files Browse the repository at this point in the history
Upgrade to v4.0
  • Loading branch information
briri authored Oct 26, 2022
2 parents fd57e12 + 68bf79b commit c16f001
Show file tree
Hide file tree
Showing 196 changed files with 10,450 additions and 4,415 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,5 @@ jobs:
- name: 'Yarn Install'
run: yarn install

# Run the ES Lint checks on javascript files
# https://github.com/marketplace/actions/run-eslint
- name: 'ES Lint checks'
uses: stefanoeb/[email protected]
with:
args: './app/javascript/**/*.js'
- name: 'Run ESLint'
run: yarn run eslint app/javascript/**/*.js --ext .js
29 changes: 14 additions & 15 deletions .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# Install Ruby and run bundler
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.3
ruby-version: 2.7.6
bundler-cache: true

# Install Node
Expand Down Expand Up @@ -48,28 +48,27 @@ jobs:

# Start the DB server and initialize the DB
- name: 'Start MySQL'
run: sudo systemctl start mysql

- name: 'Build out the test database'
run: |
sudo systemctl start mysql
bin/rails db:setup RAILS_ENV=test
bin/rails db:migrate RAILS_ENV=test
bundle exec rails db:create RAILS_ENV=test
bundle exec rails db:schema:load RAILS_ENV=test
- name: 'Run any pending database migrations'
run: bin/rails db:migrate RAILS_ENV=test

# Prebuild the CSS, JS and image assets
- name: 'Precompile all of the Assets'
run: bin/rails assets:precompile

# briley - comment out Karma tests due to issues with dependencies. We should
# replace these with RSpec feature tests
# Run the JS tests
# - name: 'Run Karma Tests'
# run: yarn test
run: bundle exec rails assets:precompile

# Run the unit and functional tests
- name: 'Run Rspec Unit and Functional Tests'
run: |
bin/bundle exec rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
bin/bundle exec rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
bin/bundle exec rspec spec/mixins/
bundle exec rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
bundle exec rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
bundle exec rspec spec/mixins/
# Run the time consuming integration tests (using Chrome headless browser)
- name: 'Run Rspec Integration Tests'
run: bin/bundle exec rspec spec/features/
run: bundle exec rspec spec/features/
22 changes: 8 additions & 14 deletions .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# Install Ruby and run bundler
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.3
ruby-version: 2.7.6
bundler-cache: true

# Install Node
Expand Down Expand Up @@ -74,26 +74,20 @@ jobs:
# Initialize the DB
- name: 'Setup Test DB'
run: |
bin/rails db:setup RAILS_ENV=test
bin/rails db:migrate RAILS_ENV=test
bundle exec rails db:setup RAILS_ENV=test
bundle exec rails db:migrate RAILS_ENV=test
# Prebuild the CSS, JS and image assets
- name: 'Compile Assets'
run: bin/rails assets:precompile

# briley - comment out Karma tests due to issues with dependencies. We should
# replace these with RSpec feature tests
# Run the JS tests
# - name: 'Run Karma Tests'
# run: yarn test
run: bundle exec rails assets:precompile

# Run the unit and functional tests
- name: 'Run Rspec Unit and Functional Tests'
run: |
bin/rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
bin/rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
bin/rspec spec/mixins/
bundle exec rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
bundle exec rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
bundle exec rspec spec/mixins/
# Run the time consuming integration tests (using Chrome headless browser)
- name: 'Run Integration Tests'
run: bin/rspec spec/features/
run: bundle exec rspec spec/features/
2 changes: 1 addition & 1 deletion .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
# Install Ruby and run bundler
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.3
ruby-version: 2.7.6
bundler-cache: true

# Run the Rubocop linter checks
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,6 @@ yarn-debug.log*
/yarn-error.log
yarn-debug.log*
.yarn-integrity

# Ignore briley AWS cloud9 script to start the application
cloud9-start.sh
41 changes: 22 additions & 19 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

source 'https://rubygems.org'

ruby '>= 2.6.3'
ruby '>= 2.7'

# ===========#
# CORE RAILS #
# ===========#

# Full-stack web application framework. (http://rubyonrails.org)
gem 'rails', '~> 5.2'
gem 'rails', '~> 6.1'

# TODO: Remove this once Rails addresses the issue with its dependency on mimemagic. Mimemagic had
# an MIT license but was using some incompatible GPL license code.
# Versions of mimemagic that were yanked: https://rubygems.org/gems/mimemagic/versions
# Analysis of the issue: https://www.theregister.com/2021/03/25/ruby_rails_code/
gem 'mimemagic', '~> 0.3.7'
gem 'mimemagic'

# Use sqlite3 as the database for Active Record
# gem 'sqlite3', '~> 1.4'
Expand All @@ -24,13 +24,17 @@ gem 'mimemagic', '~> 0.3.7'
gem 'puma', group: :puma, require: false

# Use SCSS for stylesheets
# TODO : might need to move to cssbundling-rails
# SEE: https://dev.to/kolide/how-to-migrate-a-rails-6-app-from-sass-rails-to-cssbundling-rails-4l41
gem 'sass-rails'

# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker'

# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks'
# Turbo gives you the speed of a single-page web application without having to write any JavaScript..
# Read more: https://github.com/hotwired/turbo-rails
# https://github.com/hotwired/turbo-rails/blob/main/UPGRADING.md
gem 'turbo-rails'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder'
Expand Down Expand Up @@ -60,6 +64,7 @@ gem 'bootsnap', require: false

# Rollbar-gem is the SDK for Ruby apps and includes support for apps using
# Rails, Sinatra, Rack, plain Ruby, and other frameworks.
# https://github.com/rollbar/rollbar-gem
gem 'rollbar', group: :rollbar, require: false

# ======== #
Expand Down Expand Up @@ -93,6 +98,7 @@ gem 'devise_invitable'
gem 'omniauth'

# OmniAuth Shibboleth strategies for OmniAuth 1.x
# https://github.com/toyokazu/omniauth-shibboleth
gem 'omniauth-shibboleth'

# ORCID OAuth 2.0 Strategy for OmniAuth 1.0
Expand Down Expand Up @@ -148,6 +154,7 @@ gem 'kaminari'

# Paginate in your headers, not in your response body. This follows the
# proposed RFC-8288 standard for Web linking.
# https://github.com/davidcelis/api-pagination
gem 'api-pagination'

# =========== #
Expand All @@ -158,7 +165,7 @@ gem 'api-pagination'
gem 'sassc-rails'

# Font-Awesome SASS (https://github.com/FortAwesome/font-awesome-sass)
gem 'font-awesome-sass', '~> 5.13.0'
gem 'font-awesome-sass', '~> 5'

# Use webpack to manage app-like JavaScript modules in Rails
# (https://github.com/rails/webpacker)
Expand Down Expand Up @@ -188,10 +195,6 @@ gem 'wicked_pdf'
# (http://github.com/karnov/htmltoword)
gem 'htmltoword'

# Filename sanitization for Ruby. This is useful when you generate filenames for
# downloads from user input
gem 'zaru'

# ==================== #
# INTERNATIONALIZATION #
# ==================== #
Expand Down Expand Up @@ -239,11 +242,11 @@ group :test do
# (https://github.com/thekompanee/fuubar)
gem 'fuubar'

# Guard keeps an eye on your file modifications (http://guardgem.org)
# Guard keeps an eye on your file modifications (https://github.com/guard/guard)
gem 'guard'

# Guard gem for RSpec (https://github.com/guard/guard-rspec)
gem 'guard-rspec'
# gem 'guard-rspec'

# Library for stubbing HTTP requests in Ruby.
# (http://github.com/bblimke/webmock)
Expand Down Expand Up @@ -273,11 +276,11 @@ group :test do

# Automatically create snapshots when Cucumber steps fail with Capybara
# and Rails (http://github.com/mattheworiordan/capybara-screenshot)
gem 'capybara-screenshot'
# gem 'capybara-screenshot'

# Browser integration tests are expensive. We can mock external requests
# in our tests, but once a browser is involved, we lose control.
gem 'capybara-webmock', '~> 0.6'
gem 'capybara-webmock'

# RSpec::CollectionMatchers lets you express expected outcomes on
# collections of an object in an example.
Expand Down Expand Up @@ -309,22 +312,22 @@ group :ci, :development do
gem 'rubocop-i18n'

# A collection of RuboCop cops to check for performance optimizations in Ruby code.
gem 'rubocop-performance'
# gem 'rubocop-performance'

# Automatic Rails code style checking tool. A RuboCop extension focused on enforcing
# Rails best practices and coding conventions.
gem 'rubocop-rails'
# gem 'rubocop-rails'

# A RuboCop plugin for Rake tasks
gem 'rubocop-rake'
# gem 'rubocop-rake'

# Code style checking for RSpec files. A plugin for the RuboCop code style enforcing
# & linting tool.
gem 'rubocop-rspec'
# gem 'rubocop-rspec'

# Thread-safety checks via static analysis. A plugin for the RuboCop code style
# enforcing & linting tool.
gem 'rubocop-thread_safety'
# gem 'rubocop-thread_safety'
end

group :development do
Expand Down
Loading

0 comments on commit c16f001

Please sign in to comment.