Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Adoptions #5356

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Remove Adoptions #5356

wants to merge 6 commits into from

Conversation

martinemde
Copy link
Member

See the Remove Adoptions RFC for more details.

@martinemde martinemde force-pushed the martinemde/remove-adoption branch from ca2badc to d269e95 Compare December 21, 2024 21:08
Copy link

codecov bot commented Dec 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.00%. Comparing base (0b6886d) to head (4180bf7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5356      +/-   ##
==========================================
- Coverage   97.14%   97.00%   -0.14%     
==========================================
  Files         458      451       -7     
  Lines        9584     9396     -188     
==========================================
- Hits         9310     9115     -195     
- Misses        274      281       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martinemde martinemde force-pushed the martinemde/remove-adoption branch 2 times, most recently from 98fd9f0 to fc49e12 Compare December 22, 2024 22:54
@simi simi force-pushed the martinemde/remove-adoption branch from 91b4e85 to a995d64 Compare January 1, 2025 12:31
@simi
Copy link
Member

simi commented Jan 2, 2025

@martinemde I have updated few bits to make tests and linters passing again. OK to consider ready for review?

@martinemde martinemde marked this pull request as ready for review January 2, 2025 21:17
@martinemde
Copy link
Member Author

Thanks for your help @simi. I think it’s ready.

@simi simi force-pushed the martinemde/remove-adoption branch from 45e8800 to 4180bf7 Compare January 2, 2025 21:27
@simi
Copy link
Member

simi commented Jan 3, 2025

@martinemde seems reported missing coverage is related to removed functionality. Tests are passing with following diff. Would it make sense to remove also?

diff --git a/app/helpers/owners_helper.rb b/app/helpers/owners_helper.rb
index a9fcfc214..7cb74e73a 100644
--- a/app/helpers/owners_helper.rb
+++ b/app/helpers/owners_helper.rb
@@ -18,10 +18,4 @@ module OwnersHelper
       image_tag("/images/check.svg")
     end
   end
-
-  def sanitize_note(text)
-    options = RDoc::Options.new
-    options.pipe = true
-    simple_format RDoc::Markup.new.convert(text, RDoc::Markup::ToHtml.new(options))
-  end
 end
diff --git a/app/policies/application_policy.rb b/app/policies/application_policy.rb
index d7bf716f2..e7e80d611 100644
--- a/app/policies/application_policy.rb
+++ b/app/policies/application_policy.rb
@@ -31,11 +31,6 @@ class ApplicationPolicy
     false
   end
 
-  def allow
-    @error = nil
-    true
-  end
-
   def current_user?(record_user)
     user && user == record_user
   end
@@ -59,9 +54,4 @@ class ApplicationPolicy
 
   def policy!(user, record) = Pundit.policy!(user, record)
   def user_policy!(record) = policy!(user, record)
-
-  def user_authorized?(record, action)
-    policy = user_policy!(record)
-    policy.send(action) || deny(policy.error)
-  end

@martinemde
Copy link
Member Author

martinemde commented Jan 4, 2025

@simi might as well. We can add it back if needed later.

color: white;
background-color: #e9573f;
}

.adoption__heading {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this not being removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s used elsewhere. Probably it should be renamed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants