Skip to content

Instantly share code, notes, and snippets.

def somapares(*pares)
pares.map {|par| par[0] + par[1]}
end
somapares [1, 5], [4, 7]
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
# 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'