aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | Improve css in guideYoshiyuki Hirano2018-04-012-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * .clearfix is overridden. * .clear is not currently used. * #extraCol is not currently used. * table th, table td are overridden. Merged them. * Removed needless comment lines which are added on #6475
* | | | | | | | Merge pull request #32636 from yhirano55/improve_line_tasksRafael França2018-04-192-2/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Improve redundancy in line tasks
| * | | | | | | | Improve redundancy in line tasksYoshiyuki Hirano2018-04-192-2/+2
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove needless concat from actionpack/Rakefile * Remove neesless File.join from actionview/Rakefile
* | | | | | | | [ci skip] Restore of links in RDOC_MAIN after an update of the file (#32644)Felipe Tovar2018-04-191-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ci skip] Update links in RDOC_MAIN and remove style of word rails in README * [ci skip] Update links in RDOC_MAIN and remove style of word rails in README [Felipe Tovar & Rafael Mendonça França]
* | | | | | | | Merge pull request #32593 from sdhull/fix-strong-params-permit-bangRafael Mendonça França2018-04-192-2/+5
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes StrongParameters `permit!` to work with nested arrays
| * | | | | | | | Fixes StrongParameters permit! to work with nested arraysSteve Hull2018-04-163-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `permit!` is intended to mark all instances of `ActionController::Parameters` as permitted, however nested arrays of params were not being marked permitted because the method did shallow iteration. This fixes that by flattening the array before calling `permit!` on all each item.
* | | | | | | | | Merge pull request #32605 from composerinteralia/assert-notRafael França2018-04-19104-338/+429
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add RuboCop for `assert_not` over `assert !`
| * | | | | | | | | Replace `assert !` with `assert_not`Daniel Colson2018-04-1998-328/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This autocorrects the violations after adding a custom cop in 3305c78dcd.
| * | | | | | | | | Add RuboCop for `assert_not` over `assert !`Daniel Colson2018-04-196-10/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We added `assert_not` in f75addd "to replace warty 'assert !foo'". fa8d35b agrees that it is warty, and so do I. This custom Rubocop rule turns the wart into a violation. As with my last custom cop, https://github.com/rails/rails/pull/32441, I want to make sure this looks right on code climate before pushing another commit to autocorrect everything. @toshimaru I just noticed https://github.com/toshimaru/rubocop-rails/pull/26 Is there a better way to add these custom cops, or were you saying we shouldn't have custom cops at all?
* | | | | | | | | | Merge pull request #32637 from yhirano55/add_exclude_condition_in_rubocopRafael França2018-04-191-0/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Add exculude condition in rubocop.yml
| * | | | | | | | | | Add exculude condition in rubocop.ymlYoshiyuki Hirano2018-04-201-0/+1
| | |_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Excluded `railties/test/fixtures/tmp/**/*` from rubocop inspect files * These files are generated after running test in railties
* | | | | | | | | | Merge pull request #32638 from yhirano55/navigate_edgeguide_from_github_templateRafael França2018-04-192-2/+2
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ / / |/| | | | | | | | | Navigate edgeguides from .github template [ci skip]
| * | | | | | | | | Navigate edgeguide from .github template [ci skip]Yoshiyuki Hirano2018-04-202-2/+2
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Navigate prefer edgeguide over guide * Because edgeguide is always described latest policy we have
* | | | | | | | | [ci skip] Remove style of the word Rails at the topGuillermo Iguaran2018-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Similarly to https://github.com/rails/rails/pull/32626/commits/9c3fe52f5fa9904b43bf76be13f85db57c223d0c
* | | | | | | | | Merge pull request #32626 from ftovaro/masterXavier Noria2018-04-192-40/+54
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | [ci skip] Update README and RDOC_MAIN
| * | | | | | | | | [ci skip] Remove style of the word Rails at the topFelipe Tovar2018-04-191-1/+1
| | | | | | | | | |
| * | | | | | | | | [ci skip] Missing \ in RDOC_MAINFelipe Tovar2018-04-190-0/+0
| |\ \ \ \ \ \ \ \ \
| | * | | | | | | | | [ci skip] update RDOC_MAINFelipe Tovar2018-04-191-23/+30
| | | | | | | | | | |
| * | | | | | | | | | [ci skip] update RDOC_MAINFelipe Tovar2018-04-191-23/+30
| |/ / / / / / / / /
| * | | | | | | | | Update READMEFelipe Tovar2018-04-181-18/+25
| | | | | | | | | |
* | | | | | | | | | Merge pull request #32635 from yhirano55/update_cocGuillermo Iguaran2018-04-191-1/+1
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | Update CoC to change a history of updates URL [ci skip]
| * | | | | | | | | Update CoC to change a history of updates URL [ci skip]Yoshiyuki Hirano2018-04-191-1/+1
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A history of updates suggested archived URL, so changed new one: * [NEW] https://github.com/rails/homepage/commits/master/conduct.html * [OLD] https://github.com/rails/rails.github.com/commits/master/conduct/index.html
* | | | | | | | | Merge pull request #32625 from stephendolan/masterKasper Timm Hansen2018-04-191-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | [ci skip] Fix minor system testing documentation typo.
| * | | | | | | | | [ci skip] Fix minor system testing documentation typo.Stephen2018-04-181-1/+1
| | | | | | | | | |
* | | | | | | | | | Merge pull request #32627 from jlduran/make-master-key-readable-only-by-ownerAndrew White2018-04-193-0/+27
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Make the master.key readable only by the owner
| * | | | | | | | | | Make the master.key readable only by the ownerJose Luis Duran2018-04-193-0/+27
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change may only apply to POSIX-compliant systems. Previously: $ ls -l config/master.key -rw-r--r-- 1 owner group 32 Jan 1 00:00 master.key Now: $ ls -l config/master.key -rw------- 1 owner group 32 Jan 1 00:00 master.key
* | | | | | | | | | Merge pull request #32633 from bogdanvlviv/fix-ref-in-actionpack-changelogRyuta Kamizono2018-04-191-1/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix reference to fixed issue in actionpack/CHANGELOG.md [ci skip]
| * | | | | | | | | | Fix reference to fixed issue in actionpack/CHANGELOG.mdbogdanvlviv2018-04-191-1/+1
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull Request #32602 fixes Issue #32597. [ci skip]
* | | | | | | | | | Merge pull request #32613 from dsander/fix-as-timezone-allAndrew White2018-04-194-1/+35
|\ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / |/| | | | | | | | | Fix exception in AS::Timezone.all when any tzinfo data is missing
| * | | | | | | | | Merge branch 'master' into fix-as-timezone-allAndrew White2018-04-1913-26/+155
| |\ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | |
* | | | | | | | | | Redis cache store: avoid blocking the server in `#delete_matched`Gleb Mazovetskiy2018-04-182-6/+18
| |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #32610. Closes #32614. Lua scripts in redis are *blocking*, meaning that no other client can execute any commands while the script is running. See https://redis.io/commands/eval#atomicity-of-scripts. This results in the following exceptions once the number of keys is sufficiently large: BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE. This commit replaces the lua-based implementation with one that uses `SCAN` and `DEL` in batches. This doesn't block the server. The primary limitation of `SCAN`, i.e. potential duplicate keys, is of no consequence here, because `DEL` ignores keys that do not exist.
* | | | | | | | | Merge pull request #32607 from yaroslav/feature/nonce-for-javascript_include_tagAndrew White2018-04-184-0/+28
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add the `nonce: true` option for `javascript_include_tag` helper.
| * | | | | | | | | Add the `nonce: true` option for `javascript_include_tag` helper.Yaroslav Markin2018-04-174-0/+28
| | | | | | | | | |
* | | | | | | | | | Merge pull request #32326 from ↵Guillermo Iguaran2018-04-181-1/+5
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | q-centrix/perf-improvement-translation-helper-default-array Only create an array with default options if we have default options
| * | | | | | | | | | Only create an array with default options if we have default optionsDillon Welch2018-03-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the options passed in don't have a default key, there's no point in creating an array from those empty results when we can just go straight to creating an empty array. Benchmarks: ```ruby master_version with false {:FREE=>-2497, :T_STRING=>52, :T_ARRAY=>2000, :T_HASH=>1000, :T_IMEMO=>1} master_version with true {:FREE=>-3001, :T_ARRAY=>2000, :T_HASH=>1000} fast_version with false {:FREE=>-1001, :T_ARRAY=>1000} fast_version with true {:FREE=>-3001, :T_ARRAY=>2000, :T_HASH=>1000} Warming up -------------------------------------- master_version with false 104.985k i/100ms master_version with true 118.737k i/100ms fast_version with false 206.013k i/100ms fast_version with true 107.005k i/100ms Calculating ------------------------------------- master_version with false 1.970M (±24.6%) i/s - 8.924M in 5.010302s master_version with true 2.152M (±12.4%) i/s - 10.686M in 5.051588s fast_version with false 5.613M (±19.6%) i/s - 26.782M in 5.003740s fast_version with true 2.027M (±15.8%) i/s - 9.951M in 5.065670s Comparison: fast_version with false: 5613159.2 i/s master_version with true: 2152354.4 i/s - 2.61x slower fast_version with true: 2027296.0 i/s - 2.77x slower master_version with false: 1969824.9 i/s - 2.85x slower ``` Benchmark code: ```ruby begin require "bundler/inline" rescue LoadError => e $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" raise e end gemfile(true) do source "https://rubygems.org" gem "benchmark-ips" gem "rails" end def allocate_count GC.disable before = ObjectSpace.count_objects yield after = ObjectSpace.count_objects after.each { |k,v| after[k] = v - before[k] } after[:T_HASH] -= 1 # probe effect - we created the before hash. GC.enable result = after.reject { |k,v| v == 0 } GC.start result end def master_version(key) Array({}.delete(:default)).compact end def fast_version(key) if key Array({}.delete(:default)).compact else [] end end def test puts "master_version with false" puts allocate_count { 1000.times { master_version(false) } } puts "master_version with true" puts allocate_count { 1000.times { master_version(true) } } puts "fast_version with false" puts allocate_count { 1000.times { fast_version(false) } } puts "fast_version with true" puts allocate_count { 1000.times { fast_version(true) } } Benchmark.ips do |x| x.report("master_version with false") { master_version(false) } x.report("master_version with true") { master_version(true) } x.report("fast_version with false") { fast_version(false) } x.report("fast_version with true") { fast_version(true) } x.compare! end end test ```
* | | | | | | | | | | Remove unused literal introduced in #32602Andrew White2018-04-181-1/+0
| | | | | | | | | | |
* | | | | | | | | | | Don't link issue number in CHANGELOG [ci skip]Andrew White2018-04-181-1/+1
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #32602 from Envek/fix/csp-multiple-noncesAndrew White2018-04-183-13/+94
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Output only one nonce in CSP header per request
| * | | | | | | | | | | Pass nonce to CSP policy from outsideAndrew White2018-04-183-53/+97
| | | | | | | | | | | |
| * | | | | | | | | | | Output only one nonce in CSP header per requestAndrey Novikov2018-04-173-22/+59
| | | | | | | | | | | |
* | | | | | | | | | | | Merge pull request #32616 from cassidycodes/validates-inclusion-exampleRyuta Kamizono2018-04-181-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update validates_inclusion_of example in Docs [ci skip]
| * | | | | | | | | | | | Update validates_inclusion_of exampleCassidy Kobewka2018-04-171-1/+1
|/ / / / / / / / / / / /
* | | | | | | | | | | | Merge pull request #32612 from utilum/splat_actionviewRafael França2018-04-171-2/+7
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 2.6 warning: passing splat keyword arguments as a single Hash
| * | | | | | | | | | | | Ruby 2.6 warning: passing splat keyword arguments as a single Hashutilum2018-04-171-2/+7
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: ``` $ ruby -v ruby 2.6.0dev (2018-04-04 trunk 63085) [x86_64-linux] $ bundle exec rake test:template ... /rails/actionview/lib/action_view/digestor.rb:76: warning: passing splat keyword arguments as a single Hash to `find_all' ```
* | | | | | | | | | | | Merge pull request #32611 from thoughtless/patch-1Rafael França2018-04-171-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / / / / |/| | | | | | | | | | | Correct docs on naming of sprockets manifest file
| * | | | | | | | | | | Correct docs on naming of sprockets manifest filePaul2018-04-171-2/+2
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling this an MD5 implies that it is generated consistently based on some input. However, this value is [completely random](https://github.com/rails/sprockets/blob/fbe6e450b6f25cf3ea494fcab0e34001d0b5a0b9/lib/sprockets/manifest_utils.rb#L11-L24).
| | | | * / / / / / / Fix exception in AS::Timezone.all when any tzinfo data is missingDominik Sander2018-04-184-1/+35
| |_|_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change missing timezone data for any of the time zones defined in `ActiveSupport::Timezone::MAPPING` caused a `comparison of NilClass with ActiveSupport::TimeZone failed` exception. Attempting to get a timezone by passing a number/duration to `[]` or calling `all` directly will try to sort sort the values of `zones_map`. Those values are initialized by the return value of `create(zonename)` which returns `nil` if `TZInfo` is unable to find the timezone information. In our case the exception was triggered by an outdated tzdata package which did not include information for the "recently" added time zones. Before 078421bacba178eac6a8e607b16f3f4511c5d72f `zones_map` only returned the information that have been loaded into `@lazy_zone_map` which ignored time zones for which the data could not be loaded, this change restores the previous behaviour.
* | | | | | | | | | Merge pull request #32556 from utilum/splatRyuta Kamizono2018-04-172-3/+3
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | 2.6 warning: passing splat keyword arguments as a single Hash
| * | | | | | | | | | 2.6 warning: passing splat keyword arguments as a single Hashutilum2018-04-152-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 2.6.0 warns about this. ``` ruby -v ruby 2.6.0dev (2018-04-04 trunk 63085) [x86_64-linux] ``` Before, see: https://travis-ci.org/rails/rails/jobs/365740163#L1262-L1264 https://travis-ci.org/rails/rails/jobs/365944863#L2121-L2174
* | | | | | | | | | | Merge pull request #32594 from utilum/structure_dump_create_tableRyuta Kamizono2018-04-171-2/+2
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / / |/| | | | | | | | | | Fix test to allow IF NOT EXISTS in structure:dump