Skip to content
This repository
Browse code

Merge branch 'master' of github.com:lifo/docrails

  • Loading branch information...
commit e2e2d6298ebd9c67d0dc14c1e3481a59a4edf5d2 2 parents 493cf44 + 6d05c79
Sergey Parizhskiy authored November 28, 2011

Showing 159 changed files with 2,855 additions and 1,812 deletions. Show diff stats Hide diff stats

  1. 1  .gitignore
  2. 7  Gemfile
  3. 52  RELEASING_RAILS.rdoc
  4. 38  actionpack/CHANGELOG.md
  5. 2  actionpack/actionpack.gemspec
  6. 4  actionpack/lib/abstract_controller/railties/routes_helpers.rb
  7. 20  actionpack/lib/action_controller/metal/renderers.rb
  8. 10  actionpack/lib/action_controller/metal/rescue.rb
  9. 2  actionpack/lib/action_controller/railtie.rb
  10. 7  actionpack/lib/action_controller/railties/paths.rb
  11. 5  actionpack/lib/action_dispatch/middleware/cookies.rb
  12. 13  actionpack/lib/action_dispatch/middleware/params_parser.rb
  13. 37  actionpack/lib/action_dispatch/middleware/remote_ip.rb
  14. 34  actionpack/lib/action_dispatch/middleware/show_exceptions.rb
  15. 1  actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb
  16. 4  actionpack/lib/action_dispatch/railtie.rb
  17. 109  actionpack/lib/action_dispatch/routing/mapper.rb
  18. 122  actionpack/lib/action_dispatch/routing/redirection.rb
  19. 4  actionpack/lib/action_dispatch/routing/url_for.rb
  20. BIN  actionpack/lib/action_view/data/encoding_conversions.dump
  21. 88  actionpack/lib/action_view/data/encoding_conversions.txt
  22. 3  actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb
  23. 2  actionpack/lib/action_view/helpers/atom_feed_helper.rb
  24. 10  actionpack/lib/action_view/helpers/form_helper.rb
  25. 3  actionpack/lib/action_view/helpers/number_helper.rb
  26. 15  actionpack/lib/action_view/helpers/translation_helper.rb
  27. 9  actionpack/lib/action_view/renderer/partial_renderer.rb
  28. 13  actionpack/lib/action_view/template.rb
  29. 2  actionpack/lib/sprockets/helpers/rails_helper.rb
  30. 4  actionpack/test/abstract_unit.rb
  31. 6  actionpack/test/activerecord/polymorphic_routes_test.rb
  32. 59  actionpack/test/controller/show_exceptions_test.rb
  33. 4  actionpack/test/dispatch/cookies_test.rb
  34. 18  actionpack/test/dispatch/request/json_params_parsing_test.rb
  35. 20  actionpack/test/dispatch/request/xml_params_parsing_test.rb
  36. 9  actionpack/test/dispatch/request_test.rb
  37. 40  actionpack/test/dispatch/routing_test.rb
  38. 107  actionpack/test/dispatch/show_exceptions_test.rb
  39. 4  actionpack/test/lib/controller/fake_models.rb
  40. 48  actionpack/test/template/form_helper_test.rb
  41. 7  actionpack/test/template/render_test.rb
  42. 3  actionpack/test/template/sprockets_helper_test.rb
  43. 18  actionpack/test/template/translation_helper_test.rb
  44. 12  activemodel/CHANGELOG.md
  45. 1  activemodel/lib/active_model.rb
  46. 59  activemodel/lib/active_model/attribute_methods.rb
  47. 2  activemodel/lib/active_model/callbacks.rb
  48. 2  activemodel/lib/active_model/dirty.rb
  49. 27  activemodel/lib/active_model/naming.rb
  50. 144  activemodel/lib/active_model/serializable.rb
  51. 108  activemodel/lib/active_model/serializable/json.rb
  52. 195  activemodel/lib/active_model/serializable/xml.rb
  53. 139  activemodel/lib/active_model/serialization.rb
  54. 253  activemodel/lib/active_model/serializer.rb
  55. 102  activemodel/lib/active_model/serializers/json.rb
  56. 191  activemodel/lib/active_model/serializers/xml.rb
  57. 6  activemodel/lib/active_model/validations/presence.rb
  58. 2  activemodel/lib/active_model/validations/with.rb
  59. 51  activemodel/test/cases/naming_test.rb
  60. 2  activemodel/test/cases/{serializers/json_serialization_test.rb → serializable/json_test.rb}
  61. 4  activemodel/test/cases/{serializers/xml_serialization_test.rb → serializable/xml_test.rb}
  62. 4  activemodel/test/cases/{serialization_test.rb → serializable_test.rb}
  63. 12  activemodel/test/cases/validations/exclusion_validation_test.rb
  64. 24  activemodel/test/cases/validations/format_validation_test.rb
  65. 12  activemodel/test/cases/validations/inclusion_validation_test.rb
  66. 8  activemodel/test/models/blog_post.rb
  67. 34  activerecord/CHANGELOG.md
  68. 2  activerecord/activerecord.gemspec
  69. 8  activerecord/lib/active_record/associations/has_many_association.rb
  70. 2  activerecord/lib/active_record/attribute_methods/read.rb
  71. 2  activerecord/lib/active_record/attribute_methods/write.rb
  72. 18  activerecord/lib/active_record/base.rb
  73. 107  activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
  74. 31  activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
  75. 21  activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
  76. 22  activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
  77. 5  activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  78. 72  activerecord/lib/active_record/connection_adapters/schema_cache.rb
  79. 23  activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
  80. 1  activerecord/lib/active_record/persistence.rb
  81. 151  activerecord/lib/active_record/railties/databases.rake
  82. 5  activerecord/lib/active_record/relation.rb
  83. 14  activerecord/lib/active_record/relation/predicate_builder.rb
  84. 2  activerecord/lib/active_record/serialization.rb
  85. 6  activerecord/lib/active_record/serializers/xml_serializer.rb
  86. 11  activerecord/lib/active_record/session_store.rb
  87. 7  activerecord/test/active_record/connection_adapters/fake_adapter.rb
  88. 10  activerecord/test/cases/adapter_test.rb
  89. 6  activerecord/test/cases/adapters/mysql/schema_test.rb
  90. 3  activerecord/test/cases/adapters/mysql2/explain_test.rb
  91. 6  activerecord/test/cases/adapters/mysql2/schema_test.rb
  92. 3  activerecord/test/cases/adapters/postgresql/explain_test.rb
  93. 2  activerecord/test/cases/adapters/postgresql/schema_test.rb
  94. 3  activerecord/test/cases/adapters/sqlite3/explain_test.rb
  95. 5  activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
  96. 8  activerecord/test/cases/base_test.rb
  97. 55  activerecord/test/cases/connection_adapters/schema_cache_test.rb
  98. 37  activerecord/test/cases/connection_pool_test.rb
  99. 4  activerecord/test/cases/finder_test.rb
  100. 176  activerecord/test/cases/migration_test.rb
  101. 72  activerecord/test/cases/pooled_connections_test.rb
  102. 2  activeresource/lib/active_resource/custom_methods.rb
  103. 3  activesupport/CHANGELOG.md
  104. 135  activesupport/lib/active_support/cache.rb
  105. 15  activesupport/lib/active_support/concern.rb
  106. 35  activesupport/lib/active_support/core_ext/date/calculations.rb
  107. 4  activesupport/lib/active_support/core_ext/object/to_json.rb
  108. 38  activesupport/lib/active_support/core_ext/time/calculations.rb
  109. 36  activesupport/lib/active_support/dependencies.rb
  110. 8  activesupport/lib/active_support/json/encoding.rb
  111. 2  activesupport/lib/active_support/ordered_hash.rb
  112. 7  activesupport/lib/active_support/time_with_zone.rb
  113. 127  activesupport/test/caching_test.rb
  114. 43  activesupport/test/class_cache_test.rb
  115. 7  activesupport/test/concern_test.rb
  116. 18  activesupport/test/core_ext/date_time_ext_test.rb
  117. 7  activesupport/test/core_ext/integer_ext_test.rb
  118. 26  activesupport/test/core_ext/time_ext_test.rb
  119. 11  activesupport/test/core_ext/time_with_zone_test.rb
  120. 27  railties/CHANGELOG.md
  121. 2  railties/guides/code/getting_started/app/views/layouts/application.html.erb
  122. 5  railties/guides/code/getting_started/config/application.rb
  123. 5  railties/guides/code/getting_started/config/environments/test.rb
  124. 15  railties/guides/source/action_mailer_basics.textile
  125. 16  railties/guides/source/active_record_querying.textile
  126. 18  railties/guides/source/active_support_core_extensions.textile
  127. 2  railties/guides/source/asset_pipeline.textile
  128. 5  railties/guides/source/configuring.textile
  129. 2  railties/guides/source/contributing_to_ruby_on_rails.textile
  130. 4  railties/guides/source/getting_started.textile
  131. 2  railties/guides/source/i18n.textile
  132. 22  railties/guides/source/initialization.textile
  133. 4  railties/guides/source/migrations.textile
  134. 2  railties/guides/source/testing.textile
  135. 31  railties/lib/rails/application.rb
  136. 5  railties/lib/rails/application/configuration.rb
  137. 37  railties/lib/rails/application/route_inspector.rb
  138. 17  railties/lib/rails/code_statistics.rb
  139. 2  railties/lib/rails/commands/dbconsole.rb
  140. 320  railties/lib/rails/commands/plugin.rb
  141. 67  railties/lib/rails/engine.rb
  142. 7  railties/lib/rails/generators/actions.rb
  143. 1  railties/lib/rails/generators/app_base.rb
  144. 2  railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt
  145. 5  railties/lib/rails/generators/rails/app/templates/config/application.rb
  146. 5  railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
  147. 20  railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb
  148. 2  railties/lib/rails/generators/rails/plugin_new/templates/app/views/layouts/%name%/application.html.erb.tt
  149. 2  railties/lib/rails/railtie.rb
  150. 1  railties/test/application/configuration_test.rb
  151. 1  railties/test/application/console_test.rb
  152. 47  railties/test/application/middleware/cookies_test.rb
  153. 2  railties/test/application/rackup_test.rb
  154. 26  railties/test/application/route_inspect_test.rb
  155. 8  railties/test/generators/actions_test.rb
  156. 7  railties/test/generators/app_generator_test.rb
  157. 6  railties/test/generators/plugin_new_generator_test.rb
  158. 132  railties/test/railties/engine_test.rb
  159. 1  tasks/release.rb
