This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Calculates billable day-of-month numbers at the end | |
# of a month with fewer than 31 days. | |
# | |
# eg. billable_days Date.new(2012, 02, 29) => 29, 30, 31 | |
# | |
def billable_days(date = Date.today) | |
if date.day == date.end_of_month.day | |
(date.day..31) | |
else | |
date.day |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Git commit-msg hook adapted from Henrik Nyh's <http://henrik.nyh.se> original version | |
# <https://gist.github.com/184711> | |
# | |
# Works in tandem with the redmine_stagecoach gem to automatically add your | |
# branch's associated github issue number to your commit message. | |
# | |
# If you include "#noref" in the commit message, nothing will be added to | |
# the commit message, and the "#noref" itself will be stripped. |
NewerOlder