diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 9e79f6c..0000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -ruby-3.2.2 diff --git a/Gemfile b/Gemfile index c40ab41..8096ca5 100644 --- a/Gemfile +++ b/Gemfile @@ -4,12 +4,12 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem 'devise' gem 'cancancan' -ruby "3.2.2" +ruby "3.3.0" gem "nokogiri", force_ruby_platform: true # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" -gem "rails", "~> 7.0.4.3" +gem "rails", "~> 7.1.3.2" # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] gem "sprockets-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 3cc0c60..89629e7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,216 +1,244 @@ GIT remote: https://github.com/puma/puma - revision: fd259b7f1a64a505b694cd7cdef605a7de731611 + revision: 7a999de2f0da5648c30f62a6e11d74c7ddbe4e00 branch: master specs: - puma (6.2.2) + puma (6.4.2) nio4r (~> 2.0) GEM remote: https://rubygems.org/ specs: - actioncable (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + actioncable (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + zeitwerk (~> 2.6) + actionmailbox (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.4.3) - actionpack (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activesupport (= 7.0.4.3) + actionmailer (7.1.3.2) + actionpack (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.4.3) - actionview (= 7.0.4.3) - activesupport (= 7.0.4.3) - rack (~> 2.0, >= 2.2.0) + rails-dom-testing (~> 2.2) + actionpack (7.1.3.2) + actionview (= 7.1.3.2) + activesupport (= 7.1.3.2) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4.3) - actionpack (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.3.2) + actionpack (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4.3) - activesupport (= 7.0.4.3) + actionview (7.1.3.2) + activesupport (= 7.1.3.2) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.4.3) - activesupport (= 7.0.4.3) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.3.2) + activesupport (= 7.1.3.2) globalid (>= 0.3.6) - activemodel (7.0.4.3) - activesupport (= 7.0.4.3) - activerecord (7.0.4.3) - activemodel (= 7.0.4.3) - activesupport (= 7.0.4.3) - activestorage (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activesupport (= 7.0.4.3) + activemodel (7.1.3.2) + activesupport (= 7.1.3.2) + activerecord (7.1.3.2) + activemodel (= 7.1.3.2) + activesupport (= 7.1.3.2) + timeout (>= 0.4.0) + activestorage (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activesupport (= 7.1.3.2) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.4.3) + activesupport (7.1.3.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - addressable (2.8.4) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) - bcrypt (3.1.18) + base64 (0.2.0) + bcrypt (3.1.20) + bigdecimal (3.1.7) bindex (0.8.1) - bootsnap (1.16.0) + bootsnap (1.18.3) msgpack (~> 1.2) builder (3.2.4) cancancan (3.5.0) - capybara (3.39.0) + capybara (3.40.0) addressable matrix mini_mime (>= 0.1.3) - nokogiri (~> 1.8) + nokogiri (~> 1.11) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) crass (1.0.6) - date (3.3.3) - debug (1.7.2) - irb (>= 1.5.0) - reline (>= 0.3.1) - devise (4.9.2) + date (3.3.4) + debug (1.9.2) + irb (~> 1.10) + reline (>= 0.3.8) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) + drb (2.2.1) erubi (1.12.0) - ffi (1.15.5) - globalid (1.1.0) - activesupport (>= 5.0) - i18n (1.13.0) + ffi (1.16.3) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.4) concurrent-ruby (~> 1.0) image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) - importmap-rails (1.1.6) + importmap-rails (2.0.1) actionpack (>= 6.0.0) + activesupport (>= 6.0.0) railties (>= 6.0.0) - io-console (0.6.0) - irb (1.6.4) - reline (>= 0.3.0) + io-console (0.7.2) + irb (1.12.0) + rdoc + reline (>= 0.4.2) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - loofah (2.20.0) + loofah (2.22.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) + nokogiri (>= 1.12.0) mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) matrix (0.4.2) - method_source (1.0.0) mini_magick (4.12.0) - mini_mime (1.1.2) - mini_portile2 (2.8.2) - minitest (5.18.0) - msgpack (1.7.0) - mysql2 (0.5.5) - net-imap (0.3.4) + mini_mime (1.1.5) + mini_portile2 (2.8.6) + minitest (5.22.3) + msgpack (1.7.2) + mutex_m (0.2.0) + mysql2 (0.5.6) + net-imap (0.4.10) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.5.0) net-protocol - nio4r (2.5.9) - nokogiri (1.14.3) - mini_portile2 (~> 2.8.0) + nio4r (2.7.1) + nokogiri (1.16.4) + mini_portile2 (~> 2.8.2) racc (~> 1.4) orm_adapter (0.5.0) - public_suffix (5.0.1) - racc (1.6.2) - rack (2.2.7) + psych (5.1.2) + stringio + public_suffix (5.0.5) + racc (1.7.3) + rack (2.2.9) + rack-session (1.0.2) + rack (< 3) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.4.3) - actioncable (= 7.0.4.3) - actionmailbox (= 7.0.4.3) - actionmailer (= 7.0.4.3) - actionpack (= 7.0.4.3) - actiontext (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activemodel (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + rackup (1.0.0) + rack (< 3) + webrick + rails (7.1.3.2) + actioncable (= 7.1.3.2) + actionmailbox (= 7.1.3.2) + actionmailer (= 7.1.3.2) + actionpack (= 7.1.3.2) + actiontext (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activemodel (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) bundler (>= 1.15.0) - railties (= 7.0.4.3) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + railties (= 7.1.3.2) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.5.0) - loofah (~> 2.19, >= 2.19.1) - railties (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) - method_source + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) - rake (13.0.6) - regexp_parser (2.8.0) - reline (0.3.3) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rake (13.2.1) + rdoc (6.6.3.1) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.5.3) io-console (~> 0.5) - responders (3.1.0) + responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.2.5) - ruby-vips (2.1.4) + rexml (3.2.6) + ruby-vips (2.2.1) ffi (~> 1.12) rubyzip (2.3.2) - selenium-webdriver (4.9.0) + selenium-webdriver (4.10.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - spring (4.1.1) - sprockets (4.2.0) + spring (4.2.1) + sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - stimulus-rails (1.2.1) + stimulus-rails (1.3.3) railties (>= 6.0.0) - thor (1.2.1) - timeout (0.3.2) - turbo-rails (1.4.0) + stringio (3.1.0) + thor (1.3.1) + timeout (0.4.1) + turbo-rails (2.0.5) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) @@ -218,24 +246,32 @@ GEM concurrent-ruby (~> 1.0) warden (1.2.9) rack (>= 2.0.9) - web-console (4.2.0) + web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webdrivers (5.2.0) + webdrivers (5.3.1) nokogiri (~> 1.6) rubyzip (>= 1.3.0) - selenium-webdriver (~> 4.0) - websocket (1.2.9) - websocket-driver (0.7.5) + selenium-webdriver (~> 4.0, < 4.11) + webrick (1.8.1) + websocket (1.2.10) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.8) + zeitwerk (2.6.13) PLATFORMS + aarch64-linux + arm-linux + arm64-darwin + ruby + x86-linux + x86_64-darwin + x86_64-linux x86_64-openbsd DEPENDENCIES @@ -250,7 +286,7 @@ DEPENDENCIES mysql2 (~> 0.5) nokogiri puma! - rails (~> 7.0.4.3) + rails (~> 7.1.3.2) selenium-webdriver spring sprockets-rails @@ -261,7 +297,7 @@ DEPENDENCIES webdrivers RUBY VERSION - ruby 3.2.2 + ruby 3.3.0p0 BUNDLED WITH - 2.3.26 + 2.5.3 diff --git a/Gemfile.old b/Gemfile.old deleted file mode 100644 index 55f6daa..0000000 --- a/Gemfile.old +++ /dev/null @@ -1,75 +0,0 @@ -source "https://rubygems.org" -git_source(:github) { |repo| "https://github.com/#{repo}.git" } - -gem 'devise' -gem 'cancancan' - -ruby "3.2.2" - -# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" -gem "rails", "~> 7.0.4.3" - -# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] -gem "sprockets-rails" - -# Use mysql as the database for Active Record -gem "mysql2", "~> 0.5" - -# Use the Puma web server [https://github.com/puma/puma] -gem "puma", git: 'https://github.com/puma/puma', branch: 'master' - -# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] -gem "importmap-rails" - -# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] -gem "turbo-rails" - -# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] -gem "stimulus-rails" - -# Build JSON APIs with ease [https://github.com/rails/jbuilder] -gem "jbuilder" - -# Use Redis adapter to run Action Cable in production -# gem "redis", "~> 4.0" - -# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] -# gem "kredis" - -# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] -# gem "bcrypt", "~> 3.1.7" - -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ] - -# Reduces boot times through caching; required in config/boot.rb -gem "bootsnap", require: false - -# Use Sass to process CSS -# gem "sassc-rails" - -# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] -gem "image_processing", "~> 1.2" - -group :development, :test do - # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem - gem "debug", platforms: %i[ mri mingw x64_mingw ] -end - -group :development do - # Use console on exceptions pages [https://github.com/rails/web-console] - gem "web-console" - - # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] - # gem "rack-mini-profiler" - - # Speed up commands on slow machines / big apps [https://github.com/rails/spring] - gem "spring" -end - -group :test do - # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] - gem "capybara" - gem "selenium-webdriver" - gem "webdrivers" -end diff --git a/README.md b/README.md index 1e1d970..94cb94e 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ Welcome to the Hidden Agenda Ltd CAF tool to help you get organised to become Na This is a Ruby On Rails app and released under a MIT License. -This README would normally document whatever steps are necessary to get the -application up and running. Things you may want to cover: diff --git a/app/controllers/cafs_controller.rb b/app/controllers/cafs_controller.rb index 3dde73d..23c3d02 100644 --- a/app/controllers/cafs_controller.rb +++ b/app/controllers/cafs_controller.rb @@ -39,7 +39,7 @@ class CafsController < ApplicationController def update respond_to do |format| if @caf.update(caf_params) - format.html { redirect_to caf_url(@caf), notice: "Caf was successfully updated." } + format.html { redirect_to company_caf_url(@company, @caf), notice: "Caf was successfully updated." } format.json { render :show, status: :ok, location: @caf } else format.html { render :edit, status: :unprocessable_entity } @@ -53,7 +53,7 @@ class CafsController < ApplicationController @caf.destroy respond_to do |format| - format.html { redirect_to cafs_url, notice: "Caf was successfully destroyed." } + format.html { redirect_to authenticated_root_url, notice: "Caf was successfully destroyed." } format.json { head :no_content } end end diff --git a/app/views/cafs/edit.html.erb b/app/views/cafs/edit.html.erb index c5c5a2c..9ec0476 100644 --- a/app/views/cafs/edit.html.erb +++ b/app/views/cafs/edit.html.erb @@ -1,10 +1,10 @@ -
<%= link_to "Show this caf", caf %>
diff --git a/app/views/cafs/new.html.erb b/app/views/cafs/new.html.erb
index 2e84064..6c5afd3 100644
--- a/app/views/cafs/new.html.erb
+++ b/app/views/cafs/new.html.erb
@@ -5,5 +5,5 @@