aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Travis: fix that major.minor version doesn't track latest major.minor.tinyJeremy Daer2018-02-181-8/+8
| | | | | So `2.4` would match `2.4.1` (due to an rvm alias) rather than matching the latest `2.4.3` release.
* String#truncate_bytes: limit to N bytes without breaking multibyte charsJeremy Daer2018-02-183-0/+108
| | | | | This faithfully preserves grapheme clusters (characters composed of other characters and combining marks) and other multibyte characters.
* `String#strip_heredoc` preserves frozennessJeremy Daer2018-02-173-1/+23
| | | | | | | | | | | | | | | | | | ```ruby "foo".freeze.strip_heredoc.frozen? # => true ``` Fixes the case where frozen string literals would inadvertently become unfrozen: ```ruby foo = <<-MSG.strip_heredoc la la la MSG foo.frozen? # => false !?? ```
* Update bug report templatesbogdanvlviv2018-02-176-7/+8
| | | | | | Prepare bug report templates for Rails 6.0 development Add missing `require "active_support"` in `guides/bug_report_templates/generic_gem.rb`
* Document :reconnect_attempts option for Redis Cache Store [ci skip]Brian Kephart2018-02-171-3/+8
|
* Fix "warning: BigDecimal.new is deprecated"yuuji.yaginuma2018-02-181-1/+1
|
* Fixes typosDharam Gollapudi2018-02-171-3/+3
| | | Fixes typos
* Rails 6 requires Ruby 2.4.1+Jeremy Daer2018-02-1752-253/+133
| | | | | | Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
* Remove require Object#blank? monkey patchSean Collins2018-02-171-1/+0
| | | | | | | Object#blank? used to be used in this file, but it's not anymore. This avoids a monkey-patch, for those who want to use just this isolated feature of ActiveSupport.
* Clean up and consolidate .gitignoresbogdanvlviv2018-02-1714-36/+32
| | | | | | | | | | | | | | | | * Global ignores at toplevel .gitignore * Component-specific ignores in each toplevel directory * Remove `actionview/test/tmp/.keep` for JRuby ``` rm actionview/test/tmp/ -fr cd actionview/ bundle exec jruby -Itest test/template/digestor_test.rb ``` Related to #11743, #30392. Closes #29978.
* Deprecate update_attributes and update_attributes!Eddie Lebow2018-02-1717-62/+44
| | | | Closes #31998
* Partly revert 1e526788e6b1d3f42f4d8fdca20e588d42838c80bogdanvlviv2018-02-172-2/+7
| | | | | | Some attr_readers should be `protected` instead of `private` See https://travis-ci.org/rails/rails/builds/342800276
* Remove extra conditions in HWIDA since Rails 6 does not support Ruby 2.2bogdanvlviv2018-02-172-17/+13
| | | | See https://github.com/ruby/ruby/blob/ruby_2_3/NEWS
* Multipart file uploads are very rare in API only apps so don't include ↵Guillermo Iguaran2018-02-172-3/+3
| | | | Rack::TemfileReaper in default middleware stack for API only apps
* Rails 6 requires Ruby 2.3+Jeremy Daer2018-02-1738-232/+92
|
* Merge descriptions related to parallel test into one section [ci skip]yuuji.yaginuma2018-02-171-2/+2
|
* Merge pull request #32002 from y-yagi/fix_set_serializerRafael França2018-02-173-4/+21
|\ | | | | Fix custome serializer setting
| * Fix custome serializer settingYuji Yaginuma2018-02-163-4/+21
| | | | | | | | | | | | | | | | The serializer should be set up in `after_initialize` so that it work properly even if the user specifies serializer with initializers. Also, since `custom_serializers` is `Array`, it needs to be flattened before setting the value.
* | Fix changelog entry [ci skip]Rafael Mendonça França2018-02-161-1/+7
| |
* | Add chop removed in 89bcca5Rafael Mendonça França2018-02-161-1/+1
| |
* | Fix frozen string concatenation by indicating that it's mutableRafael Mendonça França2018-02-161-2/+2
| | | | | | | | References 89bcca5
* | Merge pull request #31901 from Kevinrob/patch-1Rafael França2018-02-163-4/+51
|\ \ | | | | | | Use SuppressedSummaryReporter and Rails::TestUnitReporter only if needed
| * | Add SuppressedSummaryReporter and TestUnitReporter only if necessaryKevin Robatel2018-02-153-4/+51
| | |
* | | Merge pull request #32025 from fatkodima/array-routing-constraintsRafael França2018-02-162-4/+7
|\ \ \ | | | | | | | | Fix array routing constraints
| * | | Fix array routing constraintsfatkodima2018-02-172-4/+7
| | | |
* | | | Define transform_keys! in HashWithIndifferentAccessRafael Mendonça França2018-02-162-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that when transforming the keys of a HashWithIndifferentAccess we can still access with indifferent access in Ruby 2.5. Closes #32007.
* | | | Merge pull request #32029 from yhirano55/remove_needless_stripRafael França2018-02-161-1/+0
|\ \ \ \ | | | | | | | | | | Remove needless requiring 'active_support/core_ext/string/strip'
| * | | | Remove needless requiring 'active_support/core_ext/string/strip'Yoshiyuki Hirano2018-02-171-1/+0
|/ / / /
* | | | Fix frozen string concatenation by indicating that it's mutableJeremy Daer2018-02-161-1/+1
| | | | | | | | | | | | | | | | References 89bcca59e91fa9da941de890012872e8288e77b0
* | | | Remove needless printyuuji.yaginuma2018-02-171-1/+0
|/ / / | | | | | | | | | It seems to debug print.
* | | Remove usage of strip_heredoc in the framework in favor of <<~Rafael Mendonça França2018-02-1635-131/+115
| | | | | | | | | | | | | | | Some places we can't remove because Ruby still don't have a method equivalent to strip_heredoc to be called in an already existent string.
* | | Write the code in a more natural way.Rafael Mendonça França2018-02-161-2/+2
| | |
* | | Remove support to Ruby 2.2Rafael Mendonça França2018-02-1612-13/+12
| | | | | | | | | | | | Rails 6 will only support Ruby >= 2.3.
* | | Merge pull request #32016 from SamSaffron/visitorsEileen M. Uchitelle2018-02-161-2/+2
|\ \ \ | | | | | | | | PERF: reduce retained objects in Journey
| * | | PERF: reduce retained objects in JourneySam2018-02-161-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: Total allocated: 209050523 bytes (2219202 objects) Total retained: 36580305 bytes (323462 objects) After: Total allocated: 209180253 bytes (2222455 objects) Total retained: 36515599 bytes (321850 objects) --- Modest saving of 1612 RVALUEs in the heap on Discourse boot The larger the route file the better the results. Saving will only be visible on Ruby 2.5 and up.
* | | Merge pull request #32015 from ↵Eileen M. Uchitelle2018-02-161-0/+24
|\ \ \ | | | | | | | | | | | | | | | | JPrevost/activestorage_integration_test_cleanup_docs ActiveStorage file cleanup in Integration Tests
| * | | ActiveStorage file cleanup in Integration TestsJeremy Prevost2018-02-151-0/+24
| | | | | | | | | | | | | | | | | | | | Documents ActiveStorage file cleanup in Integration Tests which is similar but slightly different than the existing docs for System Tests.
* | | | Merge pull request #31900 from eileencodes/parallel-testingEileen M. Uchitelle2018-02-1612-7/+415
|\ \ \ \ | |_|/ / |/| | | Parallel testing
| * | | Add test parallelization to Railseileencodes2018-02-1512-7/+415
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provides both a forked process and threaded parallelization options. To use add `parallelize` to your test suite. Takes a `workers` argument that controls how many times the process is forked. For each process a new database will be created suffixed with the worker number; test-database-0 and test-database-1 respectively. If `ENV["PARALLEL_WORKERS"]` is set the workers argument will be ignored and the environment variable will be used instead. This is useful for CI environments, or other environments where you may need more workers than you do for local testing. If the number of workers is set to `1` or fewer, the tests will not be parallelized. The default parallelization method is to fork processes. If you'd like to use threads instead you can pass `with: :threads` to the `parallelize` method. Note the threaded parallelization does not create multiple database and will not work with system tests at this time. parallelize(workers: 2, with: :threads) The threaded parallelization uses Minitest's parallel exector directly. The processes paralleliztion uses a Ruby Drb server. For parallelization via threads a setup hook and cleanup hook are provided. ``` class ActiveSupport::TestCase parallelize_setup do |worker| # setup databases end parallelize_teardown do |worker| # cleanup database end parallelize(workers: 2) end ``` [Eileen M. Uchitelle, Aaron Patterson]
* | | correct the dedup codeSam2018-02-151-3/+3
| | |
* | | Revert "Revert "Merge pull request #31999 from SamSaffron/patch-1""Rafael Mendonça França2018-02-151-4/+11
| | | | | | | | | | | | This reverts commit f282f3758d31e8445d0854e2ae7a67f17cede3bc.
* | | Revert "Merge pull request #31999 from SamSaffron/patch-1"Rafael Mendonça França2018-02-151-11/+4
|/ / | | | | | | | | | | | | This reverts commit 9f65d2a08bc80a94bbb2c0b6e00957c7059aed25, reversing changes made to 966843732a607864b077b72b2a17168d4e3548cc. This broken a lot of tests.
* | Merge pull request #32012 from utilum/mysql_min_versionRafael França2018-02-152-5/+5
|\ \ | | | | | | Bump mysql2 version
| * | Bump mysql2 versionutilum2018-02-152-5/+5
| |/ | | | | | | | | Skip 0.4.8 and 0.4.9, which had [Compilation failures against MariaDB Connector/C 3.0.2](https://github.com/brianmario/mysql2/releases/tag/0.4.10).
* | Merge pull request #31999 from SamSaffron/patch-1Aaron Patterson2018-02-151-4/+11
|\ \ | | | | | | PERF: dedupe scanned route fragments
| * | PERF: dedupe scanned route fragmentsSam2018-02-151-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per: https://bugs.ruby-lang.org/issues/13077 String @- will dedupe strings. This takes advantage of this by deduping route fragments that are full of duplication usually. For Discourse: Before: Total allocated: 207574305 bytes (2214916 objects) Total retained: 36470010 bytes (322194 objects) After Total allocated: 207556847 bytes (2214711 objects) Total retained: 36327973 bytes (318627 objects) <- object that GC can not collect So we save 3500 or so RVALUES this way, not the largest saving in the world, but worth it especially for large route files.
* | | Merge pull request #32003 from SamSaffron/patch-2Aaron Patterson2018-02-151-1/+1
|\ \ \ | |_|/ |/| | PERF: symbolize ivar, to reduce dupes
| * | PERF: symbolize ivar, to reduce dupesSam2018-02-151-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | I noticed this in my memory profiler report. ``` 153 "@default_url_options" 152 /home/sam/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.4/lib/active_support/core_ext/class/attribute.rb:84 ``` 152 copies of the string `@default_url_options` are retained on the heap in Discourse post boot. Since this is just used for ivar lookups there is no need to use a string.
* | Merge pull request #32001 from ydakuka/patch-2Arun Agrawal2018-02-151-18/+17
|\ \ | |/ |/| Missing backquote, extra end keyword [ci skip]
| * Missing backquote, extra end keyword [ci skip]Yauheni Dakuka2018-02-151-18/+17
|/