aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge pull request #35844 from kamipo/fix_fixture_loading_performance_regressionRyuta Kamizono2019-04-047-10/+9
|\ \ \ \ \ | | | | | | | | | | | | Use `execute_batch2` rather than `execute_batch` to fix performance regression for fixture loading
| * | | | | Use `execute_batch2` rather than `execute_batch` to fix performance ↵Ryuta Kamizono2019-04-047-10/+9
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regression for fixture loading d8d6bd5 makes fixture loading to bulk statements by using `execute_batch` for sqlite3 adapter. But `execute_batch` is slower and it caused the performance regression for fixture loading. In sqlite3 1.4.0, it have new batch method `execute_batch2`. I've confirmed `execute_batch2` is extremely faster than `execute_batch`. So I think it is worth to upgrade sqlite3 to 1.4.0 to use that method. Before: ``` % ARCONN=sqlite3 bundle exec ruby -w -Itest test/cases/associations/eager_test.rb -n test_eager_loading_too_may_ids Using sqlite3 Run options: -n test_eager_loading_too_may_ids --seed 35790 # Running: . Finished in 202.437406s, 0.0049 runs/s, 0.0049 assertions/s. 1 runs, 1 assertions, 0 failures, 0 errors, 0 skips ARCONN=sqlite3 bundle exec ruby -w -Itest -n test_eager_loading_too_may_ids 142.57s user 60.83s system 98% cpu 3:27.08 total ``` After: ``` % ARCONN=sqlite3 bundle exec ruby -w -Itest test/cases/associations/eager_test.rb -n test_eager_loading_too_may_ids Using sqlite3 Run options: -n test_eager_loading_too_may_ids --seed 16649 # Running: . Finished in 8.471032s, 0.1180 runs/s, 0.1180 assertions/s. 1 runs, 1 assertions, 0 failures, 0 errors, 0 skips ARCONN=sqlite3 bundle exec ruby -w -Itest -n test_eager_loading_too_may_ids 10.71s user 1.36s system 95% cpu 12.672 total ```
* | | | | Merge pull request #35825 from jhawthorn/always_filter_view_pathsEileen M. Uchitelle2019-04-039-44/+42
|\ \ \ \ \ | | | | | | | | | | | | Make Resolver#find_all_anywhere equivalent to #find_all
| * | | | | Always reject files external to appJohn Hawthorn2019-04-039-44/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when using `render file:`, it was possible to render files not only at an absolute path or relative to the current directory, but relative to ANY view paths. This was probably done for absolutely maximum compatibility when addressing CVE-2016-0752, but I think is unlikely to be used in practice. Tihs commit removes the ability to `render file:` with a path relative to a non-fallback view path. Make FallbackResolver.new private To ensure nobody is making FallbackResolvers other than "/" and "". Make reject_files_external_... no-op for fallbacks Because there are only two values used for path: "" and "/", and File.join("", "") == File.join("/", "") == "/", this method was only testing that the absolute paths started at "/" (which of course all do). This commit doesn't change any behaviour, but it makes it explicit that the FallbackFileSystemResolver works this way. Remove outside_app_allowed argument Deprecate find_all_anywhere This is now equivalent to find_all Remove outside_app argument Deprecate find_file for find Both LookupContext#find_file and PathSet#find_file are now equivalent to their respective #find methods.
* | | | | | Merge pull request #35843 from eregon/fix-gem-listen-in-gemfile-masterEileen M. Uchitelle2019-04-031-0/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add test that the listen gem is included when RUBY_ENGINE is not 'ruby'
| * | | | | | Add test that the listen gem is included when RUBY_ENGINE is not 'ruby'Benoit Daloze2019-04-031-0/+16
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | * The fix is already in master since https://github.com/rails/rails/pull/34243 * See https://github.com/rails/rails/pull/35482 for the fix in Rails 5.2
* | | | | | [skip ci] Add examples for has_{one,many} :through :source and :source_type ↵Tim Wade2019-04-031-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#35612) * Add example for has_many :through source/source_type * Add example for has_one :through source/source_type
* | | | | | Merge pull request #35795 from alimi/cache-database-versionEileen M. Uchitelle2019-04-0318-67/+106
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Cache database version in schema cache
| * | | | | Cache database version in schema cacheAli Ibrahim2019-04-0318-67/+106
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The database version will get cached in the schema cache file during the schema cache dump. When the database version check happens, the version will be pulled from the schema cache and thus avoid querying the database for the version. * If the schema cache file doesn't exist, we'll query the database for the version and cache it on the schema cache object. * To facilitate this change, all connection adapters now implement #get_database_version and #database_version. #database_version returns the value from the schema cache. * To take advantage of the cached database version, the database version check will now happen after the schema cache is set on the connection in the connection pool.
* | | | | [ci skip] Touch up `db:prepare` changelog entryKasper Timm Hansen2019-04-031-1/+3
| | | | |
* | | | | Merge pull request #35841 from robertomiranda/r/rake-db-prepare-changelogRyuta Kamizono2019-04-031-0/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add rake db:prepare entry to the CHANGELOG.md [ci skip]
| * | | | | Add rake db:prepare entry to the CHANGELOG.mdRoberto Miranda2019-04-031-0/+4
|/ / / / /
* | | | | Don't normalize `original_app_name`Ryuta Kamizono2019-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | `original_app_name` is used to show error message if giving app name is invalid, it should be shown raw app name.
* | | | | `bytes_margin` is only needed when `previous_packet` existsRyuta Kamizono2019-04-031-5/+2
| | | | |
* | | | | Merge pull request #35840 from ↵Ryuta Kamizono2019-04-031-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | abhaynikam/24405-update-honor-shallow-false-option-doc [ci skip] Doc for shallow: false options should use <tt> for better readability.
| * | | | | [ci skip] Doc for shallow: false options should use <tt> for better ↵Abhay Nikam2019-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | readability. PR after #24405
* | | | | | Don't assign to `@changed_attributes` in `becomes`Ryuta Kamizono2019-04-031-1/+0
|/ / / / / | | | | | | | | | | | | | | | `@changed_attributes` is no longer used since #30985.
* | | | | Use official database name [ci skip]Ryuta Kamizono2019-04-037-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * s/Postgres/PostgreSQL/ * s/MYSQL/MySQL/, s/Mysql/MySQL/ * s/Sqlite/SQLite/ Replaced all newly added them after 6089b31.
* | | | | Fix the markup for `insert_all` and `upsert_all` docs [ci skip]Ryuta Kamizono2019-04-031-7/+7
| |/ / / |/| | |
* | | | Remove duplicated CHANGELOG entry [ci skip]Ryuta Kamizono2019-04-031-2/+0
| | | |
* | | | Merge pull request #35833 from soartec-lab/update_guide_cachingRyuta Kamizono2019-04-031-1/+1
|\ \ \ \ | | | | | | | | | | Fixed description of the `cache_key_with_version` method [skip ci]
| * | | | Fixed description of the `cache_key_with_version` method [ci skip]soartec-lab2019-04-031-1/+1
| | | | |
* | | | | Auto-correct rubocop offencesRyuta Kamizono2019-04-032-17/+17
| | | | |
* | | | | Add `after_save_commit` callback as shortcut for `after_commit :hook, on: [ ↵David Heinemeier Hansson2019-04-023-0/+24
| | | | | | | | | | | | | | | | | | | | :create, :update ]`. (#35804)
* | | | | Merge pull request #24405 from waits/shallow-falseRafael França2019-04-022-1/+35
|\ \ \ \ \ | | | | | | | | | | | | Honor shallow: false on nested resources
| * | | | | Honor shallow: false on nested resourcesDylan Waits2016-04-032-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously there was no way to place a non-shallow resource inside a parent with `shallow: true` set. Now you can set `shallow: false` on a nested child resource to generate normal (non-shallow) routes for it. Fixes #23890.
* | | | | | Merge pull request #35805 from excid3/attachments-field-generatorsRafael França2019-04-0213-25/+130
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add attachment and attachments field generators
| * | | | | | Add attachment and attachments field generatorsChris Oliver2019-03-3013-25/+130
| | | | | | |
* | | | | | | Merge pull request #35771 from timoschilling/hash-speed-improvementsRafael França2019-04-022-4/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Hash / HashWithIndifferentAccess speed improvements
| * | | | | | | Speed improvement for HashWithIndifferentAccess#values_atTimo Schilling2019-04-021-2/+2
| | | | | | | |
| * | | | | | | Speed improvement for HashWithIndifferentAccess#fetch_valuesTimo Schilling2019-04-021-1/+1
| | | | | | | |
| * | | | | | | Speed improvement for HashWithIndifferentAccess#exceptTimo Schilling2019-04-011-0/+3
| | | | | | | |
| * | | | | | | Speed improvement for Hash#exceptTimo Schilling2019-03-291-1/+1
| | | | | | | |
* | | | | | | | Simplify ActionCable.createWebSocketURL and realphabetize exports (#35810)rmacklin2019-04-024-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove unnecessary variable from ActionCable.createWebSocketURL * Improve ActionCable test by creating the Consumer before reassigning URL With this change, the test now actually verifies that the Consumer's url property changes dynamically (from testURL to `${testURL}foo`). * Fix alphabetization of ActionCable exports
* | | | | | | | Merge pull request #35768 from robertomiranda/r/rake-db-prepareEileen M. Uchitelle2019-04-023-0/+46
|\ \ \ \ \ \ \ \ | |_|_|_|/ / / / |/| | | | | | | Add db:prepare rake task.
| * | | | | | | Add migration in case of db:drop assertionRoberto Miranda2019-04-021-0/+7
| | | | | | | |
| * | | | | | | 💇Roberto Miranda2019-04-023-8/+5
| | | | | | | |
| * | | | | | | Add test cases for rake db:prepareRoberto Miranda2019-04-023-6/+39
| | | | | | | |
| * | | | | | | Move db:migrate call to else blockRoberto Miranda2019-03-271-1/+2
| | | | | | | |
| * | | | | | | Improve db:prepare descriptionRoberto Miranda2019-03-271-1/+1
| | | | | | | |
| * | | | | | | Add rake db:prepare rake task.Roberto Miranda2019-03-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It Creates the database, loads the schema, run the migrations and initializes with the seed data (use db:reset to also drop the database first). This rake task runs in an idempotent way ref https://github.com/rails/rails/pull/33139#discussion_r195930751
* | | | | | | | Merge pull request #35831 from ↵Kasper Timm Hansen2019-04-021-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | abhaynikam/35826-updated-doc-template-rawfile-after-35826 [ci skip] Updated the doc after renaming Template::File -> Template::RawFile in #35826
| * | | | | | | | [ci skip] Updated the doc after renaming Template::File -> Template::RawFile ↵Abhay Nikam2019-04-021-1/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | in #35826
* | | | | | | | Merge pull request #35826 from cpruitt/rename-file-to-rawfileKasper Timm Hansen2019-04-025-5/+5
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Rename `Template::File` to `Template::RawFile`
| * | | | | | | | Rename File to RawFileCliff Pruitt2019-04-015-5/+5
| | |_|_|_|/ / / | |/| | | | | |
* | | | | | | | Merge pull request #35703 from y-yagi/add_database_option_to_dbconsole_commandYuji Yaginuma2019-04-023-13/+42
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Rename `connection` option to `database` in `dbconsole` command
| * | | | | | | | Rename `connection` option to `database` in `dbconsole` commandyuuji.yaginuma2019-04-023-13/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We introduced `connection` option for specifying spec with 1acd9a6464668d4d54ab30d016829f60b70dbbeb. But now we are using the `database` to specify the same value in other commands. * https://github.com/rails/rails/blob/0a0f115031b64b5335fa88543c40df4194dfb428/activerecord/lib/rails/generators/active_record/migration/migration_generator.rb#L11 * https://github.com/rails/rails/blob/0a0f115031b64b5335fa88543c40df4194dfb428/activerecord/lib/rails/generators/active_record/model/model_generator.rb#L17 The options provided to the users should be uniform. Since the term "database" is used in rake task etc, So I want to be able to use it in `dbconsole` command. Also I deprecated the `connection` option because I think that it would be confusing if there are multiple options to specify a same value.
* | | | | | | | | Merge pull request #35827 from abhaynikam/35824-fix-typo-in-changelogRyuta Kamizono2019-04-021-2/+2
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | [ci skip] Fix typo for recieve -> receive
| * | | | | | | | [ci skip] Fix typo for recieve -> receiveAbhay Nikam2019-04-021-2/+2
|/ / / / / / / /
* | | | | | | | Merge pull request #35824 from connorshea/add-changelog-for-webdriversRafael França2019-04-011-0/+6
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Add Changelog entry for #35732.