Skip to content

adding factory methods for PathPattern#807

Closed
noodlze wants to merge 1 commit into
line:masterfrom
noodlze:test
Closed

adding factory methods for PathPattern#807
noodlze wants to merge 1 commit into
line:masterfrom
noodlze:test

Conversation

@noodlze

@noodlze noodlze commented Feb 17, 2023

Copy link
Copy Markdown

This is a draft of my implementation for the issue #659.
I still need to add tests.
I added the following methods:

  • PathPattern#endsWith
  • PathPattern.under
  • PathPattern#of accepting PathPattern... pathPatterns
PathPattern.of(PatternPattern.of("json"), PathPattern.startsWith("/foo/bar"));

I added PathPatternBuilder class to support combining existing patterns:

// /foo/bar/**/*.json
PathPattern.startsWith("/foo/bar").endsWith("json"); // or 
PathPattern.builder()
           .startsWith("/foo/bar")
           .endsWith("json")
           .build();

@CLAassistant

CLAassistant commented Feb 17, 2023

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented Feb 17, 2023

Copy link
Copy Markdown

Codecov Report

Base: 65.71% // Head: 65.56% // Decreases project coverage by -0.16% ⚠️

Coverage data is based on head (3e4eb71) compared to base (bda3bec).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #807      +/-   ##
============================================
- Coverage     65.71%   65.56%   -0.16%     
  Complexity     3289     3289              
============================================
  Files           350      351       +1     
  Lines         13731    13766      +35     
  Branches       1488     1492       +4     
============================================
+ Hits           9024     9026       +2     
- Misses         3863     3896      +33     
  Partials        844      844              
Impacted Files Coverage Δ
.../com/linecorp/centraldogma/common/PathPattern.java 28.57% <0.00%> (-71.43%) ⬇️
...necorp/centraldogma/common/PathPatternBuilder.java 0.00% <0.00%> (ø)
...ient/armeria/legacy/LegacyCentralDogmaBuilder.java 81.48% <0.00%> (-3.71%) ⬇️
...al/storage/repository/cache/CachingRepository.java 95.31% <0.00%> (+0.78%) ⬆️
...r/internal/admin/auth/FileBasedSessionManager.java 77.69% <0.00%> (+1.43%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@noodlze noodlze marked this pull request as draft February 17, 2023 07:30
@noodlze

noodlze commented Feb 22, 2023

Copy link
Copy Markdown
Author

Replaced by #809

@noodlze noodlze closed this Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants