Welcome to mirror list, hosted at ThFree Co, Russian Federation.

package_url_shared_contexts.rb « sbom « lib « shared_contexts « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b5c9e9cc7b01f237eb3b787c1ebd8d322c7a7ae9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# frozen_string_literal: true

RSpec.shared_context 'with purl matrix' do
  where do
    {
      'valid RubyGems package URL' => {
        url: 'pkg:gem/ruby-advisory-db-check@0.12.4',
        type: 'gem',
        namespace: nil,
        name: 'ruby-advisory-db-check',
        version: '0.12.4',
        qualifiers: nil,
        subpath: nil
      },
      'valid BitBucket package URL' => {
        url: 'pkg:bitbucket/birkenfeld/pygments-main@244fd47e07d1014f0aed9c',
        type: 'bitbucket',
        namespace: 'birkenfeld',
        name: 'pygments-main',
        version: '244fd47e07d1014f0aed9c',
        qualifiers: nil,
        subpath: nil
      },
      'valid GitHub package URL' => {
        url: 'pkg:github/package-url/purl-spec@244fd47e07d1004f0aed9c',
        type: 'github',
        namespace: 'package-url',
        name: 'purl-spec',
        version: '244fd47e07d1004f0aed9c',
        qualifiers: nil,
        subpath: nil
      },
      'valid Go module URL' => {
        url: 'pkg:golang/google.golang.org/genproto#googleapis/api/annotations',
        type: 'golang',
        namespace: 'google.golang.org',
        name: 'genproto',
        version: nil,
        qualifiers: nil,
        subpath: 'googleapis/api/annotations'
      },
      'valid Maven package URL' => {
        url: 'pkg:maven/org.apache.commons/io@1.3.4',
        type: 'maven',
        namespace: 'org.apache.commons',
        name: 'io',
        version: '1.3.4',
        qualifiers: nil,
        subpath: nil
      },
      'valid NPM package URL' => {
        url: 'pkg:npm/foobar@12.3.1',
        type: 'npm',
        namespace: nil,
        name: 'foobar',
        version: '12.3.1',
        qualifiers: nil,
        subpath: nil
      },
      'valid NuGet package URL' => {
        url: 'pkg:nuget/EnterpriseLibrary.Common@6.0.1304',
        type: 'nuget',
        namespace: nil,
        name: 'EnterpriseLibrary.Common',
        version: '6.0.1304',
        qualifiers: nil,
        subpath: nil
      },
      'valid PyPI package URL' => {
        url: 'pkg:pypi/django@1.11.1',
        type: 'pypi',
        namespace: nil,
        name: 'django',
        version: '1.11.1',
        qualifiers: nil,
        subpath: nil
      },
      'valid RPM package URL' => {
        url: 'pkg:rpm/fedora/curl@7.50.3-1.fc25?arch=i386&distro=fedora-25',
        type: 'rpm',
        namespace: 'fedora',
        name: 'curl',
        version: '7.50.3-1.fc25',
        qualifiers: { 'arch' => 'i386', 'distro' => 'fedora-25' },
        subpath: nil
      },
      'package URL with checksums' => {
        url: 'pkg:rpm/name?checksums=a,b,c',
        type: 'rpm',
        namespace: nil,
        name: 'name',
        version: nil,
        qualifiers: { 'checksums' => %w[a b c] },
        subpath: nil
      }
    }
  end
end