This file contains hidden or 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
| require 'rubygems' | |
| require 'sinatra' | |
| require 'haml' | |
| require 'awesome_print' | |
| before do | |
| @yoga_classes = {"hatha beginners" => ['meli', 'wilf'], "hatha intermediate" => ['atty', 'corin', 'grabby'], "ashthanga beginners" => ['corin', 'atty'], "ashtanga intermediate" => ['corin', 'stephen', 'helena', 'grandpa'], "asthanga advanced" => ['helena', 'denis']} | |
| end | |
| helpers do |
This file contains hidden or 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
| class Config | |
| def initialize(data={}) | |
| @data = {} | |
| update!(data) | |
| end | |
| def update!(data) | |
| data.each do |key,value| | |
| self[key] = value | |
| end |
This file contains hidden or 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
| ( ) ( ) ) | |
| ) ( ) ( ( | |
| ( ) ( ) ) | |
| _____________ | |
| <_____________> ___ | |
| | |/ _ \ | |
| | | | | | |
| | |_| | | |
| ___| |\___/ |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'thor' | |
| require 'pathname' | |
| command = ARGV.first | |
| arguments = ARGV[1..-1] | |
| class CucumberChef < Thor |
This file contains hidden or 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
| require 'rubygems' | |
| require 'thor' | |
| require 'fileutils' | |
| require 'awesome_print' | |
| ap ARGV | |
| command = ARGV.first | |
| arguments = ARGV[1..-1] | |
| GEM_DIR = Gem.default_dir |
This file contains hidden or 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
| ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:26 +0000] INFO: Client key /etc/chef/client.pem is not present - registering | |
| ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:26 +0000] ERROR: Connection refused connecting to localhost:4000 for /clients, retry 1/5 | |
| ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:31 +0000] ERROR: Connection refused connecting to localhost:4000 for /clients, retry 2/5 | |
| ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:36 +0000] ERROR: Connection refused connecting to localhost:4000 for /clients, retry 3/5 | |
| ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:41 +0000] ERROR: Connection refused connecting to localhost:4000 for /clients, retry 4/5 | |
| ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:46 +0000] ERROR: Connection refused connecting to localhost:4000 for /clients, retry 5/5 | |
| ec2-46-137-13-24.eu-west-1.compute.amazonaws.com /usr/lib/ruby/g |
This file contains hidden or 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
| ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:48 +0000] INFO: Client key /etc/chef/client.pem is not present - registering | |
| ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:49 +0000] WARN: HTTP Request Returned 409 Conflict: Client already exists. | |
| ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:51 +0000] WARN: HTTP Request Returned 404 Not Found: Cannot load node test_node | |
| ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:54 +0000] INFO: Setting the run_list to "" from JSON | |
| ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:55 +0000] INFO: Starting Chef Run (Version 0.9.14) | |
| ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:56 +0000] ERROR: Running exception handlers | |
| ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:56 +0000] ERROR: Exception handlers complete | |
| ec2-46-137-39-91.eu-west-1.compute.amazonaws.com /usr/lib/ruby/gems/1.8/gems/chef-0.9.14 |
This file contains hidden or 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
| { | |
| "AWSTemplateFormatVersion": "2010-09-09", | |
| "Description" : "Test template that fires up a single FreeBSD instance", | |
| "Parameters" : { | |
| "KeyPair" : { | |
| "Description" : "The EC2 Key Pair to allow SSH access to the instance", | |
| "Type" : "String" | |
| } | |
| }, | |
| "Resources" : { |
This file contains hidden or 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
| class Magick < Sinatra::Base | |
| helpers do | |
| def smash(version, environment) | |
| environments = get_environments | |
| versions = environments[environment] | |
| index = versions.index(version) | |
| environments[environment].delete_at(index) | |
| File.open("environments.yaml", "w") { |file| file.write(environments.to_yaml) } |
This file contains hidden or 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
| { | |
| "AWSTemplateFormatVersion": "2010-09-09", | |
| "Description" : "Phase1", | |
| "Parameters" : { | |
| "KeyPair" : { | |
| "Description" : "The EC2 Key Pair to allow SSH access to the instance", | |
| "Type" : "String" | |
| }, | |
| "Version" : { | |
| "Description" : "The version of the app that was deployed", |