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
`git clone git://github.com/sinatra/sinatra.git` unless File.exists?('sinatra') | |
`mkdir -p public` | |
`touch public/favicon.ico` | |
$: << 'sinatra/lib' | |
require 'rack' | |
require 'sinatra/base' | |
class Server < ::Sinatra::Base | |
set :public, Dir.pwd + '/public'; enable :static |
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
See associated gist for simple definitions of Project, User, Task, Answer models | |
referenced herein. | |
Summary: | |
I believe the logic about how JOINs are constructed needs to fundamentally | |
change. In order to create the correct JOIN SQL, the logic needs to be | |
aware of and account for how an individual query param's "links" are related | |
to each other *only*, instead of how they the query param's themselves | |
relate to each other (which is how I intepret how it works now). |
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
require "do_mysql" | |
require "dm-core" | |
require 'rubygems' | |
require 'ruby-debug' | |
Debugger.start | |
DataMapper::Logger.new(STDOUT, :debug) | |
DataMapper.setup(:default, "mysql://root@localhost/foo") |
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
jpr5@finesse(tmp)$ ruby foo.rb | |
2148181980 born | |
2148181820 born | |
2148181660 born | |
2148181500 born | |
2148181340 born | |
nuke class constant | |
done | |
calling GC.start | |
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
diff --git a/spec/lib/rspec_immediate_feedback_formatter.rb b/spec/lib/rspec_immediate_feedback_formatter.rb | |
index 95051ee..9068d87 100644 | |
--- a/spec/lib/rspec_immediate_feedback_formatter.rb | |
+++ b/spec/lib/rspec_immediate_feedback_formatter.rb | |
@@ -38,14 +38,27 @@ module Spec | |
output.flush | |
end | |
- def example_passed(*) | |
- output.print green('.') |
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
# Populate $BASE with symlinks to what you want, and put the rubygems.rb file at its root. | |
function rubylib { | |
if [ -n "$1" ]; then BASE="$1/"; else BASE="/proj/work/rubylib"; fi | |
export BASE | |
echo RUBYLIB will use base: $BASE | |
export RUBYLIB=$BASE:`ruby -e 'puts Dir["#{ENV["BASE"]}/*/**/lib"].join(":")'`:$RUBYLIB | |
} | |
alias rl=rubylib |
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
== Sinatra/0.10.1 has taken the stage on 4000 for development with backup from Mongrel | |
Sun, 09 Aug 2009 03:47:26 GMT ~ debug ~ (0.000587) SELECT "id", "session_id", "data", "updated_at" FROM "sessions" WHERE ("session_id" = 'true') ORDER BY "id" LIMIT 1 | |
Sun, 09 Aug 2009 03:47:26 GMT ~ debug ~ (0.000054) SELECT "id", "session_id", "data", "updated_at" FROM "sessions" WHERE ("session_id" = 'true') ORDER BY "id" LIMIT 1 | |
127.0.0.1 - - [08/Aug/2009 20:47:26] "GET /flows HTTP/1.1" 200 155 0.0080 | |
127.0.0.1 - - [08/Aug/2009 20:47:27] "GET /favicon.ico HTTP/1.1" 200 32 0.0014 | |
^CSat Aug 08 20:47:27 -0700 2009: Reaping 1 threads for slow workers because of 'shutdown' | |
Waiting for 1 requests to finish, could take 60.0 seconds. | |
== Sinatra has ended his set (crowd applauds) | |
^C |
NewerOlder