Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Remove git connector #390

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions devel/docker/fedora-packages.conf
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ WSGIScriptAlias /packages /usr/share/fedoracommunity/fedora-packages.wsgi
WSGIProcessGroup fedoracommunity
</Directory>

<Directory /var/tmp/fedoracommunity/git.fedoraproject.org/>
Require all granted
</Directory>

<Directory /var/cache/fedoracommunity/packages/xapian/icons/>
# If someone tries to access an icon that doesn't exist,
# then send them to the default icon. This is used by
Expand Down
2 changes: 1 addition & 1 deletion devel/docker/packages
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN dnf install -y TurboGears2 python-moksha-wsgi intltool koji bodhi-client\
xapian-bindings-python python-dogpile-core python-dogpile-cache\
python-memcached python2-markdown pygobject3 fedmsg python2-pytest\
python2-pdc-client python2-webhelpers libappstream-glib dumb-init\
python2-GitPython git python2-pytest-mock python2-pytest-vcr\
python2-requests python2-pytest-mock python2-pytest-vcr\
&& dnf clean all

RUN mkdir -p /var/log/fedoracommunity\
Expand Down
4 changes: 2 additions & 2 deletions development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ fedoracommunity.connector.kojihub.baseurl = https://koji.fedoraproject.org/kojih
fedoracommunity.connector.bugzilla.baseurl = https://bugzilla.redhat.com/xmlrpc.cgi
fedoracommunity.connector.fas.baseurl = https://admin.fedoraproject.org/accounts/
fedoracommunity.connector.bodhi.baseurl = https://bodhi.fedoraproject.org
fedoracommunity.connector.pkgdb.baseurl = https://admin.fedoraproject.org/pkgdb
fedoracommunity.connector.tagger.baseurl = https://apps.fedoraproject.org/tagger
fedoracommunity.connector.mdapi.baseurl = https://apps.stg.fedoraproject.org/mdapi
fedoracommunity.connector.mdapi.baseurl = https://apps.fedoraproject.org/mdapi
fedoracommunity.connector.icons.baseurl = https://alt.fedoraproject.org/pub/alt/screenshots
fedoracommunity.connector.spec.baseurl = https://src.fedoraproject.org

fedmenu.url = https://apps.fedoraproject.org/fedmenu
fedmenu.data_url = https://apps.fedoraproject.org/js/data.js
Expand Down
162 changes: 0 additions & 162 deletions fedoracommunity/connectors/gitconnector.py

This file was deleted.

48 changes: 48 additions & 0 deletions fedoracommunity/connectors/specconnector.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This file is part of Fedora Community.
# Copyright (C) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""
:mod:`fedoracommunity.connectors.specconnector` - Spec Connector
=======================================================================

This Connector returns a package spec file using src.fp.o as a source

"""
import logging

import requests
from tg import config

log = logging.getLogger(__name__)


class SpecConnector(object):
_method_paths = {}
_query_paths = {}

def __init__(self, package, branch='master'):
self.pkg = package
self.branch = branch
self.baseurl = config.get(
'fedoracommunity.connector.spec.baseurl',
'https://src.fedoraproject.org')

def get_spec(self):
resp = requests.get(
'{url}/rpms/{pkg}/raw/{branch}/f/{pkg}.spec'
.format(url=self.baseurl, pkg=self.pkg, branch=self.branch))
if resp.ok:
return resp.text
Loading