Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
module Fabulous
def self.included(base)
base.send :remove_method, :name
end
def name
"Fabulous"
end
# ==== Returns
# Hash:: The cookies for this request.
def cookies
@cookies ||= begin
cookies = self.class.query_parse(@env[Merb::Const::HTTP_COOKIE], ';,')
set_default_cookies
cookies
end
end
# frozen-merb freeze --all [--submodules] or [--rubygems]
#
# frozen-merb:freeze --dependencies [--rubygems] or [--submodules]
#
# frozen-merb freeze --core
# frozen-merb freeze --more
# frozen-merb freeze --plugins
#
# frozen-merb freeze --gems "foo-gem[0.9.5],bar-gem" [--rubygems] or [--submodules]
#
ORIGINAL IMPLEMENTATION /main/store
Server Software:
Server Hostname: 0.0.0.0
Server Port: 4000
Document Path: /main/store
Document Length: 3 bytes
Concurrency Level: 1
if defined?(Merb::Plugins)
dependency "activerecord"
require File.join(File.dirname(__FILE__) / "merb" / "orms" / "active_record" / "connection")
Merb::Plugins.add_rakefiles(File.join(File.dirname(__FILE__) / "active_record" / "merbtasks"))
class Merb::Orms::ActiveRecord::Connect < Merb::BootLoader
after BeforeAppLoads
fabien$ rm -Rf bin gems src
fabien$ thor merb:tasks:setup
Located thor in gem cache...
Successfully installed thor-0.9.6
Located rake in gem cache...
Successfully installed rake-0.8.1
Located rspec in gem cache...
Successfully installed rspec-1.1.4
Adding local executable /Users/fabien/Development/merb-related/bundle-app/bin/thor
@fabien
fabien / goals.txt
Created September 15, 2008 17:33 — forked from carllerche/goals.txt
How do we generate the following?
From inside a slice, generate a route that stays inside the slice.
From inside a slice, generate a route that goes to another slice.
From inside a slice, generate a route that goes to the main application.
From the main application, generate a route to a slice route.
desc 'bundle [STRATEGY]', 'Bundle the current application (strategy=stable|edge)'
method_options "--merb-root" => :optional,
"--version" => :optional,
"--sources" => :optional,
"--all" => :boolean
Proposed new structure for merb.thor:
1) use Merb module instead of Merb class (no more < Thor)
2) extract source handling (git related tasks) into SourceManagement module
3) keep merb:gems and merb:source 'raw' tasks (but use the new Thor grouping: thor -T --all OR --group developer)
4) use merb:depencies for application bundle tasks (alternatively merb:application)
5) use merb:system for system-wide tasks (alternatively merb:stack)
6) use merb:tasks for utility tasks (merb:tasks:update etc. - setup will be implicit now)
7) use dm: namespace for specific dm tasks (merb:stack could delegate to this?)
8) use sequel: or active_record: namespaces in a similar fashion
require 'rubygems/dependency_installer'
require 'rubygems/uninstaller'
require 'rubygems/dependency'
module GemManagement
include ColorfulMessages
# Install a gem - looks remotely and local gem cache;
# won't process rdoc or ri options.