1  .gitignore
@@ -2,6 +2,7 @@
2 2
 # Check out http://help.github.com/ignore-files/ for how to set that up.
3 3
 
4 4
 debug.log
  5
+.Gemfile
5 6
 /.bundle
6 7
 /.rbenv-version
7 8
 /.rvmrc
7  Gemfile
@@ -36,13 +36,11 @@ gem "memcache-client", ">= 1.8.5"
36 36
 
37 37
 platforms :mri_18 do
38 38
   gem "system_timer"
39  
-  gem "ruby-debug", ">= 0.10.3" unless ENV['TRAVIS']
40 39
   gem "json"
41 40
 end
42 41
 
43  
-platforms :mri_19 do
44  
-  gem "ruby-debug19", :require => "ruby-debug" unless ENV['TRAVIS']
45  
-end
  42
+# Add your own local bundler stuff
  43
+instance_eval File.read ".Gemfile" if File.exists? ".Gemfile"
46 44
 
47 45
 platforms :mri do
48 46
   group :test do
@@ -69,7 +67,6 @@ platforms :ruby do
69 67
 end
70 68
 
71 69
 platforms :jruby do
72  
-  gem "ruby-debug", ">= 0.10.3"
73 70
   gem "json"
74 71
   gem "activerecord-jdbcsqlite3-adapter", ">= 1.2.0"
75 72
 
52  RELEASING_RAILS.rdoc
Source Rendered
@@ -25,6 +25,12 @@ for Rails.  You can check the status of his tests here:
25 25
 
26 26
 Do not release with Red AWDwR tests.
27 27
 
  28
+=== Are the postgres tests green? If not, make them green
  29
+
  30
+Currently Travis CI doesn't run the Active Record postgres tests. They are
  31
+working to resolve this, but in the mean time, it is crucial to ensure that
  32
+the tests are still green before release.
  33
+
28 34
 === Do we have any git dependencies?  If so, contact those authors.
29 35
 
30 36
 Having git dependencies indicates that we depend on unreleased code.
@@ -60,6 +66,8 @@ for today:
60 66
 
61 67
 === Is Sam Ruby happy?  If not, make him happy.
62 68
 
  69
+=== Are the postgres tests green? If not, make them green
  70
+
63 71
 === Contact the security team.  CVE emails must be sent on this day.
64 72
 
65 73
 === Create a release branch.
@@ -81,8 +89,20 @@ You can review the commits for the 3.0.10 release like this:
81 89
 
82 90
     [aaron@higgins rails (3-0-10)]$ git log v3.0.9..
83 91
 
  92
+If you're doing a stable branch release, you should also ensure that all of
  93
+the CHANGELOG entries in the stable branch are also synced to the master
  94
+branch.
  95
+
84 96
 === Update the RAILS_VERSION file to include the RC.
85 97
 
  98
+=== Build and test the gem.
  99
+
  100
+Run `rake install` to generate the gems and install them locally. Then try
  101
+generating a new app and ensure that nothing explodes.
  102
+
  103
+This will stop you from looking silly when you push an RC to rubygems.org and
  104
