Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 342 lines (196 sloc) 12.067 kB
6cf68d7 @tenderlove updating rails release date
tenderlove authored
1 ## Rails 3.1.7 (Jul 26, 2012)
a4b8a7e @tenderlove updating changelog
tenderlove authored
2
3 * No changes.
4
63dce16 @tenderlove updating changelogs
tenderlove authored
5 ## Rails 3.1.6 (Jun 12, 2012)
75d039f @tenderlove adding version number to changelogs
tenderlove authored
6
7 * No changes.
8
a7ed198 @tenderlove updating the CHANGELOG
tenderlove authored
9 ## Rails 3.1.5 (May 31, 2012) ##
10
11 * No changes
12
43486e0 @jonleighton Convert CHANGELOGs to Markdown format.
jonleighton authored
13 ## Rails 3.1.1 (October 7, 2011) ##
14
15 * No changes
16
17
18 ## Rails 3.1.0 (August 30, 2011) ##
19
20 * The default format has been changed to JSON for all requests. If you want to continue to use XML you will need to set `self.format = :xml` in the class. eg.
21
22 class User < ActiveResource::Base
23 self.format = :xml
24 end
25
26
27 ## Rails 3.0.7 (April 18, 2011) ##
28
29 * No changes.
30
31
32 * Rails 3.0.6 (April 5, 2011)
33
34 * No changes.
35
36
37 ## Rails 3.0.5 (February 26, 2011) ##
38
39 * No changes.
40
41
42 ## Rails 3.0.4 (February 8, 2011) ##
43
44 * No changes.
45
46
47 ## Rails 3.0.3 (November 16, 2010) ##
48
49 * No changes.
50
51
52 ## Rails 3.0.2 (November 15, 2010) ##
53
54 * No changes
55
56
57 ## Rails 3.0.1 (October 15, 2010) ##
58
59 * No Changes, just a version bump.
60
61
62 ## Rails 3.0.0 (August 29, 2010) ##
63
64 * JSON: set Base.include_root_in_json = true to include a root value in the JSON: {"post": {"title": ...}}. Mirrors the Active Record option. *Santiago Pastorino*
65
66 * Add support for errors in JSON format. #1956 *Fabien Jakimowicz*
67
68 * Recognizes 410 as Resource Gone. #2316 *Jordan Brough, Jatinder Singh*
69
70 * More thorough SSL support. #2370 *Roy Nicholson*
71
72 * HTTP proxy support. #2133 *Marshall Huss, Sébastien Dabet*
73
74
75 ## 2.3.2 Final (March 15, 2009) ##
76
77 * Nothing new, just included in 2.3.2
78
79
80 ## 2.2.1 RC2 (November 14th, 2008) ##
81
82 * Fixed that ActiveResource#post would post an empty string when it shouldn't be posting anything #525 *Paolo Angelini*
83
84
85 ## 2.2.0 RC1 (October 24th, 2008) ##
86
87 * Add ActiveResource::Base#to_xml and ActiveResource::Base#to_json. #1011 *Rasik Pandey, Cody Fauser*
88
89 * Add ActiveResource::Base.find(:last). [#754 state:resolved] (Adrian Mugnolo)
90
91 * Fixed problems with the logger used if the logging string included %'s [#840 state:resolved] (Jamis Buck)
92
93 * Fixed Base#exists? to check status code as integer [#299 state:resolved] (Wes Oldenbeuving)
94
95
96 ## 2.1.0 (May 31st, 2008) ##
97
98 * Fixed response logging to use length instead of the entire thing (seangeo) *#27*
99
100 * Fixed that to_param should be used and honored instead of hardcoding the id #11406 *gspiers*
101
102 * Improve documentation. *Ryan Bigg, Jan De Poorter, Cheah Chu Yeow, Xavier Shay, Jack Danger Canty, Emilio Tagua, Xavier Noria, Sunny Ripert*
103
104 * Use HEAD instead of GET in exists? *bscofield*
105
106 * Fix small documentation typo. Closes #10670 *Luca Guidi*
107
108 * find_or_create_resource_for handles module nesting. #10646 *xavier*
109
110 * Allow setting ActiveResource::Base#format before #site. *Rick Olson*
111
112 * Support agnostic formats when calling custom methods. Closes #10635 *joerichsen*
113
114 * Document custom methods. #10589 *Cheah Chu Yeow*
115
116 * Ruby 1.9 compatibility. *Jeremy Kemper*
117
118
119 ## 2.0.2 (December 16th, 2007) ##
120
121 * Added more specific exceptions for 400, 401, and 403 (all descending from ClientError so existing rescues will work) #10326 *trek*
122
123 * Correct empty response handling. #10445 *seangeo*
124
125
126 ## 2.0.1 (December 7th, 2007) ##
127
128 * Don't cache net/http object so that ActiveResource is more thread-safe. Closes #10142 *kou*
129
130 * Update XML documentation examples to include explicit type attributes. Closes #9754 *Josh Susser*
131
132 * Added one-off declarations of mock behavior [David Heinemeier Hansson]. Example:
133
134 Before:
135 ActiveResource::HttpMock.respond_to do |mock|
136 mock.get "/people/1.xml", {}, "<person><name>David</name></person>"
137 end
138
139 Now:
140 ActiveResource::HttpMock.respond_to.get "/people/1.xml", {}, "<person><name>David</name></person>"
141
142 * Added ActiveResource.format= which defaults to :xml but can also be set to :json [David Heinemeier Hansson]. Example:
143
144 class Person < ActiveResource::Base
145 self.site = "http://app/"
146 self.format = :json
147 end
148
149 person = Person.find(1) # => GET http://app/people/1.json
150 person.name = "David"
151 person.save # => PUT http://app/people/1.json {name: "David"}
152
153 Person.format = :xml
154 person.name = "Mary"
155 person.save # => PUT http://app/people/1.json <person><name>Mary</name></person>
156
157 * Fix reload error when path prefix is used. #8727 *Ian Warshak*
158
159 * Remove ActiveResource::Struct because it hasn't proven very useful. Creating a new ActiveResource::Base subclass is often less code and always clearer. #8612 *Josh Peek*
160
161 * Fix query methods on resources. *Cody Fauser*
162
163 * pass the prefix_options to the instantiated record when using find without a specific id. Closes #8544 *Eloy Duran*
164
165 * Recognize and raise an exception on 405 Method Not Allowed responses. #7692 *Josh Peek*
166
167 * Handle string and symbol param keys when splitting params into prefix params and query params.
168
169 Comment.find(:all, :params => { :article_id => 5, :page => 2 }) or Comment.find(:all, :params => { 'article_id' => 5, :page => 2 })
170
171 * Added find-one with symbol [David Heinemeier Hansson]. Example: Person.find(:one, :from => :leader) # => GET /people/leader.xml
172
173 * BACKWARDS INCOMPATIBLE: Changed the finder API to be more extensible with :params and more strict usage of scopes [David Heinemeier Hansson]. Changes:
174
175 Person.find(:all, :title => "CEO") ...becomes: Person.find(:all, :params => { :title => "CEO" })
176 Person.find(:managers) ...becomes: Person.find(:all, :from => :managers)
177 Person.find("/companies/1/manager.xml") ...becomes: Person.find(:one, :from => "/companies/1/manager.xml")
178
179 * Add support for setting custom headers per Active Resource model *Rick Olson*
180
181 class Project
182 headers['X-Token'] = 'foo'
183 end
184
185 \# makes the GET request with the custom X-Token header
186 Project.find(:all)
187
188 * Added find-by-path options to ActiveResource::Base.find [David Heinemeier Hansson]. Examples:
189
190 employees = Person.find(:all, :from => "/companies/1/people.xml") # => GET /companies/1/people.xml
191 manager = Person.find("/companies/1/manager.xml") # => GET /companies/1/manager.xml
192
193
194 * Added support for using classes from within a single nested module [David Heinemeier Hansson]. Example:
195
196 module Highrise
197 class Note < ActiveResource::Base
198 self.site = "http://37s.sunrise.i:3000"
199 end
200
201 class Comment < ActiveResource::Base
202 self.site = "http://37s.sunrise.i:3000"
203 end
204 end
205
206 assert_kind_of Highrise::Comment, Note.find(1).comments.first
207
208
209 * Added load_attributes_from_response as a way of loading attributes from other responses than just create *David Heinemeier Hansson*
210
211 class Highrise::Task < ActiveResource::Base
212 def complete
213 load_attributes_from_response(post(:complete))
214 end
215 end
216
217 ...will set "done_at" when complete is called.
218
219
220 * Added support for calling custom methods #6979 *rwdaigle*
221
222 Person.find(:managers) # => GET /people/managers.xml
223 Kase.find(1).post(:close) # => POST /kases/1/close.xml
224
225 * Remove explicit prefix_options parameter for ActiveResource::Base#initialize. *Rick Olson*
226 ActiveResource splits the prefix_options from it automatically.
227
228 * Allow ActiveResource::Base.delete with custom prefix. *Rick Olson*
229
230 * Add ActiveResource::Base#dup *Rick Olson*
231
232 * Fixed constant warning when fetching the same object multiple times *David Heinemeier Hansson*
233
234 * Added that saves which get a body response (and not just a 201) will use that response to update themselves *David Heinemeier Hansson*
235
236 * Disregard namespaces from the default element name, so Highrise::Person will just try to fetch from "/people", not "/highrise/people" *David Heinemeier Hansson*
237
238 * Allow array and hash query parameters. #7756 *Greg Spurrier*
239
240 * Loading a resource preserves its prefix_options. #7353 *Ryan Daigle*
241
242 * Carry over the convenience of #create from ActiveRecord. Closes #7340. *Ryan Daigle*
243
244 * Increase ActiveResource::Base test coverage. Closes #7173, #7174 *Rich Collins*
245
246 * Interpret 422 Unprocessable Entity as ResourceInvalid. #7097 *dkubb*
247
248 * Mega documentation patches. #7025, #7069 *rwdaigle*
249
250 * Base.exists?(id, options) and Base#exists? check whether the resource is found. #6970 *rwdaigle*
251
252 * Query string support. *untext, Jeremy Kemper*
253 # GET /forums/1/topics.xml?sort=created_at
254 Topic.find(:all, :forum_id => 1, :sort => 'created_at')
255
256 * 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. *Jeremy Kemper*
257
258 * Allow subclassed resources to share the site info *Rick Olson, Jeremy Kemper*
259 d
260 class BeastResource < ActiveResource::Base
261 self.site = 'http://beast.caboo.se'
262 end
263
264 class Forum < BeastResource
265 # taken from BeastResource
266 # self.site = 'http://beast.caboo.se'
267 end
268
269 class Topic < BeastResource
270 self.site += '/forums/:forum_id'
271 end
272
273 * Fix issues with ActiveResource collection handling. Closes #6291. *bmilekic*
274
275 * Use attr_accessor_with_default to dry up attribute initialization. References #6538. *Stuart Halloway*
276
277 * Add basic logging support for logging outgoing requests. *Jamis Buck*
278
279 * Add Base.delete for deleting resources without having to instantiate them first. *Jamis Buck*
280
281 * Make #save behavior mimic AR::Base#save (true on success, false on failure). *Jamis Buck*
282
283 * Add Basic HTTP Authentication to ActiveResource (closes #6305). *jonathan*
284
285 * Extracted #id_from_response as an entry point for customizing how a created resource gets its own ID.
286 By default, it extracts from the Location response header.
287
288 * Optimistic locking: raise ActiveResource::ResourceConflict on 409 Conflict response. *Jeremy Kemper*
289
290 # Example controller action
291 def update
292 @person.save!
293 rescue ActiveRecord::StaleObjectError
294 render :xml => @person.reload.to_xml, :status => '409 Conflict'
295 end
296
297 * Basic validation support *Rick Olson*
298
299 Parses the xml response of ActiveRecord::Errors#to_xml with a similar interface to ActiveRecord::Errors.
300
301 render :xml => @person.errors.to_xml, :status => '400 Validation Error'
302
303 * Deep hashes are converted into collections of resources. *Jeremy Kemper*
304 Person.new :name => 'Bob',
305 :address => { :id => 1, :city => 'Portland' },
306 :contacts => [{ :id => 1 }, { :id => 2 }]
307 Looks for Address and Contact resources and creates them if unavailable.
308 So clients can fetch a complex resource in a single request if you e.g.
309 render :xml => @person.to_xml(:include => [:address, :contacts])
310 in your controller action.
311
312 * Major updates *Rick Olson*
313
314 * Add full support for find/create/update/destroy
315 * Add support for specifying prefixes.
316 * Allow overriding of element_name, collection_name, and primary key
317 * Provide simpler HTTP mock interface for testing
318
319 # rails routing code
320 map.resources :posts do |post|
321 post.resources :comments
322 end
323
324 # ActiveResources
325 class Post < ActiveResource::Base
326 self.site = "http://37s.sunrise.i:3000/"
327 end
328
329 class Comment < ActiveResource::Base
330 self.site = "http://37s.sunrise.i:3000/posts/:post_id/"
331 end
332
333 @post = Post.find 5
334 @comments = Comment.find :all, :post_id => @post.id
335
336 @comment = Comment.new({:body => 'hello world'}, {:post_id => @post.id})
337 @comment.save
338
339 * Base.site= accepts URIs. 200...400 are valid response codes. PUT and POST request bodies default to ''. *Jeremy Kemper*
340
341 * Initial checkin: object-oriented client for restful HTTP resources which follow the Rails convention. *David Heinemeier Hansson*
Something went wrong with that request. Please try again.