- 08 9月, 2018 7 次提交
-
-
由 Yoshiyuki Kinjo 提交于
-
由 Xavier Noria 提交于
-
由 Richard Schneeman 提交于
Don’t allocate array on no args
-
由 schneems 提交于
When no dependencies are present to be digested there is no reason to build an array just to turn around and turn it back into a string. The dependencies array is not mutated in this method so we can use the same empty array across all invocations. Total allocated: 791402 bytes (7294 objects) Total allocated: 777442 bytes (7132 objects) (791402 - 777442) / 791402.0 # => 1.76 % speed improvement
-
由 Xavier Noria 提交于
Closes #32885.
-
由 Ryuta Kamizono 提交于
Fix non_numeric_string?
-
由 Rafael França 提交于
`ActiveModel.full_message` interaction with `index_errors`
-
- 07 9月, 2018 20 次提交
-
-
由 Eileen M. Uchitelle 提交于
Add `inspection_masks` to make values of sensitive database columns w…
-
由 Yoshiyuki Kinjo 提交于
For example, dirty checking was not right for the following case: ``` model.int_column = "+5" model.float_column = "0.5E+1" model.decimal_column = "0.5e-3" ``` It is enough to see whether leading character is a digit for avoiding invalid numeric expression like 'wibble' to be type-casted to 0, as this method's comment says. Fixes #33801
-
由 Zhang Kang 提交于
Configuration item `config.filter_parameters` could also filter out 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] ...> ```
-
由 Ryuta Kamizono 提交于
Fixing code block rendering, indentation, backticks, etc.
-
由 yuuji.yaginuma 提交于
`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 1c59b484. `spec` is already in use there.
-
由 Aaron Patterson 提交于
Maintain html_safe? on sliced HTML safe strings
-
由 Richard Schneeman 提交于
Document ActionView::OutputBuffer
-
由 schneems 提交于
-
由 Yumin Wong 提交于
Co-authored-by: Nno-itsbackpack <no-itsbackpack@github.com>
-
由 Richard Schneeman 提交于
[ci skip] Improve remove_column documentation
-
由 Rafael França 提交于
Fix typo in i18n_railtie.rb [ci skip]
-
由 Olivier 提交于
-
由 Paulo Fidalgo 提交于
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.
-
由 Ryuta Kamizono 提交于
Follow up of #33798.
-
由 Richard Schneeman 提交于
Faster File Store
-
由 Rafael Mendonça França 提交于
This will avoid gems that are made to be private to be pushed to public repositories.
-
由 Rafael França 提交于
update I18n fallbacks configuration to be compatible with i18n 1.1.0
-
由 Rafael França 提交于
ActionCable: add id option to redis adapter config
-
由 Yumin Wong 提交于
Co-authored-by: Nno-itsbackpack <no-itsbackpack@github.com>
-
由 schneems 提交于
-
- 06 9月, 2018 7 次提交
-
-
由 schneems 提交于
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.
-
由 Rafael França 提交于
Use Turbolinks in Rails guides
-
由 Ryuta Kamizono 提交于
Deprecate most methods which were never used in `DatabaseLimits`
-
由 Rafael Mendonça França 提交于
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.
-
由 Rafael Mendonça França 提交于
-
由 Eileen M. Uchitelle 提交于
Ensure we always cleanup the databases
-
由 Eileen Uchitelle 提交于
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.
-
- 05 9月, 2018 6 次提交
-
-
由 Ryuta Kamizono 提交于
`DatabaseLimits` and those methods were introduced at 3809c80c, 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.
-
由 Ilia Kasianenko 提交于
-
由 Eileen M. Uchitelle 提交于
Update documentation to ActionController::ConditionalGet
-
由 Eileen M. Uchitelle 提交于
Fix tests in `activerecord/test/cases/tasks/database_tasks_test.rb`
-
由 bogdanvlviv 提交于
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
-
由 Eileen Uchitelle 提交于
This method used to take a block, but that's no longer the case so we can delete the block from the method signature.
-