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
source 'https://rubygems.org' | |
gem 'aws-sdk' | |
gem 'yaml_properties' | |
gem 'pry' |
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
var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol | |
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name | |
'((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address | |
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path | |
'([\?\&][\\\/;&a-z\\d%_.~+=-]*)?'+ // query string | |
'(\\#[-a-z\\d_]*)?$','i'); // fragment locator | |
function testString(str){ | |
if(!pattern.test(str)) { | |
return false; |
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
module BroadcastFlow | |
class V1Decorator < ApplicationDecorator | |
def navigation_partial | |
h.render 'events_wizard/wizard_steps' | |
end | |
def show_path | |
h.events_wizard_path(model) | |
end | |
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
namespace :db do | |
desc "Download the a full dump of the production database into the development database" | |
task :pull do | |
config = YAML::load(File.open(File.join('config', 'database.yml'))) | |
dump_database_remotely(config['production'], remote_file) | |
compress_backup_remotely(remote_file) | |
download_backup(remote_file(:compressed), local_file(:compressed)) |