Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

random pairing box diff

  • Loading branch information...
commit 8b2fdf27af8576f4e584055af3a0c709823a7450 1 parent a2ee2a3
Tim Carey-Smith authored October 13, 2010

Showing 1 changed file with 9 additions and 9 deletions. Show diff stats Hide diff stats

  1. 18  lib/github-post-receive-hooks.rb
18  lib/github-post-receive-hooks.rb
@@ -3,22 +3,22 @@
3 3
 require 'nokogiri'
4 4
 
5 5
 class PostreceiveHooks
6  
-  def self.run(user, token, repo, urls)
7  
-    new(user, token, repo, urls).run
  6
+  def self.run(user, token, repo, enabled_urls, disabled_urls)
  7
+    new(user, token, repo, enabled_urls, disabled_urls).run
8 8
   end
9 9
 
10  
-  def initialize(user, token, repo, urls)
11  
-    @user = user
12  
-    @token = token
13  
-    @repo = repo
14  
-    @urls = urls
  10
+  def initialize(user, token, repo, enabled_urls, disabled_urls)
  11
+    @user          = user
  12
+    @token         = token
  13
+    @repo          = repo
  14
+    @enabled_urls  = enabled_urls
  15
+    @disabled_urls = disabled_urls
15 16
   end
16 17
 
17 18
   def run
18 19
     raise "No user specified" if @user.nil? || @user.empty?
19 20
     raise "No token specified" if @token.nil? || @token.empty?
20 21
     raise "No repo specified" if @repo.nil? || @repo.empty?
21  
-    raise "No urls specified" if @urls.nil? || @urls.empty?
22 22
 
23 23
     puts "Current: "
24 24
     puts current_urls
@@ -50,7 +50,7 @@ def load_current_urls
50 50
   end
51 51
 
52 52
   def required_urls
53  
-    (current_urls + @urls).uniq
  53
+    (current_urls + @enabled_urls - @disabled_urls).uniq
54 54
   end
55 55
 
56 56
   def update

0 notes on commit 8b2fdf2

Please sign in to comment.
Something went wrong with that request. Please try again.