Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
# ruby '3.3.9'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 7.2.2'
gem 'rails', '~> 8.0.5'

gem 'date', '3.1.3' # Lock to Ruby 3.0 version of gem for live service

Expand Down
118 changes: 58 additions & 60 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,70 +1,67 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.2.3.2)
actionpack (= 7.2.3.2)
activesupport (= 7.2.3.2)
actioncable (8.0.5.1)
actionpack (= 8.0.5.1)
activesupport (= 8.0.5.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.2.3.2)
actionpack (= 7.2.3.2)
activejob (= 7.2.3.2)
activerecord (= 7.2.3.2)
activestorage (= 7.2.3.2)
activesupport (= 7.2.3.2)
actionmailbox (8.0.5.1)
actionpack (= 8.0.5.1)
activejob (= 8.0.5.1)
activerecord (= 8.0.5.1)
activestorage (= 8.0.5.1)
activesupport (= 8.0.5.1)
mail (>= 2.8.0)
actionmailer (7.2.3.2)
actionpack (= 7.2.3.2)
actionview (= 7.2.3.2)
activejob (= 7.2.3.2)
activesupport (= 7.2.3.2)
actionmailer (8.0.5.1)
actionpack (= 8.0.5.1)
actionview (= 8.0.5.1)
activejob (= 8.0.5.1)
activesupport (= 8.0.5.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.2.3.2)
actionview (= 7.2.3.2)
activesupport (= 7.2.3.2)
cgi
actionpack (8.0.5.1)
actionview (= 8.0.5.1)
activesupport (= 8.0.5.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.3)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actiontext (7.2.3.2)
actionpack (= 7.2.3.2)
activerecord (= 7.2.3.2)
activestorage (= 7.2.3.2)
activesupport (= 7.2.3.2)
actiontext (8.0.5.1)
actionpack (= 8.0.5.1)
activerecord (= 8.0.5.1)
activestorage (= 8.0.5.1)
activesupport (= 8.0.5.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.2.3.2)
activesupport (= 7.2.3.2)
actionview (8.0.5.1)
activesupport (= 8.0.5.1)
builder (~> 3.1)
cgi
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.2.3.2)
activesupport (= 7.2.3.2)
activejob (8.0.5.1)
activesupport (= 8.0.5.1)
globalid (>= 0.3.6)
activemodel (7.2.3.2)
activesupport (= 7.2.3.2)
activerecord (7.2.3.2)
activemodel (= 7.2.3.2)
activesupport (= 7.2.3.2)
activemodel (8.0.5.1)
activesupport (= 8.0.5.1)
activerecord (8.0.5.1)
activemodel (= 8.0.5.1)
activesupport (= 8.0.5.1)
timeout (>= 0.4.0)
activerecord-import (2.2.0)
activerecord (>= 4.2)
activestorage (7.2.3.2)
actionpack (= 7.2.3.2)
activejob (= 7.2.3.2)
activerecord (= 7.2.3.2)
activesupport (= 7.2.3.2)
activestorage (8.0.5.1)
actionpack (= 8.0.5.1)
activejob (= 8.0.5.1)
activerecord (= 8.0.5.1)
activesupport (= 8.0.5.1)
marcel (~> 1.0)
activesupport (7.2.3.2)
activesupport (8.0.5.1)
base64
benchmark (>= 0.3)
bigdecimal
Expand All @@ -73,9 +70,10 @@ GEM
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1, < 6)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
ast (2.4.3)
Expand Down Expand Up @@ -262,31 +260,30 @@ GEM
rack (>= 1.3)
rackup (2.3.1)
rack (>= 3)
rails (7.2.3.2)
actioncable (= 7.2.3.2)
actionmailbox (= 7.2.3.2)
actionmailer (= 7.2.3.2)
actionpack (= 7.2.3.2)
actiontext (= 7.2.3.2)
actionview (= 7.2.3.2)
activejob (= 7.2.3.2)
activemodel (= 7.2.3.2)
activerecord (= 7.2.3.2)
activestorage (= 7.2.3.2)
activesupport (= 7.2.3.2)
rails (8.0.5.1)
actioncable (= 8.0.5.1)
actionmailbox (= 8.0.5.1)
actionmailer (= 8.0.5.1)
actionpack (= 8.0.5.1)
actiontext (= 8.0.5.1)
actionview (= 8.0.5.1)
activejob (= 8.0.5.1)
activemodel (= 8.0.5.1)
activerecord (= 8.0.5.1)
activestorage (= 8.0.5.1)
activesupport (= 8.0.5.1)
bundler (>= 1.15.0)
railties (= 7.2.3.2)
railties (= 8.0.5.1)
rails-dom-testing (2.3.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.7.1)
loofah (~> 2.25, >= 2.25.2)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (7.2.3.2)
actionpack (= 7.2.3.2)
activesupport (= 7.2.3.2)
cgi
railties (8.0.5.1)
actionpack (= 8.0.5.1)
activesupport (= 8.0.5.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
Expand Down Expand Up @@ -365,6 +362,7 @@ GEM
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
uri (1.1.1)
useragent (0.16.11)
websocket (1.2.11)
websocket-driver (0.8.2)
Expand Down Expand Up @@ -399,7 +397,7 @@ DEPENDENCIES
pg (~> 1.4.6)
puma (~> 7.0)
puma-daemon
rails (~> 7.2.2)
rails (~> 8.0.5)
spring
spring-watcher-listen (~> 2.0)

Expand Down
2 changes: 2 additions & 0 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env ruby
exec './bin/rails', 'server', *ARGV
16 changes: 7 additions & 9 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ require 'fileutils'
APP_ROOT = File.expand_path('..', __dir__)
APP_NAME = 'pseudonymisation_service'

def system!(*args)
system(*args, exception: true)
def system!(*)
system(*, exception: true)
end

FileUtils.chdir APP_ROOT do
Expand All @@ -14,7 +14,6 @@ FileUtils.chdir APP_ROOT do
# Add necessary setup steps to this file.

puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')

# puts "\n== Copying sample files =="
Expand All @@ -28,10 +27,9 @@ FileUtils.chdir APP_ROOT do
puts "\n== Removing old logs and tempfiles =="
system! 'bin/rails log:clear tmp:clear'

puts "\n== Restarting application server =="
system! 'bin/rails restart'

# puts "\n== Configuring puma-dev =="
# system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
# system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
unless ARGV.include?('--skip-server')
puts "\n== Starting development server =="
STDOUT.flush # flush the output before exec(2) so that it displays
exec 'bin/dev'
end
end
27 changes: 12 additions & 15 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.

# In the development environment your application's code is reloaded any time
# it changes. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
# Make code changes take effect immediately without server restart.
config.enable_reloading = true

# Do not eager load code on boot.
Expand All @@ -17,27 +15,27 @@
# Enable server timing.
# config.server_timing = true

# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
# Enable/disable Action Controller caching. By default Action Controller caching is disabled.
# Run rails dev:cache to toggle Action Controller caching.
if Rails.root.join('tmp/caching-dev.txt').exist?
config.cache_store = :memory_store
config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{2.days.to_i}" }
config.public_file_server.headers = { 'cache-control' => "public, max-age=#{2.days.to_i}" }
else
config.action_controller.perform_caching = false

config.cache_store = :null_store
end

# Change to :null_store to avoid any caching.
config.cache_store = :memory_store

# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false

# Disable caching for Action Mailer templates even if Action Controller
# caching is enabled.
# Make template changes take effect immediately.
config.action_mailer.perform_caching = false

# Set localhost to be used by links generated in mailer templates.
# config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }

# Print deprecation notices to the Rails logger.
Expand All @@ -55,6 +53,9 @@
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true

# Append comments with runtime information tags to SQL queries in logs.
config.active_record.query_log_tags_enabled = true

# Highlight code that enqueued background job in logs.
config.active_job.verbose_enqueue_logs = true

Expand All @@ -72,8 +73,4 @@

# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
# config.generators.apply_rubocop_autocorrect_after_generate!

# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
end
Loading