Permalink
Browse files

Properly handle it when override URL is not filled in.

Also, update docs to drop a typo and reword.
  • Loading branch information...
semipermeable committed May 30, 2013
1 parent 777a2a8 commit 93a78195d04a75e0300e0c7bb0dfeba022704e1c
Showing with 10 additions and 5 deletions.
  1. +8 −4 docs/tddium
  2. +1 −1 lib/services/tddium.rb
  3. +1 −0 test/tddium_test.rb
View
@@ -5,16 +5,20 @@ Learn more at [tddium.com](https://www.tddium.com).
Install Notes
-------------
-If you've connected your GitHub account with Tddium, your repos will be automatically set up with this hook.
+This hook will be automatically configured for GitHub repos you've configured
+with a connected Tddium account.
-If you don't want to connect your Github account, or you want to give Tddium GitHub repo privileges, follow these steps:
+If you don't want to connect your Github account, or you don't want to give
+Tddium `repo` privileges, follow these steps:
1. Go to your Tddium dashboard
-2. Open the Configuration page for this repo and find the 'CI Setup' section
-3. Copy the 32-character hex value listed under 'CI Token'
+2. Open the Configuration page for this repo and click on the 'CI Setup' section
+3. Copy the hex value listed under 'CI Token'
4. Paste the token above.
5. Install Tddium's repo-specific public key into this repo's deploy keys.
+You can safely leave the Override URL field blank.
+
Supported Events
----------------
View
@@ -16,7 +16,7 @@ def receive_event
token = required_config_value('token')
override_url = data['override_url']
- url_base = override_url || "https://hooks.tddium.com:443/1/github"
+ url_base = override_url.present? ? override_url : "https://hooks.tddium.com:443/1/github"
tddium_url = "#{url_base}/#{token}"
deliver tddium_url
end
View
@@ -8,6 +8,7 @@ def test_push
data = {
'token' => test_token,
+ 'override_url' => ""
}
svc = service(data, push_payload)

0 comments on commit 93a7819

Please sign in to comment.