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
From 233020a2d01e9c4f0bfdd54657062312d2039a57 Mon Sep 17 00:00:00 2001 | |
From: Michael Koziarski <[email protected]> | |
Date: Thu, 11 Sep 2008 16:03:38 +0200 | |
Subject: [PATCH] Flesh out the parameterize method to support non-ascii text and underscores. | |
--- | |
activesupport/lib/active_support/inflector.rb | 2 +- | |
activesupport/test/inflector_test_cases.rb | 5 ++++- | |
2 files changed, 5 insertions(+), 2 deletions(-) | |
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
$: << "/Users/lifo/Rails/sinatra/lib" | |
require 'rubygems' | |
require 'sinatra' | |
require 'sinatra/test/unit' | |
require 'app' | |
class Rack::Response | |
attr_accessor :variables | |
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
Let's make a list of Sinatra-based apps! | |
Apps: | |
- http://github.com/cschneid/irclogger "Sinatra based irclogger.com" | |
- http://github.com/rtomayko/wink "minimalist blogging engine" | |
- http://github.com/foca/integrity "The easy and fun Continuous Integration server" | |
- http://github.com/sr/git-wiki "git-powered wiki" | |
- http://github.com/entp/seinfeld "Seinfeld-inspired productivity calendar to track your public github commits." | |
- http://github.com/karmi/marley "Marley, the blog engine without <textareas>." | |
- http://github.com/ichverstehe/gaze "Serve up your Markdown files with this tiny Sinatra app!" |
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 Pimping | |
=============== | |
Ideas/Brain dump | |
---------------- | |
* Do not show the README on the front page. But: | |
* Elevator pitch | |
* Code | |
* Mailing-List, #sinatra, Bug tracker |
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
# A Sinatra App as a Rails Plugin | |
# | |
# In your Edge Rails app: | |
# | |
# ruby script/plugin install git://gist.github.com/50625.git | |
require 'sinatra/base' | |
class SinatraRailsPlugin < Sinatra::Base | |
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
inside('vendor') do | |
run "ln -s ~/Playground/Rails/rails rails" | |
end | |
run "rm public/index.html" | |
generate(:scaffold, "item name:string") | |
route "map.root :controller => 'items'" | |
rake("db:migrate", "development") |
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
# Czech version | |
# NOTE: We actually say "Rock-Scissors-Paper" ("Kámen-Nůžky-Papír"), in this order | |
Kámen | |
Papír | |
Nůžky | |
Raz...Dva...Tři! | |
Vy: Kámen |
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
class KubicekMiddleware | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
#tohle se vola pred aplikaci | |
env["REQUEST_URI"]="/welcome" | |
#zavolame aplikaci | |
status, headers, response = @app.call(env) |
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
#!/usr/bin/env ruby | |
# | |
# Based on drbfs example by Kent Sibilev | |
require 'lib/fusefs' | |
# We're basically just passing all requests on to the local filesystem. | |
class UfsDirectory | |
def initialize(dir) | |
@dir = dir |
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
class Performer | |
attr_accessor :object, :method_to_call, :parameters_for_method | |
def initialize(object, method_to_call, *parameters_for_method) | |
@object, @method_to_call, @parameters_for_method = object, method_to_call, parameters_for_method | |
end | |
def perform | |
puts parameters_for_method.inspect |
OlderNewer