From 2e4ddee432fd7248d3e9e1c0d91cf683aaafe217 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 11:14:51 -0500 Subject: [PATCH 1/4] Bump kamal from 2.5.2 to 2.5.3 (#1383) Bumps [kamal](https://github.com/basecamp/kamal) from 2.5.2 to 2.5.3. - [Release notes](https://github.com/basecamp/kamal/releases) - [Commits](https://github.com/basecamp/kamal/compare/v2.5.2...v2.5.3) --- updated-dependencies: - dependency-name: kamal dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6af40846a..caca323b0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -291,7 +291,7 @@ GEM json (2.10.1) jwt (2.10.1) base64 - kamal (2.5.2) + kamal (2.5.3) activesupport (>= 7.0) base64 (~> 0.2) bcrypt_pbkdf (~> 1.0) @@ -317,7 +317,7 @@ GEM listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - logger (1.6.5) + logger (1.6.6) loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -583,7 +583,7 @@ GEM unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) - uri (1.0.2) + uri (1.0.3) useragent (0.16.11) version_gem (1.1.4) view_component (3.21.0) @@ -604,7 +604,7 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.1) + zeitwerk (2.7.2) PLATFORMS arm64-darwin-21 From 188a44a176ba479933864c5e5ffb109f6fea1644 Mon Sep 17 00:00:00 2001 From: Cassie <58792902+cassieemb@users.noreply.github.com> Date: Fri, 28 Feb 2025 19:03:15 -0600 Subject: [PATCH 2/4] Include Upcoming Fosters on Fostered Pets Index - 1231 (#1384) * display upcoming fosters modify controller method to display upcoming and current fosters, add tests, modify card to show badge with the status of the foster * change name from h3 to h4 * stack badge under photo * increase name size and orient badge under name --- .../fostered_pets_controller.rb | 2 +- .../fostered_pets/index.html.erb | 32 ++++++++++++------- .../fostered_pets_controller_test.rb | 6 ++-- test/factories/pets.rb | 5 +++ 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/app/controllers/organizations/adopter_fosterer/fostered_pets_controller.rb b/app/controllers/organizations/adopter_fosterer/fostered_pets_controller.rb index c21c71b24..3fa399c48 100644 --- a/app/controllers/organizations/adopter_fosterer/fostered_pets_controller.rb +++ b/app/controllers/organizations/adopter_fosterer/fostered_pets_controller.rb @@ -5,7 +5,7 @@ class FosteredPetsController < Organizations::BaseController layout "adopter_foster_dashboard" def index - @fostered_pets = authorized_scope(Match.fosters.current, with: Organizations::AdopterFosterer::MatchPolicy) + @fostered_pets = authorized_scope(Match.fosters.current.or(Match.fosters.upcoming), with: Organizations::AdopterFosterer::MatchPolicy) end private diff --git a/app/views/organizations/adopter_fosterer/fostered_pets/index.html.erb b/app/views/organizations/adopter_fosterer/fostered_pets/index.html.erb index 3cc03dbfe..5399fb87d 100644 --- a/app/views/organizations/adopter_fosterer/fostered_pets/index.html.erb +++ b/app/views/organizations/adopter_fosterer/fostered_pets/index.html.erb @@ -8,24 +8,34 @@
<%= link_to adopter_fosterer_fostered_pet_files_path(fostered_pet.pet, pet_id: fostered_pet.pet.id), data: { turbo_frame: "pet_files", action: "click->card#selectCard" } do %>
-
-
- <%= image_tag(fostered_pet.pet.images.attached? ? fostered_pet.pet.images.first : 'coming_soon.jpg', - class: 'rounded-circle', - style: "width: 100%; height: 100%; object-fit: cover;") %> +
+
+
+ <%= image_tag( + fostered_pet.pet.images.attached? ? fostered_pet.pet.images.first : 'coming_soon.jpg', + class: 'rounded-circle', + style: "width: 100%; height: 100%; object-fit: cover;" + ) %> +
-
<%= fostered_pet.pet.name %>
-
-
-
Start Date: <%= fostered_pet.start_date.strftime("%m/%d/%y") %>
-
End Date: <%= fostered_pet.end_date.strftime("%m/%d/%y") %>
+
+

+ <%= fostered_pet.pet.name %> +

+
+ <%= fostered_pet.status.to_s.titleize %>
+
+
Start: <%= fostered_pet.start_date.strftime("%m/%d/%y") %>
+
End: <%= fostered_pet.end_date.strftime("%m/%d/%y") %>
+
<% end %>
- <% end %> + + <% end %>
<% else %> <%= render partial: "shared/empty_state", locals: {text: t(".empty_state")} %> diff --git a/test/controllers/organizations/adopter_fosterer/fostered_pets_controller_test.rb b/test/controllers/organizations/adopter_fosterer/fostered_pets_controller_test.rb index 1c96f20d1..fd5502d46 100644 --- a/test/controllers/organizations/adopter_fosterer/fostered_pets_controller_test.rb +++ b/test/controllers/organizations/adopter_fosterer/fostered_pets_controller_test.rb @@ -30,17 +30,17 @@ class FosteredPetsControllerTest < ActionDispatch::IntegrationTest end end - should "return only current foster matches for the person" do + should "return current and upcoming foster matches for the person" do ActsAsTenant.with_tenant(@organization) do completed_foster = create(:pet, :completed_foster) current_foster = create(:pet, :current_foster, foster_person: @fosterer.person) - future_foster = create(:pet, :future_foster) + future_foster = create(:pet, :future_foster, foster_person: @fosterer.person) get adopter_fosterer_fostered_pets_url assert_includes assigns(:fostered_pets), current_foster.matches.first + assert_includes assigns(:fostered_pets), future_foster.matches.first assert_not_includes assigns(:fostered_pets), completed_foster.matches.first - assert_not_includes assigns(:fostered_pets), future_foster.matches.first end end end diff --git a/test/factories/pets.rb b/test/factories/pets.rb index ab58b127b..50edd015f 100644 --- a/test/factories/pets.rb +++ b/test/factories/pets.rb @@ -49,11 +49,16 @@ end trait :future_foster do + transient do + foster_person { create(:person) } + end + matches { start = Time.current + rand(1..3).months [association(:match, pet: instance, match_type: :foster, + person: foster_person, start_date: start, end_date: start + rand(3..6).months)] } From 334bc574344705904c9c84180915bfb7abce52fc Mon Sep 17 00:00:00 2001 From: Gabriel Torres <127896538+Gabe-Torres@users.noreply.github.com> Date: Thu, 27 Feb 2025 22:55:35 -0600 Subject: [PATCH 3/4] bug-fix: duplicating copy right year add: "data: { turbo: "false" }" on adoptable pet link. --- app/views/organizations/home/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/organizations/home/index.html.erb b/app/views/organizations/home/index.html.erb index 8db2ed0a6..173b46f83 100644 --- a/app/views/organizations/home/index.html.erb +++ b/app/views/organizations/home/index.html.erb @@ -37,7 +37,7 @@
<% @pets.each do |pet| %> - <%= link_to adoptable_pet_path(pet) do %> + <%= link_to adoptable_pet_path(pet), data: { turbo: "false" } do %>