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
describe "logged in", :shared => true do | |
before(:each) do | |
login | |
end | |
end | |
context "when logged in" do | |
describe "Homepage: url(:home)", :when => "logged in" do | |
it "allows the user to visit" do | |
rack = request(:home) |
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 Numeric | |
module Extlib | |
def self.some_method(number) | |
# stuff | |
end | |
def self.some_method2(number) | |
# stuff | |
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
diff --git a/rubygems.rb b/rubygems.rb | |
index b2324f4..c942c39 100644 | |
--- a/rubygems.rb | |
+++ b/rubygems.rb | |
@@ -100,6 +100,7 @@ module Gem | |
@configuration = nil | |
@loaded_specs = {} | |
+ @specs_for = {} | |
@platforms = [] |
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
<?xml version='1.0' encoding='utf-8' ?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<title>Ditty - A non-linear web notebook</title> | |
<script src='jquery.js' type='text/javascript'></script> | |
<script type='text/javascript'> | |
//<![CDATA[ | |
$(document).ready(function() { | |
// let tiddlers be closed |
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
yehuda-katzs-macbook-pro-2:bench-app wycats$ merb | |
~ Compiling routes... | |
~ Starting Merb server listening at 0.0.0.0:4000 | |
{61209=>4000, 61210=>4001, 61211=>4002, 61212=>4003} | |
~ Starting mongrel at port 4000 | |
~ Starting mongrel at port 4003 | |
~ Starting mongrel at port 4002 | |
~ Starting mongrel at port 4001 | |
## Other console |
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
Merb::Cache.setup do | |
gzip = gzip_store(wrap(file_store)) | |
sha1 = sha1_store(wrap(gzip) | |
self[:my_page_cache] = page_store(wrap(sha1)) | |
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
"foo" \ | |
"bar" \ | |
"#{baz}" |
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
Merb::Router.prepare do |r| | |
add_slice(:MerbAuth, :path => "", :default_routes => false) | |
# This is the default route for /:controller/:action/:id | |
# This is fine for most cases. If you're heavily using resource-based | |
# routes, you may want to comment/remove this line to prevent | |
# clients from calling your create or destroy actions with a GET | |
#r.default_routes | |
# Change this for your home page to be available at / |
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
{ | |
:href => uri(article), | |
:title => article.title, | |
# ... | |
} | |
## compiles into | |
def ... | |
json = { |
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
{ | |
name: "input_name", | |
value: "input_value" | |
} |