A ruby library for managing git hooks.
your_repo/.git/hooks/post-receive
require 'captain_hook' require 'tinder'
| ... | |
| ROOT_URL = "/producer" | |
| ... |
| begin | |
| job = pool.reserve(5) | |
| puts job.id | |
| rescue Beanstalk::TimedOut | |
| puts "Timed out waiting for reservation" | |
| retry | |
| end |
| [12:00:29]: [Execute features] HI. You're using libxml2 version 2.6.16 which is over 4 years old and has | |
| [12:00:29]: [Execute features] plenty of bugs. We suggest that for maximum HTML/XML parsing pleasure, you | |
| [12:00:29]: [Execute features] upgrade your version of libxml2 and re-install nokogiri. If you like using | |
| [12:00:29]: [Execute features] libxml2 version 2.6.16, but don't like this warning, please define the constant | |
| [12:00:29]: [Execute features] I_KNOW_I_AM_USING_AN_OLD_AND_BUGGY_VERSION_OF_LIBXML2 before requring nokogiri. |
| Function.prototype.method = function (name, func) { | |
| this.prototype[ name] = func; | |
| return this; | |
| }; | |
| Number.method('integer', function(){ | |
| return Math[this < 0 ? 'ceil' : 'floor'](this); | |
| }); |
| function current_git_branch { | |
| ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
| echo "${ref#refs/heads/}" | |
| } | |
| function svn_get_and_rebase { | |
| branch=$(current_git_branch) | |
| git co master | |
| git svn rebase | |
| git co ${branch} |
| var add = function (a, b) { | |
| if (typeof a ! == ' number' | | typeof b ! == ' number' ) { | |
| throw { | |
| name: ' TypeError' , | |
| message: ' add needs numbers' | |
| }; | |
| } | |
| return a + b; | |
| } |
| function fireEvent(element,event, keyCode){ | |
| if(document.createEvent){ | |
| // dispatch for firefox + others | |
| var evt = document.createEvent("HTMLEvents"); | |
| if(keyCode !== undefined){ | |
| evt.keyCode = keyCode; | |
| } | |
| evt.initEvent(event, true, true ); // event type,bubbling,cancelable |
| function simulateClick() { | |
| var evt = document.createEvent("MouseEvents"); | |
| evt.initMouseEvent("click", true, true, window, | |
| 0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
| var cb = document.getElementById("checkbox"); | |
| var canceled = !cb.dispatchEvent(evt); | |
| if(canceled) { | |
| // A handler called preventDefault | |
| alert("canceled"); | |
| } else { |
| export PATH=/usr/local/git/bin:$PATH |