README.rdoc in dm-ambition-1.0.0 vs README.rdoc in dm-ambition-1.1.0.rc1
- old
+ new
@@ -5,26 +5,32 @@
== Installation
With Rubygems:
- $ sudo gem install dm-ambition
+ $ gem install dm-ambition
$ irb -rubygems
- >> require 'dm-core'
>> require 'dm-ambition'
=> true
With git and local working copy:
$ git clone git://github.com/dkubb/dm-ambition.git
$ cd dm-ambition
- $ rake build && sudo rake install
+ $ rake install
$ irb -rubygems
- >> require 'dm-core'
>> require 'dm-ambition'
=> true
+== Testing
+
+The simplest way to test is with Bundler since it handles all dependencies:
+
+ $ rake local_gemfile
+ $ BUNDLE_GEMFILE="Gemfile.local" ADAPTER="in_memory" bundle install --without=quality --relock
+ $ BUNDLE_GEMFILE="Gemfile.local" ADAPTER="in_memory" bundle exec rake spec
+
== Examples
# with == operator
User.select { |u| u.name == 'Dan Kubb' }
@@ -65,13 +71,16 @@
User.select { |u| !(u.id == 1) }
# with double-negated conditions
User.select { |u| !(!(u.id == 1)) }
- # with receiver matching
+ # with matching from receiver
User.select { |u| u == user }
+ # with matching to receiver
+ User.select { |u| user == u }
+
# using send on receiver
User.select { |u| u.send(:name) == 'Dan Kubb' }
# with Array#include?
User.select { |u| user_ids.include?(u.id) }
@@ -94,10 +103,10 @@
# with receiver and Hash#value?
User.select { |u| { 'Dan Kubb' => user }.value?(u) }
== License
-Copyright (c) 2010 Dan Kubb
+Copyright (c) 2011 Dan Kubb
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,