File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 11AllCops :
22 TargetRubyVersion : 3.1
3+ NewCops : enable
4+ SuggestExtensions : false
5+
6+ plugins :
7+ - rubocop-minitest
8+
9+ Layout/LineLength :
10+ Max : 200
311
412Style/StringLiterals :
513 EnforcedStyle : double_quotes
614
715Style/StringLiteralsInInterpolation :
816 EnforcedStyle : double_quotes
17+
18+ # Relax some metrics for reasonable code
19+ Metrics/ClassLength :
20+ Max : 150
21+
22+ Metrics/MethodLength :
23+ Max : 30
24+
25+ Metrics/AbcSize :
26+ Max : 35
27+
28+ # Allow development dependencies in gemspec for gems
29+ Gemspec/DevelopmentDependencies :
30+ Enabled : false
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def authenticate_user_with_token(jwt_token)
7171 return unless token_valid? ( decoded_token )
7272
7373 user = find_user_from_token ( decoded_token )
74- set_current_user ( user ) if user
74+ assign_current_user ( user ) if user
7575 end
7676
7777 def token_valid? ( decoded_token )
@@ -88,7 +88,7 @@ def find_user_from_token(decoded_token)
8888 user
8989 end
9090
91- def set_current_user ( user )
91+ def assign_current_user ( user )
9292 FastMcpJwtAuth . config . current_user_setter &.call ( user )
9393 end
9494
Original file line number Diff line number Diff line change @@ -17,11 +17,13 @@ def teardown
1717
1818 def test_patch_is_applied
1919 create_configured_transport
20+
2021 assert_predicate FastMcpJwtAuth ::RackTransportPatch , :patch_applied?
2122 end
2223
2324 def test_transport_has_patched_methods
2425 transport = create_configured_transport
26+
2527 assert_respond_to transport , :handle_mcp_request
2628 end
2729
@@ -51,6 +53,7 @@ def test_jwt_authentication_disabled_ignores_header
5153 # When disabled, patch is not applied at all
5254 FastMcpJwtAuth . configure { |c | c . enabled = false }
5355 FastMcpJwtAuth ::RackTransportPatch . apply_patch!
56+
5457 refute_predicate FastMcpJwtAuth ::RackTransportPatch , :patch_applied?
5558 end
5659
You can’t perform that action at this time.
0 commit comments