aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Switch the default redis adapter to a single-stream modelMatthew Draper2016-02-018-35/+212
| | | | | | This new adapter does get a little more intimate with the redis-rb gem's implementation than I would like, but it's the least bad of the approaches I've come up with.
* Merge pull request #23317 from rfmanuel/after-bundle-in-rails-plugin-templateRafael França2016-01-294-2/+42
|\ | | | | Add an after_bundle callback in Rails plugin templates
| * Implemented pull request changes.Ryan Manuel2016-01-292-10/+5
| |
| * Update doc with appropriate issue and pull request versionsRyan Manuel2016-01-282-2/+2
| |
| * Add an after_bundle callback in Rails plugin templatesRyan Manuel2016-01-285-2/+47
| |
* | Merge pull request #23338 from tawan/update-doc-request-headers-accessJon Moss2016-01-291-1/+15
|\ \ | | | | | | Add additional documentation on Headers#[] [ci skip]
| * | Add additional documentation on Headers#[] [ci skip]Tawan Sierek2016-01-291-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #16519 covers confusion potentially caused by how HTTP headers, that contain underscores in their names, are retrieved through `ActionDispatch::Http::Headers#[]`. This confusion has its origin in how a CGI maps HTTP header names to variable names. Even though underscores in header names are rarely encountered, they are valid according to RFC822 [1]. Nonetheless CGI like variable names, as requested by the Rack specfication, will only contain underscores and therefore the original header name cannot be recovered after the Rack server passed on the environemnt hash. Please, see also the disscussion on StackOverflow [2], which also links to an explaination in the nginx documentation [3]. [1] http://www.ietf.org/rfc/rfc822.txt [2] http://stackoverflow.com/questions/22856136/why-underscores-are-forbidden-in-http-header-names [3] https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#missing-disappearing-http-headers
* | | Use a gentler disconnectMatthew Draper2016-01-301-2/+2
|/ / | | | | | | The detach used by close! seems to be making EM very sad on Travis.
* | Don't bother stopping EM between testsMatthew Draper2016-01-301-38/+3
| | | | | | | | | | It's not strictly necessary, and maybe this will help with the current test failure.
* | Intervene on change_table as well as create_tableMatthew Draper2016-01-301-0/+13
| |
* | Merge pull request #23336 from kesha-antonov/patch-1Rafael França2016-01-291-2/+0
|\ \ | | | | | | remove require logging
| * | remove require loggingKesha Antonov2016-01-291-2/+0
|/ /
* | Merge pull request #23305 from matthewd/concurrent-take-2Matthew Draper2016-01-3031-117/+738
|\ \ | | | | | | EventMachine -> concurrent-ruby, take two
| * | Keep the socket reference after closeMatthew Draper2016-01-301-3/+2
| | | | | | | | | | | | We may still try to send to it.
| * | Reduce the client count, in hope of a more consistent testMatthew Draper2016-01-301-3/+3
| | |
| * | Be more patient while gathering the expected responsesMatthew Draper2016-01-301-4/+3
| | |
| * | Handle more IO errors (especially, ECONNRESET)Matthew Draper2016-01-303-21/+78
| | | | | | | | | | | | | | | | | | Also, address the possibility of the listen thread dying and needing to be respawned. As a bonus, we now defer construction of the thread until we are first given something to monitor.
| * | Add a couple of tests that connect with a WS clientMatthew Draper2016-01-304-0/+257
| | |
| * | Synchronize the lazy setters in ServerMatthew Draper2016-01-305-15/+47
| | | | | | | | | | | | They're all at risk of races on the first requests.
| * | Fix arguments to on_closeMatthew Draper2016-01-302-5/+3
| | |
| * | Revert "Revert "Eliminate the EventMachine dependency""Matthew Draper2016-01-3027-106/+385
|/ /
* | Don't recommend using `ActiveRecord::Base[]`Sean Griffin2016-01-291-3/+0
| | | | | | These methods are more expensive than the alternatives, and have strange semantics that are likely undesirable.
* | Merge pull request #23330 from prathamesh-sonpatki/fix-testsMatthew Draper2016-01-291-0/+2
|\ \ | | | | | | Fix broken number_to_currency conversion tests
| * | Fix broken number_to_currency testsPrathamesh Sonpatki2016-01-291-0/+2
|/ /
* | Merge pull request #23252 from kamipo/remove_limit_11Rafael França2016-01-291-1/+0
|\ \ | | | | | | Remove `limit: 11` as backward-compatibility with Rails 2.0
| * | Remove `limit: 11` as backward-compatibility with Rails 2.0Ryuta Kamizono2016-01-271-1/+0
| | | | | | | | | | | | | | | | | | | | | Integer limit as a byte size was introduced from Rails 2.1. `limit: 11` is not a byte size, but take care for backward-compatibility with Rails 2.0 (a892af6). Integer limit out of range should be allowed to raise by #6349. I think we should remove this backward-compatibility.
* | | Merge pull request #23188 from jcoleman/ar-connection-execute-docs-clarificationRafael França2016-01-292-1/+7
|\ \ \ | | | | | | | | Clarify DatabaseStatements#execute docs re: memory usage.
| * | | Clarify DatabaseStatements#execute docs re: memory usage.James Coleman2016-01-222-1/+7
| | | |
* | | | Merge pull request #23329 from prathamesh-sonpatki/fix-23320Rafael França2016-01-293-6/+16
|\ \ \ \ | | | | | | | | | | Change number_to_currency behavior for checking negativity of a number
| * | | | Change number_to_currency behavior for checking negativityPrathamesh Sonpatki2016-01-293-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Instead of using `to_f.phase`, just use `to_f.negative`?. - This change works same for all cases except when number is "-0.0". -0.0.to_f.negative? => false -0.0.to_f.phase? => pi - So -0.0 will be treated as positive from now onwards. - So this change reverts changes from https://github.com/rails/rails/pull/6512. - But it should be acceptable as we could not find any currency which supports negative zeros.
* | | | | Merge pull request #23296 from radar/cache-fragment-name-optionsRafael Mendonça França2016-01-291-2/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Extract options for cache_fragment_name method to allow expires_in on cache method
| * | | | | Slice out options for cache_fragment_name explicitlyRyan Bigg2016-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This allows expire_in (and other options) to be passed to the cache method
* | | | | | Merge pull request #22800 from dgynn/pr_cache_helper_optionsRafael Mendonça França2016-01-293-1/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Restore ability to pass extra options to cache stores
| * | | | | | restore ability to pass extra options to cache storesDave Gynn2015-12-263-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `cache` helper methods should pass any extra options to the cache store. For example :expires_in would be a valid option if memcache was the cache store. The change in commit da16745 broke the ability to pass any options other than :skip_digest and :virtual_path. This PR restores that functionality and adds a test for it.
* | | | | | | Merge pull request #23326 from fgo/patch-16Rafael França2016-01-281-1/+1
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | Getting Started Guide: Update Ruby version to 2.3.0p0 [ci skip]
| * | | | | | Getting Started Guide: Update Ruby version to 2.3.0p0Francis Go2016-01-291-1/+1
|/ / / / / /
* | | | | | Merge pull request #23323 from maclover7/api-app-docsRafael França2016-01-281-16/+19
|\ \ \ \ \ \ | | | | | | | | | | | | | | Docs review of api_app.md
| * | | | | | Docs review of api_app.mdJon Moss2016-01-281-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass through correcting api_app.md. The list of included modules and middleware was tested through a sample API app, and was listed in the same order an end user would see in their terminal. [ci skip]
* | | | | | | speed up accept header parsing a bit.Aaron Patterson2016-01-281-8/+11
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accept header is taken from what Safari on El Capitan sends: ```ruby require 'benchmark/ips' require 'action_dispatch/http/mime_type' require 'active_support/all' accept = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' Benchmark.ips do |x| x.report "omg" do Mime::Type.parse(accept) end end ``` Before: ``` [aaron@TC actionpack (master)]$ be ruby ../x.rb Calculating ------------------------------------- omg 3.181k i/100ms ------------------------------------------------- omg 35.062k (±12.8%) i/s - 174.955k [aaron@TC actionpack (master)]$ be ruby ../x.rb Calculating ------------------------------------- omg 3.153k i/100ms ------------------------------------------------- omg 33.724k (±12.4%) i/s - 167.109k [aaron@TC actionpack (master)]$ be ruby ../x.rb Calculating ------------------------------------- omg 3.575k i/100ms ------------------------------------------------- omg 37.251k (±10.4%) i/s - 185.900k ``` After: ``` [aaron@TC actionpack (master)]$ be ruby ../x.rb Calculating ------------------------------------- omg 3.365k i/100ms ------------------------------------------------- omg 40.069k (±16.1%) i/s - 198.535k [aaron@TC actionpack (master)]$ be ruby ../x.rb Calculating ------------------------------------- omg 4.168k i/100ms ------------------------------------------------- omg 47.596k (± 7.7%) i/s - 237.576k [aaron@TC actionpack (master)]$ be ruby ../x.rb Calculating ------------------------------------- omg 4.282k i/100ms ------------------------------------------------- omg 43.626k (±17.7%) i/s - 209.818k ```
* | | | | | Remove Rack::Lock from the API guidesRafael Mendonça França2016-01-281-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not always there anymore [ci skip]
* | | | | | Middleware have no pluralRafael Mendonça França2016-01-281-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | Mark API guide as work in progressRafael Mendonça França2016-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The documentation team didn't reviewed it yet so it can't be published.
* | | | | | convert AcceptList to a regular classAaron Patterson2016-01-281-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we never use this custom array outside the mime type `parse` method. We can reduce the interaction to just a regular array, so we should use that instead (IOW, there was nothing special about AcceptList so we should remove it).
* | | | | | Merge pull request #23319 from piotrj/api_app_in_table_of_contentsJon Moss2016-01-281-0/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | Put "Using Rails for API-only Applications" in table of contents
| * | | | | | Put "Using Rails for API-only Applications" in table of contentsPiotr Jakubowski2016-01-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I was looking for more info regarding this the only way I ended up on that page was by googling something along the lines of "rails new api" (as I wanted to find out what are the proper parameters when generating api app). I think it's beneficial to have that page in table of contents.
* | | | | | | Merge pull request #23220 from maclover7/fix-23215Richard Schneeman2016-01-281-6/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Remove empty lines in Rails development logger
| * | | | | | | Remove empty lines in Rails development loggerJon Moss2016-01-241-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is causing bugs like #23215 to occur, due to the extra spaces being inserted. Also, this is fixed upstream in the upcoming release of Sprockets 4.
* | | | | | | | Run `file.close` before unlinking for traviseileencodes2016-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This works on OSX but for some reason travis is throwing a ``` 1) Error: ExpiresInRenderTest#test_dynamic_render_with_absolute_path: NoMethodError: undefined method `unlink' for nil:NilClass ``` Looking at other tests in Railties the file has a name and we close it before unlinking, so I'm going to try that.
* | | | | | | | Bundle update to fix tests locallyRafael Mendonça França2016-01-281-27/+26
| |/ / / / / / |/| | | | | |
* | | | | | | Regression test for rendering file from absolute patheileencodes2016-01-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test that we are not allowing you to grab a file with an absolute path outside of your application directory. This is dangerous because it could be used to retrieve files from the server like `/etc/passwd`.