Skip to content

Instantly share code, notes, and snippets.

@xarimanx
xarimanx / gist:1798861
Created February 11, 2012 11:23 — forked from oleksiilevzhynskyi/gist:1349543
Date Time Format in RUBY
Format meaning:
%a - The abbreviated weekday name (``Sun'')
%A - The full weekday name (``Sunday'')
%b - The abbreviated month name (``Jan'')
%B - The full month name (``January'')
%c - The preferred local date and time representation
%d - Day of the month (01..31)
%H - Hour of the day, 24-hour clock (00..23)
%I - Hour of the day, 12-hour clock (01..12)
<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "--strict --tags ~@wip --tags ~@pending"
std_format = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'}"
%>
default: <%= std_opts %> <%= std_format %> features
wip: --tags @wip --tags ~@pending --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
detail: --tags ~@pending --wip features
@xarimanx
xarimanx / gist:1798774
Created February 11, 2012 11:04 — forked from delano/gist:845643
Fix for "Errno::ETIMEDOUT: Operation timed out - connect(2)" when installing gems
# A DNS change to Rubygems.org is causing lingering issues. Namely,
# rubygems.org and production.s3.rubygems.org are still pointing to
# the old address. See:
# http://twitter.com/#!/gemcutter/status/30666857698557952
# The symptoms:
# $ gem install benelux --version 0.5.17
# ERROR: Could not find a valid gem 'benelux' (= 0.5.17) in any repository
# ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)