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 'spec_helper' | |
| describe User do | |
| it "should be invalid wihout name" do | |
| user = User.create(:name => nil) | |
| user.errors.should be_invalid(:name) | |
| end | |
| it "should have minimum 5 characteres" do |
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
| deploy.application = "inploy" | |
| deploy.repository = 'git://github.com/dcrec1/inploy.git' | |
| deploy.user = 'dcrec1' | |
| deploy.hosts = ['hooters', 'geni'] | |
| deploy.path = '/var/local/apps' | |
| # optional advanced settings | |
| # deploy.ssh_opts = '-A' | |
| # deploy.branch = 'master' |
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
| deploy.template = :locaweb | |
| deploy.application = "nome_da_aplicacao" | |
| deploy.user = 'seu_usuario' | |
| deploy.hosts = ['seusite.com'] |
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 File.dirname(__FILE__) + '/../spec_helper' | |
| module ProjectSpecHelper | |
| def valid_project_attributes | |
| { :name => 'app_test', | |
| :url => 'git://my_app', | |
| :email => 'app@mail.com' } | |
| end | |
| def invalid_project_attributes |
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
| Net::SSH.start( hostname, username, :password => password ) do |ssh| | |
| puts "Gerando Backup" | |
| ssh.exec("mysqldump --host=#{host} --user=#{user} --password=#{pass} --database #{database} > dump.sql") | |
| begin | |
| raise "Excecao" unless File.exist?('dump.sql', ".") | |
| rescue ArgumentError => error | |
| puts "Algo errado aconteceu" | |
| rescue RuntimeError => error | |
| puts "Arquivo dump.sql nao foi encontado. #{error}" | |
| else |
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 'net/ssh' | |
| require 'fileutils' | |
| class MinhaGem | |
| VERSION = '0.0.1' | |
| def initialize(server, user, pass) | |
| @server = server | |
| @user = user |
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
| class Matematica | |
| end |
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
| class Matematica | |
| self # retorna Matematica | |
| end |
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
| mat = Matematica.new |
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
| mat.class # -> Matematica | |
| mat.is_a? Matematica # -> true |
OlderNewer