head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.18 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.16 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.14 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.12 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.10 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.8 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.6 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.4 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.2 pkgsrc-2008Q2-base:1.2; locks; strict; comment @# @; 1.2 date 2008.04.29.18.39.02; author jlam; state dead; branches; next 1.1; 1.1 date 2008.04.14.21.46.11; author jlam; state Exp; branches; next ; desc @@ 1.2 log @Update databases/ruby-sequel to 1.5.0. Changes from version 1.4.0 include: * No longer depend on the assistance gem, merge the Inflector and Validations code * Make the validation errors API compatible with Merb * Add validates_uniqueness_of, for protecting against duplicate entries in the database * Use reciprocal associations for all types of associations in the getter/setter/add_/remove_ methods * Fix many_to_one associations to cache negative lookups * Add eager loading of associations via new sequel_core object graphing * Fix many_to_many associations with classes inside modules without an explicit join table * Add the eager! and eager_graph! mutation methods to model datasets * Add Model.def_dataset_method, for defining methods on the model that reference methods on the dataset * Change Model#=== to always be false if the primary key is nil * Add Model#hash, which should be unique for a given class and primary key (or values if primary key is nil) * Make Model#reload clear any cached associations * Fix Model#destroy so that it returns self, not the result of after_destroy * Make Model#initialize, Model#set, and Model#update_with_params invulnerable to memory exhaustion * Add Model.str_columns, which gives a list of columns as frozen strings @ text @$NetBSD: patch-ab,v 1.1 2008/04/14 21:46:11 jlam Exp $ --- spec/caching_spec.rb.orig 2008-04-13 02:33:44.000000000 -0400 +++ spec/caching_spec.rb @@@@ -87,7 +87,12 @@@@ describe Sequel::Model, "caching" do m.values[:id] = 1 proc {m.cache_key}.should_not raise_error(Sequel::Error) end - + + it "should not raise error if trying to save a new record" do + proc {@@c.new(:name=>'blah').save}.should_not raise_error + proc {@@c.create(:name=>'blah')}.should_not raise_error + end + it "should set the cache when reading from the database" do $sqls.should == [] @@cache.should be_empty @ 1.1 log @Add patches missing from previous commit which updated ruby-sequel to version 1.4.0. @ text @d1 1 a1 1 $NetBSD$ @