aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | 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
* | | | | Merge pull request #10408 from ↵Rafael Mendonça França2013-05-0143-349/+351
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | patricksrobertson/convert_activemodel_to_new_hash_syntax Convert ActiveModel to 1.9 hash syntax.
| * | | | | Convert ActiveModel to 1.9 hash syntax.Patrick Robertson2013-05-0143-349/+351
|/ / / / / | | | | | | | | | | | | | | | | | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ).
* | | | | Merge pull request #7839 from ↵Aaron Patterson2013-05-017-9/+70
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | chancancode/handle_aliased_attributes_in_ar_relation Handle aliased attributes in AR::Relation
| * | | | | Handle aliased attributes in ActiveRecord::Relation.Godfrey Chan2013-05-017-9/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using symbol keys, ActiveRecord will now translate aliased attribute names to the actual column name used in the database: With the model class Topic alias_attribute :heading, :title end The call Topic.where(heading: 'The First Topic') should yield the same result as Topic.where(title: 'The First Topic') This also applies to ActiveRecord::Relation::Calculations calls such as `Model.sum(:aliased)` and `Model.pluck(:aliased)`. This will not work with SQL fragment strings like `Model.sum('DISTINCT aliased')`. Github #7839 *Godfrey Chan*
* | | | | | Improve docs for postgresql with uuid primary keys [ci skip]Carlos Antonio da Silva2013-05-012-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | Introduced in 09ac1776abc0d3482f491f2d49f47bcb3d9a4ad7.
* | | | | | Merge pull request #10407 from NARKOZ/encoding-constantCarlos Antonio da Silva2013-05-011-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Use constant for encoding
| * | | | | use constant for encodingNihad Abbasov2013-05-021-1/+1
| | |_|/ / | |/| | |
* | | | | Merge pull request #10404 from chadmoone/fix-pg-uuid-defaultRafael Mendonça França2013-05-012-1/+61
|\ \ \ \ \ | | | | | | | | | | | | Allow override of PostgreSQL UUID primary key default
| * | | | | allow override of uuid_generate_v4() default by passing default: nilChad Moone2013-05-012-1/+61
| |/ / / / | | | | | | | | | | | | | | | without this, it's not possible to use UUID primary keys without uuid-ossp installed and activated
* | | | | Merge pull request #10405 from rubys/410-betaGuillermo Iguaran2013-05-011-2/+2
|\ \ \ \ \ | |/ / / / |/| | | | Make railties version match RAILS_VERSION
| * | | | Make railties version match RAILS_VERSIONSam Ruby2013-05-011-2/+2
|/ / / /
* | | | Merge pull request #10394 from BMorearty/remove-varargs-from-inGuillermo Iguaran2013-05-013-31/+10
|\ \ \ \ | |_|/ / |/| | | Remove varargs from `Object#in?`
| * | | Revert the guide after removing varargs from `in?`.Brian Morearty2013-05-011-2/+1
| | | |
| * | | Revert "Object#in? also accepts multiple parameters"Brian Morearty2013-05-012-29/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ebf69ab1636df74c76332c53bcd3d8494fb91b45. `in?` must not take multiple parameters because its behavior would be ambiguous: # Test if "B" is included in a list of names with `"B".in?(*names)`: names = ["BMorearty"] "B".in?(*names) # => true names = ["BMorearty","rubyduo"] "B".in?(*names) # => false Conflicts: activesupport/lib/active_support/core_ext/object/inclusion.rb activesupport/test/core_ext/object/inclusion_test.rb
* | | | Fix failing AP testCarlos Antonio da Silva2013-05-011-1/+1
| |/ / |/| |
* | | Revert "Consistent use of code syntax formatting for boolean values"Xavier Noria2013-05-011-7/+7
| | | | | | | | | | | | | | | | | | Same rationale as previous revert. This reverts commit 887225e69b6cdd27f00cf043c4ac918ca5e18cbf.
* | | Revert "Correct formatting for remaining booleans"Xavier Noria2013-05-011-21/+21
|/ / | | | | | | | | | | | | It is not in the contract that flags have to be singletons, the use of regular font indicates that. This reverts commit 80036f9a5341bd831d125dc684841a8433d92070.
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-05-0136-380/+334
|\ \
| * | copy edits [ci skip]Vijay Dev2013-05-012-2/+2
| | |
| * | routes.rb should teach how to use concernsThiago Pinto2013-05-011-0/+7
| | |
| * | Correct formatting for remaining booleansJonathan Roes2013-04-301-21/+21
| | |
| * | more naming fixes.Yves Senn2013-04-305-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | * it's Action Mailer not ActionMailer * it's Action Pack not ActionPack * it's Active Support not ActiveSupport /cc @fxn
| * | it's Active Record not ActiveRecordYves Senn2013-04-308-8/+13
| | | | | | | | | | | | /cc @fxn
| * | Consistent use of code syntax formatting for boolean valuesJonathan Roes2013-04-301-7/+7
| | |
| * | Move 2 images to getting_started folder. All other images in getting started ↵Richard Owen2013-04-283-2/+2
| | | | | | | | | | | | guide already in this folder.