Commit Graph

216 Commits

Author SHA1 Message Date
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
Adnan Hajdarevic d3f5da5489 bumped up the minor version to 2.1.0 2015-03-14 12:44:05 +01:00
Adnan Hajdarević 59b4954845 Update README.md 2015-03-14 12:42:59 +01:00
Adnan Hajdarević 36aea82855 Merge pull request #3 from adnanh/development
added ability to hot reload the hooks file
2015-03-14 12:39:05 +01:00
Adnan Hajdarevic 652109d46e added ability to hot reload the hooks file 2015-03-14 12:37:45 +01:00
Adnan Hajdarevic a7bbff0963 fixed invalid parameter name in example file 2.0.0 2015-03-13 01:59:10 +01:00
Adnan Hajdarevic 0b269e4870 fixed payload-hash-sha1 for github header 2015-03-13 01:54:23 +01:00
Adnan Hajdarević 40d01e4d5a typo 2015-03-13 01:43:44 +01:00
Adnan Hajdarevic 90528b2ed9 webhook 2.0.0 2015-03-13 01:31:49 +01:00
Adnan Hajdarevic 489750a710 added logger 2015-03-12 13:09:50 +01:00
Adnan Hajdarevic b332c9e715 added flags 2015-03-11 17:08:53 +01:00
Adnan Hajdarevic bacf2b3666 negroni boilerplate 2015-03-11 16:48:52 +01:00
Adnan Hajdarevic c96b0497e4 updates to README wiki links 2015-03-11 02:23:16 +01:00
Adnan Hajdarevic 56560d3809 merge 2015-03-11 02:21:00 +01:00
Adnan Hajdarevic d858b54309 new path 2015-03-11 02:19:32 +01:00
Adnan Hajdarević a6023dea8f Update README.md 1.0.4 2015-03-08 14:29:01 +01:00
Adnan Hajdarević 93ab47359d Update README.md 2015-02-26 16:43:45 +01:00
Adnan Hajdarević 2e16eb5d77 bumped up the minor version 2015-02-26 15:56:41 +01:00
Adnan Hajdarević f47ba2ad97 Update webhook.go
misplaced closing bracket...
2015-02-26 15:56:15 +01:00
Adnan Hajdarevic d285c08f9f logical error 2015-02-25 01:06:55 +01:00
Adnan Hajdarevic 899e5333e8 removed debug output 2015-02-25 01:05:33 +01:00
Adnan Hajdarevic 73278ff99b github hookshot user agent fix 2015-02-25 00:27:05 +01:00
Adnan Hajdarevic 57db4f3ca6 bugfix 2015-02-25 00:25:49 +01:00
Adnan Hajdarevic ea7fd4cb87 fix 2015-02-25 00:21:10 +01:00
Adnan Hajdarevic f1c4415fc8 refactoring 2015-02-25 00:12:24 +01:00
Adnan Hajdarevic a5d79fddd9 separated github from post handler 2015-02-24 16:52:55 +01:00
Adnan Hajdarevic 478d189de8 added todo 2015-02-04 23:40:03 +01:00
Adnan Hajdarević d6d9b405ab Update README.md 2015-01-20 19:04:11 +01:00
Adnan Hajdarevic 4e4260e24f wording 2015-01-20 19:00:31 +01:00
Adnan Hajdarevic 3c4c025233 added support for x-hub-signature 2015-01-20 18:57:16 +01:00
Adnan Hajdarevic 450852e1be removed signals 2015-01-15 16:52:26 +01:00