aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Support HTTP Range downloads from diskGeorge Claghorn2018-07-153-20/+30
| | | | Closes #32193.
* Merge pull request #33337 from utilum/stub_with_minitest_not_mochaRyuta Kamizono2018-07-166-461/+699
|\ | | | | Stub with minitest not mocha
| * Stub with Minitest instead of Mochautilum2018-07-156-461/+699
| | | | | | | | Step 4 in #33162
* | Merge pull request #33366 from ahorek/fix_selectorRyuta Kamizono2018-07-161-1/+7
|\ \ | | | | | | fix test_should_impose_childless_html_tags_in_html failure with JRuby
| * | test_should_impose_childless_html_tags_in_html failure with JRubypavel2018-07-151-1/+7
| |/
* | Merge pull request #33365 from ↵Ryuta Kamizono2018-07-161-4/+4
|\ \ | |/ |/| | | | | | | | | lanzhiheng/fix-document-issue-about-active-record-callbacks-after_touch Fix document issue in active record callback about `after_touch` hook. [ci skip]
| * Fix document issue in active record callback about `after_touch` hook.lanzhiheng2018-07-151-4/+4
|/
* Merge pull request #33361 from jhubert/bugfix/fix-added-string-attributesEileen M. Uchitelle2018-07-142-1/+7
|\ | | | | Fix regression in use of string attribute in the added? method
| * Ensure attribute is a symbol in the added? methodJeremy Baker2018-07-142-1/+7
| |
* | Merge pull request #33360 from ↵Eileen M. Uchitelle2018-07-141-0/+6
|\ \ | |/ |/| | | | | jedrekdomanski/Update-active-record-querying-readme Update documentation for #pluck method [ci skip]
| * Update documentation for #pluck method [ci skip]Jędrek Domański2018-07-141-0/+6
|/
* Clear attachment changes on reloadGeorge Claghorn2018-07-133-0/+20
|
* Implement ActiveStorage::Attached::{One,Many}#attach in terms of changesGeorge Claghorn2018-07-137-67/+183
|
* Fix that detaching could purgeGeorge Claghorn2018-07-134-2/+34
|
* Fix analyzing new blobs from uploaded files on attachGeorge Claghorn2018-07-133-18/+120
|
* Merge pull request #33340 from ttanimichi/patch-1Rafael França2018-07-121-1/+1
|\ | | | | [ci skip] `sanitizer_vendor` will be removed in Rails 6
| * [ci skip] `sanitizer_vendor` will be removed in Rails 6Tsukuru Tanimichi2018-07-111-1/+1
| | | | | | Related to https://github.com/rails/rails/pull/24386#issuecomment-403926683
* | Merge pull request #33341 from Edouard-chin/ec-fix-to-paramRafael França2018-07-124-5/+35
|\ \ | | | | | | e4e1b62 broke `to_param` handling:
| * | e4e1b62 broke `to_param` handling:Edouard CHIN2018-07-124-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - There was an issue inside controller tests where order params were not respected, the reason was because we were calling `Hash#to_query` which sorts the results lexicographically. 1e4e1b62 fixed that issue by not using `to_query` but instead a utility function provided by rack. - However with the fix came another issue where it's now no longer possible to do this ``` post :foo, params: { user: User.first } # Prior to the patch the controller will receive { "user" => "1" } # Whereas now you get { "user": "#<User: ...>" } ``` The fix in this PR is to modify `Hash#to_query` to sort only when it doesn't contain an array structure that looks something like "bar[]" Ref https://github.com/rails/rails/pull/33341#issuecomment-404039396
* | | Merge pull request #33350 from kamipo/address_blank_lines_automaticallyRafael França2018-07-1217-30/+3
|\ \ \ | | | | | | | | Enable `Layout/EmptyLinesAroundBlockBody` to reduce review cost in the future
| * | | Enable `Layout/EmptyLinesAroundBlockBody` to reduce review cost in the futureRyuta Kamizono2018-07-1217-30/+3
| | |/ | |/| | | | | | | | | | | | | | | | We sometimes ask "✂️ extra blank lines" to a contributor in reviews like https://github.com/rails/rails/pull/33337#discussion_r201509738. It is preferable to deal automatically without depending on manpower.
* | | Discard ActiveStorage::PurgeJobs for missing blobsGeorge Claghorn2018-07-112-0/+29
| | |
* | | Remove overly-broad retry in ActiveStorage::PurgeJobGeorge Claghorn2018-07-111-3/+0
| | | | | | | | | | | | We've never intentionally tripped this retry in production. Add retries for specific errors as needed.
* | | Merge pull request #28327 from rngtng/add-seed-dependencyRafael França2018-07-112-1/+6
|\ \ \ | |/ / |/| | Add missing env & config dependency to `rake db:seed`
| * | Add missing load config dependency to `rake db:seed`Tobias Bielohlawek2018-07-102-1/+6
| | |
* | | Merge pull request #33336 from bogdanvlviv/fix-stubbed-methods-in-test-casesRafael França2018-07-102-3/+3
|\ \ \ | | | | | | | | Fix stubbed methods in test cases
| * | | Fix stubbed methods in test casesbogdanvlviv2018-07-102-3/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove returning of `false` value for stubbed `lock_thread=` methods since there aren't any needs in it. Remove unnecessary returning of `true` for stubbed `drop_database` method. Follow up #33309. Related to #33162, #33326.
* | | Merge pull request #33326 from utilum/replace_shallow_mocks_with_rubyRyuta Kamizono2018-07-105-18/+47
|\ \ \ | | | | | | | | Replace shallow mocks with Ruby classes
| * | | Replace shallow mocks with Ruby classesutilum2018-07-105-18/+47
|/ / / | | | | | | | | | | | | | | | | | | While preparing this I realised that some stubbed returns values serve no purpose, so this patch drops those as well. Step 3 in #33162
* / / Avoid unneeded expanded column aliases array cachingRyuta Kamizono2018-07-102-8/+5
|/ /
* | Merge pull request #33322 from utilum/test_value_instead_of_method_callRafael França2018-07-093-18/+24
|\ \ | | | | | | Reduce mocking by testing value instead of method call
| * | Reduce mocking by testing value instead of method callutilum2018-07-093-18/+24
|/ / | | | | | | Step 2 in #33162
* | Merge pull request #33309 from utilum/remove_unnecessary_mocha_stubsRafael França2018-07-095-48/+18
|\ \ | |/ |/| Remove unnecessary Mocha stubs
| * Remove unnecessary Mocha stubsutilum2018-07-075-48/+18
| | | | | | | | | | | | Step 1 in #33162 [utilum + bogdanvlviv]
* | Merge pull request #33308 from anniecodes/notes-command-changelogRafael França2018-07-091-0/+19
|\ \ | | | | | | Add rake notes and SOURCE_ANNOTATION_DIRECTORIES deprecation to Changelog
| * | Add deprecations related to `rails notes` command to ChangelogAnnie-Claude Côté2018-07-091-0/+19
| | | | | | | | | | | | | | | | | | | | | * SOURCE_ANNOTATION_DIRECTORIES deprecation * Deprecation of `rake notes`, use `rails notes` instead * Deprecation of `rails notes:custom ANNOTATION=custom`, `rails notes:optimize`, `rails notes:todo`, and `rails notes:fixme` in favor of passing `-annotations` or `-a` to `rails notes` * They have all been deprecrated in https://github.com/rails/rails/pull/33220
* | | SQLite: Don't leak internal schema objectsRyuta Kamizono2018-07-093-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related #31201. If creating custom primary key (like a string) in SQLite, it would also create an internal index implicitly which named begin with "sqlite_". It need to be hidden since the internal object names are reserved and prohibited for public use. See https://www.sqlite.org/fileformat2.html#intschema Fixes #33320.
* | | Subsecond precision is not supported until MySQL 5.6.4Ryuta Kamizono2018-07-092-19/+19
| | |
* | | Merge pull request #33280 from nkondratyev/fix/mysql-time-default-valuesRyuta Kamizono2018-07-094-4/+20
|\ \ \ | | | | | | | | | | | | Fix default value for mysql time types with specified precision
| * | | Fix default value for mysql time types with specified precisionNikolay Kondratyev2018-07-044-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TIME, DATETIME, and TIMESTAMP types [have supported](https://mariadb.com/kb/en/library/microseconds-in-mariadb/) a fractional seconds precision from 0 to 6. Default values from time columns with specified precision is read as `current_timestamp(n)` from information schema. rake `db:schema:dump` produces `schema.rb` **without** default values for time columns with the specified precision: t.datetime "last_message_at", precision: 6, null: false rake `db:schema:dump` produces `schema.rb` **with** default values for time columns with the specified precision: t.datetime "last_message_at", precision: 6, default: -> { "current_timestamp(6)" }, null: false
* | | | Merge pull request #28266 from Stellenticket/allow_disable_server_stdout_loggingKasper Timm Hansen2018-07-082-2/+21
|\ \ \ \ | | | | | | | | | | rails server: Allow to explicitly specify whether to output Rails's log to stdout
| * | | | Allow to explicitly specify whether to output Rails' log to stdoutMarkus Doits2018-07-082-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before Rails' logger output is mirrored to std out if: * environment is development and * the process is not daemonized It was not possible to change that behaviour, e.g. to disable log output in that case or enable it in other cases. Now you can explicitly disable or enable output with the new command line switch `--log-to-stdout`, regardless of any other circumstances. ``` // enable output in production rails server -e production --log-to-stdout // disable output in development rails server -e development --no-log-to-stdout ``` Enabling output when daemonized still makes no sense (since tty is detached), but this is ignored for now. If the command line flag is not specified, old behaviour still applies, so this change is completely backward compatible.
* | | | | Merge pull request #33319 from bogdanvlviv/rubocop-offense-single-quotesKasper Timm Hansen2018-07-081-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fix rubocop offense introduced in 161ed37
| * | | | | Fix rubocop offense introduced in 161ed37bogdanvlviv2018-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We prefer double quotes over single quotes. Fixes: ``` railties/lib/rails/commands/server/server_command.rb:279:39: C: Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoi d extra backslashes for escaping. original_options.concat [ '-u', using ] ``` Related to 161ed37d7120e1f391eed19e49a3390e53e4fe91
* | | | | | Raise an ArgumentError instead of a RuntimeErrorGeorge Claghorn2018-07-083-3/+3
| |/ / / / |/| | | |
* | | | | Merge pull request #33318 from ↵Kasper Timm Hansen2018-07-082-0/+28
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | lxxxvi/multiple_expressions_in_assert_no_difference Documentation and some tests for `assert_no_difference`
| * | | | added tests for assert_no_difference with multiple expressionslxxxvi2018-07-082-0/+28
| | |_|/ | |/| |
* | | | Merge pull request #33317 from ↵Kasper Timm Hansen2018-07-085-23/+23
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | bogdanvlviv/has_secure_password-use-recovery_password-instead-of-activation_token has_secure_password: use `recovery_password` instead of `activation_token`
| * | | | has_secure_password: use `recovery_password` instead of `activation_token`bogdanvlviv2018-07-085-23/+23
|/ / / / | | | | | | | | | | | | | | | | | | | | Since we have `has_secure_token`, it is too confusing to use `_token` suffix with `has_secure_password`. Context https://github.com/rails/rails/pull/33307#discussion_r200807185
* | | | Store newly-uploaded files on save rather than assignmentGeorge Claghorn2018-07-0722-679/+1049
| | | |