Commit Graph

346 Commits

Author SHA1 Message Date
Adnan Hajdarević d12bbf4036 Update README.md 2015-06-10 09:33:15 +02:00
Adnan Hajdarević d91b34a316 Update README.md 2015-06-10 09:32:07 +02:00
Adnan Hajdarević 005e723b23 Merge pull request #34 from adnanh/development
Development
2.3.4
2015-06-06 14:28:54 +02:00
Adnan Hajdarevic 9977fa8c61 refactor 2015-06-06 14:28:00 +02:00
Adnan Hajdarevic cbe2440cda add entire query and headers as well 2015-06-06 14:25:32 +02:00
Adnan Hajdarevic 9c545a745f return command output, pass whole payload as json to the command 2015-06-06 14:19:52 +02:00
Adnan Hajdarević 263c75b1b5 Update README.md 2015-06-05 11:21:52 +02:00
Adnan Hajdarević 83cbffd37c Merge pull request #33 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-06-05 11:21:06 +02:00
The Gitter Badger b310b79fb8 Added Gitter badge 2015-06-05 09:15:27 +00:00
Adnan Hajdarevic f1ebc440a4 match all hooks with the same id 2015-05-27 09:16:26 +02:00
Adnan Hajdarević 10732bd57b Merge pull request #30 from adnanh/development
separated windows and other platforms to different files, removed sig…
2.3.3
2015-05-16 13:36:20 +02:00
Adnan Hajdarevic 4350685330 separated windows and other platforms to different files, removed signal watcher from windows build file so webhook can actually compile on windows, added string as a source, so you can pass static strings to your scripts without having to wrap them around with other scripts 2015-05-16 13:32:21 +02:00
Adnan Hajdarević 6053f48b23 Merge pull request #28 from kevinlebrun/fix-for-osx-signals
Fix for OS X USR1 signal
2015-04-06 16:07:39 +02:00
Kevin Le Brun 6cd8258651 Fix for OS X USR1 signal
It seems that signals code for Linux and OS X (FreeBSD) are different. I
rely on `syscall.SIGUSR1` which should be cross-compatible.

Tested with `kill -usr1 <pid>` on OS X 10.10
2015-04-05 23:21:40 +02:00
Adnan Hajdarević fb71ea0fae Update README.md 2015-03-31 22:24:27 +02:00
Adnan Hajdarević aeacb6dac7 Merge pull request #24 from adnanh/development
added hook reload on USR1 signal
2.3.2
2015-03-31 22:14:47 +02:00
Adnan Hajdarevic 1039151a16 added hook reload on USR1 signal 2015-03-31 22:10:35 +02:00
Adnan Hajdarević db928228c8 bumping up the minor version 2015-03-30 15:33:15 +02:00
Adnan Hajdarević 6896a34aab Merge pull request #21 from kevinlebrun/master
Allow charset to be defined in Content-Type header
2015-03-30 00:22:29 +02:00
Kevin Le Brun 5f853d8aba Allow charset to be defined in Content-Type header
The payload couldn't be parsed when charset was present in the
`Content-Type` header. The content type should begin with the MIME type
so we now check if the content type starts with `application/json` or
`application/x-www-form-urlencoded`.

This closes #20
2015-03-29 20:01:56 +02:00
Adnan Hajdarević 12c48f87cb Merge pull request #19 from moorereason/test-json
Add tests for ParseJSONParameters
2015-03-21 10:28:20 +01:00
Adnan Hajdarević acf38c3210 Merge pull request #18 from moorereason/extract-tests
Add new tests for ExtractParameter
2015-03-21 10:26:36 +01:00
Cameron Moore d3f368cb8f Add tests for ParseJSONParameters
This commit adds 100% coverage to Hook.ParaseJSONParameters.
2015-03-20 23:22:30 -05:00
Cameron Moore 943bc258f7 Add new tests for ExtractParameter
This commit regains 100% coverage for ExtractParameter after changes
from commit 688483d.
2015-03-20 22:43:39 -05:00
Adnan Hajdarevic 231426da57 removed leftover debug trace, fixed a panic bug 2.3.0 2015-03-21 01:26:04 +01:00
Adnan Hajdarević baec1cadc5 Merge pull request #17 from adnanh/json-parameters
added parse-parameters-as-json property to hooks, fixed some bugs in old...
2015-03-21 01:18:44 +01:00
Adnan Hajdarevic 688483d6d1 added parse-parameters-as-json property to hooks, fixed some bugs in old code 2015-03-21 01:10:17 +01:00
Adnan Hajdarević bddb523b67 Merge pull request #16 from moorereason/fix-notrule
Fix infinite loop in NotRule.Evaluate
2015-03-20 23:37:49 +01:00
Adnan Hajdarević b8807ed434 Merge pull request #15 from moorereason/fix-negindex
Only support unsigned ints for slice indexes
2015-03-20 23:31:42 +01:00
Adnan Hajdarević 8527a9b23e Merge pull request #14 from moorereason/hook-tests
Complete hook test suite
2015-03-20 23:31:23 +01:00
Cameron Moore becd8935be Fix infinite loop in NotRule.Evaluate 2015-03-20 16:58:58 -05:00
Cameron Moore 230d16dd93 Only support unsigned ints for slice indexes
This commit changes ExtractParameter to parse slice indexes as unsigned
ints.  Fixes test case "a.-1.b".
2015-03-20 16:54:03 -05:00
Cameron Moore 9a7dedbc09 Complete hook test suite
This commit provides 100% test coverage of the hook package.

Two bugs were discovered with these tests.  I'll be submitting separate
commits to fix those issues.
2015-03-20 16:46:08 -05:00
Adnan Hajdarević 84ce6f262a Merge pull request #13 from moorereason/refactor-helpers
Refactor to remove helpers package
2015-03-20 15:05:07 +01:00
Cameron Moore 7dd55f5232 Refactor to remove helpers package
This commit removes the "helpers" package by moving functions from the
package into the other packages that use them.

CheckPayloadSignature() and ExtractParamater() are simply moved to the
"hook" package.  I'm not sure of the usefulness of having these
functions exported, but I left them allow for now.

ValuesToMap() is moved to the "main" webhook package and renamed to
valuesToMap().

Tests were moved into the "hook" package since we only test
ExtractParameter() right now.

This commit closes adnanh/webhook#12.
2015-03-20 08:55:42 -05:00
Adnan Hajdarević d8a21582a3 Merge pull request #11 from moorereason/fix-extractparam
Fix ExtractParameter and add tests
2015-03-19 20:29:14 +01:00
Cameron Moore 8a627f7e67 Fix slice traversal in ExtractParameter
With these changes, I'm able to pass tests "a.1.b" and "a.1.b.c".
2015-03-19 12:15:37 -05:00
Cameron Moore 7635cfde33 Add another slice test to ExtractParameter tests 2015-03-19 11:55:24 -05:00
Cameron Moore 2a2a20dcb8 Add tests for ExtractParameter 2015-03-19 11:32:10 -05:00
Adnan Hajdarević 10755eb9d9 Merge pull request #9 from moorereason/vet
Cleanups from static analyzers
2015-03-19 16:31:24 +01:00
Cameron Moore e9aaeb579e Rework negroni Logger creation
From `go vet`:

webhook.go:98: github.com/codegangsta/negroni.Logger composite literal uses unkeyed fields
2015-03-19 09:23:47 -05:00
Cameron Moore 956589fab3 Improve placement of variable declaration
Thanks to rsc.io/grind
2015-03-19 09:21:15 -05:00
Adnan Hajdarevic f83af97138 added per-hook defined response message 2.2.2 2015-03-17 19:34:54 +01:00
Adnan Hajdarevic 5a96a5721a added custom url prefix for served hooks url path 2015-03-17 19:05:18 +01:00
Adnan Hajdarević 37b310feaa Merge pull request #4 from adnanh/development
added support for https
2.2.0
2015-03-14 13:06:14 +01:00
Adnan Hajdarevic ad76b51e6a updated minor version to 2.2.0 2015-03-14 13:04:28 +01:00
Adnan Hajdarevic 4304aaa2d5 readme update 2015-03-14 13:03:51 +01:00
Adnan Hajdarevic a2fac2373b updated readme to include https 2015-03-14 13:02:41 +01:00
Adnan Hajdarevic c9adceb5d8 added support for https 2015-03-14 12:59:54 +01:00
Adnan Hajdarevic 8488d3c432 Merge branch 'master' of github.com:adnanh/webhook 2.1.0 2015-03-14 12:44:24 +01:00