Created
June 16, 2009 22:27
-
-
Save will/130946 to your computer and use it in GitHub Desktop.
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
require 'metric_fu' | |
task "metrics:all" do | |
require 'yaml' | |
require 'couchrest' | |
require 'grit' | |
report = File.open( File.join( RAILS_ROOT, "tmp", "metric_fu", "report.yml") ) { |f| YAML::load f } | |
repo = Grit::Repo.new(Dir.pwd) | |
commit = repo.commits.first | |
record = { | |
"_id" => commit.id, | |
:message => commit.message, | |
:date => commit.date, | |
:committer => { :name => commit.committer.name, :email => commit.committer.email }, | |
:report => report | |
} | |
db = CouchRest.database!("http://localhost:5984/metric_fu") | |
begin | |
db.save_doc record | |
rescue RestClient::RequestFailed | |
record["_rev"] = db.get(record["_id"])["_rev"] | |
db.save_doc record | |
end | |
end |
No, but it was great when I was, had it on my CI server
Cool. Very interesting. How did you use it?
You might find what I've been working on useful: https://codeclimate.com/
It's in some ways like hosted metric_fu that keeps track of stats over time and makes it easier to use.
-Bryan
Yeah it was for seeing trends over time, with some adhoc scripts. Your thing does look cool, I'll see if I can get the okay to run some internal heroku stuff through it.
Awesome. Let me know how it goes. If you have any feedback I'd love to hear it!
-Bryan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey Will,
This came across my Google Alerts. Are you still using this?
-Bryan