aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #34739 from sambostock/correct-nested-config-documentationKasper Timm Hansen2018-12-181-1/+1
|\ | | | | Single nest config in configuration guides
| * Single nest config in configuration guidesSam Bostock2018-12-181-1/+1
|/ | | | | | | Double nesting of configuration is not supported (without using an intermediate object), even though the docs suggest it is. [ci-skip]
* Eliminate "warning: assigned but unused variable - testEof"Ryuta Kamizono2018-12-191-1/+1
| | | | | | | | | | | | | | | | | | https://github.com/ammar/regexp_parser/pull/57 ``` % be ruby -w -Itest test/controller/filters_test.rb /Users/kamipo/src/github.com/rails/rails/vendor/bundle/ruby/2.5.0/gems/addressable-2.5.2/lib/addressable/idna/pure.rb:154: warning: assigned but unused variable - startercc /Users/kamipo/src/github.com/rails/rails/vendor/bundle/ruby/2.5.0/gems/regexp_parser-1.2.0/lib/regexp_parser/scanner.rb:1146: warning: assigned but unused variable - testEof Run options: --seed 32647 # Running: ................................................... Finished in 0.291176s, 175.1518 runs/s, 343.4349 assertions/s. 51 runs, 100 assertions, 0 failures, 0 errors, 0 skips ```
* [ci skip] Remove needless changelog entry, as bug fix was backported to 5.2.Kasper Timm Hansen2018-12-181-4/+0
|
* Merge pull request #34737 from r7kamura/feature/test-case-params-nilKasper Timm Hansen2018-12-183-2/+18
|\ | | | | Allow nil params on controller HTTP test methods
| * Allow nil params on controller HTTP test methodsr7kamura2018-12-183-2/+18
| |
* | More exercise `test_running_prepended_before_and_after_action`Ryuta Kamizono2018-12-191-1/+3
| | | | | | | | | | Just testing that `after_action` is invoked before `prepend_after_action`.
* | Add option to set parallel test worker count to the physical core count of ↵Bogdan2018-12-184-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the machine (#34735) * Add option to set parallel test worker count to the physical core count of the machine Also, use the physical core count of the machine as the default number of workers, and generate the `test_helper.rb` file with `parallelize(workers: :number_of_processors)` Closes #34734 * Ensure that we always test parallel testing Since #34734 we decided to use the physical core count of the machine as the default number of workers in the parallel testing, we need to ensure that some tests use at least 2 workers because we could run those tests on VM that has only 1 physical core. It also fixes tests failures on the CI since Travis server we are using has only one physical core. See https://travis-ci.org/rails/rails/jobs/469281088#L2352
* | Merge pull request #34635 from WoH/data-disable-foreverJavan Makhmali2018-12-183-0/+29
|\ \ | |/ |/| UJS: Do not disable previously disabled elements
| * Do not disable previously disabled elementsWoH2018-12-063-0/+29
| |
* | Add test case for ce48b5a366482d4b4c4c053e1e39e79d71987197Ryuta Kamizono2018-12-181-0/+7
| |
* | Fix `View.new` method call with arguments syntaxRyuta Kamizono2018-12-181-1/+1
| | | | | | [ci skip]
* | Merge pull request #34733 from tjschuck/view_context_doc_formattingVipul A M2018-12-181-4/+5
|\ \ | | | | | | Fix doc formatting [ci skip]
| * | Fix doc formattingT.J. Schuck2018-12-171-4/+5
|/ / | | | | | | [ci skip]
* | Merge pull request #33145 from gsamokovarov/host-authorizationEileen M. Uchitelle2018-12-1715-50/+393
|\ \ | | | | | | Guard against DNS rebinding attacks by whitelisting hosts
| * \ Merge branch 'master' into host-authorizationEileen M. Uchitelle2018-12-176-9/+59
| |\ \ | |/ / |/| |
* | | Merge pull request #34717 from tbuehlmann/controller-test-parsed-bodyKasper Timm Hansen2018-12-173-6/+37
|\ \ \ | | | | | | | | Allow using parsed_body in ActionController::TestCase
| * | | Allow using parsed_body in ActionController::TestCaseTobias Bühlmann2018-12-163-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | … by switching the initialzation of an appropriate response parser in `ActionDispatch::TestResponse` from eagerly to lazily. By doing so, the response parser can be correctly set for `ActionController::TestCase`, which doesn't include the content type header in the constructor but only sets it at a later time. Fixes #34676.
* | | | Extend documentation of `ActiveSupport::Notifications.subscribe` (#34721)Bogdan2018-12-173-3/+22
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Extend documentation of `ActiveSupport::Notifications.subscribe` Add mention that a block with only one argument passed to the method will yield an event object. Related to #33451 * Emphasize that `SubscribeEventObjects` is a test class by adding suffix `Test`
| * / Introduce a guard against DNS rebinding attacksGenadi Samokovarov2018-12-1515-50/+393
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ActionDispatch::HostAuthorization is a new middleware that prevent against DNS rebinding and other Host header attacks. By default it is included only in the development environment with the following configuration: Rails.application.config.hosts = [ IPAddr.new("0.0.0.0/0"), # All IPv4 addresses. IPAddr.new("::/0"), # All IPv6 addresses. "localhost" # The localhost reserved domain. ] In other environments, `Rails.application.config.hosts` is empty and no Host header checks will be done. If you want to guard against header attacks on production, you have to manually permit the allowed hosts with: Rails.application.config.hosts << "product.com" The host of a request is checked against the hosts entries with the case operator (#===), which lets hosts support entries of type RegExp, Proc and IPAddr to name a few. Here is an example with a regexp. # Allow requests from subdomains like `www.product.com` and # `beta1.product.com`. Rails.application.config.hosts << /.*\.product\.com/ A special case is supported that allows you to permit all sub-domains: # Allow requests from subdomains like `www.product.com` and # `beta1.product.com`. Rails.application.config.hosts << ".product.com"
* | Prevent infinit method_missing loop on attribute methodsRyuta Kamizono2018-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | If a klass has acceptance validation and then `klass.undefine_attribute_methods` is happened before an attribute method is called, infinit loop is caused on the `method_missing` defined by the `LazilyDefineAttributes`. https://travis-ci.org/rails/rails/jobs/467053984#L1409 To prevent the infinit loop, the `method_missing` should ensure `klass.define_attribute_methods`.
* | Ruby can show a little bit more detailed info in shorter codeAkira Matsuda2018-12-151-1/+1
| | | | | | | | This follows up adb0c7bc5116e0f6020a4ec32b7e19ea8b26f1ec
* | Merge pull request #32872 from utilum/soften_migrations_guide_generator_sectionVipul A M2018-12-151-4/+9
|\ \ | | | | | | Expand intro to generator in Migrations Guide
| * | Expand intro to Migration generator in Migrations Guideutilum2018-05-111-4/+9
| | | | | | | | | | | | [ci skip]
* | | http://localhost:3000/rails/info/properties shows more details for ease of ↵ujihisa2018-12-141-1/+1
| | | | | | | | | | | | | | | | | | bug reporting Hand-merging @ujihisa's ancient patch at https://lighthouseapp.com/projects/8994/tickets/3644
* | | Merge pull request #34702 from ↵Yuji Yaginuma2018-12-141-0/+7
|\ \ \ | | | | | | | | | | | | | | | | ysksn/test_deprecate_methods_without_alternate_method Test ActiveSupport::Deprecation.deprecate_methods
| * | | Test ActiveSupport::Deprecation.deprecate_methodsYosuke Kabuto2018-12-141-0/+7
| | | | | | | | | | | | | | | | There was no test without an alternate method name is given.
* | | | Do not show post install message on rails newRafael Mendonça França2018-12-132-5/+5
|/ / /
* | | Enable `Layout/SpaceAfterSemicolon` cop to avoid newly adding odd spacingRyuta Kamizono2018-12-133-6/+9
| | | | | | | | | | | | Ref https://github.com/rails/rails/commit/59ff1ba30d9f4d34b4d478104cc3f453e553c67a#diff-38fb97fba84b1ef0f311c4110a597c44R35
* | | Use string for arguments in server testyuuji.yaginuma2018-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When actually execute from the command, the value of ARGV is passed to the server. So they are String. So let's use the same type in the test. Also, this removes the following warning in Ruby 2.6. ``` lib/rails/commands/server/server_command.rb:195: warning: deprecated Object#=~ is called on Integer; it always returns nil ```
* | | Merge pull request #34695 from shoy75/update-ruby-version-for-travisRyuta Kamizono2018-12-131-13/+13
|\ \ \ | | | | | | | | Update tested versions of Ruby on CI
| * | | Update tested versions of Ruby on CIshoy752018-12-131-13/+13
| | | |
* | | | Merge pull request #34693 from ahorek/matchRyuta Kamizono2018-12-132-4/+4
|\ \ \ \ | |/ / / |/| | | | | | | [perf] use #match?
| * | | use match?pavel2018-12-122-4/+4
| | | |
* | | | Fix warning: shadowing outer local variable - attributeRyuta Kamizono2018-12-131-1/+1
|/ / /
* | | Merge pull request #32852 from gmcgibbon/fix_numericality_float_equalityRafael França2018-12-123-10/+34
|\ \ \ | | | | | | | | Fix numericality equality validation on floats
| * | | Fix numericality equality validation on floatsGannon McGibbon2018-12-123-10/+34
| | | |
* | | | Merge pull request #34691 from gmcgibbon/rm_helper_generator_suffixRyuta Kamizono2018-12-133-0/+16
|\ \ \ \ | | | | | | | | | | | | | | | Remove redundant suffixes on generated helpers.
| * | | | Remove redundant suffixes on generated helpers.Gannon McGibbon2018-12-123-0/+16
| | | | |
* | | | | Merge pull request #34690 from gmcgibbon/rm_integration_test_generator_suffixRyuta Kamizono2018-12-133-0/+17
|\ \ \ \ \ | |/ / / / |/| | | | Remove redundant suffixes on generated integration tests.
| * | | | Remove redundant suffixes on generated integration tests.Gannon McGibbon2018-12-123-0/+17
|/ / / /
* | | | Merge pull request #34681 from gmcgibbon/fix_boolean_system_test_scaffoldRafael França2018-12-124-3/+22
|\ \ \ \ | | | | | | | | | | Fix boolean interaction in scaffold system tests
| * | | | Fix boolean interaction in scaffold system testsGannon McGibbon2018-12-124-3/+22
| |/ / /
* | | | Merge pull request #34689 from haruelico/beanstalkdRyuta Kamizono2018-12-131-3/+3
|\ \ \ \ | |/ / / |/| | | kr/beanstalkd permanently moved to beanstalkd/beanstalkd
| * | | kr/beanstalkd permanently moved to beanstalkd/beanstalkdHarue Lico2018-12-131-3/+3
|/ / / | | | | | | | | | | | | https://github.com/kr/beanstalkd has moved to https://github.com/beanstalkd/beanstalkd as permanently.
* | | Merge pull request #34686 from got2be/actioncable-channel-rescuableKasper Timm Hansen2018-12-122-1/+21
|\ \ \ | | | | | | | | Add Missing ActiveSupport::Rescuable to ActionCable::Channel
| * | | Add Missing ActiveSupport::Rescuable to ActionCable::ChannelIlia Kasianenko2018-12-122-1/+21
| | | | | | | | | | | | | | | | [timthez, Ilia Kasianenko]
* | | | Ensure that preventing writes is invoked before `materialize_transactions` ↵Ryuta Kamizono2018-12-122-13/+23
| | | | | | | | | | | | | | | | consistently
* | | | Merge pull request #34682 from gmcgibbon/rm_system_test_generator_suffixRyuta Kamizono2018-12-123-0/+23
|\ \ \ \ | | | | | | | | | | Remove redundant suffixes on generated system tests.
| * | | | Remove redundant suffixes on generated system tests.Gannon McGibbon2018-12-113-0/+23
| | | | |