Skip to content

Instantly share code, notes, and snippets.

View foca's full-sized avatar

Nicolás Sanguinetti foca

View GitHub Profile
Información del orador:
Los interesados en contribuir con conferencias o talleres deben enviar la siguiente información:
* Autores: Nombre completo y resumen curricular
Evan Henshaw-Plath
* Público Objetivo: (Gerentes, Desarrolladores, Administradores de Sistemas)
Desarrolladores
#!/usr/bin/env ruby
require "rubygems"
require "integrity"
require "sinatra"
# Load integrity's configuration.
Integrity.config = File.expand_path("./config.yml")
Sinatra::Application.default_options.merge!(
:run => false,
Using this hook, it is easy to generate mails describing the updates to the repository. This example script sends one mail message per ref listing the
commits pushed to the repository:
#!/bin/sh
# mail out commit update information.
while read oval nval ref
do
if expr "$oval" : '0*$' >/dev/null
then
def previous_builds
builds.all(:order => [:created_at.desc]).tap do |builds|
builds.shift
end
end
Integrity.hooks do
on :successful_build, Deployer
on :failed_build, Notifier::Email
on :first_successful_build, Notifier::Email
on :build, Notifier::Irc
# the most common setup would be to have all notifiers on
# failed_build and first_successful_build, so maybe this
# shortcut would be cool too:
notify_with Notifier::Email, Notifier::Campfire
▸ git clone git://github.com/foca/webrat.git
Initialized empty Git repository in /Users/foca/tmp/webrat/.git/
remote: Counting objects: 4290, done.
remote: error: unable to find 14d5790cd4fc69a475ce493c8f6e35afba339591
remote: error: unable to find 5344d9fd43b6a604ae783b13ca1e5b3aeef0f2d9
remote: error: unable to find 5ace8b5e5d03746483233e6b16a8fb7fd0511199
remote: error: unable to find 5f2c8dfd1fc5c0cde88ddc4f4300493ee141059d
remote: error: unable to find 640b41df16e336bc31a6fb5f3ca1db01874084e3
remote: error: unable to find b03f499ac689da7f56281dcc8a9f9d528c57c0ac
remote: error: unable to find b537afb0cef5ceaaec0635aaca9953e940a7f9b0
@foca
foca / output
Created December 29, 2008 04:18
nil
"/"
"/"
"/login"
"/new"
"/integrity"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
foca ~/projects/self/integrity (git: master)
▸ gem list | grep context
jeremymcanally-context (0.5, 0.0.6)
foca ~/projects/self/integrity (git: master)
▸ ruby test/acceptance/delete_project_test.rb
Loaded suite test/acceptance/delete_project_test
Started
As an administrator,
I want to delete projects I don't care about anymore
describe Blah do
attr_reader :john, :mary
before(:each) do
@john = Webrat.session_class.new(self)
@mary = Webrat.session_class.new(self)
end
it "does stuff concurrently" do
mary.visit "/"
module Integrity
class Commit
include DataMapper::Resource
property :id, Integer, :serial => true
property :identifier, String, :nullable => false
property :message, String, :nullable => false, :length => 255
property :author, String, :nullable => false, :length => 255
property :committed_at, DateTime, :nullable => false