Skip to content

Instantly share code, notes, and snippets.

@juriglx
juriglx / cef.rb
Created January 29, 2012 13:40
removes duplicate files, keeps the file with the longer filename
#!/usr/bin/ruby -w
require 'rubygems'
require 'digest/md5'
ARGV.each do |dir|
hf = {}
Dir["#{dir}/*"].each do |file|
#Cucumber steps for restful post
require 'webrat'
When /^I post (.*) to (.+)$/ do |data, path|
@response = request_page(path, :post, JSON.parse(data))
end
Then /^I should get a "(.*)" response$/ do |response_code|
@response.code.should == response_code
end