This file contains hidden or 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
| def it_should_return_json | |
| it "should have content type json" do | |
| @response.should have_content_type(:json) | |
| end | |
| end | |
| describe "#index" do | |
| before do | |
| @response = request("/gists.json") | |
| end |
This file contains hidden or 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 File.join(File.dirname(__FILE__), '..', 'spec_helper.rb') | |
| # bring in the constants so we can use NotFound, etc, instead of Merb::ControllerExceptions::NotFound | |
| include Merb::ControllerExceptions | |
| def it_should_return(content_type) | |
| it "should have content type #{content_type}" do | |
| @response.should have_content_type(content_type) | |
| end | |
| end |
This file contains hidden or 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 File.join(File.dirname(__FILE__), '..', 'spec_helper.rb') | |
| # bring in the constants so we can use NotFound, etc, instead of Merb::ControllerExceptions::NotFound | |
| include Merb::ControllerExceptions | |
| def it_should_return(content_type) | |
| it "should have content type #{content_type}" do | |
| @response.should have_content_type(content_type) | |
| end | |
| end |
This file contains hidden or 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 "#index" do | |
| before do | |
| @response = request("/gists.json") | |
| end | |
| it_should_respond_with OK | |
| it_should_return :json | |
| it_reports OK | |
| it_returns :json |
This file contains hidden or 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/merb-core/lib/merb-core/bootloader.rb b/merb-core/lib/merb-core/bootloader.rb | |
| index 1330ede..0bc474b 100644 | |
| --- a/merb-core/lib/merb-core/bootloader.rb | |
| +++ b/merb-core/lib/merb-core/bootloader.rb | |
| @@ -127,9 +127,6 @@ module Merb | |
| # :api: plugin | |
| # @overridable | |
| def default_framework | |
| - %w[view model helper controller mailer part].each do |component| | |
| - Merb.push_path(component.to_sym, Merb.root_path("app/#{component}s")) |
This file contains hidden or 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
| ~/testbed/fresh $ rake db:database_yaml | |
| (in /Users/jdempsey/testbed/fresh) | |
| Loading init file from /Users/jdempsey/testbed/fresh/config/init.rb | |
| Loading /Users/jdempsey/testbed/fresh/config/environments/development.rb | |
| Loading init file from /Users/jdempsey/testbed/fresh/config/init.rb | |
| Loading /Users/jdempsey/testbed/fresh/config/environments/rake.rb | |
| ... |
This file contains hidden or 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::BootLoader.before_app_loads do | |
| # page cache to the public dir | |
| Merb::Cache.register(:page_store, Merb::Cache::PageStore[Merb::Cache::FileStore], :dir => Merb.root / :public) | |
| # action cache to memcache | |
| Merb::Cache.register(:action_store, Merb::Cache::ActionStore[Merb::Cache::FileStore]) | |
| # sets up the ordering of stores when attempting to read/write cache entries | |
| Merb::Cache.register(:default, Merb::Cache::AdhocStore[:page_store, :action_store]) |
This file contains hidden or 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/config/routes.rb b/config/routes.rb | |
| index 4e2c9d0..ff64bb7 100644 | |
| --- a/config/routes.rb | |
| +++ b/config/routes.rb | |
| @@ -25,7 +25,7 @@ ActionController::Routing::Routes.draw do |map| | |
| # Sample resource route with sub-resources: | |
| # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller | |
| - | |
| + |
This file contains hidden or 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 Sequel | |
| class Model | |
| def self.inherited(klass) | |
| klass.extend(WillPaginate::Finders::Sequel) | |
| end | |
| end | |
| end | |
| class Car < Sequel::Model | |
| # extend WillPaginate::Finders::Sequel |
This file contains hidden or 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 'rubygems' | |
| require 'sequel' | |
| require 'sequel_polymorphic' | |
| require 'pp' | |
| DB = Sequel.mysql('sequel', :user => 'root', :host => 'localhost') | |
| pp DB.schema | |
| class Asset < Sequel::Model |