Permalink
Browse files

add hook_name=

  • Loading branch information...
1 parent cec218e commit 58c2d8f45291e54b936acdb3aeab9b32619b9037 @technoweenie technoweenie committed Apr 27, 2012
Showing with 9 additions and 7 deletions.
  1. +7 −0 lib/service.rb
  2. +1 −4 services/basecamp.rb
  3. +1 −3 services/basecamp_classic.rb
View
@@ -265,6 +265,13 @@ def hook_name
end
end
+ # Sets the uniquely identifying name for this Service type.
+ #
+ # hook_name - The String name.
+ #
+ # Returns a String.
+ attr_writer :hook_name
+
# Public: Gets the Hash of secret configuration options. These are set on
# the GitHub servers and never committed to git.
#
View
@@ -4,10 +4,7 @@ class Service::Basecamp < Service
white_list :project_url, :email_address
default_events :push, :pull_request, :issues
-
- def hook_name
- 'bcx'
- end
+ self.hook_name = 'bcx'
def receive_push
commit = payload['commits'].last || {}
@@ -5,9 +5,7 @@ class Service::BasecampClassic < Service
white_list :url, :project, :category, :username
- def hook_name
- 'basecamp'
- end
+ self.hook_name = 'basecamp'
def receive_push
raise_config_error "Invalid basecamp domain" if basecamp_domain.nil?

0 comments on commit 58c2d8f

Please sign in to comment.