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

Added flipper, so admin could enable or disable mhc calculator #969

Merged
merged 2 commits into from
Nov 24, 2024

Conversation

SleekMutt
Copy link
Contributor

@SleekMutt SleekMutt commented Nov 22, 2024

unknown_2024.11.22-19.21_1.mp4

Code reviewers

Summary of issue

There is no feature flipper for the mhc calculator

Summary of change

Added feature flipper for the mhc calculator

CHECK LIST

  • СI passed
  • Сode coverage >=95%
  • PR is reviewed manually again (to make sure you have 100% ready code)
  • All reviewers agreed to merge the PR
  • I've checked new feature as logged in and logged out user if needed
  • PR meets all conventions

@SleekMutt SleekMutt added the enhancement New feature or request label Nov 22, 2024
@SleekMutt SleekMutt self-assigned this Nov 22, 2024
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.79%. Comparing base (f73b6d8) to head (a663d87).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #969      +/-   ##
===========================================
+ Coverage    91.76%   91.79%   +0.03%     
===========================================
  Files           73       73              
  Lines         1044     1048       +4     
===========================================
+ Hits           958      962       +4     
  Misses          86       86              

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


🚨 Try these New Features:

@@ -52,4 +53,8 @@ def collection
def resource
collection.friendly.find(params[:slug])
end

def check_mhc_flipper
raise ActionController::RoutingError, "Mhc calculator flipper is disabled" unless Flipper[:mhc_calculator_status].enabled?
Copy link
Collaborator

Choose a reason for hiding this comment

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

404 має бути

Copy link
Collaborator

Choose a reason for hiding this comment

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

і краще спочатку умову мати з ретурном, а вже знизу от наприклад редірект, чи рейзання ерори, чи ще щось

@SleekMutt SleekMutt merged commit a6b2208 into develop Nov 24, 2024
7 checks passed
@SleekMutt SleekMutt deleted the add-feature-flag-for-mhc branch November 24, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants