aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix for Ruby 1.9 - define_method throws an exception under 1.9 if given ↵Chad Woolley2009-10-081-1/+1
| | | | | | incorrect number of args Signed-off-by: Carl Lerche <carllerche@mac.com>
* Ruby 1.9: Fix ActiveResource::ConnectionError#to_s when @response does not ↵Chad Woolley2009-10-081-1/+1
| | | | | | respond to #code or #message Signed-off-by: Carl Lerche <carllerche@mac.com>
* Cleanup whitespace introduced in 8377646 and f4f6888Joshua Peek2009-10-022-20/+13
|
* add indifferent access to the attributesTaryn East2009-10-022-0/+28
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* update_attribute(s) added to Active ResourceTaryn East2009-10-021-2/+51
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Fix brittle content-type check. [#1956 state:committed]Jeremy Kemper2009-09-171-2/+2
|
* Fix failing ARes isolated testsJoshua Peek2009-09-052-1/+4
|
* Added first/last/all aliases for equivalent find scopestaryn2009-08-211-0/+38
| | | | | | | Just a copy from Active Record (with tests). Each is a warpper function for the equivalent scoped call to find eg first is a wrapper for find(:first) Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Added save! which raises ResourceInvalid unless valid?taryn2009-08-192-2/+14
| | | | | | | | | | | | | | | Similar to Active Record - it will raise ActiveResouce::ResourceInvalid if the resource is not valid (ie if <tt>valid?</tt> returns false) However - does not raise ActiveResource::ResourceNotFound if the callbacks fail (callbacks have not yet been implemented) - it will just try to save and raise if the callbacks all fail. This is not ideal behaviour - but will do until we decide to change the behaviour of save_with_validations to actually raise (rather than catch) the ResourceInvalid exception. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Swallow ResourceNotFound error on find_everytaryn2009-08-191-0/+13
| | | | | | | | | | | | | | Active Record does not explode with RecordNotFound if you go looking for a collection of objects - it just returns nil. Thus Active Resource should also not explode. After all - finding no objects that match a set of conditions is not exceptional behaviour - unlike looking for a specific object with a given id (which you'd expect to exist). I've also added documentation to +find+ to reflect this. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Pulled find-based tests into their own test case. This matches Active ↵taryn2009-08-192-76/+182
| | | | | | Record, and allows us to have one places where all find-tests are located, which will help when adding dynamic finders later. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Moved all test cases into a new test/cases directory to match Active Record ↵taryn2009-08-199-0/+0
| | | | | | test directory structure. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Added validations to ActiveResource. Added a smoke test to see if we can add ↵taryn2009-08-192-0/+74
| | | | | | a validation and use it, and add a validates callback and use it. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Fix ActiveResource load test for 64bit machines [#3051 state:resolved]Jatinder Singh2009-08-151-3/+3
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add support for errors in JSON format.Fabien Jakimowicz2009-08-091-21/+56
| | | | | | [#1956 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Ensure ActiveResource#load works with numeric arrays [Grzegorz Forysinski, ↵Grzegorz Forysinski2009-08-091-1/+16
| | | | | | | | Elad Meidar] [#2305 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Active Resource recognizes 410 as Resource Gone now [#2316 state:resolved] ↵Jordan Brough2009-08-092-0/+27
| | | | | | [Jordan Brough, Jatinder Singh] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Make ActiveResource#exists? work [#3020 state:resolved]Jatinder Singh2009-08-091-0/+8
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add ability to set SSL options on ARes connections.Roy Nicholson2009-08-092-0/+69
| | | | | | [#2370 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Setting connection timeout also affects Net::HTTP open_timeout.Jeremy Kemper2009-08-091-0/+11
| | | | [#2947 state:resolved]
* HTTP proxy supportMarshall Huss2009-08-083-0/+78
| | | | | | [#2133 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add observing hooks to AResJoshua Peek2009-07-111-0/+53
|
* Move mocha down below initial T::U require and bump version to 0.9.7 [#2858 ↵Yehuda Katz + Carl Lerche2009-07-011-3/+1
| | | | state:resolved]
* Setup ActiveResource autoloadsJoshua Peek2009-06-081-1/+0
|
* Merge branch 'master' into active_modelJoshua Peek2009-05-294-10/+8
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: activemodel/lib/active_model/core.rb activemodel/test/cases/state_machine/event_test.rb activemodel/test/cases/state_machine/state_transition_test.rb activerecord/lib/active_record/validations.rb activerecord/test/cases/validations/i18n_validation_test.rb activeresource/lib/active_resource.rb activeresource/test/abstract_unit.rb
| * Cherry-pick core extensionsJeremy Kemper2009-05-133-0/+3
| |
| * Fix tests on 1.8.6Jeremy Kemper2009-05-061-0/+1
| |
| * Cherry pick Active Support dependencies. Autoload.Jeremy Kemper2009-05-062-7/+4
| |
* | Deprecate Errors#on_base/add_to_base/invalid?/each_fullPratik Naik2009-03-212-2/+5
| |
* | Fix ActiveResource::Errors deprecation messagesPratik Naik2009-03-201-2/+2
| |
* | Make Active Resource use ActiveModel::ErrorsPratik Naik2009-03-191-1/+1
|/
* Strip invalid leading whitespace error uncovered by nokogiriJeremy Kemper2009-03-101-1/+1
|
* Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-082-14/+14
| | | | [#1617 state:resolved]
* Ensure Active Support is loaded locally rather than from RubyGems. [#1620 ↵Jeremy Kemper2009-03-081-0/+1
| | | | state:committed]
* Prefer tap to returningJeremy Kemper2009-02-061-3/+2
|
* Require rubygemsJeremy Kemper2009-02-031-1/+1
|
* Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha.Jeremy Kemper2009-02-032-22/+16
|
* Improve exception handling when Location header is invalid. [#1192 ↵Bob Aman2009-01-281-1/+14
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* ActiveResource#eqls? and == should not take into account object identity and ↵Rasik Pandey2009-01-281-0/+9
| | | | | | prefix options should be considered. [#1098 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ruby 1.9 compat: don't shadow local var with block argJeremy Kemper2008-11-221-1/+1
|
* Fix indentation mismatchesJeremy Kemper2008-11-222-56/+56
|
* Silence parens warningJeremy Kemper2008-11-071-1/+1
|
* Fixed that ActiveResource#post would post an empty string when it shouldn't ↵David Heinemeier Hansson2008-10-301-0/+2
| | | | be posting anything (Paolo Angelini) [#525 state:committed]
* Add ActiveResource::Base#to_xml and ActiveResource::Base#to_json methods. ↵Cody Fauser2008-10-071-0/+17
| | | | | | [#1011 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* ActiveResource can load array of strings, like serialize :bar, ArrayMatthew Moore2008-10-051-0/+24
| | | | | Signed-off-by: rick <technoweenie@gmail.com> [#1055 state:resolved]
* HTTP Accept headerEdgar J. Suarez2008-09-181-2/+10
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, ↵Jeremy Kemper2008-08-314-15/+15
| | | | | | | | | | but it has since been removed from 1.9. Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> Conflicts: actionpack/test/controller/layout_test.rb
* Format related patches to support serializing data out in the correct format ↵Rasik Pandey2008-08-293-14/+25
| | | | | | | with correct http request headers per http method type [#450 state:resolved] Signed-off-by: Tarmo Tänav <tarmo@itech.ee> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Clear prefix_parameters cache when setting prefixTarmo Tänav2008-08-231-0/+9
|
* Add ActiveResource::Base.find(:last). [#754 state:resolved]Adrian Mugnolo2008-08-221-46/+52
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>