Permalink
Browse files

Fixing schema to get rid of rails 3.2 deprecation warning, updating r…

…eadme with compatibility clause
  • Loading branch information...
awebneck committed Apr 8, 2012
1 parent 957f65d commit f34450b4526036c9baeb77fc2ad43f4115b1570b
Showing with 53 additions and 43 deletions.
  1. +1 −1 Gemfile
  2. +37 −39 Gemfile.lock
  3. +11 −1 README.markdown
  4. +2 −2 spec/object_daddy_spec.rb
  5. +2 −0 spec/resources/schema
View
@@ -10,7 +10,7 @@ group :development do
gem "rdoc", "~> 3.12"
gem "bundler", "~> 1.0.0"
gem "jeweler", "~> 1.8.3"
gem "rails", "~> 3.1.4"
gem "rails", ">= 3.0.0"
gem "generator_spec"
gem "sqlite3"
gem "rspec-rails"
View
@@ -1,35 +1,34 @@
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.4)
actionpack (= 3.1.4)
mail (~> 2.3.0)
actionpack (3.1.4)
activemodel (= 3.1.4)
activesupport (= 3.1.4)
actionmailer (3.2.3)
actionpack (= 3.2.3)
mail (~> 2.4.4)
actionpack (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.6)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.3)
activemodel (3.1.4)
activesupport (= 3.1.4)
sprockets (~> 2.1.2)
activemodel (3.2.3)
activesupport (= 3.2.3)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.4)
activemodel (= 3.1.4)
activesupport (= 3.1.4)
arel (~> 2.2.3)
activerecord (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.1.4)
activemodel (= 3.1.4)
activesupport (= 3.1.4)
activesupport (3.1.4)
activeresource (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
activesupport (3.2.3)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (2.2.3)
arel (3.0.2)
builder (3.0.0)
coderay (1.0.6)
diff-lcs (1.1.3)
@@ -45,8 +44,9 @@ GEM
git (>= 1.2.5)
rake
rdoc
journey (1.0.3)
json (1.6.6)
mail (2.3.3)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
@@ -61,26 +61,24 @@ GEM
coderay (~> 1.0.5)
method_source (~> 0.7.1)
slop (>= 2.4.4, < 3)
rack (1.3.6)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.4)
actionmailer (= 3.1.4)
actionpack (= 3.1.4)
activerecord (= 3.1.4)
activeresource (= 3.1.4)
activesupport (= 3.1.4)
rails (3.2.3)
actionmailer (= 3.2.3)
actionpack (= 3.2.3)
activerecord (= 3.2.3)
activeresource (= 3.2.3)
activesupport (= 3.2.3)
bundler (~> 1.0)
railties (= 3.1.4)
railties (3.1.4)
actionpack (= 3.1.4)
activesupport (= 3.1.4)
railties (= 3.2.3)
railties (3.2.3)
actionpack (= 3.2.3)
activesupport (= 3.2.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@@ -102,7 +100,7 @@ GEM
railties (>= 3.0)
rspec (~> 2.8.0)
slop (2.4.4)
sprockets (2.0.3)
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
@@ -123,7 +121,7 @@ DEPENDENCIES
jeweler (~> 1.8.3)
mocha
pry
rails (~> 3.1.4)
rails (>= 3.0.0)
rdoc (~> 3.12)
rspec (~> 2.8.0)
rspec-rails
View
@@ -18,6 +18,16 @@ exemplar" or _stereotype_.
See [http://b.logi.cx/2007/11/26/object-daddy](http://b.logi.cx/2007/11/26/object-daddy) for inspiration, historical drama, and too much reading.
## Compatibility
Object Daddy does not require Rails/ActiveRecord in order to be of use, but should you be doing so, be aware that
this gem is compatible only with Rails >= 3.0.0. It has been tested with the following versions, but should be
perfectly compatible with all corresponding minor releases.
- Rails 3.0.12
- Rails 3.1.4
- Rails 3.2.3
## Installation
Add the following to your Gemfile and run `bundle install`
@@ -26,7 +36,7 @@ Add the following to your Gemfile and run `bundle install`
gem 'object-daddy'
end
Once installed, to set up your exemplars directory, run `rails g object-daddy`
Once installed, to set up your exemplars directory, run `rails g object-daddy` (if using with Rails)
## Using Object Daddy
@@ -637,11 +637,11 @@ class ProtectedAttribute < ActiveRecord::Base
it "should provide a means of generating and saving a class instance" do
Frobnitz.should respond_to(:generate)
end
it "should provide a means of generating and saving a class instance while raising exceptions" do
Frobnitz.should respond_to(:generate!)
end
describe "and a block is passed to generate" do
it "should yield the instance to the block" do
yielded_object = nil
View
@@ -4,12 +4,14 @@ ActiveRecord::Schema.define(:version => 0) do
t.column :title, :string
t.column :foo_id, :integer
t.column :baz_id, :integer
t.column :bar_id, :integer
t.column :thing_id, :integer
t.column :splort_id, :integer
t.column :bangbang_id, :integer
t.column :wakka_id, :integer
t.column :blitblot_id, :integer
t.column :poolie_id, :integer
t.column :type, :string
end
create_table :foos, :force => true do |t|

0 comments on commit f34450b

Please sign in to comment.