Skip to content

Instantly share code, notes, and snippets.

View cassiomarques's full-sized avatar
💭
I have no idea what I'm doing

Cássio Marques cassiomarques

💭
I have no idea what I'm doing
View GitHub Profile
# is it risky to trust on updated_at ?
# Summary: all products with no price on API should be disabled.
# adding a new 'updated_by_api_at' timestamp field to the products table...
start_time = Time.now
Product.transaction do
ProductApi.each do |e|
Product.find(e.code).update_attributes :price => e.price, :updated_by_api_at = Time.now
end
require 'cucumber/rake/task'
namespace :cucumber do
Cucumber::Rake::Task.new(:plain) do |t|
t.cucumber_opts = "--format pretty"
t.step_list = %w{features/support/env.rb features/support/plain.rb features/step_definitions}
t.feature_list = %w{features/plain}
end
task :plain => 'db:test:prepare'