aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Track the version-compatible config settings inside railtiesMatthew Draper2017-03-187-59/+60
| | | | | | | | | | | | | | | | Instead of forcing new applications to carry an initializer that just switches things to what their default "should" be, we can handle it internally. The initializer is then only used by upgraders: it shows what the new default would be (commented out), while their upgraded application continues to operate as it did before. Under this model, a multiply-upgraded application could accumulate several new_framework_defaults_*.rb files, for each release series it has traversed. A given release series only needs to generate the latest, though, because we don't support `rails app:upgrade` while skipping releases.
* Merge pull request #28341 from mtsmfm/pass-options-to-driven-byRafael França2017-03-173-4/+6
|\ | | | | Pass options to `driven_by`
| * Pass options to `driven_by`Fumiaki MATSUSHIMA2017-03-133-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Capybara drivers can handle some options such like `url`. ### before ``` # test/test_helper.rb Capybara.register_driver :remote_chrome do |app| Capybara::Selenium::Driver.new(app, browser: :chrome, url: "http://example.com/wd/hub") end # test/application_system_test_case.rb class ApplicationSystemTestCase < ActionDispatch::SystemTestCase driven_by :remote_chrome end ``` ### after ``` # test/application_system_test_case.rb class ApplicationSystemTestCase < ActionDispatch::SystemTestCase driven_by :selenium, using: :chrome, screen_size: [1400, 1400], options: {url: "http://chrome:4444/wd/hub"} end ```
* | Merge pull request #28318 from ↵Rafael França2017-03-175-49/+4
|\ \ | | | | | | | | | | | | bogdanvlviv/remove-ability-update-locking_column-value Remove ability update locking_column value
| * | Remove ability update locking_column valuebogdanvlviv2017-03-165-49/+4
| | |
* | | Add :default option to belongs_to (#28453)George Claghorn2017-03-175-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use it to specify that an association should be initialized with a particular record before validation. For example: # Before belongs_to :account before_validation -> { self.account ||= Current.account } # After belongs_to :account, default: -> { Current.account }
* | | Bump Capybara and include Minitest::Assertionseileencodes2017-03-174-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Capybara was updated in teamcapybara/capybara#1841 to use Minitest style assertions so that system test output shows x number of assertions, x numbe of failures, etc. Before: ``` 6 runs, 0 assertions, 0 failures, 0 errors, 0 skips ``` After: ``` 6 runs, 7 assertions, 1 failures, 0 errors, 0 skips ``` This change bumps Capybara from 2.7.0 to 2.13.0 and includes the required minitest assertion file in the test case. :tada:
* | | Cleanup documentation fixes (#28460)Vipul A M2017-03-172-5/+5
| | |
* | | Merge pull request #28421 from tangposmarvin/docs-assest-pipelineVipul A M2017-03-171-1/+1
|\ \ \ | | | | | | | | Fix guide incorrectly refers to public/assets/images [ci ckip]
| * | | Fix asset_pipeline docs incorrect image dir infomarvin2017-03-161-1/+1
| | | |
* | | | Merge pull request #28444 from budnik/patch-2Vipul A M2017-03-171-4/+3
|\ \ \ \ | | | | | | | | | | Updates incorrect documentation [ci skip]
| * | | | Updates incorrect documentation [ci skip]Dmitriy Budnik2017-03-161-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Looking on code for this method it's clear that it's just returns `response.status` instead of full `response` object. It's better to correct docs as probably lots of specs are relying on this behavior.
* | | | | Merge pull request #28445 from denniszelada/feature-documentation-with_optionsVipul A M2017-03-171-0/+11
|\ \ \ \ \ | |/ / / / |/| | | | Add documentation to use with_options anywhere in the same class [ci
| * | | | Add documentation to use with_options in the same class [ci skip]Dennis Zelada2017-03-161-0/+11
| | | | |
* | | | | Fix test warningsAndrew White2017-03-161-5/+5
| | | | |
* | | | | Move `to_time` to `DateTime` compatibility.rb fileAndrew White2017-03-164-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are overriding it in `Time` and `ActiveSupport::TimeWithZone` so there's no point in having it in the `DateAndTime::Compatibility` module. Also add some docs for the `to_time` implementations.
* | | | | Merge pull request #28147 from kmcphillips/master-time-freezeAndrew White2017-03-166-22/+206
|\ \ \ \ \ | |_|_|/ / |/| | | | Allow Time#to_time on frozen objects. Return frozen time rather than "RuntimeError: can't modify frozen Time"
| * | | | Handle #to_time and memoization taking into account memoization, frozen ↵Kevin McPhillips2017-03-066-22/+206
| | | | | | | | | | | | | | | | | | | | state, and preserve_timezone flag.
* | | | | Merge pull request #28368 from y-yagi/add_test_for_secrets_commandKasper Timm Hansen2017-03-151-0/+13
|\ \ \ \ \ | | | | | | | | | | | | Add secrets edit test
| * | | | | Add secrets edit testyuuji.yaginuma2017-03-121-0/+13
| | | | | |
* | | | | | Tweak 28412Jon Moss2017-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR was merged before I could finished reviewing :grimacing: [ci skip]
* | | | | | Remove unnecessary params mungingAndrew White2017-03-152-2/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 9b654d4 some params munging was added to ensure that they were set whenever `recognize_path` would call either a proc or callable constraint. Since we no longer mutate the environment hash within the method it's now unnecessary and actually causes params to leak between route matches before checking constraints. Fixes #28398.
* | | | | | Revert #27850 following test breakage (#28427)David Heinemeier Hansson2017-03-153-19/+7
| | | | | |
* | | | | | Merge pull request #28426 from mtsmfm/fix-fragile-testRafael França2017-03-151-36/+34
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix fragile test (`AssociationProxyTest#test_save_on_parent_saves_children`)
| * | | | | | Fix fragile test (`AssociationProxyTest#test_save_on_parent_saves_children`)Fumiaki MATSUSHIMA2017-03-161-36/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we run only following tests: - test/cases/scoping/default_scoping_test.rb - test/cases/associations_test.rb ``` $ cat Rakefile.test require "rake/testtask" ENV["ARCONN"] = "postgresql" Rake::TestTask.new do |t| t.libs << "test" t.test_files = %w( test/cases/scoping/default_scoping_test.rb test/cases/associations_test.rb ) end ``` a test will fail: ``` $ bundle exec rake test -f Rakefile.test /app/activesupport/lib/active_support/core_ext/enumerable.rb:20: warning: method redefined; discarding old sum Using postgresql Run options: --seed 11830 # Running: .........................................................................................F................ Finished in 6.939055s, 15.2759 runs/s, 27.9577 assertions/s. 1) Failure: AssociationProxyTest#test_save_on_parent_saves_children [/app/activerecord/test/cases/associations_test.rb:185]: Expected: 1 Actual: 2 106 runs, 194 assertions, 1 failures, 0 errors, 0 skips rake aborted! Command failed with status (1) /usr/local/bin/bundle:22:in `load' /usr/local/bin/bundle:22:in `<main>' Tasks: TOP => test (See full trace by running task with --trace) ``` In #28083, change `self.use_transactional_tests` to `false` but we forget to clean-up fixture. However we don't have to disable transaction except a few tests.
* | | | | | | Merge pull request #28425 from rails/remove-duration-deprecationAndrew White2017-03-155-38/+214
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Remove implicit coercion deprecation of durations
| * | | | | | | Restore 5.minutes changed in #28204Andrew White2017-03-151-1/+1
| | | | | | | |
| * | | | | | | Use better duration aliases in testsAndrew White2017-03-151-2/+2
| | | | | | | |
| * | | | | | | Remove implicit coercion deprecation of durationsAndrew White2017-03-153-35/+211
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #28204 we deprecated implicit conversion of durations to a numeric which represented the number of seconds in the duration because of unwanted side effects with calculations on durations and dates. This unfortunately had the side effect of forcing a explicit cast when configuring third-party libraries like expiration in Redis, e.g: redis.expire("foo", 5.minutes) To work around this we've removed the deprecation and added a private class that wraps the numeric and can perform calculation involving durations and ensure that they remain a duration irrespective of the order of operations.
* | | | | | | Merge pull request #28412 from benoittgt/add_doc_for_message_encryptor_newRafael França2017-03-151-0/+5
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Add documentation about signature_key for MessageEncryptor.new [ci skip]
| * | | | | | Add documentation about signature_key for MessageEncryptor.new [ci skip]Benoit Tigeot2017-03-151-0/+5
| | | | | | |
* | | | | | | Merge pull request #28423 from eugeneius/rm_txnRichard Schneeman2017-03-152-2/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Remove unused `@txn` variable
| * | | | | | | Remove unused `@txn` variableEugene Kenny2017-03-152-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was added in c24c885209ac2334dc6f798c394a821ee270bec6, removed in b89ffe7f0047eb614e42232a21201b317b880755, and then (unintentionally?) reintroduced in 2d7ae1b08ee2a10b12cbfeef3a6cc6da55b57df6.
* | | | | | | | Merge pull request #28409 from y-yagi/make_destroy_command_work_within_enginesEileen M. Uchitelle2017-03-152-2/+57
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Make destroy command work within engines
| * | | | | | | | Make destroy command work within enginesyuuji.yaginuma2017-03-142-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of calling methods of Rails.application directly, we need to use a method that is considered for the rails engine.
* | | | | | | | | Merge pull request #28422 from ↵Kasper Timm Hansen2017-03-151-7/+7
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | y-yagi/rename_app_update_test_to_more_appropriate_name Rename test of `app:update` to more appropriate name
| * | | | | | | | Rename test of `app:update` to more appropriate nameyuuji.yaginuma2017-03-151-7/+7
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `rails:update` was changed to `app:update` in 6fb31638c8b61731103d4963272755b217a2df87. Therefore, I think that it is better that the test name is also `app_update`.
* | | | | | / / Don't cast to float unnecessarilyAndrew White2017-03-151-2/+2
| |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | Adding durations to `Time` instances is perfectly okay.
* | | | | | | Merge pull request #28420 from claudiob/changelog-skip-coffeeClaudio B2017-03-141-0/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add CHANGELOG entry for --skip-coffee [ci skip]
| * | | | | | | Add CHANGELOG entry for --skip-coffee [ci skip]claudiob2017-03-141-0/+4
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | Was added in #25248 by @bluesh55
* | | | | | | Merge pull request #28410 from fphilipe/remove-obsolete-warning-in-guidesRyuta Kamizono2017-03-141-3/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Remove obsolete warning about regular expression
| * | | | | | | Remove obsolete warning about regular expressionPhilipe Fatio2017-03-141-3/+0
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This warning became obsolete when the regular expression was changed to use `\z` instead of `\Z` in fce9c4e5e1ecb31cff2ca43a04fbe332816c3c45. "-1234\n" =~ /\A[+-]?\d+\Z/ => 0 "-1234\n" =~ /\A[+-]?\d+\z/ => nil [ci skip]
* | | | | | | Revert "Merge pull request #28369 from ↵Matthew Draper2017-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mylake/reduce-postgresql-adapter-memory-bloat" This reverts commit 192db64452d148c7b51713979459e38407380dc6, reversing changes made to 9893955363cf6358556ed3b36f4538d5b54e9d17. We can't sacrifice correctness for performance.
* | | | | | | Merge pull request #28407 from claudiob/changelog-skip-pipelineRichard Schneeman2017-03-131-0/+17
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add CHANGELOG for #26226 [ci skip]
| * | | | | | | Add CHANGELOG for #26226 [ci skip]claudiob2017-03-131-0/+17
| | | | | | | |
* | | | | | | | Merge pull request #28369 from mylake/reduce-postgresql-adapter-memory-bloatRafael França2017-03-131-2/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | 500x memory reduction of 10k schemas for postgresql adapter
| * | | | | | | | Use “distinct” to filter redundant types from pg_typeto reduce memory ↵mylake2017-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bloat especially in multi-schema structure database
* | | | | | | | | Merge pull request #28356 from jasl/patch-1Rafael França2017-03-131-9/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Remove non-exists method delegation
| * | | | | | | | | Remove non-exists method delegation and correct docjasl2017-03-111-9/+1
| | | | | | | | | |
* | | | | | | | | | Merge pull request #28068 from kamipo/refactor_data_sourcesRafael França2017-03-138-205/+156
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Extract `data_source_sql` to refactor data source statements