aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Extract `quoted_binary` and use it rather than override `_quote`Ryuta Kamizono2016-09-274-20/+17
| | | | | | | Each databases have different binary representation. Therefore all adapters overrides `_quote` for quoting binary. Extract `quoted_binary` for quoting binary and use it rather than override `_quote`.
* Merge pull request #26629 from kamipo/fix_doc_formatJon Moss2016-09-261-3/+3
|\ | | | | Fix doc format for `RecordFetchWarning` [ci skip]
| * Fix doc format for `RecordFetchWarning` [ci skip]Ryuta Kamizono2016-09-271-3/+3
| |
* | Merge pull request #26414 from rails/rails-commandsKasper Timm Hansen2016-09-2638-766/+1005
|\ \ | | | | | | Initial Rails Commands Infrastructure
| * | Apply test command changes.Kasper Timm Hansen2016-09-261-1/+3
| | |
| * | Fix server command tests.Kasper Timm Hansen2016-09-251-1/+2
| | |
| * | Fix dbconsole tests.Kasper Timm Hansen2016-09-252-28/+59
| | |
| * | Apply Rafaels review fixes.Kasper Timm Hansen2016-09-253-3/+4
| | |
| * | Fix console tests.Kasper Timm Hansen2016-09-253-7/+33
| | |
| * | Remove the old command files.Kasper Timm Hansen2016-09-2514-880/+0
| | | | | | | | | | | | | | | Wash out your old! These adhoc scripts are replaced by the new commands.
| * | Per Dr. Eileen's orders :)Kasper Timm Hansen2016-09-253-5/+7
| | | | | | | | | | | | Prescribed some review fixes for myself!
| * | Simplify auxiliary command files directory finding.Kasper Timm Hansen2016-09-251-1/+1
| | | | | | | | | | | | | | | Still vulnerable to different file structures. We likely want something more robust when we tackle in app commands.
| * | Run engine commands through command infrastructure.Kasper Timm Hansen2016-09-256-14/+54
| | |
| * | Initial command structure.Kasper Timm Hansen2016-09-2525-160/+1176
| | |
* | | Use xor to avoid allocations in `AR::Core#hash`Sean Griffin2016-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is not as good a solution as actually hashing both values, but Ruby doesn't expose that capability other than allocating the array. Unless we were to do something silly like have a thread local array that is re-used, I don't see any other way to do this without allocation. This solution may not be perfect, but it should reasonably avoid collisions to the extent that we need.
* | | Merge pull request #26626 from alexcameron89/pg_result_docMatthew Draper2016-09-261-1/+1
|\ \ \ | |_|/ |/| | [ci skip] Update PG adapter documentation
| * | [ci skip] Update PG adapter documentationAlex Kitchens2016-09-261-1/+1
|/ / | | | | | | | | | | | | | | Per discussion in pull request #26622: "Let's change it to PG::Error. The more specific classes mentioned are subclasses, and the fact the raised exception is a PG::UndefinedColumn doesn't change the fact that it's also a PG::Error." - matthewd
* | Merge pull request #26622 from alexcameron89/pg_result_docJon Moss2016-09-251-4/+4
|\ \ | | | | | | [ci skip] Clarify Postgresql Documentation
| * | [ci skip] Clarify Postgresql DocumentationAlex Kitchens2016-09-251-4/+4
| | | | | | | | | | | | | | | This clarifies the object that +ActiveRecord::Base.connection.execute+ will return when using Postgresql.
* | | Merge pull request #26579 from y-yagi/remove_unnecessary_rails_env_settingKasper Timm Hansen2016-09-252-4/+0
|\ \ \ | | | | | | | | remove unnecessary `RAILS_ENV` setting
| * | | remove unnecessary `RAILS_ENV` settingyuuji.yaginuma2016-09-222-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `RAILS_ENV` is always set in the initialization process of test runner. https://github.com/rails/rails/blob/9fa07095a35be2d8cb5adcc992b988e73a6d9719/railties/lib/rails/test_unit/minitest_plugin.rb#L74 Therefore, it is not necessary to set in `test_helper`.
* | | | Merge pull request #26619 from maclover7/jm-a502703-notesJon Moss2016-09-251-0/+3
|\ \ \ \ | |_|_|/ |/| | | Add info about a502703 to Rails 5 release notes
| * | | Add info about a502703 to Rails 5 release notesJon Moss2016-09-251-0/+3
| | | | | | | | | | | | | | | | [ci skip]
* | | | Use autorun when running via Rake.Kasper Timm Hansen2016-09-251-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes sure we get support for `Minitest.after_run` hooks and don't accidentally run tests twice. Requires overriding minitest `run` to respect the TESTOPTS variable.
* | | | fffffff, Add code missing in 29f0fbdKasper Timm Hansen2016-09-251-2/+2
| | | |
* | | | Revise setting of run_with_rails_extension.Kasper Timm Hansen2016-09-253-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Rails test runner supports three ways to run tests: directly, via rake, or ruby. When Running with Ruby ala `ruby -Itest test/models/post_test.rb` our test file would be evaluated first, requiring `test_helper` and then `active_support/testing/autorun` that would then require the test file (which it hadn't been before) thus reevaluating it. This caused exceptions if using Active Support's declarative syntax. Fix this by shifting around when we set the how we're run to closer mimick the require order. If we're running with `bin/rails test` the test command file is run first and we then set `run_with_rails_extension`, later we hit `active_support/testing/autorun` and do nothing — because we've been run elsewhere. If we at this point haven't set `run_with_rails_extension` we've been running with `ruby` this whole time and thus we set that. We should always trigger `Minitest.autorun` as it doesn't hurt to call it twice. Consolidate the two methods into a single one that better brings out the intent of why they're there.
* | | | Require `active_support/testing/autorun`.Kasper Timm Hansen2016-09-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revise the require in the test command to use `active_support/testing/autorun` and spare us the minitest spec syntax as detailed in 5da4d51. Also move the require to the top of the file for consistency with the rest of Rails' requires across the project.
* | | | Merge pull request #26613 from adamcrown/save-validate-rdoc-formattingप्रथमेश Sonpatki2016-09-251-2/+2
|\ \ \ \ | |_|_|/ |/| | | Fix code formatting in `#save` RDoc [ci skip]
| * | | Fix code formatting in `#save` RDoc [ci skip]Adam Crownoble2016-09-251-2/+2
|/ / / | | | | | | Noticed that the `validate: false` option for `ActiveRecord::Persistence#save` and `#save!` were not formatted as code like the other examples in the documentation.
* | | Merge pull request #26610 from mechanicles/as-to-active-supportJon Moss2016-09-241-1/+1
|\ \ \ | | | | | | | | AS => Active Support [ci skip]
| * | | AS => Active Support [ci skip]Santosh Wadghule2016-09-251-1/+1
| | | |
* | | | Merge pull request #26597 from tbalthazar/26580Andrew White2016-09-243-1/+51
|\ \ \ \ | | | | | | | | | | Fix ActiveSupport::TimeWithZone#in
| * | | | Fix ActiveSupport::TimeWithZone#inThomas Balthazar2016-09-243-1/+51
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously calls to `in` were being sent to the non-DST aware method `Time#since` via `method_missing`. It is now aliased to the DST aware `ActiveSupport::TimeWithZone#+` which handles transitions across DST boundaries, e.g: Time.zone = "US/Eastern" t = Time.zone.local(2016,11,6,1) # => Sun, 06 Nov 2016 01:00:00 EDT -05:00 t.in(1.hour) # => Sun, 06 Nov 2016 01:00:00 EST -05:00
* | | | Merge pull request #26515 from grosser/grosser/after_runArthur Nogueira Neves2016-09-233-4/+40
|\ \ \ \ | |_|/ / |/| | | support minitest after_run
| * | | switch to autorun to support after_run and patch lessMichael Grosser2016-09-231-3/+1
| | | |
| * | | support minitest after_run for parity to regular minitestMichael Grosser2016-09-163-1/+25
| | | | | | | | | | | | | | | | see https://github.com/seattlerb/minitest/blob/f9605387e4af7d657921a83aaf0ae364f6d26a57/lib/minitest.rb#L51-L65
| * | | improve test coverageMichael Grosser2016-09-162-4/+18
| | | |
* | | | Merge pull request #26607 from matthewd/skip-fixture-pathMatthew Draper2016-09-242-1/+9
|\ \ \ \ | | | | | | | | | | Only search fixture_path for files that can't be found directly
| * | | | Only search fixture_path for files that can't be found directlyMatthew Draper2016-09-242-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When passed an already-valid file name, prepending the path is likely to create problems. This is particularly relevant for #26384, which adds fixture_path handling to test classes that previously didn't have it: any existing caller must have been manually locating the file, and we don't want to break them.
* | | | | Merge pull request #26591 from philipqnguyen/changelog-fix-etag-templateClaudio B2016-09-231-0/+8
|\ \ \ \ \ | |/ / / / |/| | | | Add #25546 and #25817 to changelog [ci skip]
| * | | | Add #25546 and #25817 to changelog [ci skip]Philip Nguyen2016-09-231-0/+8
| | |/ / | |/| |
* | | | Merge pull request #26605 from mjhoy/fix-controller-tests-guides-get-actionप्रथमेश Sonpatki2016-09-241-4/+4
|\ \ \ \ | | | | | | | | | | Fix docs for allowed params to `get` in controller tests [ci skip]
| * | | | Fix docs for allowed params to `get` in controller tests [ci skip]Michael Hoy2016-09-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #26602 Relevant method documentation: https://github.com/rails/rails/blob/abe3da9f12710ea85be69b17172bef41220037fc/actionpack/lib/action_dispatch/testing/integration.rb#L14-L43
* | | | | Merge pull request #25670 from tdtran/fix-nil-jsonAaron Patterson2016-09-234-1/+41
|\ \ \ \ \ | | | | | | | | | | | | Serialize JSON attribute value nil as SQL NULL, not JSON 'null'
| * | | | | Serialize JSON attribute value nil as SQL NULL, not JSON 'null'Trung Duc Tran2016-09-234-1/+41
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | Test: JSON attribute value nil can be used in where(attr: nil) Add changelog entry
* | | | | Merge pull request #26563 from knugie/fix_issue_26430Aaron Patterson2016-09-231-0/+1
|\ \ \ \ \ | |/ / / / |/| | | | Prevent circular require of proxy_wrappers.rb, Fixes #26430
| * | | | Prevent circular require of proxy_wrappers.rb, Fixes #26430Wolfgang Teuber2016-09-211-0/+1
| | |_|/ | |/| |
* | | | Merge pull request #26595 from prathamesh-sonpatki/fix-26593Aaron Patterson2016-09-233-4/+12
|\ \ \ \ | | | | | | | | | | Return true if attribute is not changed for update_attribute
| * | | | Return true if attribute is not changed for update_attributePrathamesh Sonpatki2016-09-233-4/+12
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - If the attribute is not changed, then update_attribute does not run SQL query, this effectively means that no change was made to the attribute. - This change was made in https://github.com/rails/rails/commit/0fcd4cf5 to avoid a SQL call. - But the change resulted into `nil` being returned when there was no change in the attribute value. - This commit corrects the behavior to return true if there is no change in attribute value. This is same as previous behavior of Rails 4.2 plus benefit of no additional SQL call. - Fixes #26593.
* | | | Merge pull request #26594 from y-yagi/fix_formatting_of_define_callbacksVipul A M2016-09-231-4/+4
|\ \ \ \ | |_|/ / |/| | | fix formatting of `define_callbacks` doc [ci skip]