Skip to content

Commit

Permalink
General cleanup and upgrades (Terrastories#867)
Browse files Browse the repository at this point in the history
* Remove unused gem: acts-as-taggable

It appears the code that used this gem was moved a long time ago, but
the gem lingered.

* Remove unused gem: dotenv-rails

While we do have a `.env` file, it's used for Docker purposes and not at
the root of the Rails application. Since we are not loading .env into
the app in this way, we can remove the gem.

Plus, with the use of Docker, we should be using .dockerenv or
specifying env in the Dockerfile or Compose files.

* Remove font-awesome-rails gem

This appears to be have been added, but never made fully functional. A
quick search for the font awesome `fa_*` helpers and finding none,
removing this gem seemed fine.

If we ever wish to utilize font awesome in the future, we can add it
then.

* Remove rails-controller-testing gem

* Reorganize and document gems in Gemfile

* Remove obsolete custom DeviseFailureApp.

This is left over from when we attempted to run Devise on a subdomain.
We abandoned this shortly after but the code lingered. Removing for now.
  • Loading branch information
lauramosher authored Nov 1, 2022
1 parent 45d8aba commit 2837050
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 55 deletions.
36 changes: 19 additions & 17 deletions rails/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.5.9'

gem "dotenv-rails", require: "dotenv/rails-now", group: %i[development test]

gem 'rails', '~> 6.1.0'
# Use Puma as the app server
gem 'puma', '~> 4.3'
Expand All @@ -17,8 +15,6 @@ gem 'geocoder'
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'terser'
# See https://github.com/rails/execjs#readme for more supported runtimes
gem 'acts-as-taggable-on', '~> 5.0'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
Expand All @@ -27,17 +23,32 @@ gem 'jbuilder', '~> 2.5'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

gem 'rails-i18n'
# Use devise for authentication
gem 'devise'
gem 'devise-i18n'

# Use pundit for policy based authorization
gem 'pundit'

# Internationalization
gem 'rails-i18n'
gem 'devise-i18n'

# Internationalization in JS
gem 'i18n-js'

# Mapbox GL rendering library
gem 'mapbox-gl-rails', '~> 2.9.0'

# S3 backed Active Storage
gem 'aws-sdk-s3'

# ActiveStorage Validation
gem 'activestorage-validator'

# Enable Webpack for javascript application code
gem 'webpacker', '~> 3.5'
gem 'react-rails'

gem 'font-awesome-rails', '~> 4.7'

# plyr-rails gem is the integration of plyr.io javascript library for your Rails 4 and Rails 5 application.
gem 'plyr-rails'

Expand All @@ -47,9 +58,6 @@ gem 'image_processing'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Internationalization in JS
gem 'i18n-js'

# Reduces boot times through caching; required in config/boot.rb
# gem 'bootsnap', '>= 1.1.0', require: false

Expand Down Expand Up @@ -85,13 +93,7 @@ group :test do
# Factories for creating database entities for testing
gem 'factory_bot_rails'
gem 'simplecov', require: false
# Gem with utilities to test controllers
gem 'rails-controller-testing'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'mapbox-gl-rails', '~> 2.9.0'
gem 'aws-sdk-s3'
gem 'activestorage-validator'
16 changes: 0 additions & 16 deletions rails/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
acts-as-taggable-on (5.0.0)
activerecord (>= 4.2.8)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
annotate (3.2.0)
Expand Down Expand Up @@ -126,10 +124,6 @@ GEM
devise (>= 4.8.0)
diff-lcs (1.5.0)
docile (1.4.0)
dotenv (2.7.6)
dotenv-rails (2.7.6)
dotenv (= 2.7.6)
railties (>= 3.2)
erubi (1.11.0)
execjs (2.8.1)
factory_bot (6.2.1)
Expand All @@ -138,8 +132,6 @@ GEM
factory_bot (~> 6.2.0)
railties (>= 5.0.0)
ffi (1.15.5)
font-awesome-rails (4.7.0.8)
railties (>= 3.2, < 8.0)
formatador (1.1.0)
geocoder (1.7.5)
globalid (1.0.0)
Expand Down Expand Up @@ -229,10 +221,6 @@ GEM
bundler (>= 1.15.0)
railties (= 6.1.7)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
Expand Down Expand Up @@ -352,7 +340,6 @@ PLATFORMS

DEPENDENCIES
activestorage-validator
acts-as-taggable-on (~> 5.0)
annotate
aws-sdk-s3
better_errors
Expand All @@ -362,9 +349,7 @@ DEPENDENCIES
capybara (>= 2.15, < 4.0)
devise
devise-i18n
dotenv-rails
factory_bot_rails
font-awesome-rails (~> 4.7)
geocoder
guard-rspec
i18n-js
Expand All @@ -378,7 +363,6 @@ DEPENDENCIES
puma (~> 4.3)
pundit
rails (~> 6.1.0)
rails-controller-testing
rails-i18n
react-rails
rgeo-geojson
Expand Down
1 change: 0 additions & 1 deletion rails/app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
@import 'plyr';
@import 'core/core';
@import 'components/components';
@import 'font-awesome';
2 changes: 1 addition & 1 deletion rails/config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
Rails.application.config.assets.precompile += %w( dashboard.js dashboard.css font-awesome.css )
Rails.application.config.assets.precompile += %w( dashboard.js dashboard.css )
5 changes: 0 additions & 5 deletions rails/config/initializers/devise.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require "terrastories/devise_failure_app"

# Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
Expand Down Expand Up @@ -268,9 +266,6 @@
# manager.intercept_401 = false
# manager.default_strategies(scope: :user).unshift :some_external_strategy
# end
# config.warden do |manager|
# manager.failure_app = Terrastories::DeviseFailureApp
# end

# ==> Mountable engine configurations
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
Expand Down
15 changes: 0 additions & 15 deletions rails/lib/terrastories/devise_failure_app.rb

This file was deleted.

0 comments on commit 2837050

Please sign in to comment.