This file contains 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
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. | |
function rvm_version { | |
RVM_VERSION=`~/.rvm/bin/rvm-prompt` | |
if [[ -f "$(pwd)/Rakefile" ]] && [[ ! -z "$RVM_VERSION" ]]; then | |
echo "${RVM_VERSION} " | |
fi | |
} | |
if [[ -s ~/.rvm/scripts/rvm ]] |
This file contains 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
@ECHO OFF | |
SET _HOMEDRIVE=%HOMEDRIVE% | |
SET _HOMEPATH=%HOMEPATH% | |
SET HOMEDRIVE=C: | |
SET HOMEPATH=\Ruby187 | |
IF NOT "%~f0" == "~f0" GOTO :WinNT | |
@"ruby.exe" "C:\Ruby187\bin\gem" %1 %2 %3 %4 %5 %6 %7 %8 %9 | |
GOTO :EOF | |
:WinNT | |
@"ruby.exe" "%~dpn0" %* |
This file contains 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
# importamos a biblioteca rubygems, sem ela não podemos importar o Watir | |
require 'rubygems' | |
# importamos a biblioteca do Watir | |
# require 'firewatir' se você estiver usando Linux/Mac ou se você | |
# quer usar o Firefox, ao invés, do IE (necessário instalar ele - gem install firewatir) | |
require 'watir' | |
puts "Abrindo navegador" | |
# aqui estamos passando para a variável browser a instância de um objeto Browser do Watir | |
# você verá que o IE irá abri | |
browser = Watir::Browser.new |
This file contains 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 bash | |
echo -e "\n\n" | |
echo -e "=> Instalando o Ruby e o Rubygems" | |
apt-get install ruby rubygems ruby-dev | |
echo export PATH=/var/lib/gems/1.8/bin:$PATH >> ~/.bashrc | |
echo -e "=> Atualizando Rubygems" | |
cd /tmp/ | |
wget http://production.cf.rubygems.org/rubygems/rubygems-1.6.1.tgz |
This file contains 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 'rubygems' | |
require 'watir' | |
#require 'firewatir' => se você estiver no Linux/Mac | |
class HomePage | |
HOME_PAGE = 'twitter.com' | |
def initialize | |
@browser = Watir::Browser.new |
This file contains 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 'rubygems' | |
require 'firewatir' | |
@browser = Watir::Browser.new | |
@browser.goto('http://www.eliasnogueira.info/arquivos_blog/selenium/desafio/soma.php') | |
number1 = @browser.label(:id, 'number1').text.to_i | |
number2 = @browser.label(:id, 'number2').text.to_i | |
sum = number1 + number2 | |
@browser.text_field(:name, 'soma').value = sum | |
@browser.button(:name, 'submit').click |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<link rel="selenium.base" href="http://www.eliasnogueira.info/" /> | |
<title>New Test</title> | |
</head> | |
<body> | |
<table cellpadding="1" cellspacing="1" border="1"> |
This file contains 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
2011-03-21 09:24:38.185 / 500 47181ms 37455cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16,gzip(gfe) | |
189.68.16.247 - - [21/Mar/2011:09:24:38 -0700] "GET / HTTP/1.1" 500 217 - "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16,gzip(gfe)" "vizir-ics.appspot.com" ms=47182 cpu_ms=37455 api_cpu_ms=0 cpm_usd=1.040485 pending_ms=1144 exit_code=104 throttle_code=1 | |
E 2011-03-21 09:24:37.572 | |
javax.servlet.ServletContext log: unable to create shared application instance | |
org.jruby.rack.RackInitializationException: undefined method `blame_file!' for #<Java::ComGoogleApphostingApi::DeadlineExceededException:0x16bc6e5> | |
from file:/base/data/home/apps/vizir-ics/1.349156647874378203/WEB-INF/lib/gems.jar!/bundler_gems/jruby/1.8/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:287:in `load_routes!' | |
from org/jruby/RubyArray.java:1572:in `each' | |
from file:/base/data/home/apps |
This file contains 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
SELECT 'example', CURTIME() | |
INTO OUTFILE '/tmp/result.csv' | |
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' | |
LINES TERMINATED BY '\n' | |
FROM YOUR_TABLE |
This file contains 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
class Client < ActiveRecord::Base | |
LIST_FIELDS = [:code, :corporate_name, :phone, :email] | |
rails_admin do | |
label "#{I18n.t('client.menu_name')}" | |
LIST_FIELDS.each do |f| | |
list do | |
field f | |
end | |
end | |
edit do |
OlderNewer