FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)
output = `cat #{ENV["CIRCLE_ARTIFACTS"] || "."}/coverage/index.html | grep Changed -A 2 | grep "[0-9\.]*%"` | |
percentage_match = output.match(/([0-9\.]+)%/) | |
raise "Unable to determine test coverage change" unless percentage_match | |
RED = "\033[0;31m" | |
BOLD = "\033[1m" | |
NO_COLOR = "\033[0m" | |
percentage = percentage_match[0].to_f |
def assert_differences(expression_array, by:, message: nil, &block) | |
expressions = Array(expression_array) | |
change_by = Array(by).map(&:to_i) | |
if expressions.size != change_by.size | |
raise ArgumentError, 'Each expression must have a corresponding value to change by' | |
end | |
exps = expressions.map.with_index do |e, i| | |
callable = e.respond_to?(:call) ? e : lambda { eval(e, block.binding) } |
FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)
Welcome!
UPDATE: This list is no longer maintained. I've moved it to its own repo so you can send suggestions as Pull Requests. https://github.com/dideler/bootstrapping/
For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.
Starring this gist will give me an idea of how many people consider this list useful.