Skip to content

Instantly share code, notes, and snippets.

@alanrrb
alanrrb / dicas_capybara.md
Last active July 21, 2021 19:29
Dicas Capybara + Rspec

Dicas Capybara + Rspec

Navegando

visit('/path')
visit(models_path)
visit(model_path(model))
visit '/path'
@alanrrb
alanrrb / meus_jogos_ps3
Created November 24, 2011 01:20
Meus jogos - PS3
Infamous 2
Uncharted 3
Bioshock 2
Dante's Inferno
God of War 3
Resistance 2
Crysis 2
Sports Champions
Dead Space
Super Street Fighter IV
# adicionando a gem
require 'rubygems'
require 'jsparrow'
# capturando os parametros de linha
$NOME = ARGV[0] if ARGV[0]
# parametrizando a conexao com o provider
JSparrow::Connection.configure do |connection|
connection.use_jms_client_jar '/Users/alan/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar'
# adicionando a gem
require 'rubygems'
require 'jsparrow'
# capturando os parametros de linha
$NOME = ARGV[0] if ARGV[0]
# parametrizando a conexao com o provider
JSparrow::Connection.configure do |connection|
connection.use_jms_client_jar '/Users/alan/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar'
require 'rubygems'
require 'mongo'
conn = Mongo::Connection.new
db = conn.db("meu_bd")
# mongo_template.rb
# fork of Ben Scofield's Rails MongoMapper Template (http://gist.github.com/181842)
# fork of banker's Rails MongoMapper Template (http://gist.github.com/219223)
#
# Uso:
# rails project_name -m "http://gist.github.com/307386.txt"
# removendo arquivos desnecessarios
run "rm public/index.html"
run "rm public/images/rails.png"