aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | | Configuration item `config.filter_parameters` could also filter out ↵Zhang Kang2018-09-075-2/+122
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sensitive value of database column when call `#inspect` * Why Some sensitive data will be exposed in log accidentally by calling `#inspect`, e.g. ```ruby @account = Account.find params[:id] payload = { account: @account } logger.info "payload will be #{ payload }" ``` All the information of `@account` will be exposed in log. * Solution Add a class attribute filter_attributes to specify which values of columns shouldn't be exposed. This attribute equals to `Rails.application.config.filter_parameters` by default. ```ruby Rails.application.config.filter_parameters += [:credit_card_number] Account.last.insepct # => #<Account id: 123, credit_card_number: [FILTERED] ...> ```
* | | | | | | | | | Formatting CHANGELOGs [ci skip]Ryuta Kamizono2018-09-076-28/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing code block rendering, indentation, backticks, etc.
* | | | | | | | | | Use canonical name for block localyuuji.yaginuma2018-09-072-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `spec` is the same variable name as gemspec generated by bundler, and its intention is easier to understand than a one-letter variable. https://github.com/bundler/bundler/blob/00fd58eaa69015092ee272c4cb5aa92a5e7ee45c/lib/bundler/templates/newgem/newgem.gemspec.tt#L11 This is follow up on 1c59b4840c58097186022f68427c46e0046c5d0d. `spec` is already in use there.
* | | | | | | | | | Merge pull request #33808 from itsbagpack/fix-access-safety-buffer-sliceAaron Patterson2018-09-063-3/+20
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Maintain html_safe? on sliced HTML safe strings
| * | | | | | | | | | Update CHANGELOG for SafetyBuffer slice accessYumin Wong2018-09-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: no-itsbackpack <no-itsbackpack@github.com>
| * | | | | | | | | | Use assert_predicate insteadYumin Wong2018-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: no-itsbackpack <no-itsbackpack@github.com>
| * | | | | | | | | | SafeBuffer should maintain safety upon getting a slice via a range if ↵Yumin Wong2018-08-312-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | original buffer was safe. Co-Authored-By: no-itsbackpack <no-itsbackpack@github.com>
* | | | | | | | | | | Merge pull request #33810 from schneems/schneems/doc-output-bufferRichard Schneeman2018-09-062-0/+19
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Document ActionView::OutputBuffer
| * | | | | | | | | | | [ci skip] Doc ActionView::OutputBufferschneems2018-09-062-3/+17
| | | | | | | | | | | |
| * | | | | | | | | | | [ci skip] Clarify CaptureHelper#capture functionschneems2018-09-061-0/+5
| |/ / / / / / / / / /
* | | | | | | | | | | Merge pull request #33809 from fidalgo/improve-remove-column-documentationRichard Schneeman2018-09-061-0/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Improve remove_column documentation
| * | | | | | | | | | | [ci skip] Improve remove_column documentationPaulo Fidalgo2018-09-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since when we remove one column it will also remove the associated indexes, we must ensure this behaviour is properly documented. In this commit we add a line to the documentation mentioning this behaviour.
* | | | | | | | | | | | Merge pull request #33807 from olimart/patch-4Rafael França2018-09-061-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typo in i18n_railtie.rb [ci skip]
| * | | | | | | | | | | | Fix typo in i18n_railtie.rbOlivier2018-09-061-1/+1
|/ / / / / / / / / / / /
* | | | | | | | | | | | Fix test case to ensure default connection id is filledRyuta Kamizono2018-09-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up of #33798.
* | | | | | | | | | | | Merge pull request #33805 from schneems/schneems/faster-file-storeRichard Schneeman2018-09-061-6/+10
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Faster File Store
| * | | | | | | | | | | | Faster File Storeschneems2018-09-061-6/+10
| | |/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Memory before 1826584.8 memory after: 1797795.6 difference: 1.58% memory (speed) savings. When the key is not longer than the limit we can avoid allocating two strings and an array.
* | | | | | | | | | | | Generate a gem that can't be pushed to Rubygems.org by defaultRafael Mendonça França2018-09-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will avoid gems that are made to be private to be pushed to public repositories.
* | | | | | | | | | | | Merge pull request #33574 from ↵Rafael França2018-09-063-4/+14
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lsylvester/change-i18n-defaults-behaviour-to-match-i18n-1.1.0 update I18n fallbacks configuration to be compatible with i18n 1.1.0
| * | | | | | | | | | | | update I18n fallbacks configuration to be compatible with i18n 1.1.0Lachlan Sylvester2018-08-233-4/+14
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #33798 from got2be/actioncable-redis-client-nameRafael França2018-09-063-3/+30
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActionCable: add id option to redis adapter config
| * | | | | | | | | | | | | ActionCable: add id option to redis adapter configIlia Kasianenko2018-09-053-3/+30
| | |_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #32405 from yhirano55/use_turbolinks_in_guideRafael França2018-09-066-32/+54
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / / / / / |/| | | | | | | | | | | | Use Turbolinks in Rails guides
| * | | | | | | | | | | | Use Turbolinks in Rails guidesYoshiyuki Hirano2018-04-236-32/+54
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #33799 from ↵Ryuta Kamizono2018-09-063-0/+43
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/deprecate_unused_methods_in_database_limits Deprecate most methods which were never used in `DatabaseLimits`
| * | | | | | | | | | | | | Deprecate most methods which were never used in `DatabaseLimits`Ryuta Kamizono2018-09-053-0/+43
| | |/ / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `DatabaseLimits` and those methods were introduced at 3809c80, but most methods were never used and never tested from the beginning (except `table_alias_length`, `index_name_length`, and `in_clause_length` (since 66c09372)). There is no reason to maintain unused those methods for about 8 years.
* | | | | | | | | | | | | Unlock ffi versionRafael Mendonça França2018-09-052-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ffi has a security issue on versions before 1.9.24 so it is better to upgrade even if that occasionally cause failures in some contributors machines.
* | | | | | | | | | | | | Upgrade all the gemsRafael Mendonça França2018-09-051-75/+70
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #33604 from rails/ensure-we-always-cleanup-dbsEileen M. Uchitelle2018-09-051-11/+13
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / |/| | | | | | | | | | | | Ensure we always cleanup the databases
| * | | | | | | | | | | | Ensure we always cleanup the databasesEileen Uchitelle2018-09-051-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit moves the `run_cleanup` hook into an `ensure` block so we make sure to cleanup the databases even if an exception is raised while running the parallel tests.
* | | | | | | | | | | | | Merge pull request #33782 from mikhailov/patch-1Eileen M. Uchitelle2018-09-051-0/+6
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ / / / / |/| | | | | | | | | | | | Update documentation to ActionController::ConditionalGet
| * | | | | | | | | | | | Update documentation to ActionController::ConditionalGetAnatoly Mikhaylov2018-09-031-0/+6
| | |_|_|_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two implemented but undocumented features are to help indicate that cache is fresh for 3 hours, and it may continue to be served stale for up to an additional 60 seconds to parallel requests for the same resource or up to 5 minutes while errors are being returned back while the initial synchronous revalidation is attempted.
* | | | | | | | | | | | Merge pull request #33781 from bogdanvlviv/fix-test-after-33637Eileen M. Uchitelle2018-09-042-684/+120
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / |/| | | | | | | | | | | Fix tests in `activerecord/test/cases/tasks/database_tasks_test.rb`
| * | | | | | | | | | | Fix tests in `activerecord/test/cases/tasks/database_tasks_test.rb`bogdanvlviv2018-09-042-684/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After #33637 some tests in `activerecord/test/cases/tasks/database_tasks_test.rb` don't assert anything. We used to stub `ActiveRecord::Base::configurations` method in those tests like `ActiveRecord::Base.stub(:configurations, @configurations) {}`. Since #33637 `ActiveRecord::Base::configurations` is a `ActiveRecord::DatabaseConfigurations` object(not a Hash object) we can't do so anymore. `ActiveRecord::DatabaseConfigurations` object builds during `ActiveRecord::Base::configurations=`. We can replace `ActiveRecord::Base.stub(:configurations, @configurations) {}` to ``` begin old_configurations = ActiveRecord::Base.configurations ActiveRecord::Base.configurations = @configurations # ... ensure ActiveRecord::Base.configurations = old_configurations end ``` Also I fixed tests in `activerecord/test/cases/tasks/legacy_database_tasks_test.rb` But currently It looks like duplication of `activerecord/test/cases/tasks/database_tasks_test.rb`. We should improve those tests or remove them. I've tried (in `activerecord/test/cases/tasks/legacy_database_tasks_test.rb` file): ``` def with_stubbed_configurations old_configurations = ActiveRecord::Base.configurations.to_h ActiveRecord::Base.configurations = @configurations ActiveRecord::Base.stub(:configurations, ActiveRecord::Base.configurations.to_h) do yield end ensure ActiveRecord::Base.configurations = old_configurations end ``` but it causes erros in tests cases. After discussion we decided to remove `activerecord/test/cases/tasks/legacy_database_tasks_test.rb` Related to #33637
* | | | | | | | | | | | Remove unused blockEileen Uchitelle2018-09-041-1/+1
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method used to take a block, but that's no longer the case so we can delete the block from the method signature.
* | | | | | | | | | | Respect config setting when output deprecation notice in rake tasksyuuji.yaginuma2018-09-047-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rake tasks which became deprecate now does not load the environment. Therefore, even if the application specifies the behavior of deprecating, the message is output to stderr ignoring the specification. It seems that this is not the expected behavior. We should respect the setting even in the rake tasks.
* | | | | | | | | | | Merge pull request #33789 from nisusam/update_hijacking_linkYuji Yaginuma2018-09-041-2/+2
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | | Update link for `Rack socket hijacking API`
| * | | | | | | | | | Update link for `Rack socket hijacking API`nisusam2018-09-041-2/+2
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use valid `fragment identifier` in the URL - Use `https`
* | | | | | | | | | Merge pull request #33779 from mcnelson/update_changelog_for_null_storeKasper Timm Hansen2018-09-031-0/+4
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Update changelog with new default cache store in test env
| * | | | | | | | | | Update changelog with null_store defaultMichael Nelson2018-09-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | | | | Merge pull request #33673 from ↵Ryuta Kamizono2018-09-034-6/+31
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tgxworld/regression_setting_children_record_in_parent_before_save Fix regression setting children record in parent before_save callback.
| * | | | | | | | | | Fix regression setting children record in parent before_save callback.Guo Xiang Tan2018-09-034-6/+31
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #33773 from mcnelson/null_cache_store_for_test_envGeorge Claghorn2018-09-021-0/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Make null_store the default cache store in test environment config
| * | | | | | | | | | | Set cache store as null_store for test environmentMichael Nelson2018-08-021-0/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Remove unused splat args in `_create_record`Ryuta Kamizono2018-09-022-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `_create_record` is passed `attribute_names` only. ``` % git grep -n '_create_record(attribute_names' lib/active_record/attribute_methods/dirty.rb:173: def _create_record(attribute_names = attribute_names_for_partial_writes) lib/active_record/counter_cache.rb:162: def _create_record(attribute_names = self.attribute_names) lib/active_record/locking/optimistic.rb:64: def _create_record(attribute_names = self.attribute_names) lib/active_record/persistence.rb:738: def _create_record(attribute_names = self.attribute_names) ```
* | | | | | | | | | | | Merge pull request #33774 from sharang-d/comment-changesRyuta Kamizono2018-09-023-6/+6
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change some comments to conform to the style used in other comments [ci skip]
| * | | | | | | | | | | | [ci skip] Change some comments to conform to the style used in other commentsSharang Dashputre2018-09-013-6/+6
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #33776 from gmcgibbon/extend-database-default-value-testRyuta Kamizono2018-09-023-3/+23
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / |/| | | | | | | | | | | | add mysql and sqlite3 default test
| * | | | | | | | | | | | add mysql and sqlite3 default testkenjiszk2018-09-013-3/+23
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Gannon McGibbon + Kenji Suzuki]
* | | | | | | | | | | | Merge pull request #33770 from eileencodes/multi-db-improvements-part-3Eileen M. Uchitelle2018-09-0110-30/+99
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Part 3: Multi-db Improvements, identifying replica configurations