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 "merb-assets" | |
Merb.flat! do |url| | |
url.match('/').to(:controller => 'simple', :action =>'index') | |
end | |
class Simple < Merb::Controller | |
provides :json | |
self._template_root = Dir.pwd | |
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 'mongrel' | |
require 'merb-core/rack/handler/mongrel' | |
module Merb | |
module Rack | |
class Mongrel < Merb::Rack::AbstractAdapter | |
def self.stop(status = 0) | |
if @server |
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
{{APIHeader|CSS|css|function}} | |
{{APIEntry| | |
|type=function | |
|name=css | |
|cat=CSS | |
|return=String | |
|added=1.0 | |
|desc=Return a style property on the first matched element. | |
|longdesc= | |
|arg0=name |
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
given "logged in" do | |
login | |
end | |
describe "/foo", :given => "logged in" do | |
end | |
# is equivalent to | |
describe "logged in", :shared => true do |
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
given "logged in" do | |
login | |
end | |
context "when logged in" do | |
context "Homepage: url(:home)", :given => "logged in" do | |
before(:each) do | |
@rack = request(:home) | |
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
(function($) { | |
$.fn.tabify = function(opts) { | |
opts = opts || {}; | |
opts["default"] = true; | |
var getContainer = function(anchor) { | |
if(anchor.attr("href").match(/^#/)) return $(anchor.attr("href")); | |
else return $(anchor.attr("rel")); | |
}; |
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::Test.add_helpers do | |
def login | |
rack = request("/", :method => "POST", | |
:params => {:username => "wycats", :password => "pass"}) | |
end | |
alias logging_in login | |
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
module Kernel | |
def given(*args, &example_group_block) | |
args << {} unless Hash === args.last | |
params = args.last | |
params[:shared] = true | |
describe(*args) do | |
before(:each) do | |
self.instance_eval(&example_group_block) |
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
/* | |
jQuery.plugin("resizable", { | |
options: { clickable: false }, | |
setup: function(){ | |
if ( this.options.clickable ) | |
// Automatically Namespaced | |
this.bind("click", function(){}); | |
this.addClass("test"); | |
}, |
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
(function($) { | |
$.plugin("tabify", { | |
options: { | |
showContainer: function(all, self) { | |
all.removeClass("tabs-container-visible"); | |
self.addClass("tabs-container-visible"); | |
}, | |
selectTab: function(all, self) { | |
all.removeClass("tabs-selected"); |