Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 7 additions & 148 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,148 +1,7 @@
AllCops:
TargetRubyVersion: 2.5
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
Exclude:
- '**/templates/**/*'
- '**/vendor/**/*'
- 'actionpack/lib/action_dispatch/journey/parser.rb'

# Prefer &&/|| over and/or.
Style/AndOr:
Enabled: true

# Do not use braces for hash literals when they are the last argument of a
# method call.
# Style/BracesAroundHashParameters:
# Enabled: true
# EnforcedStyle: context_dependent

# Align `when` with `case`.
Layout/CaseIndentation:
Enabled: true

# Align comments with method definitions.
Layout/CommentIndentation:
Enabled: true

Layout/EmptyLineAfterMagicComment:
Enabled: true

# In a regular class definition, no empty lines around the body.
Layout/EmptyLinesAroundClassBody:
Enabled: true

# In a regular method definition, no empty lines around the body.
Layout/EmptyLinesAroundMethodBody:
Enabled: true

# In a regular module definition, no empty lines around the body.
Layout/EmptyLinesAroundModuleBody:
Enabled: true

Layout/FirstParameterIndentation:
Enabled: true

# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
Style/HashSyntax:
Enabled: true

# Method definitions after `private` or `protected` isolated calls need one
# extra level of indentation.
Layout/IndentationConsistency:
Enabled: true
EnforcedStyle: indented_internal_methods

# Two spaces, no tabs (for indentation).
Layout/IndentationWidth:
Enabled: true

Layout/SpaceAfterColon:
Enabled: true

Layout/SpaceAfterComma:
Enabled: true

Layout/SpaceAroundEqualsInParameterDefault:
Enabled: true

Layout/SpaceAroundKeyword:
Enabled: true

Layout/SpaceAroundOperators:
Enabled: true

Layout/SpaceBeforeFirstArg:
Enabled: true

Style/DefWithParentheses:
Enabled: true

# Defining a method with parameters needs parentheses.
Style/MethodDefParentheses:
Enabled: true

Style/FrozenStringLiteralComment:
Enabled: true
EnforcedStyle: always
Exclude:
- 'actionview/test/**/*.builder'
- 'actionview/test/**/*.ruby'
- 'actionpack/test/**/*.builder'
- 'actionpack/test/**/*.ruby'
- 'activestorage/db/migrate/**/*.rb'

# Use `foo {}` not `foo{}`.
Layout/SpaceBeforeBlockBraces:
Enabled: true

# Use `foo { bar }` not `foo {bar}`.
Layout/SpaceInsideBlockBraces:
Enabled: true

# Use `{ a: 1 }` not `{a:1}`.
Layout/SpaceInsideHashLiteralBraces:
Enabled: true

Layout/SpaceInsideParens:
Enabled: true

# Check quotes usage according to lint rule below.
Style/StringLiterals:
Enabled: true
EnforcedStyle: single_quotes

# Detect hard tabs, no hard tabs.
Layout/IndentationStyle:
Enabled: true

# Blank lines should not have any spaces.
Layout/TrailingEmptyLines:
Enabled: true

# No trailing whitespace.
Layout/TrailingWhitespace:
Enabled: true

# Use quotes for string literals when they are enough.
Style/RedundantPercentQ:
Enabled: true

# Align `end` with the matching keyword or starting expression except for
# assignments, where it should be aligned with the LHS.
Layout/EndAlignment:
Enabled: true
EnforcedStyleAlignWith: variable

# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
Lint/RequireParentheses:
Enabled: true

Style/RedundantReturn:
Enabled: true
AllowMultipleReturnValues: true

Style/Semicolon:
Enabled: true
AllowAsExpressionSeparator: true
# Omakase Ruby styling for Rails
inherit_gem: { rubocop-rails-omakase: rubocop.yml }
# Overwrite or add rules to create your own house style
#
# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]`
# Layout/SpaceInsideArrayLiteralBrackets:
# Enabled: false
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
3.4.4
29 changes: 16 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
FROM ruby:3.1.2-slim
FROM ruby:3.4.4-slim

ENV RAILS_ENV=production

RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
postgresql-client \
libpq-dev \
libgdal-dev \
gdal-bin \
imagemagick \
libmagickwand-dev \
libvips \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
build-essential \
curl \
git \
postgresql-client \
libpq-dev \
libgdal-dev \
gdal-bin \
imagemagick \
libmagickwand-dev \
libvips \
libyaml-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /rails

Expand Down
92 changes: 46 additions & 46 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,61 +1,68 @@
# frozen_string_literal: true

source 'https://rubygems.org'
source "https://rubygems.org"

git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
# gem 'rails', '~> 7.0.4'
gem 'rails', '~> 6.1.0'
gem "rails", "~> 8.0.0"

gem "pg"

# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
gem "rubocop-rails-omakase", require: false

gem 'rack', '>= 2.0.6'
gem 'pg'
gem 'mysql2'
# Multitenancy for Rails and ActiveRecord
gem 'ros-apartment', require: 'apartment'
gem "ros-apartment", "~> 3.4.0", require: "apartment"
# For JSONAPI responses
gem 'active_model_serializers', '~> 0.10.12'
gem "active_model_serializers", "~> 0.10.12"
# For pagination
gem 'kaminari'
gem "kaminari"
# gem 'pagy', '~> 5.10'
# Use Puma as the app server
gem 'puma', '~> 4.3.0'
gem "puma", "~> 4.3.0"
# Use Redis adapter to run Action Cable in production
gem 'redis', '~> 3.0'
gem 'actionview', '>= 5.2.2.1'
gem "redis", "~> 3.0"
gem "actionview", ">= 5.2.2.1"
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# gem 'ecds_rails_auth_engine', path: '../ecds_auth_engine'
gem 'ecds_rails_auth_engine', git: 'https://github.com/ecds/ecds_rails_auth_engine.git', branch: 'feature/fauxoauth'
gem "ecds_rails_auth_engine", git: "https://github.com/ecds/ecds_rails_auth_engine.git", branch: "feature/fauxoauth"

# Active Storage will land in 5.2
gem 'carrierwave', '~> 1.0'
gem 'mini_magick'
gem 'image_processing', '~> 1.2'
gem 'ferrum'
gem 'aws-sdk-s3', '~> 1'
gem "carrierwave", "~> 1.0"
gem "mini_magick"
gem "image_processing", "~> 1.2"
gem "ferrum"
gem "aws-sdk-s3", "~> 1"

# RGeo is a geospatial data library for Ruby.
# https://github.com/rgeo/rgeo
gem 'rgeo'
gem 'ipinfo-rails'
gem "rgeo"
gem "ipinfo-rails"

# Elasticsearch
gem "elasticsearch", "~> 7.17.1"
gem "searchkick"
gem "sidekiq", ">=7.2.2", "<8"
gem "faraday-httpclient", "~> 2.0"

# Vidoe provider APIs
gem 'vimeo'
gem 'yt'
gem 'youtube_rails'
gem "vimeo"
gem "yt"
gem "youtube_rails"

# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'
gem "rack-cors"

# TODO: should probably only require this for :test
gem 'faker'
gem "faker"

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
Expand All @@ -64,32 +71,25 @@ group :development, :test do
end

group :development do
gem 'listen'
gem "listen"
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'rspec-rails', '~> 5.1.2'
# Use Capistrano for deployment
gem 'capistrano-rails'
gem 'capistrano-rbenv', '~> 2.0'
gem 'capistrano-passenger'
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "rspec-rails", "~> 6.1.0"
end


group :test do
gem 'factory_bot'
gem 'factory_bot_rails'
gem 'shoulda-matchers', '~> 4.5.1' #git: 'https://github.com/thoughtbot/shoulda-matchers.git', branch: 'rails-5'
gem 'database_cleaner'
gem 'webmock'
gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false
gem 'term-ansicolor'
gem "factory_bot"
gem "factory_bot_rails"
gem "shoulda-matchers", "~> 4.5.1" # git: 'https://github.com/thoughtbot/shoulda-matchers.git', branch: 'rails-5'
gem "database_cleaner"
gem "webmock"
gem "term-ansicolor"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'net-smtp', require: false
gem 'net-imap', require: false
gem 'net-pop', require: false
gem "tzinfo-data", platforms: [ :mingw, :mswin, :x64_mingw, :jruby ]
gem "net-smtp", require: false
gem "net-imap", require: false
gem "net-pop", require: false
Loading
Loading