We have changed our check_url implementation from curl to wget for three reasons
- It gives us the ability to retry on connection refused. Compare the command we used previously with curl:
curl -sSfL --retry 3 URL
to the current one:
We have changed our check_url implementation from curl to wget for three reasons
curl -sSfL --retry 3 URL
to the current one:
class Tunnel < Thor | |
method_options :environment => "development", :aliases => "-e", :desc => "Config environment" | |
desc "start", "Start an ssh tunnel" | |
def start | |
random_hi_port = rand(30000) + 30000 | |
identity_part = tunnel['identity_file'] ? "-i #{tunnel['identity_file']}" : "" | |
ssh_part = "ssh -t #{identity_part} -g -R *:#{random_hi_port}:0.0.0.0:#{tunnel['local_port']} #{tunnel['username']}@#{tunnel['public_host']}" |
require 'config/environment.rb' | |
class GlobalizeCountry < ActiveRecord::Base | |
end | |
class GlobalizeLanguage < ActiveRecord::Base | |
end | |
class GlobalizeTranslation < ActiveRecord::Base | |
belongs_to :language, :class_name => "GlobalizeLanguage" |
require 'open-uri' | |
# url dsl -- the ultimate url dsl! | |
# | |
# You just can't beat this: | |
# | |
# $ irb -r url_dsl | |
# >> include URLDSL | |
# => Object | |
# >> http://github.com/defunkt.json |