This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 71cda3a724f9096a0355580810f981d332056299
Author: Dave Brondsema <[email protected]>
AuthorDate: Fri Mar 4 17:05:23 2022 -0500

    Remove gittip_button macro; gittip is defunct
---
 Allura/allura/lib/macro.py                         |  9 ---------
 Allura/allura/lib/utils.py                         |  2 +-
 Allura/allura/lib/widgets/macros.py                |  6 ------
 Allura/allura/templates/jinja_master/lib.html      |  6 ------
 Allura/allura/templates/widgets/gittip_button.html | 19 -------------------
 Allura/allura/tests/test_globals.py                | 11 -----------
 6 files changed, 1 insertion(+), 52 deletions(-)

diff --git a/Allura/allura/lib/macro.py b/Allura/allura/lib/macro.py
index 35eafe7..efccc97 100644
--- a/Allura/allura/lib/macro.py
+++ b/Allura/allura/lib/macro.py
@@ -317,15 +317,6 @@ def project_screenshots():
     return response
 
 
-@macro()
-def gittip_button(username):
-    from allura.lib.widgets.macros import GittipButton
-    button = GittipButton(username=username)
-    g.resource_manager.register(button)
-    response = button.display(username=username)
-    return response
-
-
 def parse_repo(repo):
     if not repo:
         return None
diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
index 6639734..4edd6b5 100644
--- a/Allura/allura/lib/utils.py
+++ b/Allura/allura/lib/utils.py
@@ -567,7 +567,7 @@ class 
ForgeHTMLSanitizerFilter(html5lib.filters.sanitizer.Filter):
 
         self.valid_iframe_srcs = ('https://www.youtube.com/embed/',
                                   'https://www.youtube-nocookie.com/embed/',
-                                  'https://www.gittip.com/')
+                                  )
         self._prev_token_was_ok_iframe = False
 
     def sanitize_token(self, token):
diff --git a/Allura/allura/lib/widgets/macros.py 
b/Allura/allura/lib/widgets/macros.py
index 77c329a..e621b4d 100644
--- a/Allura/allura/lib/widgets/macros.py
+++ b/Allura/allura/lib/widgets/macros.py
@@ -27,12 +27,6 @@ class Include(ew.Widget):
     }
 
 
-class GittipButton(ew.Widget):
-    template = 'jinja:allura:templates/widgets/gittip_button.html'
-    params = ['username']
-    project = None
-
-
 class NeighborhoodFeeds(ew.Widget):
     template = 'jinja:allura:templates/macro/neighborhood_feeds.html'
     params = ['feeds']
diff --git a/Allura/allura/templates/jinja_master/lib.html 
b/Allura/allura/templates/jinja_master/lib.html
index 7834684..250682e 100644
--- a/Allura/allura/templates/jinja_master/lib.html
+++ b/Allura/allura/templates/jinja_master/lib.html
@@ -851,12 +851,6 @@ then that shebang line will be omitted from output.
 [[download_button]]
 </pre></div>
 
-<h2 id="md_ex_gittip_button{{id}}">Gittip Button</h2>
-<p>You can display a Gittip button in your wiki. You will need to provide your 
gittip handle in the username parameter.</p>
-<div class="codehilite"><pre>
-[[gittip_button username=foo]]
-</pre></div>
-
 <h2 id="md_ex_member{{id}}">Project Member List</h2>
 <p>You can display a list of project members. By default the list is limited 
to 20 members, and a link is provided to a page with the full list.</p>
 <div class="codehilite"><pre>
diff --git a/Allura/allura/templates/widgets/gittip_button.html 
b/Allura/allura/templates/widgets/gittip_button.html
deleted file mode 100644
index 708793a..0000000
--- a/Allura/allura/templates/widgets/gittip_button.html
+++ /dev/null
@@ -1,19 +0,0 @@
-{#-
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
--#}
-<p><iframe style="border: 0; margin: 0; padding: 0;" 
src="https://www.gittip.com/{{username}}/widget.html"; width="48pt" 
height="22pt"></iframe></p>
diff --git a/Allura/allura/tests/test_globals.py 
b/Allura/allura/tests/test_globals.py
index 6163dff..2e1ec28 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -164,17 +164,6 @@ def test_macro_projects():
         assert 'alt="Test Project Logo"' not in r
 
 
-def test_macro_gittip_button():
-    p_nbhd = M.Neighborhood.query.get(name='Projects')
-    p_test = M.Project.query.get(shortname='test', neighborhood_id=p_nbhd._id)
-    with h.push_config(c, project=p_test):
-        r = g.markdown_wiki.convert('[[gittip_button username=test]]')
-    assert_equal(
-        r,
-        '<div class="markdown_content"><p><iframe height="22pt" 
src="https://www.gittip.com/test/widget.html"; '
-        'style="border: 0; margin: 0; padding: 0;" 
width="48pt"></iframe></p></div>')
-
-
 def test_macro_neighborhood_feeds():
     p_nbhd = M.Neighborhood.query.get(name='Projects')
     p_test = M.Project.query.get(shortname='test', neighborhood_id=p_nbhd._id)

Reply via email to