• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

KSP-CKAN / CKAN / 16212120896

11 Jul 2025 04:53AM UTC coverage: 47.831% (+0.04%) from 47.792%
16212120896

push

github

HebaruSan
Merge #4407 Lookback for version_from_asset

3901 of 8740 branches covered (44.63%)

Branch coverage included in aggregate %.

27 of 37 new or added lines in 4 files covered. (72.97%)

1 existing line in 1 file now uncovered.

8373 of 16921 relevant lines covered (49.48%)

1.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.0
/Netkan/Model/RemoteRef.cs
1
using System.Text.RegularExpressions;
2

3
namespace CKAN.NetKAN.Model
4
{
5
    internal class RemoteRef
6
    {
7
         public RemoteRef(string remoteRefToken)
2✔
8
        {
2✔
9
            if (Pattern.Match(remoteRefToken) is Match { Success: true } match)
2!
10
            {
2✔
11
                Source  = match.Groups["source"].Value;
2✔
12
                Id      = match.Groups["id"].Value;
2✔
13
                _string = remoteRefToken;
2✔
14
            }
2✔
15
            else
NEW
16
            {
×
NEW
17
                throw new Kraken(string.Format(@"Could not parse reference: ""{0}""",
×
18
                                               remoteRefToken));
19
            }
20
        }
2✔
21

22
        public RemoteRef(RemoteRef remoteRef)
2✔
23
        {
2✔
24
            Source  = remoteRef.Source;
2✔
25
            Id      = remoteRef.Id;
2✔
26
            _string = remoteRef.ToString();
2✔
27
        }
2✔
28

29
        public override string ToString()
30
            => _string;
2✔
31

32
        public static explicit operator RemoteRef(string rref)
33
        {
2✔
34
            return new RemoteRef(rref);
2✔
35
        }
2✔
36

37
        public string  Source { get; private set; }
38
        public string? Id     { get; private set; }
39

40
        private static readonly Regex Pattern = new Regex(
2✔
41
            @"^#/ckan/(?<source>[^/]+)(?:/(?<id>.+))?",
42
            RegexOptions.Compiled);
43

44
        private readonly string _string;
45
    }
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc