Skip to content

Commit

Permalink
Merge pull request #25 from TuftsUniversity/pysh-disallowedclass
Browse files Browse the repository at this point in the history
Upgrade to Ruby 2.7
  • Loading branch information
rawOrlando authored Apr 7, 2023
2 parents 353b002 + 324990b commit 74bbe6c
Show file tree
Hide file tree
Showing 84 changed files with 958 additions and 634 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['2.6']
ruby-version: ['2.7']
experimental: [false]
# include:
# - ruby-version: 2.6
Expand All @@ -45,7 +45,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler: "1.17.3"
bundler: "2.3.26"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Update rubygems
run: |
Expand All @@ -70,11 +70,14 @@ jobs:
cp config/tufts.yml.sample config/tufts.yml
- name: Create database
run: |
RAILS_ENV=test bundle exec rake db:create
RAILS_ENV=test bundle exec rake db:migrate --trace
#- name: Rubbocop
# run: |
# bundle exec rubocop
bundle exec rake db:create
bundle exec rake db:migrate --trace
env:
RAILS_ENV: test
- name: Rubocop
run: bundle exec rubocop
env:
RAILS_ENV: test
- name: Compile assets
run: |
bundle exec rails assets:precompile &> /dev/null
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/log/.keep
/tmp
.byebug_history

Expand All @@ -27,7 +27,6 @@ config/database.yml
config/secrets.yml
config/solr.yml
config/tufts.yml
config/environments/tdldev.rb

# Ignore jetty
jetty
Expand All @@ -37,3 +36,5 @@ public/assets

.env
coverage/**

.DS_Store
85 changes: 78 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,79 @@
Metrics/LineLength:
Max: 120
Style/Next:
Enabled: false
Style/ParenthesesAroundCondition:
Enabled: false
inherit_gem:
bixby: bixby_default.yml

AllCops:
Exclude:
- bin/*
- db/**/*
- spec/fixtures/**/*
- vendor/**/*
TargetRubyVersion: 2.7

Metrics/AbcSize:
Exclude:
- app/controllers/spotlight/pages_controller.rb
- app/controllers/tufts/tdl_resources_controller.rb
- app/models/search_builder.rb
- lib/tufts/hostname_fixer.rb
Metrics/BlockLength:
Enabled: false
Exclude:
- app/controllers/catalog_controller.rb
- config/**/*
- lib/tasks/data_cleaner.rake
- lib/tasks/reindexer.rake
- spec/features/feature_page_customizations_spec.rb
- spec/features/sir_trevor_customizations_spec.rb
- spec/features/tdl_ingest_spec.rb
- spec/features/view_customizations_spec.rb
- Guardfile
Metrics/CyclomaticComplexity:
Exclude:
- lib/tufts/hostname_fixer.rb
Metrics/PerceivedComplexity:
Exclude:
- lib/tufts/hostname_fixer.rb
Metrics/ClassLength:
Exclude:
- lib/tufts/hostname_fixer.rb
Metrics/MethodLength:
Exclude:
- app/controllers/tufts/tdl_resources_controller.rb
- app/models/tufts/iiif_manifest.rb
- lib/tufts/hostname_fixer.rb
Naming/MethodParameterName:
Exclude:
- lib/in_menu_behavior/helper.rb
Lint/Debugger:
Exclude:
- lib/tufts/hostname_fixer.rb
Style/SymbolArray:
StyleGuide: '#brackets'
Style/Documentation:
Exclude:
- app/**/*
- test/*
- app/models/user.rb
- lib/**/*
- spec/**/*
- config/**/*
Lint/UnusedMethodArgument:
Exclude:
- app/controllers/application_controller.rb
Layout/LineLength:
Exclude:
- config/**/*
Rails/ApplicationRecord:
Exclude:
- app/models/spotlight/*
Rails/FilePath:
Exclude:
- lib/tasks/test.rake
Rails/Output:
Exclude:
- lib/tufts/hostname_fixer.rb
RSpec/ExampleLength:
Exclude:
- spec/features/feature_page_customizations_spec.rb
- spec/features/sir_trevor_customizations_spec.rb
- spec/features/tdl_ingest_spec.rb
- spec/features/view_customizations_spec.rb
2 changes: 1 addition & 1 deletion .ruby-gemset
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tufts-spotlight

2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.6.0
ruby-2.7.2
33 changes: 18 additions & 15 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
Expand All @@ -9,15 +11,15 @@ gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
#gem 'coffee-rails', '~> 4.2'
# gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
#gem 'therubyracer', platforms: :ruby
gem 'mini_racer'
# gem 'therubyracer', platforms: :ruby
# gem 'mini_racer'

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
#gem 'turbolinks'
# gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
Expand All @@ -30,14 +32,14 @@ gem 'blacklight-spotlight', tag: 'v2.13.0', git: 'https://github.com/projectblac
gem 'rsolr', '>= 1.0'
gem 'solrizer'

gem 'blacklight-gallery', '>= 0.3.0'
gem 'blacklight-oembed', '>= 0.1.0'
gem 'devise'
gem 'devise-guests', '~> 0.6'
gem 'devise_invitable'
gem 'friendly_id'
gem 'riiif'
gem 'sitemap_generator'
gem 'blacklight-gallery', '>= 0.3.0'
gem 'blacklight-oembed', '>= 0.1.0'
gem 'devise_invitable'

gem 'bootstrap-sass', '~> 3.0'
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
Expand All @@ -49,26 +51,27 @@ group :development do
gem 'web-console', '>= 3.3.0'

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
#gem 'spring'
#gem 'spring-commands-rspec'
# gem 'spring'
# gem 'spring-commands-rspec'
end

group :development, :test do
gem 'solr_wrapper', '~> 2' #hi
gem 'rspec-rails', '~> 4' # Can update to 5.x after updating to Rails 6.x
gem 'bixby', '3.0.2'
gem 'byebug'
gem 'rspec-rails', '~> 4' # Can update to 5.x after updating to Rails 6.x
gem 'rubocop', require: false
gem 'solr_wrapper', '~> 2' # hi
end

group :test do
gem 'database_cleaner'
gem 'capybara'
gem 'capybara-maleficent', require: false
gem 'capybara-screenshot'
gem 'ladle'
gem 'database_cleaner'
gem 'factory_bot_rails'
gem 'selenium-webdriver'
gem 'ladle'
gem 'selenium-webdriver', '~> 4.1.0'
gem 'simplecov'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'webdrivers', '~> 4.0', require: false
end

Loading

0 comments on commit 74bbe6c

Please sign in to comment.