aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* stop using @_env in the controller instanceAaron Patterson2015-08-075-7/+14
| | | | | | | Actions are processed through `dispatch`, so they should have the request set on them before any user land code can be executed. Lets stop setting _env on the controller, and give access to it through the `env` method.
* finish deprecating handling strings and symbolsAaron Patterson2015-08-076-80/+24
| | | | | since we only work with instances of classes, it greatly simplifies the `Middleware` implementation.
* Using strings or symbols for middleware class names is deprecated.Aaron Patterson2015-08-076-50/+61
| | | | | | | | | | Convert things like this: middleware.use "Foo::Bar" to this: middleware.use Foo::Bar
* move `valid?` conditional to the constructorAaron Patterson2015-08-071-11/+21
| | | | | use a strategy pattern to calculate the conditional in `valid?` in advance.
* simplify the Middleware constructorAaron Patterson2015-08-073-57/+54
| | | | | | We should do the hard work outside the constructor. Also fix the tests to not directly construct middleware objects, but to go through the stack object.
* use Proc.new to reduce some conditionalsAaron Patterson2015-08-071-3/+1
| | | | | | Proc.new will pick up the passed in block, but since it's a default param, it won't get evaluated unless someone doesn't pass in an app. It will raise an exception if no block is provided.
* the request class is never changed, so just use it directly in the method bodyAaron Patterson2015-08-072-6/+6
|
* Merge pull request #21161 from rails/rm-xml-serializerRafael Mendonça França2015-08-0713-1204/+12
|\ | | | | Remove XML Serialization from core
| * Remove XML Serialization from core.Zachary Scott2015-08-0713-1204/+12
| | | | | | | | | | | | | | This includes the following classes: - ActiveModel::Serializers::Xml - ActiveRecord::Serialization::XmlSerializer
* | Regexp#=== is faster than String#=~schneems2015-08-071-1/+1
|/ | | | Discussion https://github.com/JuanitoFatas/fast-ruby/pull/59#issuecomment-128513763
* refactor param parsing middleware to use request objectsAaron Patterson2015-08-072-10/+17
| | | | | this is another place that we should stop directly accessing the env hash and let the request object take care of that for us
* move flash hash access to methods on the request objectAaron Patterson2015-08-071-2/+11
|
* Merge pull request #20933 from siadat/relations-in-batches-using-idsDavid Heinemeier Hansson2015-08-076-12/+413
|\ | | | | in_batches using ids
| * Add ActiveRecord::Relation#in_batchesSina Siadat2015-08-076-12/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `in_batches` yields Relation objects if a block is given, otherwise it returns an instance of `BatchEnumerator`. The existing `find_each` and `find_in_batches` methods work with batches of records. The new API allows working with relation batches as well. Examples: Person.in_batches.each_record(&:party_all_night!) Person.in_batches.update_all(awesome: true) Person.in_batches.delete_all Person.in_batches.map do |relation| relation.delete_all sleep 10 # Throttles the delete queries end
* | Merge pull request #21159 from tcopeland/fix_spelingKasper Timm Hansen2015-08-071-1/+1
|\ \ | | | | | | Fix doc typo
| * | Fix doc typoTom Copeland2015-08-071-1/+1
|/ /
* | Merge pull request #21158 from ↵Rafael Mendonça França2015-08-072-1/+7
|\ \ | |/ |/| | | | | lsylvester/only-invoke-mattr_accessor-default-block-once Prevent the default block for mattr_accessor being called multiple times
| * Only invoke the default block for mattr_accessor once so that it does not ↵Lachlan Sylvester2015-08-072-1/+7
|/ | | | cause issues if it is not idempotent
* Merge pull request #21156 from yui-knk/fix/guide_instumentationMatthew Draper2015-08-071-8/+0
|\ | | | | [ci skip] Remove `identity.active_record`
| * [ci skip] Remove `identity.active_record`yui-knk2015-08-071-8/+0
|/ | | | | This is removed by this commit cf: https://github.com/rails/rails/pull/5261
* Merge pull request #21155 from AaronLasseigne/fewer_objectsRichard Schneeman2015-08-061-1/+1
|\ | | | | Speed up code and avoid unnecessary MatchData objects
| * speed up code and avoid unnecessary MatchData objectsAaron Lasseigne2015-08-061-1/+1
| |
* | Merge pull request #21153 from grosser/grosser/portsRafael Mendonça França2015-08-062-1/+24
|\ \ | | | | | | do not add common ports to HTTP_HOST
| * | do not add common ports to HTTP_HOSTMichael Grosser2015-08-062-1/+24
| |/ | | | | | | | | - webservers do not do it - it makes redirect urls ugly when request.host is used for redirection
* | Merge pull request #20972 from vngrs/bin_updateRafael Mendonça França2015-08-063-1/+33
|\ \ | | | | | | Added bin/update script to update application automatically
| * | Added bin/update script to update application automaticallyMehmet Emin İNAÇ2015-08-073-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use system! fix changelog use bundle check first and use rake use system instead system! for bundle check
* | | Merge pull request #21154 from sobrinho/patch-1Rafael Mendonça França2015-08-061-1/+1
|\ \ \ | |_|/ |/| | Fix documentation on ActionDispatch::Request
| * | Fix documentation on ActionDispatch::RequestGabriel Sobrinho2015-08-061-1/+1
|/ /
* | use a request object to access info from env in GetIpAaron Patterson2015-08-062-11/+19
| | | | | | | | | | | | | | again, we want to hide the contents of `env` from the implementation. Allocate a request object to access the contents of env, but save allocations due to string literal allocations when accessing the env hash.
* | ask the request if we should show exceptionsAaron Patterson2015-08-063-4/+13
| | | | | | | | | | hide the env key in the request object so that other code doesn't need to know.
* | ExceptionWrapper doesn't need to know about `env`Aaron Patterson2015-08-064-26/+22
| | | | | | | | | | | | ExceptionWrapper only cares about the backtrace cleaner, so lets just pass the cleaner to the wrapper. It does not need to know that env exists or what key the backtrace cleaner is stored in
* | prevent string allocationsAaron Patterson2015-08-061-1/+1
| |
* | Merge pull request #20459Sean Griffin2015-08-063-0/+132
|\ \ | |/ |/|
| * Add missing data types for ActiveRecord migrationsMehmet Emin İNAÇ2015-06-083-0/+132
| |
* | reuse the request object in the File serving middlewareAaron Patterson2015-08-061-9/+13
| | | | | | | | | | | | | | Implement `serve` on the middleware. Nothing can be placed between the instance of FileHandler and Static because Static instantiates an instance of FileHandler. IOW there is no reason to implement the `call` API in this case.
* | get the underlying REQUEST_METHOD from the superclassAaron Patterson2015-08-061-1/+1
| |
* | use a request object to reduce string allocations and not know about ENV keysAaron Patterson2015-08-062-7/+8
| |
* | Merge pull request #21092 from vngrs/use_memoization_for_ids_readerRafael Mendonça França2015-08-062-2/+12
|\ \ | | | | | | Use memoization for collection associations ids reader
| * | Use memoization for collection associations ids readerMehmet Emin İNAÇ2015-08-032-2/+12
| | | | | | | | | | | | | | | | | | Fixes #21082 remove extra space
* | | Merge pull request #21022Rafael Mendonça França2015-08-062-3/+11
|\ \ \ | | | | | | | | | | | | Fix STATS_DIRECTORIES warning by only loading statistics.rake once
| * | | Only load statistics.rake once from inside engineErsin Akinci2015-08-062-3/+11
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running rake stats from inside an engine, the engine's Rakefile attempts to reload statistics.rake after the test app loads it, which results in STATS_DIRECTORIES being redefined and an annoying warning. This patch skips loading statistics.rake from tasks.rb if rake's current scope isn't empty, i.e. if we are running from inside an engine and not the test app dir or a normal app. Fixes #20510.
* | | Merge pull request #21043 from ↵Rafael Mendonça França2015-08-062-0/+2
|\ \ \ | | | | | | | | | | | | | | | | y-yagi/loading_fixtures_in_engine_integration_tests set the correct path to `ActionDispatch::IntegrationTest.fixture_path`
| * | | set the correct path to `ActionDispatch::IntegrationTest.fixture_path`yuuji.yaginuma2015-07-282-0/+2
| | | | | | | | | | | | | | | | | | | | `ActionDispatch::IntegrationTest.fixture_path` set by `test_help.rb`, but if the engine, path under the dummy is will be set, fixtures under test was not loaded.
* | | | Merge pull request #21061 from yui-knk/refactor/route_setRafael Mendonça França2015-08-061-4/+2
|\ \ \ \ | | | | | | | | | | Remove duplicated `Array#to_param`
| * | | | Remove duplicated `Array#to_param`yui-knk2015-08-011-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | `Array#to_param` is defind in active_support/core_ext/object/to_query.rb, so we can call `to_param` if value is_a Array.
* | | | | Merge pull request #21131 from eagletmt/percent-filenameRafael Mendonça França2015-08-063-1/+28
|\ \ \ \ \ | | | | | | | | | | | | Fix Encoding::UndefinedConversionError with multibyte UTF-8 filename containing "%" character
| * | | | | Assume uploaded filename is UTF-8Kohei Suzuki2015-08-051-1/+7
| | | | | |
| * | | | | Add failing spec on utf8 filename with percent characterKohei Suzuki2015-08-042-0/+21
| | | | | |
* | | | | | Merge pull request #15948 from MGerrior/fix_test_session_fetchRafael Mendonça França2015-08-063-0/+23
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix test session fetch
| * | | | | | Adds missing argument handling for ActionController::TestSession toMatthew Gerrior2015-08-063-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | allow testing controllers that use session#fetch with a default value.