+then realise it is broken.
  105
+
86 106
 === Release the gem.
87 107
 
88 108
 IMPORTANT: Due to YAML parse problems on the rubygems.org server, it is safest
@@ -150,6 +170,7 @@ Today, do this stuff in this order:
150 170
 * Apply security patches to the release branch
151 171
 * Update CHANGELOG with security fixes.
152 172
 * Update RAILS_VERSION to remove the rc
  173
+* Build and test the gem
153 174
 * Release the gems
154 175
 * Email security lists
155 176
 * Email general announcement lists
@@ -184,3 +205,34 @@ There are two simple steps for fixing the CI:
184 205
 2. Fix it
185 206
 
186 207
 Repeat these steps until the CI is green.
  208
+
  209
+=== Manually trigger docs generation
  210
+
  211
+We have a post-receive hook in GitHub that calls the docs server on pushes.
  212
+It triggers generation and publication of edge docs, updates the contrib app,
  213
+and generates and publishes stable docs if a new stable tag is detected.
  214
+
  215
+The hook unfortunately is not invoked by tag pushing, so once the new stable
  216
+tag has been pushed to origin, please run
  217
+
  218
+    curl -X POST -d '' http://rails-hooks.hashref.com/rails-master-hook
  219
+
  220
+You should see something like this:
  221
+
  222
+    Rails master hook tasks scheduled:
  223
+
  224
+      * updates the local checkout
  225
+      * updates Rails Contributors
  226
+      * generates and publishes edge docs
  227
+
  228
+    If a new stable tag is detected it also
  229
+
  230
+      * generates and publishes stable docs
  231
+
  232
+    This needs typically a few minutes.
  233
+
  234
+Note you do not need to specify the tag, the docs server figures it out.
  235
+
  236
+Also, don't worry if you call that multiple times or the hook is triggered
  237
+again by some immediate regular push, if the scripts are running new calls
  238
+are just queued (in a queue of size 1).
38  actionpack/CHANGELOG.md
Source Rendered
... ...
@@ -1,5 +1,9 @@
1 1
 ## Rails 3.2.0 (unreleased) ##
2 2
 
  3
+*   Refactor ActionDispatch::ShowExceptions. Controller is responsible for choice to show exceptions. *Sergey Nartimov*
  4
+
  5
+    It's possible to override +show_detailed_exceptions?+ in controllers to specify which requests should provide debugging information on errors.
  6
+
3 7
 *   Responders now return 204 No Content for API requests without a response body (as in the new scaffold) *José Valim*
4 8
 
5 9
 *   Added ActionDispatch::RequestId middleware that'll make a unique X-Request-Id header available to the response and enables the ActionDispatch::Request#uuid method. This makes it easy to trace requests from end-to-end in the stack and to identify individual requests in mixed logs like Syslog *DHH*
@@ -62,8 +66,40 @@
62 66
     persistent between requests so if you need to manipulate the environment
63 67
     for your test you need to do it before the cookie jar is created.
64 68
 
  69
+## Rails 3.1.3 (unreleased) ##
  70
+
  71
+*   Fix using `tranlate` helper with a html translation which uses the `:count` option for
  72
+    pluralization.
  73
+
  74
+    *Jon Leighton*
  75
+
65 76
 ## Rails 3.1.2 (unreleased) ##
66 77
 
  78
+*   Fix XSS security vulnerability in the `translate` helper method. When using interpolation
  79
+    in combination with HTML-safe translations, the interpolated input would not get HTML
  80
+    escaped. *GH 3664*
  81
+
  82
+    Before:
  83
+
  84
+        translate('foo_html', :something => '<script>') # => "...<script>..."
  85
+
  86
+    After:
  87
+
  88
+        translate('foo_html', :something => '<script>') # => "...&lt;script&gt;..."
  89
+
  90
+    *Sergey Nartimov*
  91
+
  92
+*   Upgrade sprockets dependency to ~> 2.1.0
  93
+
  94
+*   Ensure that the format isn't applied twice to the cache key, else it becomes impossible
  95
+    to target with expire_action.
  96
+
  97
+    *Christopher Meiklejohn*
  98
+
  99
+*   Swallow error when can't unmarshall object from session.
  100
+
  101
+    *Bruno Zanchet*
  102
+
67 103
 *   Implement a workaround for a bug in ruby-1.9.3p0 where an error would be raised
68 104
     while attempting to convert a template from one encoding to another.
69 105
 
@@ -76,6 +112,8 @@
76 112
 
77 113
     *Jon Leighton*
78 114
 
  115
