Makes 680g dough (enough for 4 × 30 cm pizza)
- 4 teaspoons dried yeast
- 4 teaspoons salt
- 400 ml warm water
- 8 teaspoons olive oil, plus extra, for greasing
- 640 g plain (all-purpose) flour, sifted
| def requirable?(filename) | |
| result = fork do | |
| begin | |
| require filename | |
| exit!(0) | |
| rescue | |
| exit!(1) | |
| end | |
| end | |
| result == 0 ? true : false |
| describe "Without logging in" do | |
| describe "a request to /foo/bar" do | |
| before(:each) do | |
| get("/foo/bar") | |
| end | |
| it "redirects" do | |
| rack.status.should == 302 | |
| end | |
| # Example of how to use multiple Routes in external files/modules | |
| require 'rubygems' | |
| require 'sinatra/base' | |
| # set the root of the whole app | |
| APP_ROOT = File.dirname(File.expand_path(__FILE__)) unless defined?(APP_ROOT) | |
| require "sinatra-external_routes_example" |
| #!/usr/bin/env ruby -wKU | |
| @actions = Hash.new {|h,k| h[k] = []} | |
| def tell_program(name, &block) | |
| @actions['songstart'] << lambda do |*args| | |
| IO.popen("osascript", "w") do |f| | |
| f.puts %Q{ | |
| tell application "System Events" | |
| if exists process "#{name}" then |
| require 'celluloid' | |
| class Something | |
| class RemoteScriptError < RuntimeError; end | |
| include Celluloid | |
| def ssh_command(*) | |
| [false, Struct.new(:stdout, :stderr).new("out", "err")] | |
| end |
| require 'rubygems' | |
| require "bundler/setup" | |
| require 'reel/app' | |
| Celluloid.task_class = Celluloid::TaskThread | |
| class Wu | |
| include Reel::App | |
| get '/' do |request| | |
| puts "Request came in //" |
| source 'https://rubygems.org' | |
| gem 'celluloid-io', :git => 'https://github.com/celluloid/celluloid-io.git' | |
| gem 'celluloid', :git => 'https://github.com/celluloid/celluloid.git' | |
| gem 'reel',:git => 'https://github.com/celluloid/reel.git' |
| foo | |
| D, [2013-05-11T00:39:46.596057 #48493] DEBUG -- : Terminating 2 actors... | |
| D, [2013-05-11T00:39:46.596526 #48493] DEBUG -- : Shutdown completed cleanly |
| class WTF | |
| attr_reader :color | |
| def initialize | |
| @color = 'red' | |
| end | |
| def color_with_self | |
| color = self.color | |
| color |