actionpack 3.0.9 → 3.0.10.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionpack might be problematic. Click here for more details.
- data/CHANGELOG +16 -3
- data/lib/action_controller/base.rb +5 -5
- data/lib/action_controller/caching/sweeping.rb +1 -0
- data/lib/action_dispatch/http/upload.rb +11 -1
- data/lib/action_pack/version.rb +2 -2
- data/lib/action_view/helpers/cache_helper.rb +4 -4
- data/lib/action_view/helpers/form_helper.rb +1 -1
- data/lib/action_view/helpers/translation_helper.rb +1 -1
- metadata +19 -35
data/CHANGELOG
CHANGED
@@ -1,4 +1,17 @@
|
|
1
|
-
*Rails 3.0.
|
1
|
+
*Rails 3.0.10 (unreleased)*
|
2
|
+
|
3
|
+
* Fixes an issue where cache sweepers with only after filters would have no
|
4
|
+
controller object, it would raise undefined method controller_name for nil [jeroenj]
|
5
|
+
|
6
|
+
* Ensure status codes are logged when exceptions are raised.
|
7
|
+
|
8
|
+
* Subclasses of OutputBuffer are respected.
|
9
|
+
|
10
|
+
* Fixed ActionView::FormOptionsHelper#select with :multiple => false
|
11
|
+
|
12
|
+
* Avoid extra call to Cache#read in case of a fragment cache hit
|
13
|
+
|
14
|
+
*Rails 3.0.9 (June 16, 2011)*
|
2
15
|
|
3
16
|
* json_escape will now return a SafeBuffer string if it receives SafeBuffer string [tenderlove]
|
4
17
|
|
@@ -2102,7 +2115,7 @@ superclass' view_paths. [Rick Olson]
|
|
2102
2115
|
|
2103
2116
|
* Update documentation for erb trim syntax. #5651 [matt@mattmargolis.net]
|
2104
2117
|
|
2105
|
-
* Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com
|
2118
|
+
* Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com]
|
2106
2119
|
|
2107
2120
|
* Reset @html_document between requests so assert_tag works. #4810 [Jarkko Laine, easleydp@gmail.com]
|
2108
2121
|
|
@@ -2699,7 +2712,7 @@ superclass' view_paths. [Rick Olson]
|
|
2699
2712
|
|
2700
2713
|
* Provide support for decimal columns to form helpers. Closes #5672. [Dave Thomas]
|
2701
2714
|
|
2702
|
-
* Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com
|
2715
|
+
* Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com]
|
2703
2716
|
|
2704
2717
|
* Reset @html_document between requests so assert_tag works. #4810 [Jarkko Laine, easleydp@gmail.com]
|
2705
2718
|
|
@@ -204,16 +204,16 @@ module ActionController
|
|
204
204
|
HttpAuthentication::Digest::ControllerMethods,
|
205
205
|
HttpAuthentication::Token::ControllerMethods,
|
206
206
|
|
207
|
-
# Add instrumentations hooks at the bottom, to ensure they instrument
|
208
|
-
# all the methods properly.
|
209
|
-
Instrumentation,
|
210
|
-
|
211
207
|
# Before callbacks should also be executed the earliest as possible, so
|
212
208
|
# also include them at the bottom.
|
213
209
|
AbstractController::Callbacks,
|
214
210
|
|
215
211
|
# The same with rescue, append it at the end to wrap as much as possible.
|
216
|
-
Rescue
|
212
|
+
Rescue,
|
213
|
+
|
214
|
+
# Add instrumentations hooks at the bottom, to ensure they instrument
|
215
|
+
# all the methods properly.
|
216
|
+
Instrumentation
|
217
217
|
]
|
218
218
|
|
219
219
|
MODULES.each do |mod|
|
@@ -4,7 +4,7 @@ module ActionDispatch
|
|
4
4
|
attr_accessor :original_filename, :content_type, :tempfile, :headers
|
5
5
|
|
6
6
|
def initialize(hash)
|
7
|
-
@original_filename = hash[:filename]
|
7
|
+
@original_filename = encode_filename(hash[:filename])
|
8
8
|
@content_type = hash[:type]
|
9
9
|
@headers = hash[:head]
|
10
10
|
@tempfile = hash[:tempfile]
|
@@ -30,6 +30,16 @@ module ActionDispatch
|
|
30
30
|
def size
|
31
31
|
@tempfile.size
|
32
32
|
end
|
33
|
+
|
34
|
+
private
|
35
|
+
def encode_filename(filename)
|
36
|
+
# Encode the filename in the utf8 encoding, unless it is nil or we're in 1.8
|
37
|
+
if "ruby".encoding_aware? && filename
|
38
|
+
filename.force_encoding("UTF-8").encode!
|
39
|
+
else
|
40
|
+
filename
|
41
|
+
end
|
42
|
+
end
|
33
43
|
end
|
34
44
|
|
35
45
|
module Upload
|
data/lib/action_pack/version.rb
CHANGED
@@ -46,17 +46,17 @@ module ActionView
|
|
46
46
|
private
|
47
47
|
# TODO: Create an object that has caching read/write on it
|
48
48
|
def fragment_for(name = {}, options = nil, &block) #:nodoc:
|
49
|
-
if controller.
|
50
|
-
|
49
|
+
if fragment = controller.read_fragment(name, options)
|
50
|
+
fragment
|
51
51
|
else
|
52
52
|
# VIEW TODO: Make #capture usable outside of ERB
|
53
53
|
# This dance is needed because Builder can't use capture
|
54
54
|
pos = output_buffer.length
|
55
55
|
yield
|
56
|
-
if output_buffer.
|
56
|
+
if output_buffer.html_safe?
|
57
57
|
safe_output_buffer = output_buffer.to_str
|
58
58
|
fragment = safe_output_buffer.slice!(pos..-1)
|
59
|
-
self.output_buffer =
|
59
|
+
self.output_buffer = output_buffer.class.new(safe_output_buffer)
|
60
60
|
else
|
61
61
|
fragment = output_buffer.slice!(pos..-1)
|
62
62
|
end
|
@@ -1066,7 +1066,7 @@ module ActionView
|
|
1066
1066
|
options["name"] ||= tag_name_with_index(@auto_index)
|
1067
1067
|
options["id"] = options.fetch("id"){ tag_id_with_index(@auto_index) }
|
1068
1068
|
else
|
1069
|
-
options["name"] ||= tag_name + (options
|
1069
|
+
options["name"] ||= tag_name + (options['multiple'] ? '[]' : '')
|
1070
1070
|
options["id"] = options.fetch("id"){ tag_id }
|
1071
1071
|
end
|
1072
1072
|
end
|
@@ -5,7 +5,7 @@ module I18n
|
|
5
5
|
class ExceptionHandler
|
6
6
|
include Module.new {
|
7
7
|
def call(exception, locale, key, options)
|
8
|
-
exception.is_a?(MissingTranslationData) ? super.html_safe : super
|
8
|
+
exception.is_a?(MissingTranslationData) && options[:rescue_format] == :html ? super.html_safe : super
|
9
9
|
end
|
10
10
|
}
|
11
11
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: true
|
6
5
|
segments:
|
7
6
|
- 3
|
8
7
|
- 0
|
9
|
-
-
|
10
|
-
|
8
|
+
- 10
|
9
|
+
- rc1
|
10
|
+
version: 3.0.10.rc1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Heinemeier Hansson
|
@@ -15,49 +15,46 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-04 00:00:00 -07:00
|
19
|
+
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: activesupport
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
25
|
requirements:
|
26
26
|
- - "="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
hash: 21
|
29
28
|
segments:
|
30
29
|
- 3
|
31
30
|
- 0
|
32
|
-
-
|
33
|
-
|
31
|
+
- 10
|
32
|
+
- rc1
|
33
|
+
version: 3.0.10.rc1
|
34
34
|
type: :runtime
|
35
35
|
version_requirements: *id001
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: activemodel
|
38
38
|
prerelease: false
|
39
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
40
|
requirements:
|
42
41
|
- - "="
|
43
42
|
- !ruby/object:Gem::Version
|
44
|
-
hash: 21
|
45
43
|
segments:
|
46
44
|
- 3
|
47
45
|
- 0
|
48
|
-
-
|
49
|
-
|
46
|
+
- 10
|
47
|
+
- rc1
|
48
|
+
version: 3.0.10.rc1
|
50
49
|
type: :runtime
|
51
50
|
version_requirements: *id002
|
52
51
|
- !ruby/object:Gem::Dependency
|
53
52
|
name: builder
|
54
53
|
prerelease: false
|
55
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
-
none: false
|
57
55
|
requirements:
|
58
56
|
- - ~>
|
59
57
|
- !ruby/object:Gem::Version
|
60
|
-
hash: 15
|
61
58
|
segments:
|
62
59
|
- 2
|
63
60
|
- 1
|
@@ -69,11 +66,9 @@ dependencies:
|
|
69
66
|
name: i18n
|
70
67
|
prerelease: false
|
71
68
|
requirement: &id004 !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
69
|
requirements:
|
74
70
|
- - ~>
|
75
71
|
- !ruby/object:Gem::Version
|
76
|
-
hash: 11
|
77
72
|
segments:
|
78
73
|
- 0
|
79
74
|
- 5
|
@@ -85,11 +80,9 @@ dependencies:
|
|
85
80
|
name: rack
|
86
81
|
prerelease: false
|
87
82
|
requirement: &id005 !ruby/object:Gem::Requirement
|
88
|
-
none: false
|
89
83
|
requirements:
|
90
84
|
- - ~>
|
91
85
|
- !ruby/object:Gem::Version
|
92
|
-
hash: 29
|
93
86
|
segments:
|
94
87
|
- 1
|
95
88
|
- 2
|
@@ -101,11 +94,9 @@ dependencies:
|
|
101
94
|
name: rack-test
|
102
95
|
prerelease: false
|
103
96
|
requirement: &id006 !ruby/object:Gem::Requirement
|
104
|
-
none: false
|
105
97
|
requirements:
|
106
98
|
- - ~>
|
107
99
|
- !ruby/object:Gem::Version
|
108
|
-
hash: 5
|
109
100
|
segments:
|
110
101
|
- 0
|
111
102
|
- 5
|
@@ -117,11 +108,9 @@ dependencies:
|
|
117
108
|
name: rack-mount
|
118
109
|
prerelease: false
|
119
110
|
requirement: &id007 !ruby/object:Gem::Requirement
|
120
|
-
none: false
|
121
111
|
requirements:
|
122
112
|
- - ~>
|
123
113
|
- !ruby/object:Gem::Version
|
124
|
-
hash: 27
|
125
114
|
segments:
|
126
115
|
- 0
|
127
116
|
- 6
|
@@ -133,11 +122,9 @@ dependencies:
|
|
133
122
|
name: tzinfo
|
134
123
|
prerelease: false
|
135
124
|
requirement: &id008 !ruby/object:Gem::Requirement
|
136
|
-
none: false
|
137
125
|
requirements:
|
138
126
|
- - ~>
|
139
127
|
- !ruby/object:Gem::Version
|
140
|
-
hash: 61
|
141
128
|
segments:
|
142
129
|
- 0
|
143
130
|
- 3
|
@@ -149,11 +136,9 @@ dependencies:
|
|
149
136
|
name: erubis
|
150
137
|
prerelease: false
|
151
138
|
requirement: &id009 !ruby/object:Gem::Requirement
|
152
|
-
none: false
|
153
139
|
requirements:
|
154
140
|
- - ~>
|
155
141
|
- !ruby/object:Gem::Version
|
156
|
-
hash: 27
|
157
142
|
segments:
|
158
143
|
- 2
|
159
144
|
- 6
|
@@ -334,6 +319,7 @@ files:
|
|
334
319
|
- lib/action_view/test_case.rb
|
335
320
|
- lib/action_view/testing/resolvers.rb
|
336
321
|
- lib/action_view.rb
|
322
|
+
has_rdoc: true
|
337
323
|
homepage: http://www.rubyonrails.org
|
338
324
|
licenses: []
|
339
325
|
|
@@ -343,29 +329,27 @@ rdoc_options: []
|
|
343
329
|
require_paths:
|
344
330
|
- lib
|
345
331
|
required_ruby_version: !ruby/object:Gem::Requirement
|
346
|
-
none: false
|
347
332
|
requirements:
|
348
333
|
- - ">="
|
349
334
|
- !ruby/object:Gem::Version
|
350
|
-
hash: 57
|
351
335
|
segments:
|
352
336
|
- 1
|
353
337
|
- 8
|
354
338
|
- 7
|
355
339
|
version: 1.8.7
|
356
340
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
357
|
-
none: false
|
358
341
|
requirements:
|
359
|
-
- - "
|
342
|
+
- - ">"
|
360
343
|
- !ruby/object:Gem::Version
|
361
|
-
hash: 3
|
362
344
|
segments:
|
363
|
-
-
|
364
|
-
|
345
|
+
- 1
|
346
|
+
- 3
|
347
|
+
- 1
|
348
|
+
version: 1.3.1
|
365
349
|
requirements:
|
366
350
|
- none
|
367
351
|
rubyforge_project: actionpack
|
368
|
-
rubygems_version: 1.
|
352
|
+
rubygems_version: 1.3.6
|
369
353
|
signing_key:
|
370
354
|
specification_version: 3
|
371
355
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|