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 DataMapper | |
module Types | |
class UtcDateTime < DataMapper::Type | |
primitive DateTime | |
def self.load(value, property) | |
if value.nil? |
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 'rubygems' | |
require 'dm-core' | |
require 'spec' | |
module DataMapper | |
module ActiveModel | |
# This is mostly copied from active_model and adapted to use extlib under the hood. | |
# see http://github.com/rails/rails/blob/master/activemodel/lib/active_model/naming.rb |
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
## no idea | |
'Merb::Controller#cookies creating should append secure to the end of the cookie header when marked as such' FAILED | |
expected "safecook=no-hackers-here; domain=specs.merbivore.com; path=/; secure;" to match /secure$/ | |
## probably bundler related | |
'using dependency to require a simple gem loads dependencies immediately if Merb is already started' FAILED | |
expected not nil, got nil |
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
# setup new rubygem environment for merb 1.0.x | |
gem install extlib rspec rake memcache-client mongrel ruby-debug hpricot --no-rdoc --no-ri | |
gem install webrat --version=0.3.1 --no-rdoc --no-ri | |
gem install json_pure --version=1.1.6 --no-rdoc --no-ri |
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 'rubygems' | |
require 'dm-core' | |
module DataMapper | |
# monkey patch alarm | |
def self.setup(*args) | |
# original code | |
# ------------------------------------------------ |
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
mysql: | |
mysql-config: /usr/local/mysql/bin/mysql_config | |
nokogiri: | |
xml2-include: /opt/local/include/libxml2 | |
xml2-lib: /opt/local/lib | |
xslt-dir: /opt/local | |
iconv-dir: /opt/local |
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 'extlib/assertions' # pull it in | |
require 'extlib/inflection' # use active_support | |
require 'extlib/lazy_array' # pull it in | |
require 'extlib/logger' # use active_support | |
require 'extlib/class' # pull it in | |
require 'extlib/hash' # use active_support | |
require 'extlib/mash' # use active_support (if available) | |
require 'extlib/pathname' # think about dropping | |
require 'extlib/module' # think about using active_support | |
require 'extlib/object' # pull it in |
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 'rubygems' | |
require 'dm-core' | |
DataMapper::Logger.new($stdout, :debug) | |
DataMapper.setup(:default, 'sqlite3:memory:') | |
class Quote | |
include DataMapper::Resource | |
property :id, Serial | |
has 0..n, :billings, :through => Resource |
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
development: | |
adapter: master_slave | |
master: | |
adapter: mysql | |
database: master | |
host: master_server | |
slave: | |
adapter: mysql | |
database: slave | |
host: localhost |
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 ParameterSanitization | |
# Convert blank strings to nil if type is Integer and nils are allowed | |
# | |
# @example | |
# | |
# class User | |
# | |
# include DataMapper::Resource | |
# |