+*   Ensure users upgrading from 3.0.x to 3.1.x will properly upgrade their flash object in session (issues #3298 and #2509)
  116
+
79 117
 ## Rails 3.1.1 (unreleased) ##
80 118
 
81 119
 *   javascript_path and stylesheet_path now refer to /assets if asset pipelining
2  actionpack/actionpack.gemspec
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24 24
   s.add_dependency('rack',          '~> 1.3.5')
25 25
   s.add_dependency('rack-test',     '~> 0.6.1')
26 26
   s.add_dependency('journey',       '~> 1.0.0')
27  
-  s.add_dependency('sprockets',     '~> 2.1.0.beta')
  27
+  s.add_dependency('sprockets',     '~> 2.1.1')
28 28
   s.add_dependency('erubis',        '~> 2.7.0')
29 29
 
30 30
   s.add_development_dependency('tzinfo', '~> 0.3.29')
4  actionpack/lib/abstract_controller/railties/routes_helpers.rb
@@ -5,8 +5,8 @@ def self.with(routes)
5 5
         Module.new do
6 6
           define_method(:inherited) do |klass|
7 7
             super(klass)
8  
-            if namespace = klass.parents.detect {|m| m.respond_to?(:_railtie) }
9  
-              klass.send(:include, namespace._railtie.routes.url_helpers)
  8
+            if namespace = klass.parents.detect { |m| m.respond_to?(:railtie_routes_url_helpers) }
  9
+              klass.send(:include, namespace.railtie_routes_url_helpers)
10 10
             else
11 11
               klass.send(:include, routes.url_helpers)
12 12
             end
20  actionpack/lib/action_controller/metal/renderers.rb
... ...
@@ -1,5 +1,6 @@
1 1
 require 'active_support/core_ext/class/attribute'
2 2
 require 'active_support/core_ext/object/blank'
  3
+require 'set'
3 4
 
4 5
 module ActionController
5 6
   # See <tt>Renderers.add</tt>
@@ -12,16 +13,13 @@ module Renderers
12 13
 
13 14
     included do
14 15
       class_attribute :_renderers
15  
-      self._renderers = {}.freeze
  16
+      self._renderers = Set.new.freeze
16 17
     end
17 18
 
18 19
     module ClassMethods
19 20
       def use_renderers(*args)
20  
-        new = _renderers.dup
21  
-        args.each do |key|
22  
-          new[key] = RENDERERS[key]
23  
-        end
24  
-        self._renderers = new.freeze
  21
+        renderers = _renderers + args
  22
+        self._renderers = renderers.freeze
25 23
       end
26 24
       alias use_renderer use_renderers
27 25
     end
@@ -31,10 +29,10 @@ def render_to_body(options)
31 29
     end
32 30
 
33 31
     def _handle_render_options(options)
34  
-      _renderers.each do |name, value|
35  
-        if options.key?(name.to_sym)
  32
+      _renderers.each do |name|
  33
+        if options.key?(name)
36 34
           _process_options(options)
37  
-          return send("_render_option_#{name}", options.delete(name.to_sym), options)
  35
+          return send("_render_option_#{name}", options.delete(name), options)
38 36
         end
39 37
       end
40 38
       nil
@@ -42,7 +40,7 @@ def _handle_render_options(options)
42 40
 
43 41
     # Hash of available renderers, mapping a renderer name to its proc.
44 42
     # Default keys are :json, :js, :xml.
45  
-    RENDERERS = {}
  43
+    RENDERERS = Set.new
46 44
 
47 45
     # Adds a new renderer to call within controller actions.
48 46
     # A renderer is invoked by passing its name as an option to
@@ -79,7 +77,7 @@ def _handle_render_options(options)
79 77
     # <tt>ActionController::MimeResponds#respond_with</tt>
80 78
     def self.add(key, &block)
81 79
       define_method("_render_option_#{key}", &block)
82  
-      RENDERERS[key] = block
  80
+      RENDERERS << key.to_sym
83 81
     end
84 82
 
85 83
     module All
10  actionpack/lib/action_controller/metal/rescue.rb
@@ -3,6 +3,11 @@ module Rescue
3 3
     extend ActiveSupport::Concern
4 4
     include ActiveSupport::Rescuable
5 5
 
  6
+    included do
  7
+      config_accessor :consider_all_requests_local
  8
+      self.consider_all_requests_local = false if consider_all_requests_local.nil?
  9
+    end
  10
+
6 11
     def rescue_with_handler(exception)
7 12
       if (exception.respond_to?(:original_exception) &&
8 13
           (orig_exception = exception.original_exception) &&
@@ -12,10 +17,15 @@ def rescue_with_handler(exception)
12 17
       super(exception)
13 18
     end
14 19
 
  20
+    def show_detailed_exceptions?
  21
+      consider_all_requests_local || request.local?
  22
+    end
  23
+
15 24
     private
16 25
       def process_action(*args)
17 26
         super
18 27
       rescue Exception => exception
  28
+        request.env['action_dispatch.show_detailed_exceptions'] = show_detailed_exceptions?
19 29
         rescue_with_handler(exception) || raise(exception)
20 30
       end
21 31
   end
2  actionpack/lib/action_controller/railtie.rb
@@ -21,6 +21,8 @@ class Railtie < Rails::Railtie
21 21
       paths   = app.config.paths
22 22
       options = app.config.action_controller
23 23
 
  24
+      options.consider_all_requests_local ||= app.config.consider_all_requests_local
  25
+
24 26
       options.assets_dir           ||= paths["public"].first
25 27
       options.javascripts_dir      ||= paths["public/javascripts"].first
26 28
       options.stylesheets_dir      ||= paths["public/stylesheets"].first
7  actionpack/lib/action_controller/railties/paths.rb
@@ -6,13 +6,14 @@ def self.with(app)
6 6
           define_method(:inherited) do |klass|
7 7
             super(klass)
8 8
 
9  
-            if namespace = klass.parents.detect {|m| m.respond_to?(:_railtie) }
10  
-              paths = namespace._railtie.paths["app/helpers"].existent
  9
+            if namespace = klass.parents.detect { |m| m.respond_to?(:railtie_helpers_paths) }
  10
+              paths = namespace.railtie_helpers_paths
11 11
             else
12  
-              paths = app.config.helpers_paths
  12
+              paths = app.helpers_paths
13 13
             end
14 14
 
15 15
             klass.helpers_path = paths
  16
+
16 17
             if klass.superclass == ActionController::Base && ActionController::Base.include_all_helpers
17 18
               klass.helper :all
18 19
             end
5  actionpack/lib/action_dispatch/middleware/cookies.rb
@@ -243,10 +243,13 @@ def recycle! #:nodoc:
243 243
         @delete_cookies.clear
244 244
       end
245 245
 
  246
+      mattr_accessor :always_write_cookie
  247
+      self.always_write_cookie = false
  248
+
246 249
       private
247 250
 
248 251
         def write_cookie?(cookie)
249  
-          @secure || !cookie[:secure] || defined?(Rails.env) && Rails.env.development?
  252
+          @secure || !cookie[:secure] || always_write_cookie
250 253
         end
251 254
     end
252 255
 
13  actionpack/lib/action_dispatch/middleware/params_parser.rb
@@ -52,14 +52,9 @@ def parse_formatted_parameters(env)
52 52
           false
53 53
         end
54 54
       rescue Exception => e # YAML, XML or Ruby code block errors
55  
-        logger.debug "Error occurred while parsing request parameters.\nContents:\n\n#{request.raw_post}"
  55
+        logger(env).debug "Error occurred while parsing request parameters.\nContents:\n\n#{request.raw_post}"
56 56
 
57  
-        raise
58  
-          { "body"           => request.raw_post,
59  
-            "content_type"   => request.content_mime_type,
60  
-            "content_length" => request.content_length,
61  
-            "exception"      => "#{e.message} (#{e.class})",
62  
-            "backtrace"      => e.backtrace }
  57
+        raise e
63 58
       end
64 59
 
65 60
       def content_type_from_legacy_post_data_format_header(env)
@@ -73,8 +68,8 @@ def content_type_from_legacy_post_data_format_header(env)
73 68
         nil
74 69
       end
75 70
 
76  
-      def logger
77  
-        defined?(Rails.logger) ? Rails.logger : Logger.new($stderr)
  71
+      def logger(env)
  72
+        env['action_dispatch.logger'] || Logger.new($stderr)
78 73
       end
79 74
   end
80 75
 end
37  actionpack/lib/action_dispatch/middleware/remote_ip.rb
@@ -13,16 +13,16 @@ class IpSpoofAttackError < StandardError ; end
13 13
        )\.
14 14
     }x
15 15
 
16  
-    attr_reader :check_ip_spoofing, :trusted_proxies
  16
+    attr_reader :check_ip, :proxies
17 17
 
18 18
     def initialize(app, check_ip_spoofing = true, custom_proxies = nil)
19 19
       @app = app
20  
-      @check_ip_spoofing = check_ip_spoofing
  20
+      @check_ip = check_ip_spoofing
21 21
       if custom_proxies
22  
-        custom_regexp = Regexp.new(custom_proxies, "i")
23  
-        @trusted_proxies = Regexp.union(TRUSTED_PROXIES, custom_regexp)
  22
