This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hook to save the html page of every failed features into the temp | |
# # file directory taht it can be checked after cucumber has finished running. | |
require 'fileutils' | |
FAILED_FEATURES_PAGES_PATH = File.join Rails.root, 'tmp', 'failed_features' | |
FAILED_FEATURES_IMAGES_PATH = File.join Rails.root, 'tmp', 'failed_features_images' | |
FileUtils.rm_rf FAILED_FEATURES_PAGES_PATH | |
FileUtils.rm_rf FAILED_FEATURES_IMAGES_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert a locations response to an Array of Location Objects | |
# | |
# response - The Hash object from an API response | |
# | |
# Returns an array of Location objects, returns nil if the Hash is empty | |
def self.objectify(response) | |
response.empty? ? nil : response.map {|station| Rtransport::Location.new(station)} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apps=( app1-demo app1-staging app2-draft ) | |
for app in ${apps[@]}; do | |
host="http://$app.herokuapp.com" | |
curl --silent --output /var/log/keep-alive.txt -L $host | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*/5 * * * * root /etc/cron.custom/keep-alive.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
$(document).on("page:change", -> | |
sumo = document.createElement("script") | |
sumo.type = "text/javascript" | |
sumo.async = true | |
sumo.src = "//load.sumome.com/" | |
sumo.setAttribute('data-sumo-site-id', 'your sumo me ID') | |
(document.getElementsByTagName("head")[0] or document.getElementsByTagName("body")[0]).appendChild(sumo) | |
) |
NewerOlder