Permalink
Browse files

random pairing box diff

  • Loading branch information...
1 parent a2ee2a3 commit 8b2fdf27af8576f4e584055af3a0c709823a7450 @halorgium halorgium committed Oct 13, 2010
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/github-post-receive-hooks.rb
View
18 lib/github-post-receive-hooks.rb
@@ -3,22 +3,22 @@
require 'nokogiri'
class PostreceiveHooks
- def self.run(user, token, repo, urls)
- new(user, token, repo, urls).run
+ def self.run(user, token, repo, enabled_urls, disabled_urls)
+ new(user, token, repo, enabled_urls, disabled_urls).run
end
- def initialize(user, token, repo, urls)
- @user = user
- @token = token
- @repo = repo
- @urls = urls
+ def initialize(user, token, repo, enabled_urls, disabled_urls)
+ @user = user
+ @token = token
+ @repo = repo
+ @enabled_urls = enabled_urls
+ @disabled_urls = disabled_urls
end
def run
raise "No user specified" if @user.nil? || @user.empty?
raise "No token specified" if @token.nil? || @token.empty?
raise "No repo specified" if @repo.nil? || @repo.empty?
- raise "No urls specified" if @urls.nil? || @urls.empty?
puts "Current: "
puts current_urls
@@ -50,7 +50,7 @@ def load_current_urls
end
def required_urls
- (current_urls + @urls).uniq
+ (current_urls + @enabled_urls - @disabled_urls).uniq
end
def update

0 comments on commit 8b2fdf2

Please sign in to comment.