actionpack 3.0.7 → 3.0.8.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 CHANGED
@@ -1,3 +1,7 @@
1
+ *Rails 3.0.8 (unreleased)*
2
+
3
+ * Fixed github issue #342 with asset paths and relative roots.
4
+
1
5
  *Rails 3.0.7 (April 18, 2011)*
2
6
 
3
7
  *No changes.
@@ -14,7 +14,7 @@ module AbstractController
14
14
  # Override AbstractController::Base's process_action to run the
15
15
  # process_action callbacks around the normal behavior.
16
16
  def process_action(method_name, *args)
17
- run_callbacks(:process_action, method_name) do
17
+ run_callbacks(:process_action, action_name) do
18
18
  super
19
19
  end
20
20
  end
@@ -126,7 +126,7 @@ module ActionController
126
126
  # This was moved to a plugin
127
127
  def verify(*args)
128
128
  ActiveSupport::Deprecation.warn "verify was removed from Rails and is now available as a plugin. " \
129
- "Please install it with `rails plugin install git://github.com/rails/verification.git`.", caller
129
+ "Please install it with `rails plugin install git://github.com/sikachu/verification.git`.", caller
130
130
  end
131
131
 
132
132
  def exempt_from_layout(*)
@@ -16,7 +16,11 @@ module ActionController
16
16
  payload = event.payload
17
17
  additions = ActionController::Base.log_process_action(payload)
18
18
 
19
- message = "Completed #{payload[:status]} #{Rack::Utils::HTTP_STATUS_CODES[payload[:status]]} in %.0fms" % event.duration
19
+ status = payload[:status]
20
+ if status.nil? && payload[:exception].present?
21
+ status = Rack::Utils.status_code(ActionDispatch::ShowExceptions.rescue_responses[payload[:exception].first]) rescue nil
22
+ end
23
+ message = "Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in %.0fms" % event.duration
20
24
  message << " (#{additions.join(" | ")})" unless additions.blank?
21
25
 
22
26
  info(message)
@@ -1,13 +1,9 @@
1
1
  module ActionController
2
2
  module ImplicitRender
3
- def send_action(method, *args)
4
- if respond_to?(method, true)
5
- ret = super
6
- default_render unless response_body
7
- ret
8
- else
9
- default_render
10
- end
3
+ def send_action(*)
4
+ ret = super
5
+ default_render unless response_body
6
+ ret
11
7
  end
12
8
 
13
9
  def default_render
@@ -15,8 +11,10 @@ module ActionController
15
11
  end
16
12
 
17
13
  def method_for_action(action_name)
18
- super || if template_exists?(action_name.to_s, _prefix)
19
- action_name.to_s
14
+ super || begin
15
+ if template_exists?(action_name.to_s, _prefix)
16
+ "default_render"
17
+ end
20
18
  end
21
19
  end
22
20
  end
@@ -1,7 +1,7 @@
1
1
  <h1>
2
2
  <%=h @exception.class.to_s %>
3
3
  <% if @request.parameters['controller'] %>
4
- in <%=h @request.parameters['controller'].classify.pluralize %>Controller<% if @request.parameters['action'] %>#<%=h @request.parameters['action'] %><% end %>
4
+ in <%=h @request.parameters['controller'].camelize %>Controller<% if @request.parameters['action'] %>#<%=h @request.parameters['action'] %><% end %>
5
5
  <% end %>
6
6
  </h1>
7
7
  <pre><%=h @exception.message %></pre>
@@ -2,8 +2,8 @@ module ActionPack
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 0
5
- TINY = 7
6
- PRE = nil
5
+ TINY = 8
6
+ PRE = "rc1"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
9
9
  end
@@ -165,8 +165,12 @@ module ActionView #:nodoc:
165
165
 
166
166
  # Specify whether RJS responses should be wrapped in a try/catch block
167
167
  # that alert()s the caught exception (and then re-raises it).
168
- cattr_accessor :debug_rjs
168
+ cattr_reader :debug_rjs
169
169
  @@debug_rjs = false
170
+ def self.debug_rjs=(new_value)
171
+ ActiveSupport::Deprecation.warn("config.action_view.debug_rjs will be removed in 3.1, from 3.1 onwards you will need to install prototype-rails to continue to use RJS templates ")
172
+ @@debug_rjs = new_value
173
+ end
170
174
 
171
175
  # Specify the proc used to decorate input tags that refer to attributes with errors.
172
176
  cattr_accessor :field_error_proc
@@ -872,14 +872,14 @@ module ActionView
872
872
 
873
873
  def ensure_stylesheet_sources!(sources)
874
874
  sources.each do |source|
875
- asset_file_path!(path_to_stylesheet(source))
875
+ asset_file_path!(compute_public_path(source, 'stylesheets', 'css', false))
876
876
  end
877
877
  return sources
878
878
  end
879
879
 
880
880
  def ensure_javascript_sources!(sources)
881
881
  sources.each do |source|
882
- asset_file_path!(path_to_javascript(source))
882
+ asset_file_path!(compute_public_path(source, 'javascripts', 'js', false))
883
883
  end
884
884
  return sources
885
885
  end
@@ -299,12 +299,12 @@ module ActionView
299
299
 
300
300
  container = container.to_a if Hash === container
301
301
  selected, disabled = extract_selected_and_disabled(selected).map do | r |
302
- Array.wrap(r).map(&:to_s)
302
+ Array.wrap(r).map { |item| item.to_s }
303
303
  end
304
304
 
305
305
  container.map do |element|
306
306
  html_attributes = option_html_attributes(element)
307
- text, value = option_text_and_value(element).map(&:to_s)
307
+ text, value = option_text_and_value(element).map { |item| item.to_s }
308
308
  selected_attribute = ' selected="selected"' if option_value_selected?(value, selected)
309
309
  disabled_attribute = ' disabled="disabled"' if disabled && option_value_selected?(value, disabled)
310
310
  %(<option value="#{html_escape(value)}"#{selected_attribute}#{disabled_attribute}#{html_attributes}>#{html_escape(text)}</option>)
@@ -182,6 +182,7 @@ module ActionView
182
182
  @request
183
183
  @routes
184
184
  @templates
185
+ @options
185
186
  @test_passed
186
187
  @view
187
188
  @view_context_class
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionpack
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
5
- prerelease:
4
+ hash: 15424055
5
+ prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 7
10
- version: 3.0.7
9
+ - 8
10
+ - rc
11
+ - 1
12
+ version: 3.0.8.rc1
11
13
  platform: ruby
12
14
  authors:
13
15
  - David Heinemeier Hansson
@@ -15,7 +17,7 @@ autorequire:
15
17
  bindir: bin
16
18
  cert_chain: []
17
19
 
18
- date: 2011-04-18 00:00:00 Z
20
+ date: 2011-05-25 00:00:00 Z
19
21
  dependencies:
20
22
  - !ruby/object:Gem::Dependency
21
23
  name: activesupport
@@ -25,12 +27,14 @@ dependencies:
25
27
  requirements:
26
28
  - - "="
27
29
  - !ruby/object:Gem::Version
28
- hash: 9
30
+ hash: 15424055
29
31
  segments:
30
32
  - 3
31
33
  - 0
32
- - 7
33
- version: 3.0.7
34
+ - 8
35
+ - rc
36
+ - 1
37
+ version: 3.0.8.rc1
34
38
  type: :runtime
35
39
  version_requirements: *id001
36
40
  - !ruby/object:Gem::Dependency
@@ -41,12 +45,14 @@ dependencies:
41
45
  requirements:
42
46
  - - "="
43
47
  - !ruby/object:Gem::Version
44
- hash: 9
48
+ hash: 15424055
45
49
  segments:
46
50
  - 3
47
51
  - 0
48
- - 7
49
- version: 3.0.7
52
+ - 8
53
+ - rc
54
+ - 1
55
+ version: 3.0.8.rc1
50
56
  type: :runtime
51
57
  version_requirements: *id002
52
58
  - !ruby/object:Gem::Dependency
@@ -356,16 +362,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
356
362
  required_rubygems_version: !ruby/object:Gem::Requirement
357
363
  none: false
358
364
  requirements:
359
- - - ">="
365
+ - - ">"
360
366
  - !ruby/object:Gem::Version
361
- hash: 3
367
+ hash: 25
362
368
  segments:
363
- - 0
364
- version: "0"
369
+ - 1
370
+ - 3
371
+ - 1
372
+ version: 1.3.1
365
373
  requirements:
366
374
  - none
367
375
  rubyforge_project: actionpack
368
- rubygems_version: 1.7.2
376
+ rubygems_version: 1.8.2
369
377
  signing_key:
370
378
  specification_version: 3
371
379
  summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).