+        custom_regexp = Regexp.new(custom_proxies)
  23
+        @proxies = Regexp.union(TRUSTED_PROXIES, custom_regexp)
24 24
       else
25  
-        @trusted_proxies = TRUSTED_PROXIES
  25
+        @proxies = TRUSTED_PROXIES
26 26
       end
27 27
     end
28 28
 
@@ -33,7 +33,9 @@ def call(env)
33 33
 
34 34
     class GetIp
35 35
       def initialize(env, middleware)
36  
-        @env, @middleware = env, middleware
  36
+        @env          = env
  37
+        @middleware   = middleware
  38
+        @calculated_ip = false
37 39
       end
38 40
 
39 41
       # Determines originating IP address. REMOTE_ADDR is the standard
@@ -42,27 +44,36 @@ def initialize(env, middleware)
42 44
       # HTTP_X_FORWARDED_FOR may be a comma-delimited list in the case of
43 45
       # multiple chained proxies. The last address which is not a known proxy
44 46
       # will be the originating IP.
45  
-      def to_s
  47
+      def calculate_ip
46 48
         client_ip     = @env['HTTP_CLIENT_IP']
47 49
         forwarded_ips = ips_from('HTTP_X_FORWARDED_FOR')
48 50
         remote_addrs  = ips_from('REMOTE_ADDR')
49 51
 
50  
-        check_ip = client_ip && @middleware.check_ip_spoofing
  52
+        check_ip = client_ip && @middleware.check_ip
51 53
         if check_ip && !forwarded_ips.include?(client_ip)
52 54
           # We don't know which came from the proxy, and which from the user
53 55
           raise IpSpoofAttackError, "IP spoofing attack?!" \
54  
-            "HTTP_CLIENT_IP=#{env['HTTP_CLIENT_IP'].inspect}" \
55  
-            "HTTP_X_FORWARDED_FOR=#{env['HTTP_X_FORWARDED_FOR'].inspect}"
  56
+            "HTTP_CLIENT_IP=#{@env['HTTP_CLIENT_IP'].inspect}" \
  57
+            "HTTP_X_FORWARDED_FOR=#{@env['HTTP_X_FORWARDED_FOR'].inspect}"
56 58
         end
57 59
 
58  
-        client_ip || forwarded_ips.last || remote_addrs.last
  60
+        not_proxy = client_ip || forwarded_ips.last || remote_addrs.first
  61
+
  62
+        # Return first REMOTE_ADDR if there are no other options
  63
+        not_proxy || ips_from('REMOTE_ADDR', :allow_proxies).first
  64
+      end
  65
+
  66
+      def to_s
  67
+        return @ip if @calculated_ip
  68
+        @calculated_ip = true
  69
+        @ip = calculate_ip
59 70
       end
60 71
 
61 72
     protected
62 73
 
63  
-      def ips_from(header)
  74
+      def ips_from(header, allow_proxies = false)
64 75
         ips = @env[header] ? @env[header].strip.split(/[,\s]+/) : []
65  
-        ips.reject{|ip| ip =~ @middleware.trusted_proxies }
  76
+        allow_proxies ? ips : ips.reject{|ip| ip =~ @middleware.proxies }
66 77
       end
67 78
     end
68 79
 
34  actionpack/lib/action_dispatch/middleware/show_exceptions.rb
@@ -2,6 +2,7 @@
2 2
 require 'action_controller/metal/exceptions'
3 3
 require 'active_support/notifications'
4 4
 require 'action_dispatch/http/request'
  5
+require 'active_support/deprecation'
5 6
 
6 7
 module ActionDispatch
7 8
   # This middleware rescues any exception returned by the application and renders
@@ -38,9 +39,9 @@ class ShowExceptions
38 39
        "application's log file and/or the web server's log file to find out what " <<
39 40
        "went wrong.</body></html>"]]
40 41
 
41  
-    def initialize(app, consider_all_requests_local = false)
  42
+    def initialize(app, consider_all_requests_local = nil)
  43
+      ActiveSupport::Deprecation.warn "Passing consider_all_requests_local option to ActionDispatch::ShowExceptions middleware no longer works" unless consider_all_requests_local.nil?
42 44
       @app = app
43  
-      @consider_all_requests_local = consider_all_requests_local
44 45
     end
45 46
 
46 47
     def call(env)
@@ -62,14 +63,13 @@ def call(env)
62 63
 
63 64
     private
64 65
       def render_exception(env, exception)
65  
-        log_error(exception)
  66
+        log_error(env, exception)
66 67
         exception = original_exception(exception)
67 68
 
68  
-        request = Request.new(env)
69  
-        if @consider_all_requests_local || request.local?
70  
-          rescue_action_locally(request, exception)
  69
+        if env['action_dispatch.show_detailed_exceptions'] == true
  70
+          rescue_action_diagnostics(env, exception)
71 71
         else
72  
-          rescue_action_in_public(exception)
  72
+          rescue_action_error_page(exception)
73 73
         end
74 74
       rescue Exception => failsafe_error
75 75
         $stderr.puts "Error during failsafe response: #{failsafe_error}\n  #{failsafe_error.backtrace * "\n  "}"
@@ -78,9 +78,9 @@ def render_exception(env, exception)
78 78
 
79 79
       # Render detailed diagnostics for unhandled exceptions rescued from
80 80
       # a controller action.
81  
-      def rescue_action_locally(request, exception)
  81
+      def rescue_action_diagnostics(env, exception)
82 82
         template = ActionView::Base.new([RESCUES_TEMPLATE_PATH],
83  
-          :request => request,
  83
+          :request => Request.new(env),
84 84
           :exception => exception,
85 85
           :application_trace => application_trace(exception),
86 86
           :framework_trace => framework_trace(exception),
@@ -98,7 +98,7 @@ def rescue_action_locally(request, exception)
98 98
       # it will first attempt to render the file at <tt>public/500.da.html</tt>
99 99
       # then attempt to render <tt>public/500.html</tt>. If none of them exist,
100 100
       # the body of the response will be left empty.
101  
-      def rescue_action_in_public(exception)
  101
+      def rescue_action_error_page(exception)
102 102
         status = status_code(exception)
103 103
         locale_path = "#{public_path}/#{status}.#{I18n.locale}.html" if I18n.locale
104 104
         path = "#{public_path}/#{status}.html"
@@ -124,14 +124,14 @@ def public_path
124 124
         defined?(Rails.public_path) ? Rails.public_path : 'public_path'
125 125
       end
126 126
 
127  
-      def log_error(exception)
128  
-        return unless logger
  127
+      def log_error(env, exception)
  128
+        return unless logger(env)
129 129
 
130 130
         ActiveSupport::Deprecation.silence do
131 131
           message = "\n#{exception.class} (#{exception.message}):\n"
132 132
           message << exception.annoted_source_code.to_s if exception.respond_to?(:annoted_source_code)
133 133
           message << "  " << application_trace(exception).join("\n  ")
134  
-          logger.fatal("#{message}\n\n")
  134
+          logger(env).fatal("#{message}\n\n")
135 135
         end
136 136
       end
137 137
 
@@ -153,8 +153,12 @@ def clean_backtrace(exception, *args)
153 153
           exception.backtrace
154 154
       end
155 155
 
156  
-      def logger
157  
-        defined?(Rails.logger) ? Rails.logger : Logger.new($stderr)
  156
+      def logger(env)
  157
+        env['action_dispatch.logger'] || stderr_logger
  158
+      end
  159
+
  160
+      def stderr_logger
  161
+        Logger.new($stderr)
158 162
       end
159 163
 
160 164
     def original_exception(exception)
1  actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb
@@ -16,6 +16,7 @@
16 16
       background-color: #eee;
17 17
       padding: 10px;
18 18
       font-size: 11px;
  19
+      white-space: pre-wrap;
19 20
     }
