7 |
8 |
9 |
10 | Watch for releases of your favorite projects
11 |
12 |
We all have our favorite projects and we all like to use their
13 | latest versions with their latest features. However, it is hard
14 | to keep in touch with all of them and be informed when they
15 | release a new version. Anitya can help!
16 |
17 |
18 |
19 |
20 |
21 |
22 |
Announce
23 |
We monitor upstream releases and broadcast them on
24 | Fedora messaging bus.
25 |
26 |
27 |
Search
28 |
Currently {{ total }} projects are being monitored by Anitya.
29 | Your project of interest might be there, or not. To check it
30 | browse the list of all projects
31 | or simply search for them!
32 |
36 |
You may use * to search for pattern (ie: py*).
37 |
38 |
39 |
40 | {% endblock %}
41 |
42 | {% block jscript %}
43 |
44 | {% endblock %}
45 |
--------------------------------------------------------------------------------
/anitya/templates/login.html:
--------------------------------------------------------------------------------
1 | {% extends "master.html" %}
2 |
3 | {% block title %}Login · Anitya{% endblock %}
4 |
5 | {% block body %}
6 |
14 | {% endblock %}
15 |
--------------------------------------------------------------------------------
/anitya/templates/login_debug.html:
--------------------------------------------------------------------------------
1 | {% extends "master.html" %}
2 |
3 | {% block title %}Login · Anitya{% endblock %}
4 |
5 | {% block body %}
6 |
14 | {% endblock %}
15 |
--------------------------------------------------------------------------------
/anitya/templates/logs.html:
--------------------------------------------------------------------------------
1 | {% extends "master.html" %}
2 |
3 | {% block title %}Logs · Anitya{% endblock %}
4 |
5 | {%block header %}
6 | {% if refresh %}
7 |
8 | {% endif %}
9 | {% endblock %}
10 |
11 |
12 | {% block body %}
13 |
14 |
31 |
32 |
33 |
34 | {% if total_page > 1 %}
35 |
60 | {% endif %}
61 |
62 |
63 |
64 |
65 |
66 |
67 | Name
68 | Updated
69 | Status
70 | Description
71 |
72 | {% for project in projects %}
73 |
74 |
75 |
76 | {{ project.name }}
77 |
78 |
79 | {{ project.last_check.strftime('%Y-%m-%d %H:%M:%S') }} (UTC)
80 |
81 | {% if project.check_successful is none %}
82 | Not updated
83 | {% elif not project.check_successful %}
84 | Fail
85 | {% else %}
86 | OK
87 | {% endif %}
88 | {{ project.logs }}
89 |
90 | {% endfor %}
91 |
92 |
93 | {% endblock %}
94 |
--------------------------------------------------------------------------------
/anitya/templates/mapping.html:
--------------------------------------------------------------------------------
1 | {% extends "master.html" %}
2 | {% from "functions.html" import render_field_in_row %}
3 |
4 | {% block title %}Distribution Mapping · Anitya{% endblock %}
5 |
6 | {% block body %}
7 |
8 |
11 |
12 |
13 | {% if package %}
14 |
53 |
54 |
55 |
56 |
57 | Missing your favorite distribution?
58 | You can add it through distros
59 |
60 |
61 |
62 |
63 | {% endblock %}
64 |
65 | {% block jscript %}
66 |
71 | {% endblock %}
72 |
--------------------------------------------------------------------------------
/anitya/templates/project_flag.html:
--------------------------------------------------------------------------------
1 | {% extends "master.html" %}
2 | {% from "functions.html" import render_field_in_row %}
3 |
4 | {% block title %}Flag Project · Anitya{% endblock %}
5 |
6 | {% block body %}
7 |
8 |
11 |
38 | {% endblock %}
39 |
--------------------------------------------------------------------------------
/anitya/templates/project_versions_delete.html:
--------------------------------------------------------------------------------
1 | {% extends "master.html" %}
2 |
3 | {% block body %}
4 |
5 |
8 |
9 |
40 |
41 | {% endblock %}
42 |
--------------------------------------------------------------------------------
/anitya/templates/regex_delete.html:
--------------------------------------------------------------------------------
1 | {% extends "master.html" %}
2 |
3 | {% block body %}
4 |
5 |
8 |
9 |
50 |
51 | {% endblock %}
52 |
--------------------------------------------------------------------------------
/anitya/templates/settings.html:
--------------------------------------------------------------------------------
1 | {% extends "master.html" %}
2 |
3 | {% block title %}Settings · Anitya{% endblock %}
4 |
5 |
6 | {% block body %}
7 |
8 |
9 | User ID
10 |
11 |
12 | Your user ID is {{ user.id }}
13 |
14 |
15 |
16 |
17 |
18 | API Tokens
19 |
20 |
21 | API keys are tokens used to authenticate you when using the REST API.
22 | These keys are like passwords; make sure to store them safely.
23 |
24 |
25 |
26 | {% if user.api_tokens %}
27 |
28 | {% for api_token in user.api_tokens %}
29 |
53 | {% endfor %}
54 |
55 | {% endif %}
56 |
57 |
58 |
72 | {% endblock %}
73 |
--------------------------------------------------------------------------------
/anitya/templates/user_delete.html:
--------------------------------------------------------------------------------
1 | {% extends "master.html" %}
2 | {% from "functions.html" import render_field_in_row %}
3 |
4 | {% block title %}Delete User · Anitya{% endblock %}
5 |
6 | {% block body %}
7 |
8 |
11 |
12 |
23 |
24 | {% endblock %}
25 |
--------------------------------------------------------------------------------
/anitya/templates/version_delete.html:
--------------------------------------------------------------------------------
1 | {% extends "master.html" %}
2 |
3 | {% block body %}
4 |
5 |
8 |
9 |
48 |
49 | {% endblock %}
50 |
--------------------------------------------------------------------------------
/anitya/tests/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #
3 | # Copyright © 2017 Red Hat, Inc.
4 | #
5 | # This copyrighted material is made available to anyone wishing to use,
6 | # modify, copy, or redistribute it subject to the terms and conditions
7 | # of the GNU General Public License v.2, or (at your option) any later
8 | # version. This program is distributed in the hope that it will be
9 | # useful, but WITHOUT ANY WARRANTY expressed or implied, including the
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 | # PURPOSE. See the GNU General Public License for more details. You
12 | # should have received a copy of the GNU General Public License along
13 | # with this program; if not, write to the Free Software Foundation,
14 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 | #
16 | # Any Red Hat trademarks that are incorporated in the source
17 | # code or documentation are not subject to the GNU General Public
18 | # License and may only be used or replicated with the express permission
19 | # of Red Hat, Inc.
20 | #
21 | """
22 | Anitya tests.
23 | """
24 |
--------------------------------------------------------------------------------
/anitya/tests/db/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/anitya/1ea6ac8b6a7a4f3d36caf12e36449adf02e4f4df/anitya/tests/db/__init__.py
--------------------------------------------------------------------------------
/anitya/tests/lib/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/anitya/1ea6ac8b6a7a4f3d36caf12e36449adf02e4f4df/anitya/tests/lib/__init__.py
--------------------------------------------------------------------------------
/anitya/tests/lib/backends/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/anitya/1ea6ac8b6a7a4f3d36caf12e36449adf02e4f4df/anitya/tests/lib/backends/__init__.py
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_cran.CranBackendTests.test_get_version:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.11.0 at release-monitoring.org]
10 | method: GET
11 | uri: https://crandb.r-pkg.org/whisker
12 | response:
13 | body: {string: !!python/unicode '{"Package":"whisker","Maintainer":"Edwin de Jonge
14 |
","License":"GPL-3","Title":"{{mustache}} for R, logicless
15 | templating","Type":"Package","LazyLoad":"yes","Author":"Edwin de Jonge","Description":"logicless
16 | templating, reuse templates in many programminglanguages including
17 | R","Version":"0.3-2","URL":"http://github.com/edwindj/whisker","Date":"2010-12-23","Collate":"''whisker.R''
18 | ''section.R'' ''parseTemplate.R'' ''partials.R''''inverted.R'' ''pkg.R''
19 | ''iteratelist.R'' ''delim.R'' ''markdown.R''''rowsplit.R''","Repository":"CRAN","Date/Publication":"2013-04-28
20 | 07:55:20","crandb_file_date":"2013-04-28 01:55:21","Suggests":{"markdown":"*"},"Packaged":"2013-04-27
21 | 22:49:33 UTC; Edwin","NeedsCompilation":"no","date":"2013-04-28T07:55:20+00:00","releases":["3.0.1","3.0.2","3.0.3","3.1.0","3.1.1"]}'}
22 | headers:
23 | connection: [keep-alive]
24 | content-length: ['827']
25 | content-type: [application/json]
26 | date: ['Wed, 14 Mar 2018 03:43:47 GMT']
27 | etag: ['"9DG53ZQA3SWD31JBGQC35B0FH"']
28 | server: [nginx/1.4.6 (Ubuntu)]
29 | vary: [Accept]
30 | x-couch-request-id: [c392ddd81e]
31 | x-couchdb-body-time: ['0']
32 | status: {code: 200, message: OK}
33 | version: 1
34 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_cran.CranBackendTests.test_get_version_missing_project:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.11.0 at release-monitoring.org]
10 | method: GET
11 | uri: https://crandb.r-pkg.org/non-existent-name-that-cannot-exist
12 | response:
13 | body: {string: !!python/unicode '{"error":"not_found","reason":"document not found"}
14 |
15 | '}
16 | headers:
17 | cache-control: [must-revalidate]
18 | connection: [keep-alive]
19 | content-length: ['52']
20 | content-type: [application/json]
21 | date: ['Wed, 14 Mar 2018 03:43:47 GMT']
22 | server: [nginx/1.4.6 (Ubuntu)]
23 | x-couch-request-id: [7e923005d7]
24 | x-couchdb-body-time: ['0']
25 | status: {code: 404, message: Object Not Found}
26 | version: 1
27 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_cran.CranBackendTests.test_get_versions:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.11.0 at release-monitoring.org]
10 | method: GET
11 | uri: https://crandb.r-pkg.org/whisker/all
12 | response:
13 | body: {string: !!python/unicode '{"_id":"whisker","_rev":"2-25867cf941bf2cf85daeed4d120df5c1","name":"whisker","versions":{"0.1":{"Package":"whisker","Maintainer":"Edwin
14 | de Jonge ","License":"GPL-3","Title":"{{mustache}}
15 | for R, logicless templating","Type":"Package","LazyLoad":"yes","Author":"Edwin
16 | de Jonge","Description":"logicless templating, reuse templates in many programminglanguages
17 | including R","Version":"0.1","URL":"http://github.com/edwindj/whisker","Date":"2010-12-23","Collate":"''whisker.R''
18 | ''section.R'' ''parseTemplate.R'' ''partials.R''''inverted.R'' ''pkg.R''
19 | ''iteratelist.R''","Depends":{},"Repository":"CRAN","Date/Publication":"2011-09-05
20 | 19:37:50","crandb_file_date":"2011-09-05 15:37:53","date":"2011-09-05T19:37:50+00:00","releases":["2.13.2","2.14.0","2.14.1","2.14.2","2.15.0","2.15.1","2.15.2","2.15.3","3.0.0"]},"0.3-2":{"Package":"whisker","Maintainer":"Edwin
21 | de Jonge ","License":"GPL-3","Title":"{{mustache}}
22 | for R, logicless templating","Type":"Package","LazyLoad":"yes","Author":"Edwin
23 | de Jonge","Description":"logicless templating, reuse templates in many programminglanguages
24 | including R","Version":"0.3-2","URL":"http://github.com/edwindj/whisker","Date":"2010-12-23","Collate":"''whisker.R''
25 | ''section.R'' ''parseTemplate.R'' ''partials.R''''inverted.R'' ''pkg.R''
26 | ''iteratelist.R'' ''delim.R'' ''markdown.R''''rowsplit.R''","Repository":"CRAN","Date/Publication":"2013-04-28
27 | 07:55:20","crandb_file_date":"2013-04-28 01:55:21","Suggests":{"markdown":"*"},"Packaged":"2013-04-27
28 | 22:49:33 UTC; Edwin","NeedsCompilation":"no","date":"2013-04-28T07:55:20+00:00","releases":["3.0.1","3.0.2","3.0.3","3.1.0","3.1.1"]}},"timeline":{"0.1":"2011-09-05T19:37:50+00:00","0.3-2":"2013-04-28T07:55:20+00:00"},"latest":"0.3-2","title":"{{mustache}}
29 | for R, logicless templating","archived":false,"revdeps":8}'}
30 | headers:
31 | connection: [keep-alive]
32 | content-length: ['1853']
33 | content-type: [application/json]
34 | date: ['Wed, 14 Mar 2018 03:43:48 GMT']
35 | etag: ['"9DG53ZQA3SWD31JBGQC35B0FH"']
36 | server: [nginx/1.4.6 (Ubuntu)]
37 | vary: [Accept]
38 | x-couch-request-id: [32c7928dfd]
39 | x-couchdb-body-time: ['0']
40 | status: {code: 200, message: OK}
41 | version: 1
42 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_cran.CranBackendTests.test_get_versions_missing_project:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.11.0 at release-monitoring.org]
10 | method: GET
11 | uri: https://crandb.r-pkg.org/non-existent-name-that-cannot-exist/all
12 | response:
13 | body: {string: !!python/unicode '{"error":"not_found","reason":"document not found"}
14 |
15 | '}
16 | headers:
17 | cache-control: [must-revalidate]
18 | connection: [keep-alive]
19 | content-length: ['52']
20 | content-type: [application/json]
21 | date: ['Wed, 14 Mar 2018 03:43:48 GMT']
22 | server: [nginx/1.4.6 (Ubuntu)]
23 | x-couch-request-id: [222d1ea70e]
24 | x-couchdb-body-time: ['0']
25 | status: {code: 404, message: Object Not Found}
26 | version: 1
27 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_crates.CratesBackendTests.test_get_ordered_versions:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.10.1 at release-monitoring.org]
10 | method: GET
11 | uri: https://crates.io/api/v1/crates/itoa/versions
12 | response:
13 | body:
14 | string: !!binary |
15 | H4sIAAAAAAAAA6WU226DMAyG3yXXQJxwGnkOrjpNKGpSFZUFxKHThHj3GbR2MEFHurs4cWz/X36l
16 | J1ddN3lpGiJee3KsZauJIHlbSuJgqDFWmWxxjwOLXWAuj1IIBXDBkwPmqCKrZHvGBCqrnF4ZnYo0
17 | dKxBweMeo6r8MEUp1Zj+vcR+HF4ccsIOXa0x7AeH5IqIwPfDwCFFbi7jLpFdey5rXD5ocMvB+rrS
18 | RmlzzMeaD64sEp0bhmw236PLdxU4tOnesdOkFAV2lfqT2ac0F41ST7Jo9ODs5B6kACKIRAj7uMMW
19 | dwbr3Flkxx2oNXecaf5Adtx/BDVkwR02uS+Z2XKPXIhcHqacC8ZEuMvvbNvvSRzzZA09T1jMLSw/
20 | 9rBEP431LPq5pgV6PFhBv4btafTIHYTv77E887Ys77Mt7Hiw+6cZ61tj/4fj53p+YV9z/B37DNkS
21 | +9vwBZMkJG7wBQAA
22 | headers:
23 | connection: [keep-alive]
24 | content-encoding: [gzip]
25 | content-type: [application/json; charset=utf-8]
26 | date: ['Thu, 26 Jan 2017 22:04:29 GMT']
27 | server: [nginx]
28 | set-cookie: [cargo_session=--3Mz45cH3itfVkmY41+nVjWRm9+0=; HttpOnly; Secure;
29 | Path=/]
30 | strict-transport-security: [max-age=31536000]
31 | via: [1.1 vegur]
32 | status: {code: 200, message: OK}
33 | version: 1
34 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_crates.CratesBackendTests.test_get_version:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | Cookie: [cargo_session=--3Mz45cH3itfVkmY41+nVjWRm9+0=]
9 | From: [admin@fedoraproject.org]
10 | User-Agent: [Anitya 0.10.1 at release-monitoring.org]
11 | method: GET
12 | uri: https://crates.io/api/v1/crates/itoa/versions
13 | response:
14 | body:
15 | string: !!binary |
16 | H4sIAAAAAAAAA6WU226DMAyG3yXXQJxwGnkOrjpNKGpSFZUFxKHThHj3GbR2MEFHurs4cWz/X36l
17 | J1ddN3lpGiJee3KsZauJIHlbSuJgqDFWmWxxjwOLXWAuj1IIBXDBkwPmqCKrZHvGBCqrnF4ZnYo0
18 | dKxBweMeo6r8MEUp1Zj+vcR+HF4ccsIOXa0x7AeH5IqIwPfDwCFFbi7jLpFdey5rXD5ocMvB+rrS
19 | RmlzzMeaD64sEp0bhmw236PLdxU4tOnesdOkFAV2lfqT2ac0F41ST7Jo9ODs5B6kACKIRAj7uMMW
20 | dwbr3Flkxx2oNXecaf5Adtx/BDVkwR02uS+Z2XKPXIhcHqacC8ZEuMvvbNvvSRzzZA09T1jMLSw/
21 | 9rBEP431LPq5pgV6PFhBv4btafTIHYTv77E887Ys77Mt7Hiw+6cZ61tj/4fj53p+YV9z/B37DNkS
22 | +9vwBZMkJG7wBQAA
23 | headers:
24 | connection: [keep-alive]
25 | content-encoding: [gzip]
26 | content-type: [application/json; charset=utf-8]
27 | date: ['Thu, 26 Jan 2017 22:04:30 GMT']
28 | server: [nginx]
29 | set-cookie: [cargo_session=--3Mz45cH3itfVkmY41+nVjWRm9+0=; HttpOnly; Secure;
30 | Path=/]
31 | strict-transport-security: [max-age=31536000]
32 | via: [1.1 vegur]
33 | status: {code: 200, message: OK}
34 | version: 1
35 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_crates.CratesBackendTests.test_get_version_missing:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | Cookie: [cargo_session=--3Mz45cH3itfVkmY41+nVjWRm9+0=]
9 | From: [admin@fedoraproject.org]
10 | User-Agent: [Anitya 0.10.1 at release-monitoring.org]
11 | method: GET
12 | uri: https://crates.io/api/v1/crates/pleasedontmakethisprojectitllbreakmytests/versions
13 | response:
14 | body: {string: !!python/unicode '{"errors":[{"detail":"Not Found"}]}'}
15 | headers:
16 | connection: [keep-alive]
17 | content-length: ['35']
18 | content-type: [application/json; charset=utf-8]
19 | date: ['Thu, 26 Jan 2017 22:04:30 GMT']
20 | server: [nginx]
21 | set-cookie: [cargo_session=--3Mz45cH3itfVkmY41+nVjWRm9+0=; HttpOnly; Secure;
22 | Path=/]
23 | via: [1.1 vegur]
24 | status: {code: 404, message: Not Found}
25 | version: 1
26 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_crates.CratesBackendTests.test_get_versions:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | Cookie: [cargo_session=--3Mz45cH3itfVkmY41+nVjWRm9+0=]
9 | From: [admin@fedoraproject.org]
10 | User-Agent: [Anitya 0.10.1 at release-monitoring.org]
11 | method: GET
12 | uri: https://crates.io/api/v1/crates/itoa/versions
13 | response:
14 | body:
15 | string: !!binary |
16 | H4sIAAAAAAAAA6WU226DMAyG3yXXQJxwGnkOrjpNKGpSFZUFxKHThHj3GbR2MEFHurs4cWz/X36l
17 | J1ddN3lpGiJee3KsZauJIHlbSuJgqDFWmWxxjwOLXWAuj1IIBXDBkwPmqCKrZHvGBCqrnF4ZnYo0
18 | dKxBweMeo6r8MEUp1Zj+vcR+HF4ccsIOXa0x7AeH5IqIwPfDwCFFbi7jLpFdey5rXD5ocMvB+rrS
19 | RmlzzMeaD64sEp0bhmw236PLdxU4tOnesdOkFAV2lfqT2ac0F41ST7Jo9ODs5B6kACKIRAj7uMMW
20 | dwbr3Flkxx2oNXecaf5Adtx/BDVkwR02uS+Z2XKPXIhcHqacC8ZEuMvvbNvvSRzzZA09T1jMLSw/
21 | 9rBEP431LPq5pgV6PFhBv4btafTIHYTv77E887Ys77Mt7Hiw+6cZ61tj/4fj53p+YV9z/B37DNkS
22 | +9vwBZMkJG7wBQAA
23 | headers:
24 | connection: [keep-alive]
25 | content-encoding: [gzip]
26 | content-type: [application/json; charset=utf-8]
27 | date: ['Thu, 26 Jan 2017 22:04:31 GMT']
28 | server: [nginx]
29 | set-cookie: [cargo_session=--3Mz45cH3itfVkmY41+nVjWRm9+0=; HttpOnly; Secure;
30 | Path=/]
31 | strict-transport-security: [max-age=31536000]
32 | via: [1.1 vegur]
33 | status: {code: 200, message: OK}
34 | version: 1
35 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_debian.DebianBackendtests.test_get_versions_http_404:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.10.1 at release-monitoring.org]
10 | method: GET
11 | uri: http://ftp.debian.org/debian/pool/main/f/foo/
12 | response:
13 | body: {string: !!python/unicode '
14 |
15 |
16 |
17 | 404 Not Found
18 |
19 |
20 |
21 | Not Found
22 |
23 | The requested URL /debian/pool/main/f/foo/ was not found on this server.
24 |
25 |
26 |
27 | Apache Server at ftp.debian.org Port 80
28 |
29 |
30 |
31 | '}
32 | headers:
33 | connection: [Keep-Alive]
34 | content-length: ['285']
35 | content-type: [text/html; charset=iso-8859-1]
36 | date: ['Wed, 11 Jan 2017 21:14:13 GMT']
37 | keep-alive: ['timeout=5, max=100']
38 | server: [Apache]
39 | status: {code: 404, message: Not Found}
40 | version: 1
41 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_debian.DebianBackendtests.test_get_versions_no_z_release:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.10.1 at release-monitoring.org]
10 | method: GET
11 | uri: http://ftp.debian.org/debian/pool/main/libg/libgnupg-interface-perl/
12 | response:
13 | body:
14 | string: !!binary |
15 | H4sIAAAAAAAAA8WYXW+bMBSG7/crzrjYHdiYjy4pYeqSTovWplGbaZqmqXLAAasEkHG7tr9+JiQa
16 | XZuEREjc5EO8Pnmf43N8FHvvR1fD2c/pOXydXV7A9Pvni/EQNB2hH9YQodFsVD2wDAJfeEoThM4n
17 | mv/Oi+Uy8d+BFzMaqnfwJJcJ88dpyB4hWwAK2ZzTFOVZlqAl5SlK+DxavaT3eaTzVDKxoAHTcyYS
18 | D1XLVUC0jujNs/Cp/CHz+KBq7coana9ilx+F78kYHmjCo3SgySzXfI8vIyhEMNAQD7K0QPOEpndG
19 | xBca0EQOtF/j4dVvpUMyLlf7HoVYsMVA+zQcTE6vBiPNn9Al8xB9W3OpNGeaf0ELCcss5AvOwq3i
20 | m0p8w59rAZHyXfcfZEmRUwVgK1uxqKsqSbgPkQYvCKdn1+eT2Wh8XXGGZYh/trbkXfOnVLBUwogL
21 | FshMPK0dV8s/pPMiP918hbUfwaNYaj6ADtWjA1wH2TIXrChYWPeu8vKm6y1lcYsN29FNo2IyJBVG
22 | 9Kz5h6jrmP9xEWyauol14oLZ65snAFuEjkG+HZyA+/Quzf6kbdAXwX7mImiDlHRKekuTpNy9fbQb
23 | XRvEcGIfTtxecRuZ8tGosOvKVsBdt6OtdrBu1Zv0cSf5a/VuelvHPR2bJb3KwfaWtjql393SG00b
24 | pMQwOyRt0tJ1XRvER1V2Wy3t4KYt/VK5F9zSTRsI7uNd4F2d3g7RnQNa+pV6N71bbrs6yhS9bW+n
25 | N7ul39PSa00bpMQ4Yma1RtqopWu6hsRWH+Pte+v0uiN2D6ps97DKVtOaWEBI39zR1wR3Sr+3st0m
26 | ld2ElBhOh6QNK9ttWtlrYmvnqXVMZbc2rEjjYUWaDytHx7ZOTgD3+pbTdFg1/MeM1hcEHg3DMgP+
27 | WU6DmMENEw9MAJWwkPmmAzMRwTQTEj5i5Xi9QMVYXVd4qLoX+QsB6Ia/VxEAAA==
28 | headers:
29 | connection: [Keep-Alive]
30 | content-encoding: [gzip]
31 | content-length: ['730']
32 | content-type: [text/html;charset=UTF-8]
33 | date: ['Wed, 11 Jan 2017 21:14:14 GMT']
34 | keep-alive: ['timeout=5, max=100']
35 | server: [Apache]
36 | vary: [Accept-Encoding]
37 | x-clacks-overhead: [GNU Terry Pratchett]
38 | status: {code: 200, message: OK}
39 | version: 1
40 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_gitea.GiteaBackendtests.test_get_versions_project_invalid_owner_repo:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept:
6 | - '*/*'
7 | Accept-Encoding:
8 | - gzip, deflate
9 | Connection:
10 | - keep-alive
11 | From:
12 | - admin@fedoraproject.org
13 | If-modified-since:
14 | - Thu, 01 Jan 1970 00:00:00 GMT
15 | User-Agent:
16 | - Anitya 1.8.1 at release-monitoring.org
17 | method: GET
18 | uri: https://gitea.com/api/v1/repos/project_with_malformed_url/invalid_project/tags
19 | response:
20 | body:
21 | string: '{"errors":["user redirect does not exist [name: project_with_malformed_url]"],"message":"GetUserByName","url":"https://gitea.com/api/swagger"}
22 |
23 | '
24 | headers:
25 | Cache-Control:
26 | - max-age=0, private, must-revalidate, no-transform
27 | Connection:
28 | - keep-alive
29 | Content-Length:
30 | - '143'
31 | Content-Type:
32 | - application/json;charset=utf-8
33 | Date:
34 | - Mon, 11 Sep 2023 09:25:46 GMT
35 | Server:
36 | - Caddy
37 | Vary:
38 | - Origin
39 | X-Content-Type-Options:
40 | - nosniff
41 | X-Frame-Options:
42 | - SAMEORIGIN
43 | status:
44 | code: 404
45 | message: Not Found
46 | version: 1
47 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_github.GithubBackendtests.test_gargoyle:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: !!python/unicode '{"query": "\n{\n repository(owner: \"garglk\", name:
4 | \"garglk\") {\n refs (refPrefix: \"refs/tags/\", last:50,\n orderBy:{field:TAG_COMMIT_DATE,
5 | direction:ASC}) {\n totalCount\n edges {\n cursor\n node
6 | {\n name\n target {\n commitUrl\n }\n }\n }\n }\n }\n rateLimit
7 | {\n limit\n remaining\n resetAt\n }\n}"}'
8 | headers:
9 | Accept: ['*/*']
10 | Accept-Encoding: ['gzip, deflate']
11 | Authorization: [bearer foobar]
12 | Connection: [keep-alive]
13 | Content-Length: ['526']
14 | Content-Type: [application/json]
15 | From: [admin@fedoraproject.org]
16 | User-Agent: [Anitya 0.13.2 at release-monitoring.org]
17 | method: POST
18 | uri: https://api.github.com/graphql
19 | response:
20 | body:
21 | string: !!binary |
22 | H4sIAAAAAAAAA62TTWsbQQyG/8uc7VjzoflYyCH02gQK7aWlh/nQbJasvWF3TCnG/71aTKHU4Itz
23 | 0oz0SjyIVydRYouiO4mZ3qdlaNP8+/Kryxrb1OL4aToemujsRlDpifM/TiIf52WaRSeevzw+io04
24 | TIXWhkPccxRLi2mkrQKwEKRjQYtzTzyFW6f9fmjf5pF1r629L91u1w/t9ZgeuLTrWTi+/Q0X8c57
25 | byvakKSx3lMkKEUigquOwKHSKZrqpBTn83nzL11/m85LpfBuOk3Byoi+moq5Mk+lmgrabGPVtlgH
26 | QWUFeEX36zZdAP8BdClm3pALiaz2OScrgRwZUjqiK4nAJqOTz//TvTzdpJPwIO/enKeiChksLhhp
27 | kq/RR5WMKz4iplCcskb7Gq7YbruO2dTdbDWgttKjSWDYZxWUDklbdNWCwZRTAMO+9Fdstz0n5Qfs
28 | jUwGysGR4oVBrOSYpbqEOiiDaBH4JqJXK9tPPgkxx0afB7679QLHywMBgCu0j8NhOPSiMyGENbFQ
29 | e2KhUCD9VsJWhq/gO2M7o7+vE/8ACBNMojYEAAA=
30 | headers:
31 | access-control-allow-origin: ['*']
32 | access-control-expose-headers: ['ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit,
33 | X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes,
34 | X-Poll-Interval']
35 | cache-control: [no-cache]
36 | content-encoding: [gzip]
37 | content-security-policy: [default-src 'none']
38 | content-type: [application/json; charset=utf-8]
39 | date: ['Fri, 19 Oct 2018 08:07:04 GMT']
40 | referrer-policy: ['origin-when-cross-origin, strict-origin-when-cross-origin']
41 | server: [GitHub.com]
42 | status: [200 OK]
43 | strict-transport-security: [max-age=31536000; includeSubdomains; preload]
44 | x-accepted-oauth-scopes: [repo]
45 | x-content-type-options: [nosniff]
46 | x-frame-options: [deny]
47 | x-github-media-type: [github.v4; format=json]
48 | x-github-request-id: ['52D0:1EF5:307D4FD:707BA77:5BC990A7']
49 | x-oauth-scopes: ['repo:status']
50 | x-ratelimit-limit: ['5000']
51 | x-ratelimit-remaining: ['5000']
52 | x-ratelimit-reset: ['1539938803']
53 | x-xss-protection: [1; mode=block]
54 | status: {code: 200, message: OK}
55 | version: 1
56 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_github.GithubBackendtests.test_get_version_invalid_unknown_project:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: '{"query": "\n{\n repository(owner: \"foobar\", name: \"bar\") {\n refs
4 | (refPrefix: \"refs/tags/\", orderBy: {field: TAG_COMMIT_DATE, direction: ASC},
5 | last: 50) {\n totalCount\n edges {\n cursor\n node
6 | {\n name target { commitUrl }\n }\n }\n }\n }\n rateLimit
7 | {\n limit\n remaining\n resetAt\n }\n}"}'
8 | headers:
9 | Accept:
10 | - '*/*'
11 | Accept-Encoding:
12 | - gzip, deflate
13 | Authorization:
14 | - bearer foobar
15 | Connection:
16 | - keep-alive
17 | Content-Length:
18 | - '443'
19 | Content-Type:
20 | - application/json
21 | From:
22 | - admin@fedoraproject.org
23 | If-modified-since:
24 | - Thu, 01 Jan 1970 00:00:00 GMT
25 | User-Agent:
26 | - Anitya 0.17.2 at release-monitoring.org
27 | method: POST
28 | uri: https://api.github.com/graphql
29 | response:
30 | body:
31 | string: '{"data":{"repository":null,"rateLimit":{"limit":5000,"remaining":4999,"resetAt":"2019-12-17T17:52:30Z"}},"errors":[{"type":"NOT_FOUND","path":["repository"],"locations":[{"line":3,"column":5}],"message":"Could
32 | not resolve to a Repository with the name ''bar''."}]}'
33 | headers:
34 | Access-Control-Allow-Origin:
35 | - '*'
36 | Access-Control-Expose-Headers:
37 | - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining,
38 | X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval,
39 | X-GitHub-Media-Type
40 | Cache-Control:
41 | - no-cache
42 | Content-Security-Policy:
43 | - default-src 'none'
44 | Content-Type:
45 | - application/json; charset=utf-8
46 | Date:
47 | - Tue, 17 Dec 2019 16:52:30 GMT
48 | Referrer-Policy:
49 | - origin-when-cross-origin, strict-origin-when-cross-origin
50 | Server:
51 | - GitHub.com
52 | Status:
53 | - 200 OK
54 | Strict-Transport-Security:
55 | - max-age=31536000; includeSubdomains; preload
56 | Transfer-Encoding:
57 | - chunked
58 | X-Accepted-OAuth-Scopes:
59 | - repo
60 | X-Content-Type-Options:
61 | - nosniff
62 | X-Frame-Options:
63 | - deny
64 | X-GitHub-Media-Type:
65 | - github.v4; format=json
66 | X-GitHub-Request-Id:
67 | - 625C:1B2D:76A45:119EF4:5DF907CD
68 | X-OAuth-Scopes:
69 | - ''
70 | X-RateLimit-Limit:
71 | - '5000'
72 | X-RateLimit-Remaining:
73 | - '4999'
74 | X-RateLimit-Reset:
75 | - '1576605150'
76 | X-XSS-Protection:
77 | - 1; mode=block
78 | content-length:
79 | - '262'
80 | status:
81 | code: 200
82 | message: OK
83 | version: 1
84 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_github.GithubBackendtests.test_get_versions_invalid_unknown_project:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: '{"query": "\n{\n repository(owner: \"foobar\", name: \"bar\") {\n refs
4 | (refPrefix: \"refs/tags/\", orderBy: {field: TAG_COMMIT_DATE, direction: ASC},
5 | last: 50) {\n totalCount\n edges {\n cursor\n node
6 | {\n name target { commitUrl }\n }\n }\n }\n }\n rateLimit
7 | {\n limit\n remaining\n resetAt\n }\n}"}'
8 | headers:
9 | Accept:
10 | - '*/*'
11 | Accept-Encoding:
12 | - gzip, deflate
13 | Authorization:
14 | - bearer foobar
15 | Connection:
16 | - keep-alive
17 | Content-Length:
18 | - '443'
19 | Content-Type:
20 | - application/json
21 | From:
22 | - admin@fedoraproject.org
23 | If-modified-since:
24 | - Thu, 01 Jan 1970 00:00:00 GMT
25 | User-Agent:
26 | - Anitya 0.17.2 at release-monitoring.org
27 | method: POST
28 | uri: https://api.github.com/graphql
29 | response:
30 | body:
31 | string: '{"data":{"repository":null,"rateLimit":{"limit":5000,"remaining":4990,"resetAt":"2019-12-18T15:26:11Z"}},"errors":[{"type":"NOT_FOUND","path":["repository"],"locations":[{"line":3,"column":5}],"message":"Could
32 | not resolve to a Repository with the name ''bar''."}]}'
33 | headers:
34 | Access-Control-Allow-Origin:
35 | - '*'
36 | Access-Control-Expose-Headers:
37 | - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining,
38 | X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval,
39 | X-GitHub-Media-Type
40 | Cache-Control:
41 | - no-cache
42 | Content-Security-Policy:
43 | - default-src 'none'
44 | Content-Type:
45 | - application/json; charset=utf-8
46 | Date:
47 | - Wed, 18 Dec 2019 14:28:47 GMT
48 | Referrer-Policy:
49 | - origin-when-cross-origin, strict-origin-when-cross-origin
50 | Server:
51 | - GitHub.com
52 | Status:
53 | - 200 OK
54 | Strict-Transport-Security:
55 | - max-age=31536000; includeSubdomains; preload
56 | Transfer-Encoding:
57 | - chunked
58 | Vary:
59 | - Accept-Encoding
60 | X-Accepted-OAuth-Scopes:
61 | - repo
62 | X-Content-Type-Options:
63 | - nosniff
64 | X-Frame-Options:
65 | - deny
66 | X-GitHub-Media-Type:
67 | - github.v4; format=json
68 | X-GitHub-Request-Id:
69 | - 5898:3842D:5BC507:6F58C8:5DFA379E
70 | X-OAuth-Scopes:
71 | - ''
72 | X-RateLimit-Limit:
73 | - '5000'
74 | X-RateLimit-Remaining:
75 | - '4990'
76 | X-RateLimit-Reset:
77 | - '1576682771'
78 | X-XSS-Protection:
79 | - 1; mode=block
80 | content-length:
81 | - '262'
82 | status:
83 | code: 200
84 | message: OK
85 | version: 1
86 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_github.GithubBackendtests.test_get_versions_no_token:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: !!python/unicode '{"query": "\n{\n repository(owner: \"fedora-infra\",
4 | name: \"fedocal\") {\n refs (refPrefix: \"refs/tags/\", last:50,\n orderBy:{field:TAG_COMMIT_DATE,
5 | direction:ASC}) {\n totalCount\n edges {\n cursor\n node
6 | {\n name\n target {\n commitUrl\n }\n }\n }\n }\n }\n rateLimit
7 | {\n limit\n remaining\n resetAt\n }\n}"}'
8 | headers:
9 | Accept: ['*/*']
10 | Accept-Encoding: ['gzip, deflate']
11 | Connection: [keep-alive]
12 | Content-Length: ['533']
13 | Content-Type: [application/json]
14 | From: [admin@fedoraproject.org]
15 | User-Agent: [Anitya 0.12.1 at release-monitoring.org]
16 | method: POST
17 | uri: https://api.github.com/graphql
18 | response:
19 | body: {string: !!python/unicode '{"message":"This endpoint requires you to be
20 | authenticated.","documentation_url":"https://developer.github.com/v3/#authentication"}'}
21 | headers:
22 | access-control-allow-origin: ['*']
23 | access-control-expose-headers: ['ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit,
24 | X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes,
25 | X-Poll-Interval']
26 | content-length: ['131']
27 | content-security-policy: [default-src 'none']
28 | content-type: [application/json; charset=utf-8]
29 | date: ['Fri, 24 Aug 2018 11:44:16 GMT']
30 | referrer-policy: ['origin-when-cross-origin, strict-origin-when-cross-origin']
31 | server: [GitHub.com]
32 | status: [401 Unauthorized]
33 | strict-transport-security: [max-age=31536000; includeSubdomains; preload]
34 | x-content-type-options: [nosniff]
35 | x-frame-options: [deny]
36 | x-github-media-type: [github.v4; format=json]
37 | x-github-request-id: ['BF56:23A8:3340315:62F7CF2:5B7FEF90']
38 | x-ratelimit-limit: ['0']
39 | x-ratelimit-remaining: ['0']
40 | x-ratelimit-reset: ['1535114656']
41 | x-runtime-rack: ['0.011707']
42 | x-xss-protection: [1; mode=block]
43 | status: {code: 401, message: Unauthorized}
44 | version: 1
45 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_github.GithubBackendtests.test_get_versions_no_version_retrieved:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: !!python/unicode '{"query": "\n{\n repository(owner: \"fedora-infra\",
4 | name: \"fpdc\") {\n refs (refPrefix: \"refs/tags/\", last:50,\n orderBy:{field:TAG_COMMIT_DATE,
5 | direction:ASC}) {\n totalCount\n edges {\n cursor\n node
6 | {\n name\n target {\n commitUrl\n }\n }\n }\n }\n }\n rateLimit
7 | {\n limit\n remaining\n resetAt\n }\n}"}'
8 | headers:
9 | Accept: ['*/*']
10 | Accept-Encoding: ['gzip, deflate']
11 | Authorization: [bearer e5f0dbdd06ea34113c3839f32088b42c3fff4186]
12 | Connection: [keep-alive]
13 | Content-Length: ['530']
14 | Content-Type: [application/json]
15 | From: [admin@fedoraproject.org]
16 | User-Agent: [Anitya 0.13.0 at release-monitoring.org]
17 | method: POST
18 | uri: https://api.github.com/graphql
19 | response:
20 | body:
21 | string: !!binary |
22 | H4sIAAAAAAAAAyWKsQrDMAxE/0VzAnJoSu2tdO3YqaGDIGoQJHax1aEY/XsdMt3du1dhJiUIFTJ/
23 | UhFN+Xesd9lTk9J6S9+oELADnhdufHqZdZBJ+S6btKvCepQRsWmZN5IocYFw8t7voLBemwgDukuP
24 | vh/w4TCgD+78BDP7A+uYFqmJAAAA
25 | headers:
26 | access-control-allow-origin: ['*']
27 | access-control-expose-headers: ['ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit,
28 | X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes,
29 | X-Poll-Interval']
30 | cache-control: [no-cache]
31 | content-encoding: [gzip]
32 | content-security-policy: [default-src 'none']
33 | content-type: [application/json; charset=utf-8]
34 | date: ['Thu, 20 Sep 2018 09:09:16 GMT']
35 | referrer-policy: ['origin-when-cross-origin, strict-origin-when-cross-origin']
36 | server: [GitHub.com]
37 | status: [200 OK]
38 | strict-transport-security: [max-age=31536000; includeSubdomains; preload]
39 | x-accepted-oauth-scopes: [repo]
40 | x-content-type-options: [nosniff]
41 | x-frame-options: [deny]
42 | x-github-media-type: [github.v4; format=json]
43 | x-github-request-id: ['6827:3A75:905D22:166C410:5BA363BC']
44 | x-oauth-scopes: ['repo:status']
45 | x-ratelimit-limit: ['5000']
46 | x-ratelimit-remaining: ['5000']
47 | x-ratelimit-reset: ['1537438156']
48 | x-runtime-rack: ['0.107819']
49 | x-xss-protection: [1; mode=block]
50 | status: {code: 200, message: OK}
51 | version: 1
52 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_github.GithubBackendtests.test_get_versions_unauthorized:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: !!python/unicode '{"query": "\n{\n repository(owner: \"fedora-infra\",
4 | name: \"fedocal\") {\n refs (refPrefix: \"refs/tags/\", last:50,\n orderBy:{field:TAG_COMMIT_DATE,
5 | direction:ASC}) {\n totalCount\n edges {\n cursor\n node
6 | {\n name\n target {\n commitUrl\n }\n }\n }\n }\n }\n rateLimit
7 | {\n limit\n remaining\n resetAt\n }\n}"}'
8 | headers:
9 | Accept: ['*/*']
10 | Accept-Encoding: ['gzip, deflate']
11 | Authorization: [bearer Not_found]
12 | Connection: [keep-alive]
13 | Content-Length: ['533']
14 | Content-Type: [application/json]
15 | From: [admin@fedoraproject.org]
16 | User-Agent: [Anitya 0.12.1 at release-monitoring.org]
17 | method: POST
18 | uri: https://api.github.com/graphql
19 | response:
20 | body: {string: !!python/unicode '{"message":"Bad credentials","documentation_url":"https://developer.github.com/v4"}'}
21 | headers:
22 | access-control-allow-origin: ['*']
23 | access-control-expose-headers: ['ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit,
24 | X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes,
25 | X-Poll-Interval']
26 | content-length: ['83']
27 | content-security-policy: [default-src 'none']
28 | content-type: [application/json; charset=utf-8]
29 | date: ['Fri, 24 Aug 2018 11:44:17 GMT']
30 | referrer-policy: ['origin-when-cross-origin, strict-origin-when-cross-origin']
31 | server: [GitHub.com]
32 | status: [401 Unauthorized]
33 | strict-transport-security: [max-age=31536000; includeSubdomains; preload]
34 | x-content-type-options: [nosniff]
35 | x-frame-options: [deny]
36 | x-github-media-type: [github.v4; format=json]
37 | x-github-request-id: ['C4A8:23A5:15B7BE2:314B0A8:5B7FEF90']
38 | x-ratelimit-limit: ['0']
39 | x-ratelimit-remaining: ['0']
40 | x-ratelimit-reset: ['1535114656']
41 | x-runtime-rack: ['0.011671']
42 | x-xss-protection: [1; mode=block]
43 | status: {code: 401, message: Unauthorized}
44 | version: 1
45 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_gitlab.GitlabBackendtests.test_get_versions_no_version_retrieved:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.13.0 at release-monitoring.org]
10 | method: GET
11 | uri: https://gitlab.com/api/v4/projects/Shukat%2Fproject_1/repository/tags
12 | response:
13 | body: {string: !!python/unicode '[]'}
14 | headers:
15 | cache-control: ['max-age=0, private, must-revalidate']
16 | content-length: ['2']
17 | content-type: [application/json]
18 | date: ['Thu, 20 Sep 2018 09:26:00 GMT']
19 | etag: [W/"d751713988987e9331980363e24189ce"]
20 | link: [';
21 | rel="first", ;
22 | rel="last"']
23 | ratelimit-limit: ['600']
24 | ratelimit-observed: ['1']
25 | ratelimit-remaining: ['599']
26 | ratelimit-reset: ['1537435620']
27 | ratelimit-resettime: ['Fri, 20 Sep 2018 09:27:00 GMT']
28 | server: [nginx]
29 | strict-transport-security: [max-age=31536000]
30 | vary: [Origin]
31 | x-content-type-options: [nosniff]
32 | x-frame-options: [SAMEORIGIN]
33 | x-next-page: ['']
34 | x-page: ['1']
35 | x-per-page: ['20']
36 | x-prev-page: ['']
37 | x-request-id: [a4373198-a859-4195-b7c2-e414f5ab15a2]
38 | x-runtime: ['0.029071']
39 | x-total: ['0']
40 | x-total-pages: ['1']
41 | status: {code: 200, message: OK}
42 | version: 1
43 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_init.BaseBackendTests.test_call_url_last_change:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept:
6 | - '*/*'
7 | Accept-Encoding:
8 | - gzip, deflate
9 | Connection:
10 | - keep-alive
11 | From:
12 | - admin@fedoraproject.org
13 | If-modified-since:
14 | - Tue, 07 May 2019 12:36:59 GMT
15 | User-Agent:
16 | - Anitya 0.15.1 at release-monitoring.org
17 | method: GET
18 | uri: https://www.example.com/
19 | response:
20 | body:
21 | string: ''
22 | headers:
23 | Accept-Ranges:
24 | - bytes
25 | Cache-Control:
26 | - max-age=604800
27 | Date:
28 | - Tue, 07 May 2019 12:37:00 GMT
29 | Etag:
30 | - '"1541025663+ident"'
31 | Expires:
32 | - Tue, 14 May 2019 12:37:00 GMT
33 | Last-Modified:
34 | - Fri, 09 Aug 2013 23:54:35 GMT
35 | Server:
36 | - ECS (dcb/7F18)
37 | Vary:
38 | - Accept-Encoding
39 | X-Cache:
40 | - HIT
41 | status:
42 | code: 304
43 | message: Not Modified
44 | version: 1
45 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_maven.MavenBackendTest.test_dots_in_artifact_id:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.11.0 at release-monitoring.org]
10 | method: GET
11 | uri: https://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.gogo.shell/
12 | response:
13 | body: {string: !!python/unicode "\n\n\n\n\tCentral\
14 | \ Repository: org/apache/felix/org.apache.felix.gogo.shell \n\t \n\t\
16 | \n\n\n\n\t\
17 | \n\t\torg/apache/felix/org.apache.felix.gogo.shell \n\t \n\
18 | \t \n\t\n\t\t\n../ \n0.10.0/ \
20 | \ 2011-06-16 15:50 - \n0.12.0/ 2015-10-01\
22 | \ 08:23 - \n0.6.0/ \
23 | \ 2010-06-07 16:05 - \
24 | \ \n0.6.1/ \
25 | \ 2010-09-22 20:20 - \n0.8.0/ 2011-01-11\
27 | \ 20:26 - \n1.0.0/ \
28 | \ 2016-10-11 19:24 - \
29 | \ \nmaven-metadata.xml \
30 | \ 2016-10-17 13:57 507 \nmaven-metadata.xml.md5 \
32 | \ 2016-10-17 13:57 32 \nmaven-metadata.xml.sha1 \
34 | \ 2016-10-17 13:57 40 \n\t\t \n\
35 | \t \n\t \n\n\n"}
36 | headers:
37 | accept-ranges: [bytes]
38 | age: ['0']
39 | connection: [keep-alive]
40 | content-length: ['1589']
41 | content-type: [text/html]
42 | date: ['Sun, 11 Mar 2018 07:01:03 GMT']
43 | etag: ['"3b60ca901b33661fbd4a29553816568e"']
44 | fastly-debug-digest: [9fc1dd1aeb4578b98d0d1fbea6f59e98c011c203e5459400902ab3d4a95f49ae]
45 | last-modified: ['Thu, 22 Jun 2017 20:30:25 GMT']
46 | via: [1.1 varnish, 1.1 varnish]
47 | x-cache: ['HIT, MISS']
48 | x-cache-hits: ['1, 0']
49 | x-served-by: ['cache-iad2145-IAD, cache-ord1721-ORD']
50 | x-timer: ['S1520751664.928479,VS0,VE26']
51 | status: {code: 200, message: OK}
52 | version: 1
53 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_pagure.PagureBackendtests.test_pagure_get_version:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.5.0 at release-monitoring.org]
10 | method: GET
11 | uri: https://pagure.io/api/0/pagure/git/tags
12 | response:
13 | body: {string: !!python/unicode "{\n \"tags\": [\n \"0.1\",\n \"0.1.1\",\n
14 | \ \"0.1.10\",\n \"0.1.11\",\n \"0.1.12\",\n \"0.1.13\",\n \"0.1.14\",\n
15 | \ \"0.1.15\",\n \"0.1.16\",\n \"0.1.2\",\n \"0.1.3\",\n \"0.1.4\",\n
16 | \ \"0.1.5\",\n \"0.1.6\",\n \"0.1.7\",\n \"0.1.8\",\n \"0.1.9\"\n
17 | \ ]\n}"}
18 | headers:
19 | connection: [Keep-Alive]
20 | content-length: ['244']
21 | content-type: [application/json]
22 | date: ['Mon, 22 Jun 2015 08:21:07 GMT']
23 | keep-alive: ['timeout=5, max=100']
24 | server: [Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4
25 | Python/2.7.5]
26 | set-cookie: ['pagure=eyJfcGVybWFuZW50Ijp0cnVlfQ.CGlW8w.YnJnvvpvJFr-_8SFRXRpc0LPCkg;
27 | Expires=Thu, 23-Jul-2015 08:21:07 GMT; Secure; HttpOnly; Path=/']
28 | strict-transport-security: [max-age=15768000; includeSubDomains; preload]
29 | status: {code: 200, message: OK}
30 | version: 1
31 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_pagure.PagureBackendtests.test_pagure_get_versions:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.5.0 at release-monitoring.org]
10 | method: GET
11 | uri: https://pagure.io/api/0/pagure/git/tags
12 | response:
13 | body: {string: !!python/unicode "{\n \"tags\": [\n \"0.1\",\n \"0.1.1\",\n
14 | \ \"0.1.10\",\n \"0.1.11\",\n \"0.1.12\",\n \"0.1.13\",\n \"0.1.14\",\n
15 | \ \"0.1.15\",\n \"0.1.16\",\n \"0.1.2\",\n \"0.1.3\",\n \"0.1.4\",\n
16 | \ \"0.1.5\",\n \"0.1.6\",\n \"0.1.7\",\n \"0.1.8\",\n \"0.1.9\"\n
17 | \ ]\n}"}
18 | headers:
19 | connection: [Keep-Alive]
20 | content-length: ['244']
21 | content-type: [application/json]
22 | date: ['Mon, 22 Jun 2015 08:21:29 GMT']
23 | keep-alive: ['timeout=5, max=100']
24 | server: [Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4
25 | Python/2.7.5]
26 | set-cookie: ['pagure=eyJfcGVybWFuZW50Ijp0cnVlfQ.CGlXCQ.hpWuE0kN64m-hzCmOj6h-Lhwd7Q;
27 | Expires=Thu, 23-Jul-2015 08:21:29 GMT; Secure; HttpOnly; Path=/']
28 | strict-transport-security: [max-age=15768000; includeSubDomains; preload]
29 | status: {code: 200, message: OK}
30 | version: 1
31 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_rubygems.RubygemsBackendtests.test_get_version:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.11.0 at release-monitoring.org]
10 | method: GET
11 | uri: https://rubygems.org/api/v1/versions/bio/latest.json
12 | response:
13 | body:
14 | string: !!binary |
15 | H4sIAKDRpFoAA6pWKkstKs7Mz1OyUjLUM9UzVKoFAAAA//8DAKl3OMQTAAAA
16 | headers:
17 | accept-ranges: [bytes]
18 | age: ['0']
19 | cache-control: ['max-age=0, private, must-revalidate']
20 | connection: [keep-alive]
21 | content-encoding: [gzip]
22 | content-security-policy: ['default-src ''self''; script-src ''self'' https://secure.gaug.es;
23 | style-src ''self'' https://fonts.googleapis.com; img-src ''self'' https://secure.gaug.es
24 | https://gravatar.com https://secure.gravatar.com; font-src ''self'' https://fonts.gstatic.com;
25 | connect-src https://s3-us-west-2.amazonaws.com/rubygems-dumps/; frame-src
26 | https://ghbtns.com']
27 | content-type: [application/json; charset=utf-8]
28 | date: ['Sun, 11 Mar 2018 06:50:08 GMT']
29 | etag: ['"24c70a65fc5758e148f6f236f9cc374f"']
30 | server: [RubyGems.org]
31 | strict-transport-security: [max-age=0]
32 | vary: ['Accept-Encoding,Fastly-SSL']
33 | via: [1.1 varnish]
34 | x-backend: ['F_Rails 54.186.104.15:443']
35 | x-cache: [MISS]
36 | x-cache-hits: ['0']
37 | x-content-type-options: [nosniff]
38 | x-frame-options: [SAMEORIGIN]
39 | x-request-id: [a62e7d3b-f95a-4cbb-81da-31d3b457eb08]
40 | x-runtime: ['0.008426']
41 | x-served-by: [cache-mdw17324-MDW]
42 | x-timer: ['S1520751009.798984,VS0,VE61']
43 | x-ua-compatible: ['IE=Edge,chrome=1']
44 | x-xss-protection: [1; mode=block]
45 | status: {code: 200, message: OK}
46 | version: 1
47 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_rubygems.RubygemsBackendtests.test_get_versions:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept: ['*/*']
6 | Accept-Encoding: ['gzip, deflate']
7 | Connection: [keep-alive]
8 | From: [admin@fedoraproject.org]
9 | User-Agent: [Anitya 0.11.0 at release-monitoring.org]
10 | method: GET
11 | uri: https://rubygems.org/api/v1/versions/bio/latest.json
12 | response:
13 | body:
14 | string: !!binary |
15 | H4sIAKHRpFoAA6pWKkstKs7Mz1OyUjLUM9UzVKoFAAAA//8DAKl3OMQTAAAA
16 | headers:
17 | accept-ranges: [bytes]
18 | age: ['0']
19 | cache-control: ['max-age=0, private, must-revalidate']
20 | connection: [keep-alive]
21 | content-encoding: [gzip]
22 | content-security-policy: ['default-src ''self''; script-src ''self'' https://secure.gaug.es;
23 | style-src ''self'' https://fonts.googleapis.com; img-src ''self'' https://secure.gaug.es
24 | https://gravatar.com https://secure.gravatar.com; font-src ''self'' https://fonts.gstatic.com;
25 | connect-src https://s3-us-west-2.amazonaws.com/rubygems-dumps/; frame-src
26 | https://ghbtns.com']
27 | content-type: [application/json; charset=utf-8]
28 | date: ['Sun, 11 Mar 2018 06:50:09 GMT']
29 | etag: ['"4167a607ffbfac075095edd36e6ae6fc"']
30 | server: [RubyGems.org]
31 | strict-transport-security: [max-age=0]
32 | vary: ['Accept-Encoding,Fastly-SSL']
33 | via: [1.1 varnish]
34 | x-backend: ['F_Rails 54.186.104.15:443']
35 | x-cache: [MISS]
36 | x-cache-hits: ['0']
37 | x-content-type-options: [nosniff]
38 | x-frame-options: [SAMEORIGIN]
39 | x-request-id: [5aec312c-388d-4943-9455-4c9647c92344]
40 | x-runtime: ['0.006702']
41 | x-served-by: [cache-mdw17328-MDW]
42 | x-timer: ['S1520751009.094779,VS0,VE58']
43 | x-ua-compatible: ['IE=Edge,chrome=1']
44 | x-xss-protection: [1; mode=block]
45 | status: {code: 200, message: OK}
46 | version: 1
47 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.lib.backends.test_sourcehut.SourceHutBackendTests.test_get_versions_project_without_any_release:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: null
4 | headers:
5 | Accept:
6 | - '*/*'
7 | Accept-Encoding:
8 | - gzip, deflate
9 | Connection:
10 | - keep-alive
11 | From:
12 | - admin@fedoraproject.org
13 | If-modified-since:
14 | - Thu, 01 Jan 1970 00:00:00 GMT
15 | User-Agent:
16 | - Anitya 1.5.1 at release-monitoring.org
17 | method: GET
18 | uri: https://git.sr.ht/~sircmpwn/hare/refs/rss.xml
19 | response:
20 | body:
21 | string: ~sircmpwn/hare refs https://git.sr.ht/~sircmpwn/hare/refsGit
22 | refs for ~sircmpwn/hare en
23 | headers:
24 | Connection:
25 | - keep-alive
26 | Content-Length:
27 | - '205'
28 | Content-Security-Policy:
29 | - default-src 'none'; style-src 'self' 'unsafe-inline'; img-src * data:; script-src
30 | 'self' 'unsafe-inline'
31 | Content-Type:
32 | - application/rss+xml; charset=utf-8
33 | Date:
34 | - Sun, 25 Sep 2022 19:11:55 GMT
35 | Permissions-Policy:
36 | - interest-cohort=()
37 | Server:
38 | - nginx
39 | Strict-Transport-Security:
40 | - max-age=31536000; includeSubDomains; preload
41 | X-Clacks-Overhead:
42 | - GNU Terry Pratchett
43 | status:
44 | code: 200
45 | message: OK
46 | version: 1
47 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.test_flask_api_v2.LiveAuthenticationTests.test_invalid_project_monitoring_request:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: token=8f0e31e7-2f82-4fd1-9287-2916c01c0f32_x4zSXN2dI-5BwSI19BK9lA24GyEWG62h&client_secret=xKz1P6DbhjGjw1VMPPKyNuGjVvK1viSk&client_id=D-05cd2329-1d6e-448b-8880-1a8576caaf4b&token_type_hint=Bearer
4 | headers:
5 | accept-encoding: ['gzip, deflate']
6 | content-type: [application/x-www-form-urlencoded]
7 | user-agent: [Python-httplib2/0.9.2 (gzip)]
8 | method: POST
9 | uri: https://iddev.fedorainfracloud.org/openidc/TokenInfo
10 | response:
11 | body: {string: '{"username": "ncoghlan", "token_type": "Bearer", "iss": "https://iddev.fedorainfracloud.org/openidc/",
12 | "exp": "1487936918", "client_id": "D-05cd2329-1d6e-448b-8880-1a8576caaf4b",
13 | "iat": "1487851687", "active": true, "scope": "https://release-monitoring.org/oidc/upstream",
14 | "aud": "D-05cd2329-1d6e-448b-8880-1a8576caaf4b", "sub": "ncoghlan"}'}
15 | headers:
16 | AppServer: [iddev.fedorainfracloud.org]
17 | AppTime: [D=12275]
18 | Cache-Control: ['no-cache, no-store, must-revalidate, private']
19 | Content-Length: ['340']
20 | Content-Security-Policy: [frame-options 'deny']
21 | Content-Type: [application/json]
22 | Date: ['Fri, 24 Feb 2017 10:48:39 GMT']
23 | Pragma: [no-cache]
24 | Server: [Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_auth_gssapi/1.4.0
25 | mod_wsgi/3.4 Python/2.7.5]
26 | Set-Cookie: ['_ipsilon_session_id=6847368024a4e198320eadfe7f31685b1d9cf0e3;
27 | expires=Fri, 24 Feb 2017 11:48:39 GMT; httponly; Path=/; secure']
28 | X-Frame-Options: [deny]
29 | status: {code: 200, message: OK}
30 | version: 1
31 |
--------------------------------------------------------------------------------
/anitya/tests/request-data/anitya.tests.test_flask_api_v2.LiveAuthenticationTests.test_valid_project_monitoring_request:
--------------------------------------------------------------------------------
1 | interactions:
2 | - request:
3 | body: client_id=D-05cd2329-1d6e-448b-8880-1a8576caaf4b&client_secret=xKz1P6DbhjGjw1VMPPKyNuGjVvK1viSk&token_type_hint=Bearer&token=510d8899-5164-4e12-85e2-9ada635801ce_1BuudHniy8WVE_LWaBBHL3ZoVwXHFjf7
4 | headers:
5 | accept-encoding: ['gzip, deflate']
6 | content-type: [application/x-www-form-urlencoded]
7 | user-agent: [Python-httplib2/0.9.2 (gzip)]
8 | method: POST
9 | uri: https://iddev.fedorainfracloud.org/openidc/TokenInfo
10 | response:
11 | body: {string: '{"username": "ncoghlan", "token_type": "Bearer", "iss": "https://iddev.fedorainfracloud.org/openidc/",
12 | "exp": "1487938811", "client_id": "D-05cd2329-1d6e-448b-8880-1a8576caaf4b",
13 | "iat": "1487935197", "active": true, "scope": "openid email https://release-monitoring.org/oidc/upstream",
14 | "aud": "D-05cd2329-1d6e-448b-8880-1a8576caaf4b", "sub": "ncoghlan"}'}
15 | headers:
16 | AppServer: [iddev.fedorainfracloud.org]
17 | AppTime: [D=12270]
18 | Cache-Control: ['no-cache, no-store, must-revalidate, private']
19 | Content-Length: ['353']
20 | Content-Security-Policy: [frame-options 'deny']
21 | Content-Type: [application/json]
22 | Date: ['Fri, 24 Feb 2017 11:20:12 GMT']
23 | Pragma: [no-cache]
24 | Server: [Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_auth_gssapi/1.4.0
25 | mod_wsgi/3.4 Python/2.7.5]
26 | Set-Cookie: ['_ipsilon_session_id=2ffe5901e7ec69f39f790056fa8378394ef0b5e2;
27 | expires=Fri, 24 Feb 2017 12:20:12 GMT; httponly; Path=/; secure']
28 | X-Frame-Options: [deny]
29 | status: {code: 200, message: OK}
30 | - request:
31 | body: access_token=510d8899-5164-4e12-85e2-9ada635801ce_1BuudHniy8WVE_LWaBBHL3ZoVwXHFjf7
32 | headers:
33 | accept-encoding: ['gzip, deflate']
34 | content-type: [application/x-www-form-urlencoded]
35 | user-agent: [Python-httplib2/0.9.2 (gzip)]
36 | method: POST
37 | uri: https://iddev.fedorainfracloud.org/openidc/UserInfo
38 | response:
39 | body: {string: '{"email": "ncoghlan@redhat.com", "sub": "9ab6fa59a070fa1fb52d5c051712b0af5cd99b70bf1ea5d8411f5c8a0cd2c1df"}'}
40 | headers:
41 | AppServer: [iddev.fedorainfracloud.org]
42 | AppTime: [D=11520]
43 | Cache-Control: ['no-cache, no-store, must-revalidate, private']
44 | Content-Length: ['107']
45 | Content-Security-Policy: [frame-options 'deny']
46 | Content-Type: [application/json]
47 | Date: ['Fri, 24 Feb 2017 11:20:13 GMT']
48 | Pragma: [no-cache]
49 | Server: [Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_auth_gssapi/1.4.0
50 | mod_wsgi/3.4 Python/2.7.5]
51 | Set-Cookie: ['_ipsilon_session_id=61ae136a20d865ab618325a10452b8974db87396;
52 | expires=Fri, 24 Feb 2017 12:20:13 GMT; httponly; Path=/; secure']
53 | X-Frame-Options: [deny]
54 | status: {code: 200, message: OK}
55 | version: 1
56 |
--------------------------------------------------------------------------------
/anitya/tests/test_alembic.py:
--------------------------------------------------------------------------------
1 | # (c) 2017 - Copyright Red Hat Inc
2 |
3 | # This program is free software; you can redistribute it and/or
4 | # modify it under the terms of the GNU General Public License
5 | # version 2 as published by the Free Software Foundation.
6 | #
7 | # This program is distributed in the hope that it will be useful,
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 | # GNU General Public License for more details.
11 | #
12 | # You should have received a copy of the GNU General Public License
13 | # along with this program; if not, write to the Free Software
14 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 | #
16 | # Authors:
17 | # Pierre-Yves Chibon
18 | """This test module contains tests for the migration system."""
19 |
20 | import os
21 | import subprocess
22 | import unittest
23 |
24 | REPO_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
25 |
26 |
27 | class TestAlembic(unittest.TestCase):
28 | """This test class contains tests pertaining to alembic."""
29 |
30 | def test_alembic_history(self):
31 | """Enforce a linear alembic history.
32 |
33 | This test runs the `alembic history | grep ' (head), '` command,
34 | and ensure it returns only one line.
35 | """
36 | proc1 = subprocess.Popen( # pylint: disable=R1732
37 | ["alembic", "history"], cwd=REPO_PATH, stdout=subprocess.PIPE
38 | )
39 | proc2 = subprocess.Popen( # pylint: disable=R1732
40 | ["grep", " (head), "], stdin=proc1.stdout, stdout=subprocess.PIPE
41 | )
42 | stdout = proc2.communicate()[0]
43 | stdout = stdout.strip().split(b"\n")
44 | self.assertEqual(len(stdout), 1)
45 | proc1.communicate()
46 |
--------------------------------------------------------------------------------
/anitya/tests/test_app.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #
3 | # This file is part of the Anitya project.
4 | # Copyright (C) 2017 Red Hat, Inc.
5 | #
6 | # This program is free software; you can redistribute it and/or modify
7 | # it under the terms of the GNU General Public License as published by
8 | # the Free Software Foundation; either version 2 of the License, or
9 | # (at your option) any later version.
10 | #
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program; if not, write to the Free Software
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | """Tests for the :mod:`anitya.app` module."""
20 |
21 | import logging
22 | import unittest
23 |
24 | from sqlalchemy.exc import UnboundExecutionError
25 |
26 | from anitya import app
27 | from anitya.config import config as anitya_config
28 | from anitya.db import Session
29 |
30 |
31 | class CreateTests(unittest.TestCase):
32 | """Tests for the :func:`anitya.app.create` function."""
33 |
34 | def setUp(self):
35 | # Make sure each test starts with a clean session
36 | Session.remove()
37 | Session.configure(bind=None)
38 |
39 | def test_default_config(self):
40 | """Assert when no configuration is provided, :data:`anitya.config.config` is used."""
41 | application = app.create()
42 | for key, value in anitya_config.items():
43 | self.assertEqual(value, application.config[key])
44 |
45 | def test_email_config(self):
46 | """Assert a SMTPHandler is added to the anitya logger when ``EMAIL_ERRORS=True``."""
47 | config = {
48 | "DB_URL": "sqlite://",
49 | "EMAIL_ERRORS": True,
50 | "SMTP_SERVER": "smtp.example.com",
51 | "ADMIN_EMAIL": "admin@example.com",
52 | }
53 | anitya_logger = logging.getLogger("anitya")
54 | anitya_logger.handlers = []
55 |
56 | app.create(config)
57 |
58 | self.assertEqual(1, len(anitya_logger.handlers))
59 | self.assertEqual("smtp.example.com", anitya_logger.handlers[0].mailhost)
60 | self.assertEqual(["admin@example.com"], anitya_logger.handlers[0].toaddrs)
61 |
62 | def test_db_config(self):
63 | """Assert creating the application configures the scoped session."""
64 | # Assert the scoped session is not bound.
65 | self.assertRaises(UnboundExecutionError, Session.get_bind)
66 | Session.remove()
67 |
68 | app.create({"DB_URL": "sqlite://"})
69 | self.assertEqual("sqlite://", str(Session().get_bind().url))
70 |
--------------------------------------------------------------------------------
/anitya/tests/test_reverse_proxy.py:
--------------------------------------------------------------------------------
1 | """Test module for testing anitya.reverse_proxy."""
2 |
3 | import unittest
4 |
5 | import mock
6 |
7 | from anitya.reverse_proxy import ReverseProxied
8 |
9 |
10 | class ReverseProxiedCallTests(unittest.TestCase):
11 | """Unit tests for the :func:anitya.reverse_proxy.ReverseProxied.__call__."""
12 |
13 | def setUp(self):
14 | """Setup the tests."""
15 | self.wsgi_app = mock.Mock()
16 | self.config = {}
17 | self.reverse_proxy = ReverseProxied(self.wsgi_app, self.config)
18 |
19 | def test__call__preferred(self):
20 | """
21 | Test the correct schema is set when provided in config.
22 | """
23 | self.reverse_proxy.config = {"PREFERRED_URL_SCHEME": "https"}
24 | self.environ = {}
25 |
26 | self.reverse_proxy.__call__(self.environ, None)
27 |
28 | self.assertEqual(self.environ["wsgi.url_scheme"], "https")
29 |
30 | def test__call__forwarded(self):
31 | """
32 | Test the correct schema is set when in environ.
33 | """
34 | self.environ = {"HTTP_X_FORWARDED_PROTO": "https"}
35 |
36 | self.reverse_proxy.__call__(self.environ, None)
37 |
38 | self.assertEqual(self.environ["wsgi.url_scheme"], "https")
39 |
40 | def test__call__default(self):
41 | """
42 | Test that nothing is set when the value is not configured.
43 | """
44 | self.environ = {}
45 |
46 | self.reverse_proxy.__call__(self.environ, None)
47 |
48 | self.assertNotIn("wsgi.url_scheme", self.environ)
49 |
--------------------------------------------------------------------------------
/anitya/tests/test_wsgi.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #
3 | # Copyright © 2017 Red Hat, Inc.
4 | #
5 | # This copyrighted material is made available to anyone wishing to use,
6 | # modify, copy, or redistribute it subject to the terms and conditions
7 | # of the GNU General Public License v.2, or (at your option) any later
8 | # version. This program is distributed in the hope that it will be
9 | # useful, but WITHOUT ANY WARRANTY expressed or implied, including the
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 | # PURPOSE. See the GNU General Public License for more details. You
12 | # should have received a copy of the GNU General Public License along
13 | # with this program; if not, write to the Free Software Foundation,
14 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 | #
16 | # Any Red Hat trademarks that are incorporated in the source
17 | # code or documentation are not subject to the GNU General Public
18 | # License and may only be used or replicated with the express permission
19 | # of Red Hat, Inc.
20 | """Test wsgi"""
21 | import unittest
22 |
23 | import flask
24 |
25 | from anitya import wsgi
26 |
27 |
28 | class WsgiTests(unittest.TestCase):
29 | """Tests for the :mod:`wsgi` module."""
30 |
31 | def test_application_object(self):
32 | """Test application object"""
33 | self.assertTrue(isinstance(wsgi.application, flask.Flask))
34 |
--------------------------------------------------------------------------------
/anitya/wsgi.py:
--------------------------------------------------------------------------------
1 | # This file is part of the Anitya project.
2 | # Copyright (C) 2017 Red Hat, Inc.
3 | #
4 | # This program is free software; you can redistribute it and/or modify
5 | # it under the terms of the GNU General Public License as published by
6 | # the Free Software Foundation; either version 2 of the License, or
7 | # (at your option) any later version.
8 | #
9 | # This program is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU General Public License for more details.
13 | #
14 | # You should have received a copy of the GNU General Public License
15 | # along with this program; if not, write to the Free Software
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | """wsgi"""
18 | from .app import create
19 |
20 | application = create()
21 |
--------------------------------------------------------------------------------
/container-compose.yml:
--------------------------------------------------------------------------------
1 | version: "2.0"
2 |
3 | services:
4 | anitya-web:
5 | image: anitya-base
6 | build:
7 | context: .
8 | dockerfile: Containerfile.dev
9 | args:
10 | FEDORA_VERSION: 40
11 | container_name: "anitya-web"
12 | ports:
13 | - "127.0.0.1:5000:5000"
14 | volumes:
15 | - .:/app:z
16 | restart: unless-stopped
17 | environment:
18 | - ANITYA_WEB_CONFIG=anitya.toml
19 | - FLASK_APP=anitya.wsgi
20 | - FLASK_DEBUG=1
21 | - START_COMMAND=flask run -h 0.0.0.0
22 | healthcheck:
23 | test: [ "CMD", "nc", "-z", "localhost", "5000" ]
24 | interval: 3s
25 | timeout: 3s
26 | retries: 30
27 | depends_on:
28 | postgres:
29 | condition: service_started
30 | rabbitmq:
31 | condition: service_started
32 |
33 | anitya-check-service:
34 | image: anitya-base
35 | container_name: "anitya-check-service"
36 | volumes:
37 | - .:/app:z
38 | restart: unless-stopped
39 | environment:
40 | - ANITYA_WEB_CONFIG=anitya.toml
41 | - START_COMMAND=check_service
42 | depends_on:
43 | postgres:
44 | condition: service_started
45 | rabbitmq:
46 | condition: service_started
47 |
48 | rabbitmq:
49 | image: docker.io/library/rabbitmq:3.8.16-management-alpine
50 | container_name: "rabbitmq"
51 | restart: unless-stopped
52 | ports:
53 | - "15672:15672"
54 | healthcheck:
55 | test: [ "CMD", "nc", "-z", "localhost", "5672" ]
56 | interval: 3s
57 | timeout: 3s
58 | retries: 30
59 | environment:
60 | - RABBITMQ_DEFAULT_USER=anitya
61 | - RABBITMQ_DEFAULT_PASS=anitya
62 |
63 | postgres:
64 | image: docker.io/library/postgres:13.4
65 | container_name: "postgres"
66 | user: postgres
67 | volumes:
68 | - .container/dump:/dump:z
69 | healthcheck:
70 | test: ["CMD-SHELL", "pg_isready"]
71 | interval: 3s
72 | timeout: 3s
73 | retries: 30
74 | environment:
75 | - POSTGRES_USER=postgres
76 | - POSTGRES_PASSWORD=anypasswordworkslocally
77 | - POSTGRES_DB=anitya
78 |
79 |
--------------------------------------------------------------------------------
/createdb.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 | """createdb"""
4 | import os
5 | from argparse import ArgumentParser
6 | from pathlib import Path
7 |
8 | from alembic import command
9 | from alembic.config import Config
10 |
11 | from anitya.app import create
12 | from anitya.config import load
13 | from anitya.db import Base, Session
14 |
15 | parser = ArgumentParser()
16 |
17 | script_dir = Path(__file__).parent.absolute()
18 |
19 | parser.add_argument("--debug", action="store_true", default=False, dest="verbose")
20 | parser.add_argument("--alembic-config", default=None)
21 | parser.add_argument(
22 | "--db-uri",
23 | default=None,
24 | help="This will override the URLs specified in alembic and anitya",
25 | )
26 |
27 | args = parser.parse_args()
28 |
29 | alembic_config = args.alembic_config
30 | anitya_config = load()
31 |
32 | anitya_config["SQL_DEBUG"] = args.verbose
33 |
34 | if args.db_uri:
35 | anitya_config["DB_URL"] = args.db_uri
36 |
37 | # An app object is required for social_auth tables to be created properly
38 | anitya_app = create(config=anitya_config)
39 | engine = Session.get_bind()
40 |
41 | Base.metadata.create_all(engine)
42 |
43 | # Set the alembic_version based on the current migrations available.
44 | # This presupposes the models haven't changed outside of a migration.
45 | #
46 | # Default to the side-by-side alembic.ini.
47 | if alembic_config is None:
48 | alembic_config = os.path.join(script_dir, "alembic.ini")
49 | if args.verbose and os.path.isfile(alembic_config):
50 | print(f"No alembic config specified, defaulting to: {alembic_config}")
51 |
52 | if alembic_config and os.path.isfile(alembic_config):
53 | alembic_cfg = Config(alembic_config)
54 | alembic_cfg.set_main_option("sqlalchemy.url", anitya_config["DB_URL"])
55 | command.stamp(alembic_cfg, "head")
56 |
--------------------------------------------------------------------------------
/docs/_templates/layout.html:
--------------------------------------------------------------------------------
1 |
7 | {% extends "!layout.html" %}
8 | {%- block footer %}
9 |
18 | {%- endblock %}
19 |
20 |
--------------------------------------------------------------------------------
/docs/api.rst:
--------------------------------------------------------------------------------
1 | =================
2 | API Documentation
3 | =================
4 |
5 | Anitya provides several APIs for users.
6 |
7 | .. _http-api-v2:
8 |
9 | HTTP API v2
10 | ===========
11 |
12 | The token for API could be obtained from `settings`_ page in
13 | Anitya web interface. This token needs to be provided in
14 | ``Authorization`` header of the request. See request examples
15 | bellow.
16 |
17 | .. autoflask:: anitya.app:create()
18 | :undoc-static:
19 | :modules: anitya.api_v2
20 | :order: path
21 |
22 |
23 | HTTP API v1
24 | ===========
25 |
26 | .. autoflask:: anitya.app:create()
27 | :undoc-static:
28 | :modules: anitya.api
29 | :order: path
30 |
31 |
32 | Python APIs
33 | ===========
34 |
35 | Exceptions
36 | ----------
37 |
38 | .. automodule:: anitya.lib.exceptions
39 | :members:
40 | :undoc-members:
41 | :show-inheritance:
42 |
43 | Database API
44 | ------------
45 |
46 | .. automodule:: anitya.db
47 | :members:
48 | :undoc-members:
49 | :show-inheritance:
50 |
51 | anitya.db.meta
52 | ^^^^^^^^^^^^^^
53 |
54 | .. automodule:: anitya.db.meta
55 | :members:
56 | :undoc-members:
57 | :show-inheritance:
58 |
59 | anitya.db.events
60 | ^^^^^^^^^^^^^^^^
61 |
62 | .. automodule:: anitya.db.events
63 | :members:
64 | :undoc-members:
65 | :show-inheritance:
66 |
67 | anitya.db.models
68 | ^^^^^^^^^^^^^^^^
69 |
70 | .. automodule:: anitya.db.models
71 | :noindex:
72 | :members:
73 | :undoc-members:
74 | :show-inheritance:
75 |
76 | Backend API
77 | -----------
78 |
79 | .. automodule:: anitya.lib.backends
80 | :noindex:
81 | :members:
82 | :undoc-members:
83 | :show-inheritance:
84 |
85 |
86 | Plugin API
87 | ----------
88 |
89 | .. automodule:: anitya.lib.plugins
90 | :members:
91 | :undoc-members:
92 | :show-inheritance:
93 |
94 | Ecosystem API
95 | -------------
96 |
97 | .. automodule:: anitya.lib.ecosystems
98 | :noindex:
99 | :members:
100 | :undoc-members:
101 | :show-inheritance:
102 |
103 | Versions API
104 | ------------
105 |
106 | .. automodule:: anitya.lib.versions.base
107 | :members:
108 | :undoc-members:
109 | :show-inheritance:
110 |
111 | .. _settings: https://release-monitoring.org/settings
112 |
--------------------------------------------------------------------------------
/docs/database.rst:
--------------------------------------------------------------------------------
1 | ===============
2 | Database models
3 | ===============
4 |
5 | Click below to explore Anitya's database models:
6 |
7 | .. autosummary::
8 | :toctree: docblocks
9 |
10 | anitya.db.models
11 |
12 |
13 | Database Schema
14 | ===============
15 |
16 | The Anitya database schema can be seen below.
17 |
18 | .. figure:: images/database.png
19 | :align: center
20 |
21 | Database schema.
22 |
--------------------------------------------------------------------------------
/docs/generate_db_schema:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | """
3 | Generate an image of the database schema
4 | """
5 | from sqlalchemy_schemadisplay import create_schema_graph
6 |
7 | from anitya.config import config
8 | from anitya.db import meta
9 |
10 |
11 | def write_graph(filename):
12 | """
13 | Creates graph from database classes using
14 | `sqlalchemy_schemadisplay` library.
15 |
16 | Args:
17 | filename (str): Output file where image will be written
18 | """
19 | graph = create_schema_graph(
20 | engine=meta.initialize(config),
21 | metadata=meta.metadata,
22 | show_datatypes=False,
23 | show_indexes=False,
24 | rankdir="LR",
25 | concentrate=False,
26 | )
27 | graph.write_png(filename)
28 |
29 |
30 | if __name__ == "__main__":
31 | write_graph("images/database.png")
32 |
--------------------------------------------------------------------------------
/docs/glossary.rst:
--------------------------------------------------------------------------------
1 | ========
2 | Glossary
3 | ========
4 |
5 | .. glossary::
6 |
7 | ecosystem
8 | Many programming languages now provide a package manager and public
9 | collection of packages for that language. Examples include the Python
10 | Package Index (PyPI), Rust's Cargo, or JavaScript's NPM.
11 |
12 | backend
13 | A backend in Anitya defines how to retrieve versions in a particular
14 | way. For example, some backends might use an API, while others use
15 | regular expressions to extract the versions from a web page.
16 |
--------------------------------------------------------------------------------
/docs/images/database.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fedora-infra/anitya/1ea6ac8b6a7a4f3d36caf12e36449adf02e4f4df/docs/images/database.png
--------------------------------------------------------------------------------
/docs/index.rst:
--------------------------------------------------------------------------------
1 | .. Anitya documentation master file, created by
2 | sphinx-quickstart on Tue Nov 22 14:46:31 2016.
3 | You can adapt this file completely to your liking, but it should at least
4 | contain the root `toctree` directive.
5 |
6 | ======
7 | Anitya
8 | ======
9 |
10 | Anitya is a release monitoring project.
11 |
12 | Its goal is to regularly check if a project has made a new release.
13 | When Anitya discovers a new release for a project, it publishes a RabbitMQ message via
14 | `fedora messaging `_.
15 | This makes it easy to integrate with Anitya and perform
16 | actions when a new release is created for a project. For example, the Fedora project
17 | runs a service called `the-new-hotness `_
18 | which files a Bugzilla bug against a package when the upstream project makes a new release.
19 |
20 | Anitya provides a user-friendly interface to add, edit, or browse projects.
21 |
22 | :Github page: https://github.com/fedora-infra/anitya
23 |
24 | User Guide
25 | ==========
26 |
27 | .. toctree::
28 | :maxdepth: 2
29 |
30 | user-guide
31 | admin-user-guide
32 | release-notes
33 | glossary
34 |
35 | Admin Guide
36 | ===========
37 |
38 | .. toctree::
39 | :maxdepth: 2
40 |
41 | admin-guide
42 | integrating-with-anitya
43 |
44 | Developer Guide
45 | ===============
46 |
47 | .. toctree::
48 | :maxdepth: 2
49 |
50 | api
51 | contributing
52 | database
53 |
--------------------------------------------------------------------------------
/docs/integrating-with-anitya.rst:
--------------------------------------------------------------------------------
1 | =======================
2 | Integrating with Anitya
3 | =======================
4 |
5 | This chapter describes ways how you can integrate Anitya with your solution.
6 |
7 |
8 | Fedora messaging
9 | ================
10 |
11 | `Fedora messaging`_ is a message bus. In other words it is a
12 | system that allows for the sending and receiving of notifications between
13 | applications. For anitya, every action made on the application is
14 | announced/broadcasted on this bus, allowing anyone listening to it to act
15 | immediately instead of (for example) polling hourly all the data, looking for
16 | changes, and acting then.
17 |
18 | To start receiving `Fedora messaging`_ messages from anitya,
19 | it is as simple as:
20 |
21 | * install ``Fedora messaging`` the way you want:
22 |
23 | On Fedora ::
24 |
25 | dnf install fedora-messaging
26 |
27 | Via pip ::
28 |
29 | pip install fedora-messaging
30 |
31 | For how to start a local broker for `fedora messaging`. See
32 | `Fedora messaging documentation `_.
33 |
34 | List of fedora messaging topics
35 | -------------------------------
36 |
37 | This section will list all the `Fedora messaging`_ topics Anitya is
38 | sending and in what situation.
39 |
40 | * *anitya.distro.add* is sent when a new distribution is created.
41 | * *anitya.distro.edit* is sent when an existing distribution is edited.
42 | * *anitya.distro.remove* is sent when an existing distribution is deleted.
43 | * *anitya.project.add* is sent when a new project is added.
44 | * *anitya.project.edit* is sent when an existing project is edited.
45 | * *anitya.project.remove* is sent when an existing project is deleted.
46 | * *anitya.project.flag* is sent when a new flag is created on project.
47 | * *anitya.project.flag.set* is sent when a status of flag is changed.
48 | * *anitya.project.map.new* is sent when a new mapping to distribution
49 | is created on project.
50 | * *anitya.project.map.update* is sent when an existing mapping on project
51 | is edited.
52 | * *anitya.project.map.remove* is sent when an existing mapping on project
53 | is deleted.
54 | * *anitya.project.version.update* is sent when a new release is found for
55 | the project. This topic is now deprecated.
56 | * *anitya.project.version.update.v2* is sent when a new release is found
57 | for the project. This message differentiate between stable and
58 | not stable releases.
59 | * *anitya.project.version.remove* is sent when an existing release is
60 | deleted from project. This topic is now deprecated.
61 | * *anitya.project.version.remove.v2* is sent when an existing release is
62 | deleted from project. Adds support for batch deletion.
63 |
64 | You can found out more about Anitya messages in `Fedora messaging schema`_.
65 | The schema should be used by every consumer that consumes Anitya messages.
66 |
67 | .. _Fedora messaging: https://fedora-messaging.readthedocs.io/en/latest
68 | .. _Fedora messaging schema: https://pypi.org/project/anitya-schema/
69 |
--------------------------------------------------------------------------------
/files/alembic.ini:
--------------------------------------------------------------------------------
1 | # A generic, single database configuration.
2 |
3 | [alembic]
4 | # path to migration scripts
5 | script_location = /usr/share/anitya/alembic
6 |
7 | # template used to generate migration files
8 | # file_template = %%(rev)s_%%(slug)s
9 |
10 | # max length of characters to apply to the
11 | # "slug" field
12 | #truncate_slug_length = 40
13 |
14 | # set to 'true' to run the environment during
15 | # the 'revision' command, regardless of autogenerate
16 | # revision_environment = false
17 |
18 | # set to 'true' to allow .pyc and .pyo files without
19 | # a source .py file to be detected as revisions in the
20 | # versions/ directory
21 | # sourceless = false
22 |
23 | #sqlalchemy.url = driver://user:pass@localhost/dbname
24 |
25 |
26 | # Logging configuration
27 | [loggers]
28 | keys = root,sqlalchemy,alembic
29 |
30 | [handlers]
31 | keys = console
32 |
33 | [formatters]
34 | keys = generic
35 |
36 | [logger_root]
37 | level = WARN
38 | handlers = console
39 | qualname =
40 |
41 | [logger_sqlalchemy]
42 | level = WARN
43 | handlers =
44 | qualname = sqlalchemy.engine
45 | [logger_alembic]
46 | level = INFO
47 | handlers =
48 | qualname = alembic
49 |
50 | [handler_console]
51 | class = StreamHandler
52 | args = (sys.stderr,)
53 | level = NOTSET
54 | formatter = generic
55 |
56 | [formatter_generic]
57 | format = %(levelname)-5.5s [%(name)s] %(message)s
58 | datefmt = %H:%M:%S
59 |
--------------------------------------------------------------------------------
/files/config.toml.sample:
--------------------------------------------------------------------------------
1 | # A sample configuration for fedora-messaging. This file is in the TOML format.
2 | # For complete details on all configuration options, see the documentation.
3 | # https://fedora-messaging.readthedocs.io/en/latest/configuration.html
4 |
5 | amqp_url = "amqp://"
6 |
7 | [tls]
8 | ca_cert = "/etc/pki/tls/certs/ca-bundle.crt"
9 | keyfile = "/my/client/key.pem"
10 | certfile = "/my/client/cert.pem"
--------------------------------------------------------------------------------
/mypy.cfg:
--------------------------------------------------------------------------------
1 | # Global options:
2 |
3 | [mypy]
4 | python_version = 3.8
5 | warn_return_any = True
6 | warn_unused_configs = True
7 | ignore_missing_imports = True
8 | strict_optional = True
9 |
--------------------------------------------------------------------------------
/news/PR1891.other:
--------------------------------------------------------------------------------
1 | Update documentation for APIv2
2 |
--------------------------------------------------------------------------------
/news/_template.rst:
--------------------------------------------------------------------------------
1 | {% macro issue_url(value) -%}
2 | {%- if value.startswith("PR") -%}
3 | `PR#{{ value[2:] }} `_
4 | {%- elif value.startswith("C") -%}
5 | `{{ value[1:] }} `_
6 | {%- else -%}
7 | `#{{ value }} `_
8 | {%- endif -%}
9 | {%- endmacro -%}
10 |
11 | {% for section, _ in sections.items() %}
12 | {% set underline = underlines[0] %}{% if section %}{{section}}
13 | {{ underline * section|length }}{% set underline = underlines[1] %}
14 |
15 | {% endif %}
16 |
17 | {% if sections[section] %}
18 | {% for category, val in definitions.items() if category in sections[section] and category != "author" %}
19 | {{ definitions[category]['name'] }}
20 | {{ underline * definitions[category]['name']|length }}
21 |
22 | {% if definitions[category]['showcontent'] %}
23 | {% for text, values in sections[section][category].items() %}
24 | * {{ text }}
25 | ({% for value in values -%}
26 | {{ issue_url(value) }}
27 | {%- if not loop.last %}, {% endif -%}
28 | {%- endfor %})
29 |
30 | {% endfor %}
31 | {% else %}
32 | * {{ sections[section][category]['']|sort|join(', ') }}
33 |
34 | {% endif %}
35 | {% if sections[section][category]|length == 0 %}
36 | No significant changes.
37 |
38 | {% else %}
39 | {% endif %}
40 |
41 | {% endfor %}
42 | {% if sections[section]["author"] %}
43 | {{definitions['author']["name"]}}
44 | {{ underline * definitions['author']['name']|length }}
45 | Many thanks to the contributors of bug reports, pull requests, and pull request
46 | reviews for this release:
47 |
48 | {% for text, values in sections[section]["author"].items() %}
49 | * {{ text }}
50 | {% endfor %}
51 | {% endif %}
52 |
53 | {% else %}
54 | No significant changes.
55 |
56 |
57 | {% endif %}
58 | {% endfor %}
59 |
--------------------------------------------------------------------------------
/news/get-authors.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | """
4 | This script is browsing through git commit history (starting at latest tag),
5 | collects all authors of commits and creates fragment for `towncrier`_ python module.
6 |
7 | It's meant to be run before creating a final documentation before new release.
8 |
9 | Example:
10 | $ python get_authors.py
11 |
12 | .. _towncrier:
13 | https://github.com/hawkowl/towncrier
14 |
15 | (c) 2018 - Copyright Red Hat Inc
16 |
17 | Authors:
18 | Aurelien Bompard
19 | Michal Konecny
20 | """
21 |
22 |
23 | from subprocess import check_output
24 |
25 | last_tag = check_output(["git", "describe", "--abbrev=0"], universal_newlines=True)
26 | authors = {}
27 | log_range = last_tag.strip() + "..HEAD"
28 | output = check_output(
29 | ["git", "log", log_range, "--format=%ae\t%an"], universal_newlines=True
30 | )
31 | for line in output.splitlines():
32 | email, fullname = line.split("\t")
33 | email = email.split("@")[0].replace(".", "")
34 | if email in authors:
35 | continue
36 | authors[email] = fullname
37 |
38 | for nick, fullname in authors.items():
39 | with open(f"{nick}.author", mode="w", encoding="UTF-8") as f:
40 | f.write(fullname)
41 | f.write("\n")
42 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3 | "extends": [
4 | "config:base",
5 | "group:allNonMajor",
6 | "schedule:weekdays",
7 | ":preserveSemverRanges"
8 | ],
9 | "docker": {
10 | "enabled": false
11 | },
12 | "packageRules": [
13 | {
14 | "matchPackageNames": ["Werkzeug"],
15 | "groupName": null
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/runserver.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 | """
4 | An instance of the Flask application.
5 |
6 | This is intended to be run with the Flask CLI for development purposes only::
7 |
8 | $ export ANITYA_WEB_CONFIG=
9 | $ export FLASK_DEBUG=1
10 | $ export FLASK_APP=
11 | $ flask run --host 0.0.0.0 --port 5000
12 | """
13 |
14 | from anitya.app import create
15 |
16 | app = create()
17 |
--------------------------------------------------------------------------------
/tox.ini:
--------------------------------------------------------------------------------
1 | [tox]
2 | envlist = mypy,py310,py311,py312,diff-cover,lint,format,bandit,docs,pre-commit
3 | isolated_build = True
4 |
5 | [testenv]
6 | deps = poetry
7 | allowlist_externals =
8 | rm
9 | pre-commit
10 | commands =
11 | poetry install
12 | rm -rf htmlcov coverage.xml
13 | py.test -vv --cov-config .coveragerc --cov=anitya \
14 | --cov-report term --cov-report xml --cov-report html {posargs}
15 |
16 | [testenv:diff-cover]
17 | commands =
18 | poetry install
19 | diff-cover coverage.xml --compare-branch=origin/master \
20 | --exclude debug.py --fail-under=100
21 |
22 | [testenv:docs]
23 | changedir = docs
24 | allowlist_externals =
25 | mkdir
26 | rm
27 | commands=
28 | poetry install
29 | mkdir -p _static
30 | rm -rf _build
31 | mkdir -p images
32 | ./generate_db_schema
33 | sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html
34 |
35 | [testenv:lint]
36 | commands =
37 | poetry install
38 | python -m flake8 anitya/ {posargs}
39 |
40 | [testenv:format]
41 | commands =
42 | poetry install
43 | python -m black --check --diff {posargs:.}
44 |
45 | [testenv:bandit]
46 | commands =
47 | poetry install
48 | bandit -r anitya/ -x anitya/db/migrations/* -ll
49 |
50 | [testenv:mypy]
51 | commands =
52 | poetry install
53 | mypy --config-file {toxinidir}/mypy.cfg anitya
54 |
55 | [testenv:pre-commit]
56 | commands =
57 | poetry install
58 | pre-commit run --all-files
59 |
60 | [flake8]
61 | show-source = True
62 | max-line-length = 100
63 | ignore = E203,W503
64 | exclude = .git,.tox,dist,*egg,build,files
65 |
--------------------------------------------------------------------------------