aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | Fix query cache when using shared connectionsHeinrich Lee Yu2019-07-083-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables the query cache on the correct connection when shared connections across threads are enabled
* | | | | | | | | | fixes link [skip ci]Xavier Noria2019-07-101-1/+1
| | | | | | | | | |
* | | | | | | | | | fixes link [skip ci]Xavier Noria2019-07-101-1/+1
| |_|/ / / / / / / |/| | | | | | | |
* | | | | | | | | updates the guides table of contents [skip ci]Xavier Noria2019-07-091-2/+6
| | | | | | | | |
* | | | | | | | | renames and revises the autoloading guide for classic mode [skip ci]Xavier Noria2019-07-091-0/+1351
| | | | | | | | |
* | | | | | | | | autoloading guide revamped for Zeitwerk mode [skip ci]Xavier Noria2019-07-091-1254/+108
| |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | This is a first draft only, needs polishing for final.
* | | | | | | | Merge pull request #36612 from ↵Yuji Yaginuma2019-07-091-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | y-yagi/make_setup_works_when_using_with_locales_other_than_en Make "bin/setup" works when using PostgreSQL with locales other than en locale
| * | | | | | | | Make "bin/setup" works when using PostgreSQL with locales other than en localeyuuji.yaginuma2019-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PostgreSQL adapter uses an error message to determine if a database exists or not. https://github.com/rails/rails/blob/74ef67b16de67d2ae2f996e50a18a93aebf68fe6/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L49 However, this message is properly converted according to the locale. So this check does not work correctly for non-en locales. As a result, `db:prepare` cannot correctly determine if a database exists, and `bin/setup`, which depends on the task, does not work correctly if the database does not exist. It checks to exist if the "does not exist" exists, but that message is also used in other error messages(e.g. "role does not exist"). So cannot check correctly also in en locale. https://github.com/postgres/postgres/blob/master/src/backend/po/ja.po#L10542 It would be fine could check the status, but in my understanding, when a connecting fails, only the status `CONNECTION_BAD` be used, and it seems that details cannot be checked. https://www.postgresql.org/docs/11/libpq-status.html#LIBPQ-PQSTATUS I fixed to check whether the error message contains a database name. This is probably not accurate but can check it better now.
* | | | | | | | | Merge pull request #36624 from ultrawebmarketing/patch-1Ryuta Kamizono2019-07-091-2/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update example url for add_source [ci skip]
| * | | | | | | | | update example url for add_sourceultrawebmarketing2019-07-081-2/+2
| | |_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | http://code.whytheluckystiff.net is now just a spam site. Use http://gems.github.com as an example instead.
* | | | | | | | | Merge pull request #36627 from robertomiranda/patch-4Ryuta Kamizono2019-07-091-1/+1
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Fix indentation 💇‍♀️ [ci skip]
| * | | | | | | | Fix indentation 💇‍♀️Roberto Miranda2019-07-081-1/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | Ref https://github.com/rails/rails/pull/36621#discussion_r301208961
* | | | | | | | Merge pull request #36471 from itsWill/add_database_exist_methodGuillermo Iguaran2019-07-088-0/+71
|\ \ \ \ \ \ \ \ | |_|_|_|/ / / / |/| | | | | | | Add database_exists? method to connection adapters
| * | | | | | | Merge branch 'master' into add_database_exist_methodGuillermo Iguaran2019-07-0892-221/+795
| |\ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
* | | | | | | | Merge pull request #36617 from ↵Eileen M. Uchitelle2019-07-082-5/+24
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wjessop/fix_database_url_trampling_other_env_configs When DATABASE_URL is specified don't trample envs that use a url: key
| * | | | | | | | When DATABASE_URL is specified don't trample envs that use a url: keyWill Jessop2019-07-082-5/+24
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | fixes #36610
* | | | | | | | Merge pull request #36616 from kamipo/dont_use_alias_for_grouped_fieldRyuta Kamizono2019-07-082-1/+8
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Do not use aliases in GROUP BY clause
| * | | | | | | | Do not use aliases in GROUP BY clauseRyuta Kamizono2019-07-082-1/+8
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears that Oracle does not allow using aliases in GROUP BY clause unlike ORDER BY clause. Fixes #36613.
* | | | | | | | Implement ActiveStorage::Blob#attachable_plain_text_representationGeorge Claghorn2019-07-072-0/+9
| |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes that file attachments without captions would not be represented in plain text generated from rich-text content, causing ActionText::RichText#present? to return false. Closes #36607.
* | | | | | | Should `Regexp.escape` quoted table name in regexRyuta Kamizono2019-07-087-115/+51
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | It is for agnostic test case, since quoted table name may include `.` for all adapters, and `[` / `]` for sqlserver adapter.
* | | | | | Merge pull request #36443 from jhawthorn/as_parallelization_process_nameJohn Hawthorn2019-07-061-0/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | Set process title of parallelized test workers
| * | | | | | Set process name of parallelized test workersJohn Hawthorn2019-06-071-0/+11
| | | | | | |
* | | | | | | Merge pull request #36602 from jhawthorn/system_testing_preload_2John Hawthorn2019-07-063-4/+14
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix Browser#preload for older Selenium
| * | | | | | | Bump minimum selenium-webdriver versionJohn Hawthorn2019-07-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #36424, we need an newer version in order to pass.
| * | | | | | | Fix Browser#preload for older SeleniumJohn Hawthorn2019-07-041-2/+12
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Older versions of selenium had driver_path on ::Selenium::WebDriver::Chrome directly, not on Service. This avoids errors on those old versions and will preload properly if webdrivers is installed.
* | | | | | | Merge pull request #36604 from kamipo/fix_schema_dumping_enumRyuta Kamizono2019-07-076-7/+55
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | MySQL: Fix schema dumping `enum` and `set` columns correctly
| * | | | | | | MySQL: Fix schema dumping `enum` and `set` columns correctlyRyuta Kamizono2019-07-056-7/+55
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `enum` and `set` are typed cast as `:string`, but currently the `:string` type is incorrectly reused for schema dumping. A cast type on columns is not always the same with `sql_type`, this fixes schema dumping `enum` and `set` columns to use `sql_type` instead of `type` correctly.
* | | | | | | Merge pull request #36605 from jmondo/patch-3Ryuta Kamizono2019-07-061-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | Update docs on dirty.rb [ci skip]
| * | | | | | Update docs on dirty.rbJohn Gesimondo2019-07-051-1/+1
|/ / / / / / | | | | | | | | | | | | `previously_changed` seems to actually be `previous_changes`
* | | | | | Merge pull request #36592 from jhawthorn/system_testing_preloadJohn Hawthorn2019-07-044-0/+29
|\ \ \ \ \ \ | | | | | | | | | | | | | | Preload browser driver_path to fix system testing under parallelism
| * | | | | | Preload browser driver_path for system testingJohn Hawthorn2019-07-034-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The webdrivers gem configures Selenium::WebDriver::Service.driver_path as a proc which updates the web drivers and returns their path. This commit introduces SystemTesting::Browser#preload, which runs this proc early. This ensures that webdrivers update is run before forking for parallel testing, but doesn't explicitly tie us to that gem (and I think anything configured as driver_path probably makes sense to eager-load).
* | | | | | | Fix a typo by removing extra article [ci skip]jacobherrington2019-07-041-1/+1
| | | | | | |
* | | | | | | Merge pull request #36594 from jacobherrington/doc/rephrase-ski-ci-instructionsPrem Sichanugrist2019-07-041-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Update docs regarding skipping CI tests [ci skip]
| * | | | | | Update docs regarding skipping CI tests [ci skip]jacobherrington2019-07-031-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The phrasing of this struck we as odd, "To help our CI servers..." So I feel it would be more useful if we explain more explicitly that ci skip cuts down on usage by not running CI.
* | | | | | Merge pull request #36585 from tr4b4nt/patch-1Eileen M. Uchitelle2019-07-031-1/+1
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Fix swapped replica/primary in multi-db docs [ci skip]
| * | | | | Replace replica with primary in automatic connection switching after write ↵tr4b4nt2019-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in multi-db docs [ci skip] Reads after write should be from the primary database.
* | | | | | Merge pull request #36534 from y-yagi/fixes_35137Yuji Yaginuma2019-07-037-12/+120
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Add the ability to set the CSP nonce only to the specified directives
| * | | | | Add the ability to set the CSP nonce only to the specified directivesyuuji.yaginuma2019-06-227-12/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I changed to set CSP nonce to `style-src` directive in #32932. But this causes an issue when `unsafe-inline` is specified to `style-src` (If a nonce is present, a nonce takes precedence over `unsafe-inline`). So, I fixed to nonce directives configurable. By configure this, users can make CSP as before. Fixes #35137.
* | | | | | Revert "Merge pull request #36582 from f1337/master"Ryuta Kamizono2019-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 60e19c6d6cb60159af4e2247f29d2cea375a21d6, reversing changes made to 72e257b4c935b6829f7d4db36dea61a1682aa44e. The method signature is different between `create_file` and `template`. https://www.rubydoc.info/github/erikhuda/thor/master/Thor/Actions#create_file-instance_method https://www.rubydoc.info/github/erikhuda/thor/master/Thor/Actions#template-instance_method
* | | | | | Merge pull request #36582 from f1337/masterRyuta Kamizono2019-07-021-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | [skip ci] use 'template' instead of 'create_file' for erb templates in generators guide
| * | | | | | use 'template' instead of 'create_file' for erb templates in generators ↵Michael R Fleet2019-07-011-2/+2
|/ / / / / / | | | | | | | | | | | | | | | | | | guide [skip ci]
* | | | | | bumps ZeitwerkXavier Noria2019-06-302-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version makes eager loading and autoloading consistent, as documented in the upgrading guide.
* | | | | | adds two sections to the upgrading notes for autoloading [skip ci]Xavier Noria2019-06-301-0/+16
| | | | | |
* | | | | | Make `bin/setup` test pass even if the database does not existyuuji.yaginuma2019-06-301-1/+1
| | | | | |
* | | | | | Link to top of PR as well as other links [ci skip]yuuji.yaginuma2019-06-291-1/+1
| | | | | |
* | | | | | Add "SCHEMA" to the query in `configure_connection` like as other adaptersRyuta Kamizono2019-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes to be able to ignore the query in `assert_queries` even if accidentally reconnected a connection. https://buildkite.com/rails/rails/builds/61917#4c49187a-3173-4d5c-8a8d-d65768f5bfc9/1000-1799
* | | | | | warning: instance variable @serial not initialized (#36556)utilum2019-06-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced in bba7c63a663b073034f4c73f0d59655751694e5a Before: ``` $ TESTOPTS="-n=/test_yaml_dump_and_load/" bundle exec rake test:postgresql :scisors: ... :scisors: Using postgresql Run options: -n=/test_yaml_dump_and_load/ --seed 36896 /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized /home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15: warning: instance variable @serial not initialized . Finished in 0.195325s, 5.1197 runs/s, 35.8376 assertions/s. 1 runs, 7 assertions, 0 failures, 0 errors, 0 skips ``` Co-authored-by: Ryuta Kamizono <kamipo@gmail.com>
* | | | | | Merge pull request #36565 from rails/fix-url-configsEileen M. Uchitelle2019-06-273-2/+33
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix broken url configs
| * | | | | | Fix broken url configseileencodes2019-06-273-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR is to fix #36559 but I also found other issues that haven't been reported. The check for `(config.size == 1 && config.values.all? { |v| v.is_a? String })` was naive. The only reason this passed was because we had tests that had single hash size configs, but that doesn't mean we don't want to create a hash config in other cases. So this now checks for `config["database"] || config["adapter"] || ENV["DATABASE_URL"]`. In the end for url configs we still get a UrlConfig but we need to pass through the HashConfig to create the right kind of UrlConfig. The UrlConfig's are really complex and I don't necessarily understand everything that's needed in order to act the same as Rails 5.2. I edited the connection handler test to demonstrate how the previous implementation was broken when checking config size. Now old and new tests pass so I think this is closer to 5.2. Fixes #36559
* | | | | | | Address to "DEPRECATION WARNING: Uniqueness validator will no longer enforce ↵Ryuta Kamizono2019-06-281-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | case sensitive comparison in Rails 6.1" Caused by #36210.