Skip to content

Tag Archives: ruby

CloudFront Invalidation from Ruby

Since none of the examples that I could find on the internet of how to invalidate a cloudfront asset in ruby were correct, I decided to post my solution: require 'rubygems' # may not be needed require 'openssl' require 'digest/sha1' require 'net/https' require 'base64' class CloudfrontInvalidator def initialize(aws_account, aws_secret, distribution) @aws_account = aws_account @aws_secret = […]

testing protected and private methods in ruby

When I was looking for how to test protected an private methods in ruby on the net, I found many sites arguing whether you should, and several methods for doing so. I am of the opinion that if your method contains any logic at all, it should have a test. Some examples of what I […]