sudo apt-get update && sudo apt-get install imagemagick gs
mkdir -p pdf_conversion/{merged,split}
cd pdf_conversion
# ... | |
gem 'carrierwave' | |
gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL |
require './hash_inverse' | |
describe Hash do | |
describe "when empty and asked for the inverse" do | |
it "returns an empty hash" do | |
{}.inverse.must_equal Hash.new | |
end | |
end | |
describe "when mapping are unique and asked for the inverse" do |
# Here's a contrived example of a LEFT JOIN using ARel. This is an example of | |
# the mechanics, not a real-world use case. | |
# NOTE: In the gist comments, @ozydingo linked their general-purpose ActiveRecord | |
# extension that works for any named association. That's what I really wanted! | |
# Go use that! Go: https://gist.github.com/ozydingo/70de96ad57ab69003446 | |
# == DEFINITIONS | |
# - A Taxi is a car for hire. A taxi has_many :passengers. | |
# - A Passenger records one person riding in one taxi one time. It belongs_to :taxi. |
require "open-uri" | |
require "net/http" | |
Error = Class.new(StandardError) | |
DOWNLOAD_ERRORS = [ | |
SocketError, | |
OpenURI::HTTPError, | |
RuntimeError, | |
URI::InvalidURIError, |
initialize
: once, when the controller is first instantiatedconnect
: anytime the controller is connected to the DOM