aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #23597 from kaspth/integration-response-parsingKasper Timm Hansen2016-02-104-23/+94
|\ | | | | Add `response.parsed_body` to Integration Tests
| * Add request encoding and response parsing to changelog.Kasper Timm Hansen2016-02-101-0/+38
| | | | | | | | | | Forgot to add this in the original pull request. No biggie, just show some examples.
| * Add `parsed_body` to spare writing out parsing routines.Kasper Timm Hansen2016-02-103-23/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When testing: ```ruby post articles_path, params: { article: { title: 'Ahoy!' } }, as: :json ``` It's common to want to make assertions on the response body. Perhaps the server responded with JSON, so you write `JSON.parse(response.body)`. But that gets tedious real quick. Instead add `parsed_body` which will automatically parse the reponse body as what the last request was encoded `as`.
* | Merge pull request #23528 from bensheldon/patch-1Richard Schneeman2016-02-101-1/+1
|\ \ | | | | | | Set database poolsize via rails_max_threads
| * | Set postgresql poolsize via RAILS_MAX_THREADSBen Sheldon2016-02-101-1/+1
| | |
* | | Merge pull request #23274 from KeithP/actioncable_loggingDavid Heinemeier Hansson2016-02-101-2/+16
|\ \ \ | | | | | | | | adds debug logging to actioncable connect
| * \ \ Merge remote-tracking branch 'origin/master' into actioncable_loggingkp2016-02-10258-1531/+3186
| |\ \ \ | | | |/ | | |/|
| * | | Logs successful and invalid connections separatelykp2016-02-101-8/+12
| | | |
| * | | adds debug logging to actioncable connectkp2016-01-261-2/+12
| | | |
* | | | Merge pull request #23583 from brchristian/penultimateDavid Heinemeier Hansson2016-02-1010-2/+86
|\ \ \ \ | |_|/ / |/| | | Array.second_to_last and Array.third_to_last access methods
| * | | include activerecord and activesupport CHANGELOG entriesBrian Christian2016-02-102-0/+8
| | | |
| * | | rename to 'second_to_last' and 'third_to_last'Brian Christian2016-02-108-32/+32
| | | |
| * | | allow Array.penultimate and Array.antepenultiate access methodsBrian Christian2016-02-098-2/+78
| | | |
* | | | Merge pull request #21671 from kaspth/integration-request-encoding-helpersDavid Heinemeier Hansson2016-02-102-4/+122
|\ \ \ \ | | | | | | | | | | Add `as` to encode a request as a specific mime type.
| * | | | Add `as` to encode a request as a specific mime type.Kasper Timm Hansen2016-01-042-4/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns ``` post articles_path(format: :json), params: { article: { name: 'Ahoy!' } }.to_json, headers: { 'Content-Type' => 'application/json' } ``` into ``` post articles_path, params: { article: { name: 'Ahoy!' } }, as: :json ```
* | | | | Merge pull request #22772 from gsamokovarov/nack-template-errorDavid Heinemeier Hansson2016-02-101-0/+4
|\ \ \ \ \ | | | | | | | | | | | | Fix edge case with ActionView::Template::Error reraise
| * | | | | Fix edge case with ActionView::Template::Error reraiseGenadi Samokovarov2015-12-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you re-raise an ActionView::Template::Error, the #cause can change. You can see this behaviour with [nack]. Currently, `web-console` doesn't run the console in the proper binding in the case of errors in the views, because when we follow the `#cause` of the exception it is an [`EOFError`][EOFError]. This also affects [pow] as it runs on [nack]. [nack]: https://github.com/josh/nack [pow]: http://pow.cx/ [EOFError]: https://github.com/josh/nack/blob/d523cc870c0a11dcf349388a15adfecba9314f97/lib/nack/server.rb#L108
* | | | | | Merge pull request #23512 from y-yagi/set_association_name_to_fixtureDavid Heinemeier Hansson2016-02-103-11/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | set association name to generated fixtures if attribute is reference
| * | | | | | set association name to generated fixtures if attribute is referenceyuuji.yaginuma2016-02-063-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been changed to require `belongs_to` by default in Rails 5. Therefore in order to pass the controller test, have association of set to fixtures. Fixes #23384
* | | | | | | Merge pull request #23587 from wallclockbuilder/patch-1Vipul A M2016-02-101-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix tiny grammar.
| * | | | | | | Fix tiny grammar.Mawueli Kofi Adzoe2016-02-091-1/+1
|/ / / / / / /
* | | | | | | Merge pull request #23586 from jhcole/masterप्रथमेश Sonpatki2016-02-101-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix typo
| * | | | | | | Fix typoJohn Cole2016-02-091-2/+2
|/ / / / / / /
* | | | | | | Merge pull request #23584 from ↵Jon Moss2016-02-092-4/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mgm702/fix_grammar_errors_in_security_and_migrations_docs_master Fix grammar errors in security and migrations docs master [ci skip]
| * | | | | | | Fixed grammatical errors in rails docs [ci skip]Matt Michnal2016-02-092-4/+4
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed errors in rails migrations docs [ci skip] Fixed errors in rails security docs [ci skip]
* | | | | | | prevent apps in the railties test suite from running the evented monitorXavier Noria2016-02-101-3/+12
| | | | | | |
* | | | | | | include spring-watcher-listen in the Gemfile of new applicationsXavier Noria2016-02-103-0/+9
| | | | | | |
* | | | | | | enables the evented monitor in new applicationsXavier Noria2016-02-105-1/+35
| |_|_|/ / / |/| | | | |
* | | | | | `log_process_action` will return an array, so use `empty?`Aaron Patterson2016-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to use active support in this case because we know the type that will be returned.
* | | | | | Request#fullpath should not raise an exception, so remove the rescueAaron Patterson2016-02-091-1/+1
| | | | | |
* | | | | | AC::Request#format always returns a value, so we do not need to tryAaron Patterson2016-02-091-1/+1
| | | | | |
* | | | | | Merge pull request #23577 from dgynn/docs_initializersRafael França2016-02-091-4/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update documentation regarding initializers
| * | | | | | Update documentation regarding initializers [ci skip]Dave Gynn2016-02-091-4/+16
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove ActionController `logger` and `initialize_framework_caches` which were merged into `set_configs` in fbc9d0f4 - Rename ActiveRecord `set_reloader_hooks` changed in 283a0876 - Add missing initializers for ActionController and ActiveRecord
* | | | | | Merge pull request #23571 from ↵Vipul A M2016-02-091-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | y-yagi/remove_deprecated_render_nothing_from_guide remove description of `render :nothing` from guide [ci skip]
| * | | | | | remove description of `render :nothing` from guide [ci skip]yuuji.yaginuma2016-02-091-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | `:nothing` option was deprecated in 44781b6e9790d90b4f8b9a41d2b2c114b1a582ee
* | | | | | Merge pull request #23567 from kamipo/fix_typoJon Moss2016-02-081-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix typo [ci skip]
| * | | | | | Fix typo [ci skip]Ryuta Kamizono2016-02-091-1/+1
|/ / / / / /
* | | | | | drop array allocations on `html_safe`Aaron Patterson2016-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For better or worse, anonymous `*` args will allocate arrays. Ideally, the interpreter would optimize away this allocation. However, given the number of times we call `html_safe` it seems worth the shedding idealism and going for performance. This line was the top allocation spot for a scaffold (and presumably worse on real applications).
* | | | | | speed up string xor operation and reduce object allocationsAaron Patterson2016-02-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` [aaron@TC rails (master)]$ cat xor.rb a = "\x14b\"\xB4P8\x05\x8D\xC74\xC3\xEC}\xFDf\x8E!h\xCF^\xBF\xA5%\xC6\xF0\xA9\xF9x\x04\xFA\xF1\x82" b = "O.\xF7\x01\xA9D\xA3\xE1D\x7FU\x85\xFC\x8Ak\e\x04\x8A\x97\x91\xD01\x02\xA4G\x1EIf:Y\x0F@" def xor_byte_strings(s1, s2) s1.bytes.zip(s2.bytes).map { |(c1,c2)| c1 ^ c2 }.pack('c*') end def xor_byte_strings2(s1, s2) s2_bytes = s2.bytes s1.bytes.map.with_index { |c1, i| c1 ^ s2_bytes[i] }.pack('c*') end require 'benchmark/ips' require 'allocation_tracer' Benchmark.ips do |x| x.report 'xor_byte_strings' do xor_byte_strings a, b end x.report 'xor_byte_strings2' do xor_byte_strings2 a, b end end ObjectSpace::AllocationTracer.setup(%i{type}) result = ObjectSpace::AllocationTracer.trace do xor_byte_strings a, b end p :xor_byte_strings => result ObjectSpace::AllocationTracer.clear result = ObjectSpace::AllocationTracer.trace do xor_byte_strings2 a, b end p :xor_byte_strings2 => result [aaron@TC rails (master)]$ ruby -I~/git/allocation_tracer/lib xor.rb Calculating ------------------------------------- xor_byte_strings 10.087k i/100ms xor_byte_strings2 11.339k i/100ms ------------------------------------------------- xor_byte_strings 108.386k (± 5.8%) i/s - 544.698k xor_byte_strings2 122.239k (± 3.0%) i/s - 612.306k {:xor_byte_strings=>{[:T_ARRAY]=>[38, 0, 0, 0, 0, 0], [:T_STRING]=>[2, 0, 0, 0, 0, 0]}} {:xor_byte_strings2=>{[:T_ARRAY]=>[3, 0, 0, 0, 0, 0], [:T_DATA]=>[1, 0, 0, 0, 0, 0], [:T_IMEMO]=>[2, 0, 0, 0, 0, 0], [:T_STRING]=>[2, 0, 0, 0, 0, 0]}} ```
* | | | | | Merge pull request #23565 from abhishekjain16/fix_grammarJon Moss2016-02-081-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | [ci skip] Fix grammar
| * | | | | | [ci skip] Fix grammarAbhishek Jain2016-02-091-1/+1
| | | | | | |
* | | | | | | Merge pull request #23534 from bronson/fix-redefined-warningArthur Nogueira Neves2016-02-081-0/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | fix 'method redefined' warnings
| * | | | | | fix 'method redefined' warningsScott Bronson2016-02-061-0/+1
| | | | | | |
* | | | | | | Merge pull request #23563 from pra85/patch-2Jon Moss2016-02-081-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix a typo
| * | | | | | | Fix a typoPrayag Verma2016-02-081-1/+1
|/ / / / / / / | | | | | | | | | | | | | | Replace `a` with `an`
* | | | | | | Revert "Merge pull request #23562 from Azzurrio/patch-1"Rafael Mendonça França2016-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8c3cca5e113213958469b1cec8aa9a664535251a, reversing changes made to 9dcf67c4da35b165301865d9721da1d552f7e03f. Reason: https://github.com/rails/rails/pull/23562#issuecomment-181442569
* | | | | | | Merge pull request #23562 from Azzurrio/patch-1Kasper Timm Hansen2016-02-081-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Update rails-html-sanitizer version to v1.0.3
| * | | | | | | Update rails-html-sanitizer version to v1.0.3Karim El-Husseiny2016-02-081-1/+1
|/ / / / / / / | | | | | | | | | | | | | | rails-html-sanitizer 1.0.2 is vulnerable: https://groups.google.com/d/msg/rubyonrails-security/uh--W4TDwmI/m_CVZtdbFQAJ
* | | | | | | Merge pull request #23560 from prathamesh-sonpatki/rm-rails-4-from-assets-guideप्रथमेश Sonpatki2016-02-081-9/+9
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Remove references to Rails 4 from assets guide [ci skip]
| * | | | | | | Remove references to Rails 4 from assets guide [ci skip]Prathamesh Sonpatki2016-02-081-9/+9
| | | | | | | |