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
def somapares(*pares) | |
pares.map {|par| par[0] + par[1]} | |
end | |
somapares [1, 5], [4, 7] |
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
namespace :templates do | |
desc "Copy all the templates from rails to the application directory for customization" | |
task :copy do | |
require 'rubygems' | |
require 'rubygems/gem_runner' | |
require 'fileutils' | |
railties = (version = ENV['VERSION']) ? | |
Gem.cache.find_name('railties', "= #{version}").first : | |
Gem.cache.find_name('railties').sort_by { |g| g.version }.last | |
base_path = railties.full_gem_path |
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
# template.rb | |
# from Anderson Dias | |
#==================== | |
# PLUGINS | |
#==================== | |
# Testing | |
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git' | |
plugin 'cucumber', :git => 'git://github.com/aslakhellesoy/cucumber.git' |