sr (owner)

Revisions

  • 9c25c6 sr Wed Jul 01 04:54:03 -0700 2009
gist: 138741 Download_button fork
public
Public Clone URL: git://gist.github.com/138741.git
Embed All Files: show embed
Text #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
commit 25c7988d0a282fe0f3828b12363b882d851f5c98
Author: Simon Rozet <simon@rozet.name>
Date: Wed Jul 1 13:51:55 2009 +0200
 
    Get a buildable by calling #call on it instead
 
diff --git a/lib/bobette.rb b/lib/bobette.rb
index b9e69c3..e89e4f3 100644
--- a/lib/bobette.rb
+++ b/lib/bobette.rb
@@ -16,7 +16,7 @@ module Bobette
       payload = env["bobette.payload"]
       commits = payload["commits"].collect { |c| c["id"] }
 
- if buildable = @buildable.from(payload)
+ if buildable = @buildable.call(payload)
         buildable.build(commits)
         [200, {"Content-Type" => "text/plain"}, ["OK"]]
       else
diff --git a/test/helper/buildable_stub.rb b/test/helper/buildable_stub.rb
index 44a3e9b..b7d4dc9 100644
--- a/test/helper/buildable_stub.rb
+++ b/test/helper/buildable_stub.rb
@@ -4,7 +4,7 @@ module TestHelper
       attr_accessor :no_buildable
     end
 
- def self.from(payload)
+ def self.call(payload)
       return nil if no_buildable
 
       kind = payload["kind"]