aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #32032 from utilum/method_redefinedAndrew White2018-02-191-2/+2
|\ | | | | Avoid method_redefined warnings in RouteSet::NamedRouteCollection
| * Avoid method_redefined warnings in RouteSet::NamedRouteCollectionutilum2018-02-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: ``` ~/.rbenv/versions/2.5.0/bin/ruby -w -Itest -Ilib -I../activesupport/lib -I../actionpack/lib -I../actionview/lib -I../activemodel/lib test/application/routing_test.rb Run options: --seed 5851 .......~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:156: warning: method redefined; discarding old custom_path ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_path was here ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:162: warning: method redefined; discarding old custom_url ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_url was here ....~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:156: warning: method redefined; discarding old custom_path ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_path was here ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:162: warning: method redefined; discarding old custom_url ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_url was here ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:156: warning: method redefined; discarding old custom_path ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_path was here ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:162: warning: method redefined; discarding old custom_url ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_url was here ..........~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:156: warning: method redefined; discarding old custom_path ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_path was here ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:162: warning: method redefined; discarding old custom_url ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_url was here ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:156: warning: method redefined; discarding old custom_path ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_path was here ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:162: warning: method redefined; discarding old custom_url ~/code/rails/actionpack/lib/action_dispatch/routing/route_set.rb:321: warning: previous definition of custom_url was here ..... Finished in 13.233638s, 1.9647 runs/s, 5.8185 assertions/s. 26 runs, 77 assertions, 0 failures, 0 errors, 0 skips ``` After: ``` ~/.rbenv/versions/2.5.0/bin/ruby -w -Itest -Ilib -I../activesupport/lib -I../actionpack/lib -I../actionview/lib -I../activemodel/lib test/application/routing_test.rb Run options: --seed 38072 .......................... Finished in 12.009632s, 2.1649 runs/s, 6.4115 assertions/s. 26 runs, 77 assertions, 0 failures, 0 errors, 0 skips ```
* | Merge pull request #32054 from rails/fix-generation-of-empty-cspAndrew White2018-02-194-69/+73
|\ \ | |/ |/| Fix generation of empty content security policy
| * Remove trailing semi-colon from CSPAndrew White2018-02-193-39/+39
| | | | | | | | | | | | | | | | | | Although the spec[1] is defined in such a way that a trailing semi-colon is valid it also doesn't allow a semi-colon by itself to indicate an empty policy. Therefore it's easier (and valid) just to omit it rather than to detect whether the policy is empty or not. [1]: https://www.w3.org/TR/CSP2/#policy-syntax
| * Don't accidentally create an empty CSPAndrew White2018-02-192-3/+33
| | | | | | | | | | | | Setting up the request environment was accidentally creating a CSP as a consequence of accessing the option - only set the instance variable if a block is passed.
| * Revert "Merge pull request #32045 from eagletmt/skip-csp-header"Andrew White2018-02-193-31/+5
| | | | | | | | | | | | | | | | | | This reverts commit 86f7c269073a3a9e6ddec9b957deaa2716f2627d, reversing changes made to 5ece2e4a4459065b5efd976aebd209bbf0cab89b. If a policy is set then we should generate it even if it's empty. However what is happening is that we're accidentally generating an empty policy when the initializer is commented out by default.
* | Merge pull request #32052 from rails/fix-country-zones-with-multiple-mappingsAndrew White2018-02-193-2/+31
|\ \ | |/ |/| Return all mappings for a timezone id in country_zones
| * Return all mappings for a timezone id in `country_zones`Andrew White2018-02-193-2/+31
|/ | | | | | | | | | | | | | Some timezones like `Europe/London` have multiple mappings in `ActiveSupport::TimeZone::MAPPING` so return all of them instead of the first one found by using `Hash#value`. e.g: # Before ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh"] # After ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh", "London"] Fixes #31668.
* Merge pull request #32051 from dixitp012/rubocop_single_spaceRyuta Kamizono2018-02-191-1/+1
|\ | | | | rubocop single space after assignment
| * rubocop single space after assignmentDixit Patel2018-02-191-1/+1
|/
* Use the query cache when connection is already connectedyuuji.yaginuma2018-02-192-6/+17
| | | | Fixes #32021.
* Add stimulus to list of supported options for --webpackGuillermo Iguaran2018-02-181-1/+1
|
* Fix test method nameGuillermo Iguaran2018-02-181-1/+1
|
* Don't generate empty app/views folder when --api and --skip-action-mailer ↵Guillermo Iguaran2018-02-182-2/+23
| | | | | | | are used together The purpose of keeping app/views folder in API apps is that it's used for mailer views so doesn't makes sense to keep it when Action Mailer is skipped.
* Clean up reporter replacement a bit.Kasper Timm Hansen2018-02-182-29/+29
| | | | | | | | | | | | * Don't use :: for class methods, we don't do that elsewhere. * Don't install a needless method on minitest. Prefer assigning the reporter anyway as that's what minitest does internally. * Don't bother opting out when the reporter ain't a Minitest::CompositeReporter. It's hardcoded: https://github.com/seattlerb/minitest/blob/005a3ba42c07d04797e2d00ac2c53e3be127c12f/lib/minitest.rb#L125 And overrides have to create delegate reporters: https://github.com/kern/minitest-reporters/blob/1018b1b42f34b01d4de179c8aad2fa06771fe9b0/lib/minitest/minitest_reporter_plugin.rb#L72
* Merge pull request #32045 from eagletmt/skip-csp-headerGuillermo Iguaran2018-02-183-5/+31
|\ | | | | Skip generating empty CSP header when no policy is configured
| * Skip generating empty CSP header when no policy is configuredKohei Suzuki2018-02-183-5/+31
| | | | | | | | | | | | | | | | `Rails.application.config.content_security_policy` is configured with no policies by default. In this case, Content-Security-Policy header should not be generated instead of generating the header with no directives. Firefox also warns "Content Security Policy: Couldn't process unknown directive ''".
* | Add a CHANGELOG entry for #31941 [ci skip]Ryuta Kamizono2018-02-191-0/+4
| |
* | Association scope's own order should be prioritized over through scope's orderRyuta Kamizono2018-02-183-3/+11
| | | | | | | | | | | | | | | | | | | | 3acc5d6 was changed the order of scope evaluation from through scope to the association's own scope to be prioritized over the through scope. But the sorting order will be prioritized that is evaluated first. It is unintentional effect, association scope's sorting order should be prioritized as well. Fixes #32008.
* | Merge pull request #32046 from fatkodima/fix-activejob-guideRyuta Kamizono2018-02-181-1/+1
|\ \ | |/ |/| Fix active_job_basics.md callbacks example [ci skip]
| * Fix active_job_basics.md callbacks example [ci skip]fatkodima2018-02-181-1/+1
|/
* Revert "Delegate `uniq` to `records`"Ryuta Kamizono2018-02-181-1/+1
| | | | | | This reverts commit cf4f05a7d4a2051cf3593bc7c3a6a216e74e797a. Since Rails 6 requires Ruby 2.4.1+.
* 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
|/ / / /