Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
215 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
%h1= t(".title") | ||
|
||
.row | ||
.col-md-12 | ||
.alert.alert-danger= t(".message") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
- https://github.com/adamtanner/* | ||
- https://github.com/f-list/* | ||
- https://github.com/gae-init/gae-init | ||
- https://github.com/ggreer/the_silver_searcher | ||
- https://github.com/iros/* | ||
- https://github.com/jsocol/* | ||
- https://github.com/libretro/* | ||
- https://github.com/lipis/* | ||
- https://github.com/meowy/* | ||
- https://github.com/misoproject/* | ||
- https://github.com/mitsuhiko/* | ||
- https://github.com/mplewis/* | ||
- https://github.com/sczizzo/* | ||
- https://github.com/tcrayford/* | ||
- https://github.com/untitaker/* | ||
- https://github.com/joomla/joomla-cms | ||
- https://github.com/lavagetto/* | ||
- https://github.com/jplana/python-etcd | ||
- https://github.com/sitaramc/* | ||
- https://github.com/gitolite/* | ||
- https://github.com/MarkusH/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Load the blacklist. | ||
BLACKLIST ||= Blacklist.new(YAML.load_file("config/blacklist.yml")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Feature: Developers must opt-in to create an account and receive tips | ||
Background: | ||
Given a project "my-project" | ||
And our fee is "0" | ||
And a deposit of "500" | ||
And the last known commit is "COMMIT1" | ||
|
||
Scenario: Tipping a opted-in developer | ||
And a user "yugo" has opted-in | ||
And a new commit "COMMIT2" with parent "COMMIT1" | ||
And the author of commit "COMMIT2" is "yugo" | ||
And the message of commit "COMMIT2" is "Tiny change" | ||
When the new commits are read | ||
Then there should be a tip of "5" for commit "COMMIT2" | ||
And there should be 0 email sent | ||
|
||
Scenario: Tipping a developer that has not opted-in | ||
And a new commit "COMMIT2" with parent "COMMIT1" | ||
And the author of commit "COMMIT2" is "yugo" | ||
And the message of commit "COMMIT2" is "Tiny change" | ||
When the new commits are read | ||
Then there should be no tip for commit "COMMIT2" | ||
And there should be 0 email sent |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
require "set" | ||
|
||
class Blacklist | ||
def initialize(urls) | ||
urls = urls.map {|u| normalize_url(u) } | ||
|
||
@urls = Set.new(urls) | ||
end | ||
|
||
def include?(url) | ||
url = normalize_url(url) | ||
|
||
if @urls.include?(url) | ||
return true | ||
end | ||
|
||
# Check for the author path. | ||
# https://github.com/author/* | ||
url[url.rindex("/")..-1] = "/*" | ||
|
||
@urls.include?(url) | ||
end | ||
|
||
private | ||
def normalize_url(url) | ||
url = url.clone | ||
|
||
if !url.start_with?("http://", "https://", "//") | ||
if !url.start_with?("github.com", "bitbucket.org") | ||
# Assume it is a shortened "author/project" path and | ||
# default to Github. | ||
url.prepend("github.com/") | ||
end | ||
url.prepend("https://") | ||
end | ||
|
||
uri = URI.parse(url) | ||
|
||
# Ignore irrelevant differences such as HTTP/HTTPS. | ||
[uri.host, uri.path].join | ||
end | ||
end |
Oops, something went wrong.