aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #10464 from arkiver/masterRafael Mendonça França2013-05-042-2/+2
|\ | | | | Fix to remove warning in postgres adapter test
| * fix to remove warning on postgres adapter test.Akshay Khole2013-05-051-1/+1
| | | | | | | | | | Warning was: "/vagrant/rails/activerecord/test/cases/adapters/postgresql/uuid_test.rb:63: warning: ambiguous first argument; put parentheses or even spaces"
| * Changing method call according to coding conventionsAkshay Khole2013-05-051-1/+1
|/
* Merge pull request #10463 from prathamesh-sonpatki/dirRafael Mendonça França2013-05-041-1/+1
|\ | | | | dir -> directory [ci skip]
| * dir -> directory [ci skip]Prathamesh Sonpatki2013-05-041-1/+1
|/
* Use Ruby 1.9 syntaxRafael Mendonça França2013-05-041-2/+2
|
* Review the CHANGELOG entry [ci skip]Rafael Mendonça França2013-05-041-1/+2
|
* Merge pull request #10448 from arunagw/bug-fix-scaffold-generator-masterRafael Mendonça França2013-05-043-0/+20
|\ | | | | Fixes Scaffold generator with --assets=false
| * Fixes Scaffold generator with --assets=falseArun Agrawal2013-05-043-0/+20
|/ | | | | | Scaffold generator with --assets=false option outputs an error See #9525
* Merge pull request #10458 from bwbuchanan/issue-10451Rafael Mendonça França2013-05-043-2/+18
|\ | | | | Make SchemaDumper emit "id: :uuid" when using UUID primary keys
| * Make SchemaDumper emit "id: :uuid" when appropriate. Fixes #10451.Brian Buchanan2013-05-033-2/+18
| |
* | Merge pull request #10436 from NARKOZ/keep-imagesRafael Mendonça França2013-05-043-0/+6
|\ \ | | | | | | generate 'app/assets/images' directory when creating new rails app. Fixes #10434
| * | generate 'app/assets/images' directory when creating new rails appNihad Abbasov2013-05-043-0/+6
| | |
* | | Merge pull request #10461 from rwz/masterRafael Mendonça França2013-05-042-2/+2
|\ \ \ | | | | | | | | Relaxed jbuilder dependency in Gemfile template
| * | | Relaxed jbuilder dependency in Gemfile templatePavel Pravosud2013-05-043-3/+3
| | | |
* | | | Merge pull request #10457 from zenspider/squishy_test_order_dependenciesAaron Patterson2013-05-034-6/+27
|\ \ \ \ | | | | | | | | | | Fixed bad tests to clean up after themselves.
| * | | | Fixed bad tests to clean up after themselves.Ryan Davis2013-05-034-6/+27
|/ / / /
* | | | Merge pull request #10452 from rubys/rails_version_testRafael Mendonça França2013-05-031-0/+5
|\ \ \ \ | | | | | | | | | | Add a test case for comparing Rails versions
| * | | | Add a test case for comparing Rails versionsSam Ruby2013-05-031-0/+5
| | |_|/ | |/| | | | | | | | | | https://github.com/rails/rails/commit/558d402472b49c4c99bf6753d341d7aef2e25dd4
* / | | Squashed commit of the following:Aaron Patterson2013-05-0317-174/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2683de5da85135e8d9fe48593ff6167db9d64b18 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:29:20 2013 -0700 cannot support infinite ranges right now commit cebb6acef2c3957f975f6db4afd849e535126253 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:26:12 2013 -0700 reverting infinity comparison commit 385f7e6b4efd1bf9b89e8d607fcb13e5b03737ea Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:23:28 2013 -0700 Revert "Added ability to compare date/time with infinity" This reverts commit 38f28dca3aa16efd6cc3af6453f2e6b9e9655ec1. Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/core_ext/numeric/infinite_comparable.rb activesupport/test/core_ext/date_ext_test.rb activesupport/test/core_ext/date_time_ext_test.rb activesupport/test/core_ext/numeric_ext_test.rb activesupport/test/core_ext/time_ext_test.rb activesupport/test/core_ext/time_with_zone_test.rb commit 0d799a188dc12b18267fc8421675729917610047 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:18:53 2013 -0700 Revert "Refactor infinite comparable definition a bit" This reverts commit dd3360e05e4909f2f0c74a624cccc2def688f828. commit 42dec90e49745bbfae546f0560b8783f6b48b074 Author: Aaron Patterson <aaron.patterson@gmail.com> Date: Fri May 3 11:18:47 2013 -0700 Revert "Require 'active_support/core_ext/module/aliasing' in the infinite_comparable module" This reverts commit 7003e71c13c53ec3d34250560fbf80b8381df693.
* | | Fix generating route from engine to other enginePiotr Sarnacki2013-05-033-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A regression was introduced in 5b3bb6, generating route from within an engine to an another engine resulted in prefixing a path with the SCRIPT_NAME value. The regression was caused by the fact that SCRIPT_NAME should be appended only if it's the SCRIPT_NAME for the application, not if it's SCRIPT_NAME from the current engine. closes #10409
* | | Merge pull request #9426 from exviva/nested_attributes_reuse_existing_new_recordJon Leighton2013-05-034-11/+75
|\ \ \ | | | | | | | | Do not overwrite manually built records during one-to-one nested attribute assignment
| * | | Do not overwrite manually built records during one-to-one nested attribute ↵Olek Janiszewski2013-05-034-11/+75
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assignment For one-to-one nested associations, if you build the new (in-memory) child object yourself before assignment, then the NestedAttributes module will not overwrite it, e.g.: class Member < ActiveRecord::Base has_one :avatar accepts_nested_attributes_for :avatar def avatar super || build_avatar(width: 200) end end member = Member.new member.avatar_attributes = {icon: 'sad'} member.avatar.width # => 200
* | | Merge pull request #10417 from jholton/fix_association_auto_saveJon Leighton2013-05-033-12/+34
|\ \ \ | | | | | | | | autosave_association issue that occurs when table has unique index (resubmission)
| * | | destroys association records before saving/inserting new association recordsJohnny Holton2013-05-023-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes bug introduced by #3329 These are the conditions necessary to reproduce the bug: - For an association, autosave => true. - An association record is being destroyed - A new association record is being created. - There is a unique index one of the association's fields. - The record being created has the same value as the record being destroyed on the indexed field. Before, the deletion of records was postponed until after all insertions/saves. Therefore the new record with the identical value in the indexed field caused a non-unique value error to be thrown at the database level. With this fix, the deletions happen first, before the insertions/saves. Therefore the record with the duplicate value is gone from the database before the new record is created, thereby avoiding the non-uniuqe value error.
* | | | Merge pull request #10413 from vipulnsward/change_groupingCarlos Antonio da Silva2013-05-031-1/+1
|\ \ \ \ | | | | | | | | | | Use faster Array.new instead of []*padding
| * | | | Use faster Array.new instead of []*paddingVipul A M2013-05-021-1/+1
| | | | |
* | | | | Revert "Merge pull request #10433 from ↵Jon Leighton2013-05-031-33/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wangjohn/making_callbacks_more_performant" This reverts commit 09751fdc847c25237891a8fcb0c2312e39bbe86d, reversing changes made to 6a5ab08d21c4284a05f5e34484b18a91d4e5c50c. This change caused a failure in actionpack/test/abstract/callbacks_test.rb.
* | | | | Work around change in how MiniTest detects SIGINFOJon Leighton2013-05-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MiniTest 4.7.3 detects the presence of SIGINFO and stores the answer in a constant. It seems that MiniTest 4.7.4 changes this, and instead relies on an info_signal method being implemented on the runner object. In ActiveSupport::Testing::Isolation, we use ProxyTestResult to stand in for the runner object. This object implements `method_missing`, and as such its #info_signal method has a truthy return value. This results in MiniTest trying to install the SIGINFO handler on platforms where SIGINFO does not exists. To fix, I am simply defining an explicit ProxyTestResult#info_signal method.
* | | | | Fix broken mysql testJon Leighton2013-05-032-32/+22
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test_mysql_integer_not_null_defaults in test/cases/defaults_test.rb was failing. This test relies on the connection being in strict mode. By default a new connection is not in strict mode, but Active Record automatically places it in strict mode. ActiveSchemaTest overwrites the connection's #execute method in order to prevent SQL statements from actually being executed. One of the operations which is performed in ActiveSchema test is a #recreate_database. Since 2088bf27981137a2c6c8b2f718f33b417b4045af, recreate_database on mysql or mysql2 will trigger a reconnect. Due to the implementation of the hacking of #execute in ActiveSchemaTest, this reconnect would take place, but the connection would *not* be placed in strict mode because #execute had been overridden to prevent SQL queries hitting the database. Therefore, after ActiveSchemaTest, the connection would no longer be in strict mode, causing test_mysql_integer_not_null_defaults to fail. I don't think that the way that ActiveSchemaTest is implemented is particularly nice or clean, but I have taken steps to make its hacks more isolated - it now create a separate connection object which is thrown away after the test, and the hacks are applied on the singleton class of this object.
* | | | Merge pull request #10424 from markevich/fix_test_prepareRafael Mendonça França2013-05-022-3/+11
|\ \ \ \ | | | | | | | | | | Restore ActiveRecord connection to original environment after rake:db:test:prepare task.
| * | | | rake:db:test:prepare falls back to original environment after execution.markevich2013-05-022-3/+11
| | | | |
* | | | | Merge pull request #10433 from wangjohn/making_callbacks_more_performantRafael Mendonça França2013-05-021-11/+33
|\ \ \ \ \ | | | | | | | | | | | | Improving the performance of callbacks
| * | | | | Improving the performance of callbacks by keeping a hash of thewangjohn2013-05-021-11/+33
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | callbacks in the CallbackChain, so you don't have to iterate over all callbacks when checking for duplicates. Benchmark results when the tests in activerecord/test/cases/associations_test.rb were run with and without the change: == On master (when scanning all of the callbacks): --------------------------------------------------------- % cumulative self self total time seconds seconds calls ms/call ms/call name --------------------------------------------------------- 1.85 9.26 0.82 18412 0.04 0.05 ActiveSupport::Callbacks::Callback#matches? 1.22 12.32 0.54 18412 0.03 0.08 ActiveSupport::Callbacks::Callback#duplicates? 0.93 14.61 0.41 19600 0.02 0.21 ActiveSupport::Callbacks::CallbackChain#remove_duplicates Finished tests in 1.217065s, 30.4010 tests/s, 53.4072 assertions/s. --------------------------------------------------------- == On my branch (when using a hash to check callback duplication): --------------------------------------------------------- % cumulative self self total time seconds seconds calls ms/call ms/call name --------------------------------------------------------- 0.15 29.63 0.06 1188 0.05 0.72 ActiveSupport::Callbacks::CallbackChain#handle_duplicates 0.00 40.50 0.00 84 0.00 0.12 ActiveSupport::Callbacks::Callback#matches? 0.00 40.50 0.00 84 0.00 0.12 ActiveSupport::Callbacks::Callback#duplicates? 0.00 40.50 0.00 91 0.00 0.22 ActiveSupport::Callbacks::CallbackChain#scan_and_remove_duplicates Finished tests in 1.117757s, 33.1020 tests/s, 58.1522 assertions/s. ---------------------------------------------------------
* | | | | Merge pull request #10430 from larskanis/add_sslcompression_to_pg_adapterRafael Mendonça França2013-05-021-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Add parameter :sslcompression to PostgreSQL adapter.
| * | | | | Add parameter :sslcompression to PostgreSQL adapter.Lars Kanis2013-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | It is new in PostgreSQL-9.2 .
* | | | | | Merge pull request #10426 from tkrajcar/rescue-h1-fixCarlos Antonio da Silva2013-05-021-0/+6
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Add styling to h1 for default rescue layout
| * | | | | Add styling to h1Tim Krajcar2013-05-021-0/+6
| | | | | |
* | | | | | Merge pull request #10423 from wangjohn/refactoring_testing_rakefileRafael Mendonça França2013-05-021-18/+4
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Refactoring the creation of TestTasks to remove code duplication.
| * | | | | Refactoring the creation of TestTasks to remove code duplication.wangjohn2013-05-021-18/+4
|/ / / / /
* | | | | Merge pull request #10416 from tkhr/add-test-for-AR--Base#to_paramCarlos Antonio da Silva2013-05-021-1/+6
|\ \ \ \ \ | | | | | | | | | | | | Add test for `AR::Base#to_param`
| * | | | | Add test for `AR::Base#to_param`Takehiro Adachi2013-05-021-1/+6
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the doc of `AR::Base#to_param`( https://github.com/rails/rails/blob/04cda1848cb847c2bdad0bfc12160dc8d554 7775/activerecord/lib/active_record/integration.rb#L18 ), it returns `nil` if the record is not persisted.
* | | | | Merge pull request #10412 from vipulnsward/fix_callback_test_typoCarlos Antonio da Silva2013-05-021-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fix typo in test
| * | | | | Fix typo in testVipul A M2013-05-021-1/+1
| | |_|/ / | |/| | |
* | | | | Merge pull request #10414 from eiel/fix_dependencyXavier Noria2013-05-023-0/+3
|\ \ \ \ \ | |_|/ / / |/| | | | Fixes Dependency bug in Active Support
| * | | | Fixes Dependency bug in Active SupportTomohiko Himura2013-05-023-0/+3
|/ / / / | | | | | | | | | | | | DateTime defined in date.rb
* | | | Remove not used module from initializable testCarlos Antonio da Silva2013-05-011-9/+1
| | | |
* | | | Fix failures in AS with minitest 4.7.4Carlos Antonio da Silva2013-05-011-0/+3
| | | |
* | | | Merge pull request #10396 from tkhr/extract-test-code-from-base_test.rbCarlos Antonio da Silva2013-05-012-73/+82
|\ \ \ \ | | | | | | | | | | Extract tests code out from AR's base_test.rb to integration_test.rb
| * | | | Extract tests code out from AR's base_test.rb to integration_test.rbTakehiro Adachi2013-05-022-73/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `AR::Base#to_param` and `AR::Base#cache_key` is defined at active_record/integration.rb, so tests for those methods should be at integration_test.rb