Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Commit

Permalink
more rails3 / ruby192 tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
janlelis committed Feb 6, 2011
1 parent 6a941af commit 48b19f4
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 62 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source :rubygems

gem "rails", ">=3.0.0"
gem "rails", ">=3.0.3"
gem 'sqlite3-ruby'
85 changes: 42 additions & 43 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,72 @@ GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.1)
actionpack (= 3.0.1)
mail (~> 2.2.5)
actionpack (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
actionmailer (3.0.3)
actionpack (= 3.0.3)
mail (~> 2.2.9)
actionpack (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.4.1)
i18n (~> 0.4)
rack (~> 1.2.1)
rack-mount (~> 0.6.12)
rack-test (~> 0.5.4)
rack-mount (~> 0.6.13)
rack-test (~> 0.5.6)
tzinfo (~> 0.3.23)
activemodel (3.0.1)
activesupport (= 3.0.1)
activemodel (3.0.3)
activesupport (= 3.0.3)
builder (~> 2.1.2)
i18n (~> 0.4.1)
activerecord (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
arel (~> 1.0.0)
i18n (~> 0.4)
activerecord (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
activeresource (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
activesupport (3.0.1)
arel (1.0.1)
activesupport (~> 3.0.0)
activeresource (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
activesupport (3.0.3)
arel (2.0.7)
builder (2.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
i18n (0.4.2)
mail (2.2.9)
i18n (0.5.0)
mail (2.2.15)
activesupport (>= 2.3.6)
i18n (~> 0.4.1)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack (>= 1.0.0)
rack-test (0.5.6)
rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.1)
actionmailer (= 3.0.1)
actionpack (= 3.0.1)
activerecord (= 3.0.1)
activeresource (= 3.0.1)
activesupport (= 3.0.1)
bundler (~> 1.0.0)
railties (= 3.0.1)
railties (3.0.1)
actionpack (= 3.0.1)
activesupport (= 3.0.1)
rake (>= 0.8.4)
thor (~> 0.14.0)
rails (3.0.3)
actionmailer (= 3.0.3)
actionpack (= 3.0.3)
activerecord (= 3.0.3)
activeresource (= 3.0.3)
activesupport (= 3.0.3)
bundler (~> 1.0)
railties (= 3.0.3)
railties (3.0.3)
actionpack (= 3.0.3)
activesupport (= 3.0.3)
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
sqlite3-ruby (1.3.1)
thor (0.14.3)
treetop (1.4.8)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.23)
tzinfo (0.3.24)

PLATFORMS
ruby

DEPENDENCIES
rails (>= 3.0.0)
rails (>= 3.0.3)
sqlite3-ruby
2 changes: 1 addition & 1 deletion MIT-LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2010 Jan Lelis
Copyright (c) 2010-2011 Jan Lelis

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
16 changes: 9 additions & 7 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ When the object gets saved, the plugin transforms all attributes into a single i


=== Setup
Install the plugin with
* Rails 2: <tt>script/plugin install git://github.com/janlelis/has_many_booleans</tt>
* Rails 3: <tt>rails plugin install git://github.com/janlelis/has_many_booleans</tt>
* Or as a gem: <tt>gem install has_many_booleans</tt> (and add it to your environment.rb/Gemfile)
Install the plugin with:

rails plugin install git://github.com/janlelis/has_many_booleans

or as a gem:

gem install has_many_booleans # and add it to your Gemfile

Add an integer field with the name +booleans+ to your the model's database table.

Expand Down Expand Up @@ -74,7 +77,6 @@ The plugin also generates a <tt>.true</tt> and a <tt>.false</tt> scope for the m
=== Further reading
For a more detailed description of the options, see the rdoc for the has_many_booleans method.

Code available at http://github.com/janlelis/has_many_booleans

Copyright (c) 2010 Jan Lelis, http://rbjl.net, released under the MIT license
Copyright (c) 2010-2011 Jan Lelis, http://rbjl.net, released under the MIT license

Contributions by jellehelsen
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'


desc 'Default: run unit tests.'
task :default => :test

Expand Down
15 changes: 6 additions & 9 deletions test/has_many_booleans_test.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# has_many_booleans (c) 2010 Jan Lelis, released under the MIT license
# available at <http://github.com/janlelis/has_many_booleans>
# more info at <http://rbjl.net/22>

require File.dirname(__FILE__) + '/test_helper.rb'
require File.expand_path( File.dirname(__FILE__) + '/test_helper' )

class HasManyBooleansTest < ActiveSupport::TestCase
load_schema
Expand Down Expand Up @@ -398,20 +394,21 @@ def snd(attr_name, suffix = '', value = nil)

snd :password, '=', false
snd :name, '=', false
assert_not @a.save, @a.errors.full_messages
assert_not @a.save, @a.errors.full_messages.inspect
snd :name, '=', true
assert @a.save, @a.errors.full_messages
assert @a.save, @a.errors.full_messages.inspect
end

test 'validates_false' do
create_instance ValidateTest

snd :name, '=', true
snd :password, '=', true
assert_not @a.save, @a.errors.full_messages
assert_not @a.save, @a.errors.full_messages.inspect
snd :password, '=', false
assert @a.save, @a.errors.full_messages
assert @a.save, @a.errors.full_messages.inspect
end

end

# J-_-L
2 changes: 1 addition & 1 deletion test/simple_bitset_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/test_helper.rb'
require File.expand_path( File.dirname(__FILE__) + '/test_helper' )

class SimpleBitsetTest < ActiveSupport::TestCase
test 'to_bra' do
Expand Down

0 comments on commit 48b19f4

Please sign in to comment.