Commit Graph

273 Commits

Author SHA1 Message Date
Jeremy Kemper
f7d509882e Prefer tap to returning 2009-02-06 12:18:24 -08:00
Jeremy Kemper
5581229195 Add sibling AS to load path for testing to ensure gems aren't used 2009-02-06 10:23:58 -08:00
Jeremy Kemper
b302e023b7 Require rubygems 2009-02-03 18:58:06 -08:00
Jeremy Kemper
278186534c Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. 2009-02-03 18:40:22 -08:00
David Heinemeier Hansson
ed5fa2fe33 Mark CHANGELOGs for release 2009-02-01 22:06:40 +01:00
Bob Aman
166c63818e Improve exception handling when Location header is invalid. [#1192 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-01-28 20:56:46 +00:00
Rasik Pandey
6079ec1f77 ActiveResource#eqls? and == should not take into account object identity and prefix options should be considered. [#1098 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-01-28 19:39:06 +00:00
Pratik Naik
39e1ac658e Merge docrails 2009-01-18 18:10:58 +00:00
Pratik Naik
085991891e Bump up the year in MIT license files 2009-01-18 05:28:21 +00:00
Xavier Noria
a2270ef259 Inline code comments for class_eval/module_eval [#1657 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-28 19:49:28 +00:00
Xavier Noria
46c7dd2348 normalize author names in changelogs [#1495 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-12-16 14:33:32 +01:00
Jeremy Kemper
e8c4939fb3 Benchmark.ms 2008-12-09 11:17:11 -08:00
Pratik Naik
dbbae5e00e Merge with docrails 2008-12-07 03:27:53 +01:00
miloops
2014d9141a Make new_record? an alias of new? in ActiveResource to fix problem with route generation in forms.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-12-02 15:27:16 +01:00
Jeremy Kemper
c79fb32e93 Ruby 1.9 compat: don't shadow local var with block arg 2008-11-22 19:19:13 -08:00
Jeremy Kemper
dc07c0e02b Fix indentation mismatches 2008-11-22 19:19:13 -08:00
David Heinemeier Hansson
51a19ae2bf Assume that the next version is going to be 2.3 for now 2008-11-19 14:12:38 +01:00
Jeremy Kemper
eeea1a26ec Merge branch 'master' into testing 2008-11-15 12:21:04 -08:00
David Heinemeier Hansson
3be853b59d A few more dependency updates 2008-11-14 14:08:26 +01:00
David Heinemeier Hansson
61e43700b8 Prepare for RC2 2008-11-14 12:26:50 +01:00
Jeremy Kemper
ebf14baa0e Silence parens warning 2008-11-07 15:41:27 -05:00
David Heinemeier Hansson
dffc2e2b64 Fixed that ActiveResource#post would post an empty string when it shouldn't be posting anything (Paolo Angelini) [#525 state:committed] 2008-10-30 12:47:23 +01:00
David Heinemeier Hansson
d224e6ccb1 Update CHANGELOGs with the last few fixes, set date for today 2008-10-24 13:08:47 +02:00
David Heinemeier Hansson
5366e61458 Proper update call for gem server 2008-10-23 20:29:25 +02:00
David Heinemeier Hansson
ca7e4d71c2 Should be 2.2.0 as well 2008-10-23 20:23:01 +02:00
David Heinemeier Hansson
eec6e0cbbd Push to new gem server 2008-10-23 20:18:11 +02:00
David Heinemeier Hansson
57c31a380e Prepare for Rails 2.2.0 [RC1] 2008-10-23 20:14:20 +02:00
Cody Fauser
f2c10f2756 Add ActiveResource::Base#to_xml and ActiveResource::Base#to_json methods. [#1011 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-07 17:48:02 +01:00
Matthew Moore
4df45d8609 ActiveResource can load array of strings, like serialize :bar, Array
Signed-off-by: rick <technoweenie@gmail.com>
[#1055 state:resolved]
2008-10-05 10:29:13 -07:00
Edgar J. Suarez
790ebf8eab HTTP Accept header
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-09-18 11:15:48 +02:00
Pratik Naik
6ef35461dc Merge docrails 2008-09-03 17:58:47 +01:00
Clemens Kofler
288e947ae1 Some performance goodness for inheritable attributes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:23 +02:00
Clemens Kofler
1646e8c364 More symbols for send and respond_to?.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:22 +02:00
Jeremy Kemper
a1eb4e11c2 Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>

Conflicts:

	actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00
Rasik Pandey
16b9a554db Format related patches to support serializing data out in the correct format 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>
2008-08-29 18:45:39 -07:00
Jeremy Kemper
172606e21f Harmonize framework require strategy. Don't add self to load path since Rails initializer and RubyGems handle it. 2008-08-25 21:22:34 -07:00
Tarmo Tänav
b5c4c7daf8 Clear prefix_parameters cache when setting prefix 2008-08-23 17:43:52 +03:00
Adrian Mugnolo
893fb5bb63 Add ActiveResource::Base.find(:last). [#754 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-08-22 03:06:57 +01:00
Joshua Peek
c1a8690d58 Consistently use the framework's configured logger and avoid reverting to RAILS_DEFAULT_LOGGER unless necessary. 2008-08-18 23:36:13 -05:00
David Heinemeier Hansson
aad7cac6ad Fixed problems with the logger used if the logging string included %'s [#840 state:resolved] (Jamis Buck) 2008-08-15 09:27:07 -05:00
Joshua Peek
b74b97fef5 Update uses_mocha in ActionMailer and ActiveResource 2008-07-19 11:14:12 -05:00
Pratik Naik
0432d15164 Merge with docrails. 2008-07-16 13:01:23 +01:00
Jeremy Kemper
a02d672cd7 Horo rdoc template 2008-06-22 10:38:25 -07:00
Jeremy Kemper
c52d9530c3 Exclude lib/activeresource.rb from rdoc 2008-06-18 20:17:05 -07:00
Jeremy Kemper
231c2c5709 Update Rakefiles to connect to wrath as current user. Use ssh config to set a different user. 2008-06-18 19:58:26 -07:00
Luis Hurtado
225065709c Fixes parsing deep nested resources from XML. [#380 state:resolved] 2008-06-09 23:06:07 -07:00
David Heinemeier Hansson
e7a305f08d Fixed Base#exists? to check status code as integer [#299 state:resolved] (Wes Oldenbeuving) 2008-06-02 21:58:42 -05:00
David Heinemeier Hansson
f9db7695fe Making ready for release of 2.1 2008-05-31 17:03:03 -07:00
Pratik Naik
98dc582742 Merge docrails.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-25 12:29:00 +01:00
David Heinemeier Hansson
b60c8a573e Making ready for RC1 release 2008-05-11 18:29:44 -05:00
Pratik Naik
dc4eec1129 Merge docrails:
commit e6afd8b2736364322b673bbdcca3e9b38b6d3da0
Author: Xavier Noria <fxn@hashref.com>
Date:   Thu May 8 23:49:36 2008 +0200

    Overall documentation improvement and markup corrections. Zillion changes.

commit 2fead68b3192332eee27945ed95a94a64ca73f70
Author: Austin Putman <austin@emmanuel.local>
Date:   Wed May 7 19:35:46 2008 -0700

    Documented class methods on ActionController::Routing.  These are dangerous, and mostly used for testing.

commit f5b84182dbc39bea79c8ee319c688d00fa99f9d1
Author: Teflon Ted <github@rudiment.net>
Date:   Wed May 7 16:08:49 2008 -0400

    Added explanation about errant inflections not being patched in the future in order to avoid breaking legacy applications.

commit 370f4f51722cec49ace17093d29e9ce9e8f15cfb
Author: Sunny Ripert <negatif@gmail.com>
Date:   Wed May 7 14:00:59 2008 +0200

    Applied list conventions in AR::Base

commit 5bd18429f09d44e75191bec42a6db04bd33f3030
Author: Sunny Ripert <negatif@gmail.com>
Date:   Wed May 7 13:53:35 2008 +0200

    Renamed Options list to Attributes list whenever they weren't option hashes in AR::Base

commit d912bd5672316454457ae83f6e9dda5197beeb6f
Author: Yaroslav Markin <yaroslav@markin.net>
Date:   Wed May 7 13:50:28 2008 +0400

    Add a filter_parameter_logging usage hint to generated ApplicationController.
    This may help to remind the developer to filter sensitive information from application logs.
    Closes #11578

commit b243de0db3c2605121e055079854af5090d06374
Author: Jack Danger Canty <git@6brand.com>
Date:   Tue May 6 23:39:47 2008 -0700

    doc: disambiguating an example ActiveRecord class

commit f81d771f0657ae8375b84a77a059812cce5d6fd9
Author: Jack Danger Canty <git@6brand.com>
Date:   Tue May 6 23:35:05 2008 -0700

    doc: ActiveRecord::Reflection::AssociationReflection#through_reflection

    Added documentation demonstrating the use of #through_reflection for
    finding intervening reflection objects for HasManyThrough
    and HasOneThrough.

commit ae6b46f00b5b8b2939c6b37ce3329c83de7e71db
Author: Cheah Chu Yeow <chuyeow@gmail.com>
Date:   Wed May 7 13:47:41 2008 +0800

    Document AttributeAssignmentError and MultiparameterAssignmentErrors.

commit 8f463550b597db2156b67733f31aed13487fbc3a
Author: John Barnette <jbarnette@gmail.com>
Date:   Tue May 6 22:46:44 2008 -0700

    Killing/fixing a bunch of outdated language in the AR README.

commit aca44bcd92ef783abdf484b58abdde6786db0f89
Author: Cheah Chu Yeow <chuyeow@gmail.com>
Date:   Wed May 7 13:34:52 2008 +0800

    Make a note about ActiveResource::Timeouterror being raised when ARes calls timeout.

commit 284a930a93fbee16e25d06392779dbf2f03e9e12
Author: Jonathan Dance <jd@wuputah.com>
Date:   Tue May 6 14:58:26 2008 -0400

    improvements to the page caching docs

commit 9482da621390c874da7c921c8bd6230caae7035a
Author: Sunny Ripert <negatif@gmail.com>
Date:   Mon May 5 18:13:40 2008 +0200

    validates_numericality_of() "integer" option really is "only_integer"

commit e9afd6790a8f530528f6597a7f59bb283be754f6
Author: Sunny Ripert <negatif@gmail.com>
Date:   Mon May 5 12:11:59 2008 +0200

    Harmonized hash notation in AR::Base

commit 67ebf14a91ffd970b582be4ff2991d691a9cf3e1
Author: Sunny Ripert <negatif@gmail.com>
Date:   Mon May 5 12:06:19 2008 +0200

    Turned options into rdoc-lists in AR::Base

commit 0ec7c0a41d889d4e5382b9dff72f1aaba89bf297
Author: Marshall Huss <mwhuss@Macbook.local>
Date:   Sun May 4 23:21:33 2008 -0400

    Added information of how to set element_name in the case the user has a name confliction with an existing model

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-09 10:40:50 +01:00
Xavier Noria
64092de257 Improve documentation coverage and markup
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-02 14:45:23 +01:00
David Heinemeier Hansson
869d731cca Fixed response logging to use length instead of the entire thing (seangeo) [#27 state:resolved] 2008-04-29 17:16:36 -05:00
Cheah Chu Yeow
cf32baf915 Rescue from Timeout::Error in ActiveResource::Connection.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-04-22 09:30:56 +12:00
Cheah Chu Yeow
105910429d Introduce ActiveResource::Base.timeout. This allows a timeout to be set on the internal Net::HTTP instance ARes uses (default is 60 seconds). Setting a low timeout allows ARes clients to fail-fast in the event of a unresponsive/crashed server, rather than cause cascading failures in your application.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-04-22 09:30:41 +12:00
Pratik Naik
097c0d6166 Fix more typos and changelog
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-05 11:18:05 +00:00
Pratik Naik
aa4af60aad Improve documentation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-05 03:52:58 +00:00
Jeremy Kemper
fa6fcb45e2 Don't shadow attrs var
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9145 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-30 06:17:29 +00:00
Jeremy Kemper
ad8df03f9c Add #clone. Closes #7352 [Ryan Daigle, thechrisoshow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9121 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 21:17:38 +00:00
David Heinemeier Hansson
9300ebd86f Fixed that to_param should be used and honored instead of hardcoding the id (closes #11406) [gspiers]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9114 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 19:58:46 +00:00
Pratik Naik
ca9413674e Improve documentation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 12:27:52 +00:00
David Heinemeier Hansson
9af9fc3da1 sshpublisher needs to be explicitly required now, apparently
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9054 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-18 04:46:51 +00:00
Jeremy Kemper
ab45bd487a URI.decode site username/password. Closes #11169 [Ernesto Jimenez]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8900 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-19 23:06:09 +00:00
Michael Koziarski
8bbabd43a9 Add user and password configuration options to ActiveResource::Base, not all credentials can be specified inline. Closes #11112 [ernesto.jimenez]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-18 00:21:18 +00:00
Michael Koziarski
5396b0f3b0 Use HEAD instead of GET inside exists? Closes #11062 [bscofield]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-09 22:21:55 +00:00
Marcel Molina
349df75605 Reference to :element option in documentation should be :member. Closes #10905 [fxn]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 17:04:49 +00:00
Jeremy Kemper
7671e98397 remove rubyforgepublisher, removed from rake
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 00:12:18 +00:00
Jeremy Kemper
1f2e9bb280 require abstract_unit directly since test is in load path
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8566 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:38 +00:00
Rick Olson
4261b837f5 Fix small documentation typo. Closes #10670 [l.guidi]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8528 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 19:27:21 +00:00
Jeremy Kemper
9a97f9a14b find_or_create_resource_for handles module nesting. Closes #10646.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 09:14:34 +00:00
Rick Olson
e8730713d2 Allow setting ActiveResource::Base#format before #site. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8503 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 17:12:35 +00:00
Rick Olson
c54b915825 Support agnostic formats when calling custom methods. Closes #10635 [joerichsen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8502 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 17:03:58 +00:00
Rick Olson
90d75e5109 inherit from the new ActiveSupport::BlankSlate class
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8501 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-28 17:02:01 +00:00
Jeremy Kemper
470fc02096 Document custom methods. Closes #10589.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8472 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 21:42:27 +00:00
Jeremy Kemper
a1ec3aa6c0 Ruby 1.9 compatibility
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8462 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-21 11:22:03 +00:00
Jeremy Kemper
7f53d0485f RubyGems 0.9.5 compat: always set the gem platform
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8438 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-19 04:21:24 +00:00
Jeremy Kemper
f91acf0258 Ruby 1.9 compat: move from the deprecated Base64 module to ActiveSupport::Base64. Closes #10554.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-18 21:14:07 +00:00
David Heinemeier Hansson
69edebf0f1 Prepare for 2.0.2 release
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8419 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-16 23:30:30 +00:00
David Heinemeier Hansson
1ceccdeb7f Added more specific exceptions for 400, 401, and 403 (all descending from ClientError so existing rescues will work) (closes #10326) [trek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8390 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 23:09:46 +00:00
Jeremy Kemper
c81fff2468 Correct empty response handling. Closes #10445.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8364 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-10 05:53:56 +00:00
David Heinemeier Hansson
1acd54a5b4 Make ready for 2.0.1
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8330 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-07 13:37:13 +00:00
David Heinemeier Hansson
729741a3fa Preparing for release shortly
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8321 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-06 18:12:48 +00:00
David Heinemeier Hansson
54a75de3ec Prep for RC2
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-29 00:27:53 +00:00
Rick Olson
24e6cbc724 Don't cache net/http object so that ActiveResource is more thread-safe. Closes #10142 [kou]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8167 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-19 00:06:23 +00:00
David Heinemeier Hansson
5c8beba9dc Prepare versions for RC1
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8121 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-09 20:02:29 +00:00
Marcel Molina
7863c4a18a Update XML documentation examples to include explicit type attributes. Closes #9754 [hasmanyjosh]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8090 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-06 18:33:45 +00:00
Jeremy Kemper
16d47e6dbe Update gem dependencies to match current versions
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7883 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-14 19:24:24 +00:00
Michael Koziarski
f29ae12535 Add Base#to_param to Active Resource that quacks like ActiveRecord. Closes #9557 [bradediger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7764 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 02:13:51 +00:00
Jeremy Kemper
f118a5b05b BlankSlate -> BasicObject
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7763 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 02:08:05 +00:00
Jeremy Kemper
335c15005d Bump versions for 1.2.4 release.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-05 05:20:37 +00:00
Jeremy Kemper
0ee1cb2cd3 Ruby 1.9 compat, consistent load paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-02 05:32:14 +00:00
David Heinemeier Hansson
f18356edb7 Updated CHANGELOGs. They need to be filtered for duplicates
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-29 22:18:26 +00:00
Michael Koziarski
fc042435a6 Fix ARes tests under jruby. [tom.enebo@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7615 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-24 18:01:09 +00:00
David Heinemeier Hansson
18a24274ec Allow frameworks to be required by their gem name (closes #8845) [drnic]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7560 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-22 18:15:05 +00:00
David Heinemeier Hansson
f99e5bba19 Increase test coverage (closes #8699, #8700) [josh]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7532 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-21 23:31:21 +00:00
David Heinemeier Hansson
dc399b96c8 Added ActiveResource.format= which defaults to :xml but can also be set to :json [DHH]. Added one-off declarations of mock behavior [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7518 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-20 23:18:05 +00:00
Tobias Lütke
18a4cc1bd2 Raise ActiveResource::Redirection on 301,302 http code
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7297 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-08-09 19:22:04 +00:00
Tobias Lütke
80d539bd4d Fixes that using a subclass of an ARes object would cache a connection object based of its parent's site variable. Changing the parent's site would have no effect on the descentent objects.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7143 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-27 16:00:07 +00:00
David Heinemeier Hansson
ae4838fff2 Big documentation upgrade for ARes (closes #8694) [jeremymcanally]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7098 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-23 17:29:54 +00:00
Jeremy Kemper
e682fee121 Fix reload error when path prefix is used. Closes #8727.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7082 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-22 18:15:40 +00:00
Rick Olson
9e4461438f Added proper handling of arrays. Closes #8537 [hasmanyjosh]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-21 15:07:15 +00:00
Tobias Lütke
bf280157d9 Ensure that post and put requests pass in Content-Length to the server.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-19 18:40:28 +00:00
Jeremy Kemper
fde3d9d8e4 Remove ActiveResource::Struct because it hasn't proven very useful. Creating a new ActiveResource::Base subclass is often less code and always clearer. Closes #8612.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6980 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-09 04:42:32 +00:00
Tobias Lütke
bfda4cdc5a Fixed query methods on resources. [Cody Fauser]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6972 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-08 19:32:15 +00:00
Rick Olson
4d1c87a069 pass the prefix_options to the instantiated record when using find without a specific id. Closes #8544 [alloy]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6925 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-01 17:14:14 +00:00
Jeremy Kemper
d8b67f7fe1 Generate rdoc with utf-8 charset. Closes #7188 [manfred, jferris]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6881 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-28 22:55:14 +00:00
Jeremy Kemper
849038ee51 Recognize and raise an exception on 405 Method Not Allowed responses. Closes #7692.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-26 20:57:08 +00:00
Rick Olson
08736788c9 Handle string and symbol param keys when splitting params into prefix params and query params.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6703 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-09 03:51:06 +00:00
Tobias Lütke
0306e4a204 Make respond_to? work as expected
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-04 20:07:37 +00:00
David Heinemeier Hansson
b8e74466cc Try the class itself if the ancestor doesnt have anything
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-02 23:46:31 +00:00
David Heinemeier Hansson
04fd94d8f8 BACKWARDS INCOMPATIBLE: Changed the finder API to be more extensible with :params and more strict usage of scopes [DHH] Added find-one with symbol [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-01 04:48:48 +00:00
Rick Olson
8e8fd99d7f change #custom_headers to just #headers [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6625 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-29 04:46:14 +00:00
Rick Olson
bd50d82f70 Add support for setting custom headers per ActiveResource model [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-29 03:14:36 +00:00
David Heinemeier Hansson
70ac560e42 Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6611 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-28 15:57:29 +00:00
David Heinemeier Hansson
1d5c34c2c2 Added find-by-path options to ActiveResource::Base.find [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-27 20:54:53 +00:00
David Heinemeier Hansson
234b0b7ca0 Added support for using classes from within a single nested module [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6587 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-26 19:38:16 +00:00
David Heinemeier Hansson
37e8e35c92 Added load_attributes_from_response as a way of loading attributes from other responses than just create [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-26 02:11:16 +00:00
David Heinemeier Hansson
46b58d80b9 The find should instantiate real objects, not return hashes
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6585 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-26 02:03:40 +00:00
David Heinemeier Hansson
9b8399fb7f Added support for calling custom methods #6979 [rwdaigle]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6584 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-26 01:53:01 +00:00
Rick Olson
b3c4e301f4 dont bother merging in prefix_options
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-24 16:06:41 +00:00
Rick Olson
2df386ad53 why oh why do i always forget to save the changelog
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6569 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-24 16:05:59 +00:00
Rick Olson
208d12d15d Remove explicit prefix_options parameter for ActiveResource::Base#initialize. Allow ActiveResource::Base.delete with custom prefix. Add ActiveResource::Base#dup [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6568 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-24 16:05:20 +00:00
David Heinemeier Hansson
1d53c05889 Dont insert search parameters into the object
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6553 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-23 20:58:40 +00:00
David Heinemeier Hansson
350870a803 Only include relevant files
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6551 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-23 19:36:15 +00:00
David Heinemeier Hansson
df41c7cb61 Include Active Resource instead of Action Web Service [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6550 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-23 18:55:54 +00:00
David Heinemeier Hansson
c97f329b2a Disregard namespaces from the default element name, so Highrise::Person will just try to fetch from "/people", not "/highrise/people" [DHH] Added that saves which get a body response (and not just a 201) will use that response to update themselves [DHH] Fixed constant warning when fetching the same object multiple times [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6539 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-19 22:18:03 +00:00
Jeremy Kemper
d97456dd82 Allow array and hash query parameters. Closes #7756.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6379 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-11 13:27:57 +00:00
David Heinemeier Hansson
8f614a80e7 Fix gem deprecation warnings, which also means depending on RubyGems 0.9.0+ [Chad Fowler]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6119 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-04 20:44:45 +00:00
Jeremy Kemper
1d8cd1d744 Squash test warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6033 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-24 18:29:07 +00:00
Jeremy Kemper
1b1ddf1736 Loading a resource preserves its prefix_options. Closes #7353. Silence prefix redefinition warnings; fix type in logged error.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6032 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-24 18:27:36 +00:00
Rick Olson
f49e449ed5 Carry over the convenience of #create from ActiveRecord. Closes #7340. [Ryan Daigle]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6025 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-24 02:40:32 +00:00
Rick Olson
1bdb14bdd3 Increase ActiveResource::Base test coverage. Closes #7173, #7174 [Rich Collins]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6020 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-23 05:22:33 +00:00
Jeremy Kemper
e00e6a2941 Interpret 422 Unprocessable Entity as ResourceInvalid. Closes #7097.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5967 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-17 00:46:32 +00:00
Rick Olson
932e7b003c Mega documentation patches. #7025, #7069 [rwdaigle]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5962 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-16 06:34:10 +00:00
Jeremy Kemper
2bb33bbd59 Base.exists?(id, options) and Base#exists? check whether the resource is found. Closes #6970.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-12 07:20:05 +00:00
Jeremy Kemper
54e56ddb60 Validating save returns boolean; update and create return responses.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5810 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-29 22:28:30 +00:00
Jeremy Kemper
73101af6ab prefix_parameters pulls /:path/:params from the URI prefix
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5809 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-29 22:16:04 +00:00
Jeremy Kemper
a8d7215060 doh typo in commit from the hip
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5806 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-29 01:38:39 +00:00
Jeremy Kemper
ee1c6c2a7c generate prefix parameters if undefined
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-29 01:37:38 +00:00
Jeremy Kemper
4e57ac3544 Query string support. Closes #6855.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5804 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-29 01:18:09 +00:00
Jeremy Kemper
c172154054 Base#==, eql?, and hash methods. == returns true if its argument is identical to self or if it's an instance of the same class, is not new?, and has the same id. eql? is an alias for ==. hash delegates to id.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-22 21:42:52 +00:00
Jeremy Kemper
bc3d150386 test that element name includes module nesting
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5770 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-21 23:34:52 +00:00
Jeremy Kemper
8cb6cb58a2 HttpMock InvalidRequestError inspects the mismatched request
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5768 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-21 22:18:58 +00:00
Jeremy Kemper
e6988ef2ce Subclasses share superclass site until explicitly set. This way you can set Superclass.site = ... after subclasses have been defined.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5767 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-21 22:12:21 +00:00
Jeremy Kemper
93c816f0c2 move http_mock to lib so others can use it in their Ares tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-21 20:26:30 +00:00
Rick Olson
32bc10d7df fix Rakefile so that the rdoc can be generated
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5747 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-19 14:59:30 +00:00
Rick Olson
011f4e7413 Allow subclassed resources to share the site info [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5717 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-13 02:15:27 +00:00
Rick Olson
55d4dbb8df Fix issues with ActiveResource collection handling. Closes #6291. [bmilekic]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5714 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-12 15:29:54 +00:00
Jeremy Kemper
7370e54cc4 *_path instance methods. Check for missing/invalid site uri. http_mock response takes message arg, extracts numeric code. Tests log to test/debug.log
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5680 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-05 19:12:51 +00:00
Marcel Molina
1d31a043e0 Use attr_accessor_with_default to dry up attribute initialization. References #6538. [Stuart Halloway]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5540 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-16 19:36:50 +00:00