Skip to content

Instantly share code, notes, and snippets.

@shayarnett
Created April 28, 2011 13:08
Show Gist options
  • Save shayarnett/946311 to your computer and use it in GitHub Desktop.
Save shayarnett/946311 to your computer and use it in GitHub Desktop.
shay@Shays-MacBook-Air:~/hashrocket/pointless(master)$ rvm use 1.9.2@harvester
Using /Users/shay/.rvm/gems/ruby-1.9.2-p136 with gemset harvester
shay@Shays-MacBook-Air:~/hashrocket/pointless(master)$ gem list
*** LOCAL GEMS ***
activesupport (3.0.4)
bundler (1.0.10, 1.0.9)
cgi_multipart_eof_fix (2.5.0)
columnize (0.3.2)
configuration (1.2.0)
daemons (1.1.0)
diff-lcs (1.1.2)
fastthread (1.0.7)
gem_plugin (0.2.3)
grit (2.4.1)
highline (1.6.1)
hitch (0.6.1)
i18n (0.5.0)
launchy (0.3.7)
mime-types (1.16)
mysql (2.8.1)
open_gem (1.4.2)
pg (0.10.1)
rake (0.8.7)
rubygems-update (1.4.2)
########################
.bashrc.local
alias harvest='rvm use 1.9.2@harvester;harvester;cd ..;cd -'
#######################
/usr/local/bin/harvester
#!/usr/bin/env ruby
author = 'Shay Arnett'
require 'rubygems'
require 'active_support/all'
require 'grit'
include Grit
repo = Repo.new(".")
commits = repo.commits_since('master', 2.weeks.ago).select{|c| c.author.name.include?(author)}
puts commits.group_by {|x| x.authored_date.to_date}.map{|k,v| "#{k}:\n #{v.map(&:message).map(&:squish).join("; ")}"}.join("\n\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment