aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Merge pull request #29955 from padi/update_actiondispatch_integration_docsRyuta Kamizono2018-05-041-0/+6
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | Updates documentation on ActionDispatch::Integration::Session#process [ci skip]
| * | | Updates (rdoc) documentation on ActionDispatch::Integration::Session#processMarc Rendl Ignacio2017-07-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Adds missing information on 2 parameters: +xhr+ and +as+ [ci skip]
* | | | Merge pull request #32802 from tylerhunt/active_storage_guide_editsGeorge Claghorn2018-05-031-5/+5
|\ \ \ \ | | | | | | | | | | Minor edits to the Active Storage guide
| * | | | Minor edits to the Active Storage guideTyler Hunt2018-05-031-5/+5
|/ / / / | | | | | | | | | | | | | | | | | | | | Fix spelling, grammar, and formatting. [ci skip]
* | | | Assert correct response bodyGeorge Claghorn2018-05-031-4/+6
| | | |
* | | | Merge pull request #32799 from printercu/patch-6Ryuta Kamizono2018-05-031-11/+4
|\ \ \ \ | | | | | | | | | | Use usual method definition instead of extracting args from array
| * | | | Use usual method definition instead of extracting args from arrayprintercu2018-05-031-11/+4
| | | | | | | | | | | | | | | | | | | | Follows #32612
* | | | | Partly revert "Use https with weblog URI" [ci skip]Ryuta Kamizono2018-05-031-1/+1
|/ / / / | | | | | | | | | | | | weblog.jamisbuck.org is not GitHub Pages.
* | / / Add support for prefetch-src directiveyuuji.yaginuma2018-05-032-0/+7
| |/ / |/| | | | | | | | | | | | | | | | | Specification: https://w3c.github.io/webappsec-csp/#directive-prefetch-src This directive can already be used as an experimental feature in Chrome. Ref: https://bugs.chromium.org/p/chromium/issues/detail?id=801561
* | | Stream blobs from diskGeorge Claghorn2018-05-021-2/+13
| | |
* | | Merge pull request #32793 from yhirano55/use_https_with_weblog_uriArun Agrawal2018-05-028-13/+13
|\ \ \ | | | | | | | | Use https with weblog URI
| * | | Use https with weblog URIYoshiyuki Hirano2018-05-028-13/+13
|/ / /
* | | Merge pull request #32787 from yahonda/remove_assert_likeRafael França2018-05-011-5/+0
|\ \ \ | | | | | | | | Remove unused `assert_like` from `Arel::Test`
| * | | Remove unused `assert_like` from `Arel::Test`Yasuo Honda2018-05-021-5/+0
| | | | | | | | | | | | | | | | | | | | It had been added at https://github.com/rails/arel/commit/05b5bb12270b32e094c1c879273e0978dabe5b3b and removed at https://github.com/rails/arel/commit/db1bb4e9a728a437d16f8bdb48c3b772c3e4edb0
* | | | Support streaming downloads from Google Cloud StorageGeorge Claghorn2018-05-015-31/+50
|/ / /
* | | Remove unnecessary requireyuuji.yaginuma2018-05-021-1/+0
| | | | | | | | | | | | `require 'rubygems'` is already required in Ruby 1.9 or later.
* | | Merge pull request #32784 from jpawlyn/allow-belongs-to-create-for-new-recordRyuta Kamizono2018-05-023-4/+17
|\ \ \ | | | | | | | | Allow a belonging to object to be created from a new record
| * | | Allow a belonging to object to be created from a new recordJolyon Pawlyn2018-05-013-4/+17
| | | | | | | | | | | | | | | | If a 'has one' object is created from a new record, an ActiveRecord::RecordNotSaved error is raised but this behavior was also applied to the reverse scenario.
* | | | More exercise `test_remove_named_index`Ryuta Kamizono2018-05-021-1/+4
| | | | | | | | | | | | | | | | | | | | Ensure that do not accidentally remove an index of different definitions.
* | | | Merge pull request #32781 from utilum/retry_did_you_meanRafael França2018-05-011-2/+49
|\ \ \ \ | | | | | | | | | | Partly revert #32289 to provide Rails' custom fallback in case did_you_mean is not available
| * | | | Partly revert #32289 to provide Rails' custom fallback in caseutilum2018-05-011-2/+49
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `DidYouMean::SpellChecker` is not defined. `did_you_mean` is bundled in Ruby but can be uninstalled, and is not always available, sometimes even on our CI: https://travis-ci.org/rails/rails/jobs/372638523#L2405 https://travis-ci.org/rails/rails/jobs/372638523#L2416 https://travis-ci.org/rails/rails/jobs/372638523#L2427 ...
* | | | Merge pull request #32783 from takp/fix-typo-in-testRyuta Kamizono2018-05-021-1/+1
|\ \ \ \ | | | | | | | | | | Fix typo in ActiveRecord test method name
| * | | | Fix typo in ActiveRecord test method nameTakayoshi Nishida2018-05-021-1/+1
| | | | |
* | | | | Make sure that when serialing an just deserialized job arguments are thereRafael Mendonça França2018-05-012-10/+22
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a job was just deserialized `arguments` is `nil` and the serialized arguments are in the `@serialized_arguments` variable. If we try to serialize this job again the arguments are going to be `nil` instead of what was serialized. The test we had was not checking this case because it was deserializing the job in the same object that had the arguments. To fix this, when the `@serialized_arguments` are present we return it instead of the result of the `arguments` serialized.
* / / / `require "active_support/test_case"` is not supported since 53e877f7Ryuta Kamizono2018-05-022-2/+2
|/ / / | | | | | | | | | | | | | | | | | | It will cause "undefined method `test_order' for ActiveSupport:Module (NoMethodError)". https://travis-ci.org/rails/rails/jobs/373472604#L1208
* | | Merge pull request #32771 from yahonda/another_32720Ryuta Kamizono2018-05-018-73/+84
|\ \ \ | |_|/ |/| | Make `Arel::Test` subclass of `ActiveSupport::TestCase`
| * | Make `Arel::Test` subclass of `ActiveSupport::TestCase`Yasuo Honda2018-05-018-73/+84
|/ / | | | | | | | | | | | | | | | | | | not `Minitest::Test` to address `CustomCops/RefuteNot` and `CustomCops/AssertNot` offenses for Arel test cases Also including `ActiveSupport::Testing::Assertions` to `Arel::Spec` and add test/unit backwards compatibility methods Fixes #32720
* | Merge pull request #32773 from eugeneius/content_length_multiple_requestsGeorge Claghorn2018-04-302-0/+9
|\ \ | | | | | | Reset CONTENT_LENGTH between test requests
| * | Reset CONTENT_LENGTH between test requestsEugene Kenny2018-05-012-0/+9
| | | | | | | | | | | | | | | | | | | | | If a POST request is followed by a GET request in a controller test, the `rack.input` and `RAW_POST_DATA` headers from the first request will be reset but the `CONTENT_LENGTH` header will leak, leading the request object in the second request to incorrectly believe it has a body.
* | | Merge pull request #32775 from elebow/add-quotes-actioncontroller-rdocGeorge Claghorn2018-04-301-1/+1
|\ \ \ | |/ / |/| | Add quotes to code in rdoc comment in ActionController [ci skip]
| * | Add quotes to code in rdoc comment in ActionController [ci skip]Eddie Lebow2018-04-301-1/+1
|/ / | | | | | | The example code is meant to be a string.
* | Merge pull request #32769 from anthonycrumley/document-active-storage-folderGeorge Claghorn2018-04-301-0/+1
|\ \ | | | | | | Document rails new <app> storage folder
| * | Document rails new <app> storage folderAnthony Crumley2018-04-301-0/+1
| | | | | | | | | | | | | | | [ci skip] Active Storage now adds a storage folder to newly generated rails applications.
* | | Merge pull request #32768 from anthonycrumley/fix-oxford-commaRafael França2018-04-301-1/+1
|\ \ \ | |/ / |/| | Fix an oxford comma
| * | Fix an oxford commaAnthony Crumley2018-04-301-1/+1
|/ / | | | | | | [ci skip]
* | Merge pull request #32763 from pvalena/as-fix-threads-nilRafael França2018-04-301-4/+4
|\ \ | | | | | | Fix test: threads being nil in ensure
| * | Fix test: threads being nil in ensurePavel Valena2018-04-301-4/+4
| | | | | | | | | | | | when connection_pool is not installed.
* | | Merge pull request #32764 from jroes/patch-1Rafael França2018-04-301-5/+3
|\ \ \ | |/ / |/| | Remove reference to Tokaido
| * | Remove reference to TokaidoJonathan Roes2018-04-301-5/+3
|/ /
* | Merge pull request #32756 from houhoulis/fix_example_url_helper_in_testing_guideRyuta Kamizono2018-04-301-4/+4
|\ \ | | | | | | Fix url_helper examples in testing guide [ci skip]
| * | Fix url_helper examples in testing guide [ci skip]Chris Houhoulis2018-04-291-4/+4
|/ /
* | Avoid duplicating downloads from Google Cloud Storage in memoryGeorge Claghorn2018-04-291-2/+2
| | | | | | | | References #32703.
* | Improve the performance of `ActiveSupport::Inflector.ordinal`Ryuta Kamizono2018-04-291-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves the performance for the most ordinalized numbers (1st, 2nd, 3rd, etc). ``` require "benchmark/ips" def o1(number) abs_number = number.to_i.abs if (11..13).include?(abs_number % 100) "th" else case abs_number % 10 when 1; "st" when 2; "nd" when 3; "rd" else "th" end end end def o3(number) case number when 1; "st" when 2; "nd" when 3; "rd" when 4, 5, 6, 7, 8, 9, 10, 11, 12, 13; "th" else num_modulo = number.to_i.abs % 100 if 11 <= num_modulo && num_modulo <= 13 "th" else case num_modulo % 10 when 1; "st" when 2; "nd" when 3; "rd" else "th" end end end end def o4(number) case number when 1; "st" when 2; "nd" when 3; "rd" when 4, 5, 6, 7, 8, 9, 10, 11, 12, 13; "th" else num_modulo = number.to_i.abs % 100 num_modulo %= 10 if num_modulo > 13 case num_modulo when 1; "st" when 2; "nd" when 3; "rd" else "th" end end end puts RUBY_DESCRIPTION Benchmark.ips do |x| x.report("orig") { o1(1); o1(2); o1(3); o1(4); o1(11); o1(111); o1(1523) } x.report("ord3") { o3(1); o3(2); o3(3); o3(4); o3(11); o3(111); o3(1523) } x.report("ord4") { o4(1); o4(2); o4(3); o4(4); o4(11); o4(111); o4(1523) } x.compare! end ``` ``` ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin15] Warming up -------------------------------------- orig 25.305k i/100ms ord3 121.146k i/100ms ord4 124.944k i/100ms Calculating ------------------------------------- orig 275.496k (± 2.4%) i/s - 1.392M in 5.054720s ord3 1.649M (± 5.0%) i/s - 8.238M in 5.009801s ord4 1.700M (± 7.0%) i/s - 8.496M in 5.031646s Comparison: ord4: 1700059.6 i/s ord3: 1649154.9 i/s - same-ish: difference falls within error orig: 275496.3 i/s - 6.17x slower ``` Closes #25020. [lvl0nax, Jeremy Daer, Ryuta Kamizono]
* | Stream blobs from disk in 5 MB chunksGeorge Claghorn2018-04-292-4/+4
| | | | | | | | Match other services, which all use a 5 MB chunk size.
* | Merge pull request #32751 from utilum/make_railties_2.6_ci_log_accessible_againRyuta Kamizono2018-04-292-1/+10
|\ \ | | | | | | Make Railties CI log for Ruby 2.6 accessible again
| * | Make Railties CI log for Ruby 2.6 accessible againutilum2018-04-292-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pending the next release of Thor which [fixes](https://github.com/erikhuda/thor/commit/006832ea32480618791f89bb7d9e67b22fc814b9) calls to `ERB.new`, Railties CI log for Ruby 2.6 is flooded with so many warnings it is too long for Travis to handle: ``` /home/travis/.rvm/gems/ruby-head/gems/thor-0.20.0/lib/thor/actions/file_manipulation.rb:120: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments. /home/travis/.rvm/gems/ruby-head/gems/thor-0.20.0/lib/thor/actions/file_manipulation.rb:120: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead. /home/travis/.rvm/gems/ruby-head/gems/thor-0.20.0/lib/thor/actions/file_manipulation.rb:120: warning: Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead. The log length has exceeded the limit of 4 MB (this usually means that the test suite is raising the same exception over and over). The job has been terminated ``` https://travis-ci.org/rails/rails/jobs/372623604#L10000 https://api.travis-ci.org/v3/job/372623604/log.txt This patch forces installation of fixed Thor, and enables us to look at the the log.
* | | Merge pull request #32750 from utilum/assert_dir_before_assert_file_in_dirGeorge Claghorn2018-04-291-1/+1
|\ \ \ | |/ / |/| | Swap assertion order
| * | Swap assertion order for better reportingutilum2018-04-291-1/+1
|/ / | | | | | | `assert_directory("test/system")` may pass even if `assert_file("test/system/.keep")` fails.
* | We usually do not use GH#1234 style in the CHANGELOGs [ci skip]Ryuta Kamizono2018-04-291-1/+1
| |
* | Restore original merging order to enforce `if_exists: true`Ryuta Kamizono2018-04-291-2/+1
| | | | | | | | | | The merging order was accidentally changed at #32447. The original intention is force `drop_table ... if_exists: true`. #28070.