20 21
 
21 22
     a { color: #000; }
4  actionpack/lib/action_dispatch/railtie.rb
@@ -10,10 +10,12 @@ class Railtie < Rails::Railtie
10 10
     config.action_dispatch.tld_length = 1
11 11
     config.action_dispatch.ignore_accept_header = false
12 12
     config.action_dispatch.rack_cache = {:metastore => "rails:/", :entitystore => "rails:/", :verbose => true}
13  
-
14 13
     initializer "action_dispatch.configure" do |app|
15 14
       ActionDispatch::Http::URL.tld_length = app.config.action_dispatch.tld_length
16 15
       ActionDispatch::Request.ignore_accept_header = app.config.action_dispatch.ignore_accept_header
  16
+
  17
+      config.action_dispatch.always_write_cookie = Rails.env.development? if config.action_dispatch.always_write_cookie.nil?
  18
+      ActionDispatch::Cookies::CookieJar.always_write_cookie = config.action_dispatch.always_write_cookie
17 19
     end
18 20
   end
19 21
 end
109  actionpack/lib/action_dispatch/routing/mapper.rb
@@ -374,10 +374,6 @@ def root(options = {})
374 374
         #     # Matches any request starting with 'path'
375 375
         #     match 'path' => 'c#a', :anchor => false
376 376
         def match(path, options=nil)
377  
-          mapping = Mapping.new(@set, @scope, path, options || {})
378  
-          app, conditions, requirements, defaults, as, anchor = mapping.to_route
379  
-          @set.add_route(app, conditions, requirements, defaults, as, anchor)
380  
-          self
381 377
         end
382 378
 
383 379
         # Mount a Rack-based application to be used within the application.
@@ -867,8 +863,6 @@ module Resources
867 863
         CANONICAL_ACTIONS = %w(index create new show update destroy)
868 864
 
869 865
         class Resource #:nodoc:
870  
-          DEFAULT_ACTIONS = [:index, :create, :new, :show, :update, :destroy, :edit]
871  
-
872 866
           attr_reader :controller, :path, :options
873 867
 
874 868
           def initialize(entities, options = {})
@@ -880,7 +874,7 @@ def initialize(entities, options = {})
880 874
           end
881 875
 
882 876
           def default_actions
883  
-            self.class::DEFAULT_ACTIONS
  877
+            [:index, :create, :new, :show, :update, :destroy, :edit]
884 878
           end
885 879
 
886 880
           def actions
@@ -934,16 +928,17 @@ def nested_scope
934 928
         end
935 929
 
936 930
         class SingletonResource < Resource #:nodoc:
937  
-          DEFAULT_ACTIONS = [:show, :create, :update, :destroy, :new, :edit]
938  
-
939 931
           def initialize(entities, options)
940 932
             super
941  
-
942 933
             @as         = nil
943 934
             @controller = (options[:controller] || plural).to_s
944 935
             @as         = options[:as]
945 936
           end
946 937
 
  938
+          def default_actions
  939
+            [:show, :create, :update, :destroy, :new, :edit]
  940
+          end
  941
+
947 942
           def plural
948 943
             @plural ||= name.to_s.pluralize
949 944
           end
@@ -991,7 +986,7 @@ def resource(*resources, &block)
991 986
             return self
992 987
           end
993 988
 
994  
-          resource_scope(SingletonResource.new(resources.pop, options)) do
  989
+          resource_scope(:resource, SingletonResource.new(resources.pop, options)) do
995 990
             yield if block_given?
996 991
 
997 992
             collection do
@@ -1122,7 +1117,7 @@ def resources(*resources, &block)
1122 1117
             return self
1123 1118
           end
1124 1119
 
1125  
-          resource_scope(Resource.new(resources.pop, options)) do
  1120
+          resource_scope(:resources, Resource.new(resources.pop, options)) do
1126 1121
             yield if block_given?
1127 1122
 
1128 1123
             collection do
@@ -1245,32 +1240,44 @@ def shallow?
1245 1240
           parent_resource.instance_of?(Resource) && @scope[:shallow]
1246 1241
         end
1247 1242
 
1248  
-        def match(*args)
1249  
-          options = args.extract_options!.dup
1250  
-          options[:anchor] = true unless options.key?(:anchor)
1251  
-
1252  
-          if args.length > 1
1253  
-            args.each { |path| match(path, options.dup) }
1254  
-            return self
  1243
+        def match(path, *rest)
  1244
+          if rest.empty? && Hash === path
  1245
+            options  = path
  1246
+            path, to = options.find { |name, value| name.is_a?(String) }
  1247
+            options[:to] = to
  1248
+            options.delete(path)
  1249
+            paths = [path]
  1250
+          else
  1251
+            options = rest.pop || {}
  1252
+            paths = [path] + rest
1255 1253
           end
1256 1254
 
1257  
-          on = options.delete(:on)
1258  
-          if VALID_ON_OPTIONS.include?(on)
1259  
-            args.push(options)
1260  
-            return send(on){ match(*args) }
1261  
-          elsif on
  1255
+          options[:anchor] = true unless options.key?(:anchor)
  1256
+
  1257
+          if options[:on] && !VALID_ON_OPTIONS.include?(options[:on])
1262 1258
             raise ArgumentError, "Unknown scope #{on.inspect} given to :on"
1263 1259
           end
1264 1260
 
1265  
-          if @scope[:scope_level] == :resources
1266  
-            args.push(options)
1267  
-            return nested { match(*args) }
1268  
-          elsif @scope[:scope_level] == :resource
1269  
-            args.push(options)
1270  
-            return member { match(*args) }
  1261
+          paths.each { |_path| decomposed_match(_path, options.dup) }
  1262
+          self
  1263
+        end
  1264
+
  1265
+        def decomposed_match(path, options) # :nodoc:
  1266
+          if on = options.delete(:on)
  1267
+            send(on) { decomposed_match(path, options) }
  1268
+          else
  1269
+            case @scope[:scope_level]
  1270
+            when :resources
  1271
+              nested { decomposed_match(path, options) }
  1272
+            when :resource
  1273
+              member { decomposed_match(path, options) }
  1274
+            else
  1275
+              add_route(path, options)
  1276
+            end
1271 1277
           end
  1278
+        end
1272 1279
 
1273  
-          action = args.first
  1280
+        def add_route(action, options) # :nodoc:
1274 1281
           path = path_for_action(action, options.delete(:path))
1275 1282
 
1276 1283
           if action.to_s =~ /^[\w\/]+$/
@@ -1279,13 +1286,15 @@ def match(*args)
1279 1286
             action = nil
1280 1287
           end
1281 1288
 
1282  
-          if options.key?(:as) && !options[:as]
  1289
+          if !options.fetch(:as) { true }
1283 1290
             options.delete(:as)
1284 1291
           else
1285 1292
             options[:as] = name_for_action(options[:as], action)
1286 1293
           end
1287 1294
 
1288  
-          super(path, options)
  1295
+          mapping = Mapping.new(@set, @scope, path, options)
  1296
+          app, conditions, requirements, defaults, as, anchor = mapping.to_route
  1297
+          @set.add_route(app, conditions, requirements, defaults, as, anchor)
1289 1298
         end
1290 1299
 
1291 1300
         def root(options={})
@@ -1341,7 +1350,7 @@ def action_options?(options) #:nodoc:
1341 1350
           end
1342 1351
 
1343 1352
           def scope_action_options? #:nodoc:
1344  
-            @scope[:options].is_a?(Hash) && (@scope[:options][:only] || @scope[:options][:except])
  1353
+            @scope[:options] && (@scope[:options][:only] || @scope[:options][:except])
1345 1354
           end
1346 1355
 
1347 1356
           def scope_action_options #:nodoc:
@@ -1349,11 +1358,11 @@ def scope_action_options #:nodoc:
1349 1358
           end
1350 1359
 
1351 1360
           def resource_scope? #:nodoc:
1352  
-            @scope[:scope_level].in?([:resource, :resources])
  1361
+            [:resource, :resources].include? @scope[:scope_level]
1353 1362
           end
1354 1363
 
1355 1364
           def resource_method_scope? #:nodoc:
1356  
-            @scope[:scope_level].in?([:collection, :member, :new])
  1365
+            [:collection, :member, :new].include? @scope[:scope_level]
1357 1366
           end
1358 1367
 
1359 1368
           def with_exclusive_scope
@@ -1378,8 +1387,8 @@ def with_scope_level(kind, resource = parent_resource)
1378 1387
             @scope[:scope_level_resource] = old_resource
1379 1388
           end
1380 1389
 
1381  
-          def resource_scope(resource) #:nodoc:
1382  
-            with_scope_level(resource.is_a?(SingletonResource) ? :resource : :resources, resource) do
  1390
+          def resource_scope(kind, resource) #:nodoc:
  1391
+            with_scope_level(kind, resource) do
1383 1392
               scope(parent_resource.resource_scope) do
1384 1393
                 yield
1385 1394
               end
@@ -1387,10 +1396,12 @@ def resource_scope(resource) #:nodoc:
1387 1396
           end
1388 1397
 
1389 1398
           def nested_options #:nodoc:
1390  
-            {}.tap do |options|
1391  
-              options[:as] = parent_resource.member_name
1392  
-              options[:constraints] = { "#{parent_resource.singular}_id".to_sym => id_constraint } if id_constraint?
1393  
-            end
  1399
+            options = { :as => parent_resource.member_name }
  1400
+            options[:constraints] = {
  1401
+              :"#{parent_resource.singular}_id" => id_constraint
  1402
+            } if id_constraint?
  1403
+
  1404
+            options
1394 1405
           end
1395 1406
 
1396 1407
           def id_constraint? #:nodoc:
@@ -1466,19 +1477,6 @@ def name_for_action(as, action) #:nodoc:
1466 1477
           end
1467 1478
       end
1468 1479
 
1469  
-      module Shorthand #:nodoc:
1470  
-        def match(path, *rest)
1471  
-          if rest.empty? && Hash === path
1472  
-            options  = path
1473  
-            path, to = options.find { |name, value| name.is_a?(String) }
1474  
-            options.merge!(:to => to).delete(path)
1475  
-            super(path, options)
1476  
-          else
1477  
-            super
1478  
-          end
1479  
-        end
1480  
-      end
1481  
-
1482 1480
       def initialize(set) #:nodoc:
1483 1481
         @set = set
1484 1482
         @scope = { :path_names => @set.resources_path_names }
@@ -1489,7 +1487,6 @@ def initialize(set) #:nodoc:
1489 1487
       include Redirection
1490 1488
       include Scoping
1491 1489
       include Resources
1492  
-      include Shorthand
1493 1490
     end
1494 1491
   end
1495 1492
 end
122  actionpack/lib/action_dispatch/routing/redirection.rb
@@ -2,6 +2,54 @@
2 2
 
3 3
 module ActionDispatch
4 4
   module Routing
  5
+    class Redirect # :nodoc:
  6
+      attr_reader :status, :block
  7
+
  8
+      def initialize(status, block)
  9
+        @status = status
  10
+        @block  = block
  11
+      end
  12
+
  13
+      def call(env)
  14
+        req = Request.new(env)
  15
+
  16
+        uri = URI.parse(path(req.symbolized_path_parameters, req))
  17
+        uri.scheme ||= req.scheme
  18
+        uri.host   ||= req.host
  19
+        uri.port   ||= req.port unless req.standard_port?
  20
+
  21
+        body = %(<html><body>You are being <a href="#{ERB::Util.h(uri.to_s)}">redirected</a>.</body></html>)
  22
+
  23
+        headers = {
  24
+          'Location' => uri.to_s,
  25
+          'Content-Type' => 'text/html',
  26
+          'Content-Length' => body.length.to_s
  27
+        }
  28
+
  29
+        [ status, headers, [body] ]
  30
+      end
  31
+
  32
+      def path(params, request)
  33
+        block.call params, request
  34
+      end
  35
+    end
  36
+
  37
+    class OptionRedirect < Redirect # :nodoc:
  38
+      alias :options :block
  39
+
  40
+      def path(params, request)
  41
+        url_options = {
  42
+          :protocol => request.protocol,
  43
+          :host     => request.host,
  44
+          :port     => request.optional_port,
  45
+          :path     => request.path,
  46
+          :params   => request.query_parameters
  47
+        }.merge options
  48
+
  49
+        ActionDispatch::Http::URL.url_for url_options
  50
+      end
  51
+    end
  52
+
5 53
     module Redirection
6 54
 
7 55
       # Redirect any path to another path:
@@ -40,71 +88,27 @@ def redirect(*args, &block)
40 88
         options = args.last.is_a?(Hash) ? args.pop : {}
41 89
         status  = options.delete(:status) || 301
42 90
 
  91
+        return OptionRedirect.new(status, options) if options.any?
  92
+
43 93
         path = args.shift
44 94
 
45  
-        path_proc = if path.is_a?(String)
46  
-          proc { |params| (params.empty? || !path.match(/%\{\w*\}/)) ? path : (path % params) }
47  
-        elsif options.any?
48  
-          options_proc(options)
49  
-        elsif path.respond_to?(:call)
50  
-          proc { |params, request| path.call(params, request) }
51  
-        elsif block
52  
-          block
53  
-        else
54  
-          raise ArgumentError, "redirection argument not supported"
55  
-        end
  95
+        block = lambda { |params, request|
  96
+          (params.empty? || !path.match(/%\{\w*\}/)) ? path : (path % params)
  97
+        } if String === path
56 98
 
57  
-        redirection_proc(status, path_proc)
58  
-      end
  99
+        block = path if path.respond_to? :call
59 100
 
60  
-      private
61  
-
62  
-        def options_proc(options)
63  
-          proc do |params, request|
64  
-            path = if options[:path].nil?
65  
-              request.path
66  
-            elsif params.empty? || !options[:path].match(/%\{\w*\}/)
67  
-              options.delete(:path)
68  
-            else
69  
-              (options.delete(:path) % params)
70  
-            end
71  
-
72  
-            default_options = {
73  
-              :protocol => request.protocol,
74  
-              :host => request.host,
75  
-              :port => request.optional_port,
76  
-              :path => path,
77  
-              :params => request.query_parameters
78  
-            }
79  
-
80  
-            ActionDispatch::Http::URL.url_for(options.reverse_merge(default_options))
81  
-          end
  101
+        # :FIXME: remove in Rails 4.0
  102
+        if block && block.respond_to?(:arity) && block.arity < 2
  103
+          msg = "redirect blocks with arity of #{block.arity} are deprecated. Your block must take 2 parameters: the environment, and a request object"
  104
+          ActiveSupport::Deprecation.warn msg
  105
+          block = lambda { |params, _| block.call(params) }
82 106
         end
83 107
 
84  
-        def redirection_proc(status, path_proc)
85  
-          lambda do |env|
86  
-            req = Request.new(env)
87  
-
88  
-            params = [req.symbolized_path_parameters]
89  
-            params << req if path_proc.arity > 1
90  
-
91  
-            uri = URI.parse(path_proc.call(*params))
92  
-            uri.scheme ||= req.scheme
93  
-            uri.host   ||= req.host
94  
-            uri.port   ||= req.port unless req.standard_port?
95  
-
96  
-            body = %(<html><body>You are being <a href="#{ERB::Util.h(uri.to_s)}">redirected</a>.</body></html>)
97  
-
98  
-            headers = {
99  
-              'Location' => uri.to_s,
100  
-              'Content-Type' => 'text/html',
101  
-              'Content-Length' => body.length.to_s
102  
-            }
103  
-
104  
-            [ status, headers, [body] ]
105  
-          end
106  
-        end
  108
+        raise ArgumentError, "redirection argument not supported" unless block
107 109
 
  110
+        Redirect.new status, block
  111
+      end
108 112
     end
109 113
   end
110  
-end
  114
+end
4  actionpack/lib/action_dispatch/routing/url_for.rb
@@ -42,7 +42,7 @@ module Routing
42 42
     #   url_for(:controller => 'users',
43 43
     #           :action => 'new',
44 44
     #           :message => 'Welcome!',
45  
-    #           :host => 'www.example.com')        # Changed this.
  45
+    #           :host => 'www.example.com')
46 46
     #   # => "http://www.example.com/users/new?message=Welcome%21"
47 47
     #
48 48
     # By default, all controllers and views have access to a special version of url_for,
@@ -52,7 +52,7 @@ module Routing
52 52
     #
53 53
     # For convenience reasons, mailers provide a shortcut for ActionController::UrlFor#url_for.
54 54
     # So within mailers, you only have to type 'url_for' instead of 'ActionController::UrlFor#url_for'
55  
-    # in full. However, mailers don't have hostname information, and what's why you'll still
  55
+    # in full. However, mailers don't have hostname information, and that's why you'll still
56 56
     # have to specify the <tt>:host</tt> argument when generating URLs in mailers.
57 57
     #
58 58
     #
BIN  actionpack/lib/action_view/data/encoding_conversions.dump
Binary file not shown
88  actionpack/lib/action_view/data/encoding_conversions.txt
... ...
@@ -0,0 +1,88 @@
  1
+ASCII-8BIT:UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  2
+UTF-8:ASCII-8BIT,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  3
+US-ASCII:ASCII-8BIT,UTF-8,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  4
+Big5:ASCII-8BIT,UTF-8,US-ASCII,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  5
+Big5-HKSCS:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  6
+Big5-UAO:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  7
+CP949:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  8
+EUC-JP:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  9
+EUC-KR:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  10
+GB18030:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  11
+GBK:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  12
+ISO-8859-1:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  13
+ISO-8859-2:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  14
+ISO-8859-3:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  15
+ISO-8859-4:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  16
+ISO-8859-5:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-6,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  17
+ISO-8859-6:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-7,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  18
+ISO-8859-7:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-8,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macTurkish,macUkraine,CP950,CP951,stateless-ISO-2022-JP,eucJP-ms,CP51932,GB2312,GB12345,ISO-2022-JP,CP50220,CP50221,Windows-1252,Windows-1250,Windows-1256,Windows-1253,Windows-1255,Windows-1254,TIS-620,Windows-874,Windows-1257,Windows-31J,UTF8-MAC,UTF-16,UTF-32,UTF8-DoCoMo,SJIS-DoCoMo,UTF8-KDDI,SJIS-KDDI,ISO-2022-JP-KDDI,stateless-ISO-2022-JP-KDDI,UTF8-SoftBank,SJIS-SoftBank
  19
+ISO-8859-8:ASCII-8BIT,UTF-8,US-ASCII,Big5,Big5-HKSCS,Big5-UAO,CP949,EUC-JP,EUC-KR,GB18030,GBK,ISO-8859-1,ISO-8859-2,ISO-8859-3,ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-9,ISO-8859-10,ISO-8859-11,ISO-8859-13,ISO-8859-14,ISO-8859-15,KOI8-R,KOI8-U,Shift_JIS,UTF-16BE,UTF-16LE,UTF-32BE,UTF-32LE,Windows-1251,IBM437,IBM737,IBM775,CP850,IBM852,CP852,IBM855,CP855,IBM857,IBM860,IBM861,IBM862,IBM863,IBM865,IBM866,IBM869,macCroatian,macCyrillic,macGreek,macIceland,macRoman,macRomania,macT