aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | subclass Rails::EngineAaron Patterson2014-07-161-1/+2
|/ / / / / / / /
* | | | | | | | extract path building to a methodAaron Patterson2014-07-161-9/+11
| | | | | | | |
* | | | | | | | break out path building logic to methodsAaron Patterson2014-07-161-14/+22
| | | | | | | |
* | | | | | | | only extract :params from the options hash onceAaron Patterson2014-07-161-3/+2
| | | | | | | |
* | | | | | | | we do not need to dup the options hash, it is private and a new object each callAaron Patterson2014-07-161-2/+2
| | | | | | | |
* | | | | | | | push rails app testing upAaron Patterson2014-07-161-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this way we only have to test for whether it is a rails app once.
* | | | | | | | Rails-ish apps should descend from Rails::RailtieAaron Patterson2014-07-164-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use an is_a check to ensure it's a Railsish app so we can avoid respond_to calls everywhere.
* | | | | | | | app should always be a class (I suppose)Aaron Patterson2014-07-161-1/+1
| | | | | | | |
* | | | | | | | we should be checking if the app is a classAaron Patterson2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hopefully `object.class` always returns something that is_a?(Class), so the previous logic didn't really make sense.
* | | | | | | | Merge pull request #16197 from cgriego/patch-1Rafael Mendonça França2014-07-161-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Remove unused 1:1 association :remote option
| * | | | | | | | Remove unused 1:1 association :remote optionChris Griego2014-07-161-1/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | This option is unused, left over from pre-1.0 Rails to internally distinguish the location of the foreign key.
* | | | | | | | Merge pull request #16196 from yahonda/mysql_restrict_testMatthew Draper2014-07-172-8/+6
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Revert "Rename to test_mysql_strict_mode_disabled_dont_override_global_sql_mode"
| * | | | | | | | Revert "Rename to test_mysql_strict_mode_disabled_dont_override_global_sql_mode"Yasuo Honda2014-07-172-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit babc24c1b07c1fd58b9b3249b0256f9b0d45c0f0. Conflicts: activerecord/test/cases/adapters/mysql/connection_test.rb activerecord/test/cases/adapters/mysql2/connection_test.rb
* | | | | | | | | Merge pull request #16195 from jonatack/patch-7Matthew Draper2014-07-171-4/+4
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix typos in string_ext_test.rb
| * | | | | | | | | Fix typos in string_ext_test.rb [ci skip]Jon Atack2014-07-161-4/+4
|/ / / / / / / / /
* | | | | | | | | Merge remote-tracking branch 'origin/master'Rafael Mendonça França2014-07-164-7/+62
|\ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ Merge pull request #16190 from oss92/word_truncationMatthew Draper2014-07-173-0/+49
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Word truncation
| | * | | | | | | | | Added truncate_words method to activesupport stringsroot2014-07-163-0/+45
| | | | | | | | | | |
| * | | | | | | | | | extract inner options before delegating to the helperAaron Patterson2014-07-161-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we extract the options from the user facing method call ASAP, then we can simplify internal logic.
* | | | | | | | | | | Use &= instead of select with include?Rafael Mendonça França2014-07-161-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The performance is almost the same with both implementations but this is clear. Before this patch: Calculating ------------------------------------- small erb template 1452 i/100ms ------------------------------------------------- small erb template 17462.1 (±13.3%) i/s - 85668 in 5.031395s .Calculating ------------------------------------- small erb template with 1 partial 887 i/100ms ------------------------------------------------- small erb template with 1 partial 8899.6 (±18.8%) i/s - 42576 in 5.009453s .Calculating ------------------------------------- small erb template with 2 partials 666 i/100ms ------------------------------------------------- small erb template with 2 partials 6821.5 (±8.8%) i/s - 33966 in 5.020791s After the patch: Calculating ------------------------------------- small erb template 1479 i/100ms ------------------------------------------------- small erb template 15956.6 (±7.6%) i/s - 79866 in 5.036001s .Calculating ------------------------------------- small erb template with 1 partial 841 i/100ms ------------------------------------------------- small erb template with 1 partial 9242.2 (±6.9%) i/s - 46255 in 5.029497s .Calculating ------------------------------------- small erb template with 2 partials 615 i/100ms ------------------------------------------------- small erb template with 2 partials 6524.7 (±6.8%) i/s - 32595 in 5.020456s You can find the benchmark code at https://gist.github.com/rafaelfranca/dee31120cfdb1ddc3b56
* | | | | | | | | | | Merge pull request #15917 from luke-gru/actionview_perfRafael Mendonça França2014-07-161-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | remove Set.new from DetailsKey::get, impacts rendering overhead
| * | | | | | | | | | remove Set.new from DetailsKey::get, impacts rendering overhead performanceLuke Gruber2014-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using ruby-prof, I noticed that Set#add had the largest 'self time' percentage (5% of the overall time spent rendering) when benchmarking the rendering of a small cached ERB template that was 3 lines long. It turns out it was from this line. I don't believe the Set is necessary, either. Removing this line increases the rendering ips using Benchmark::ips accordingly.
* | | | | | | | | | | Merge pull request #15944 from seuros/uuidRafael Mendonça França2014-07-163-1/+51
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Treat invalid uuid as nil Conflicts: activerecord/CHANGELOG.md
| * | | | | | | | | | | Treat invalid uuid as nilAbdelkader Boudih2014-07-143-1/+51
| | | | | | | | | | | |
* | | | | | | | | | | | Merge pull request #16183 from goddamnhippie/fix-psych-warningRafael Mendonça França2014-07-162-0/+6
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Implement required #encode_with
| * | | | | | | | | | | | Move #encode_with to RelationGustavo Beathyate2014-07-152-4/+5
| | | | | | | | | | | | |
| * | | | | | | | | | | | Implement required #encode_withGustavo Beathyate2014-07-152-0/+5
| | |_|_|_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While running the spec `ARCONN=mysql2 ruby -v -Itest test/cases/yaml_serialization_test.rb` the following warning shows up: `implementing to_yaml is deprecated, please implement "encode_with"`
* | | | | | | | | | | | always transcode the file to utf-8Aaron Patterson2014-07-162-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | people may be passing filenames to the constructor that are not utf-8, but they will assome that calling `original_filename` returns utf-8 (because that's what it used to do).
* | | | | | | | | | | | Merge pull request #15718 from chancancode/regression_from_15694Godfrey Chan2014-07-162-1/+10
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a regression introduced in 84cf156
| * | | | | | | | | | | | Fixed a regression introduced in 84cf156Godfrey Chan2014-06-142-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 84cf156 (PR #15694) introduced a subtle regression. There are actually three distinct entry points to creating an AR object – via .new (i.e. #initialize), via #init_with (e.g. from YAML or database queries) and via .allocate. With the patch in 84cf156, attribute methods and respond_to? will not work correctly when objects are allocated directly, without going through either The reason this test case didn't catch the regression was that the `Topic` class is shared between test cases, so by the time this test case is ran the attribute methods are very likely to be defined. Switching to use a fresh anonymous class in the test to ensure we surface this problem in the future.
* | | | | | | | | | | | | Fix typo on the variable nameRafael Mendonça França2014-07-161-8/+8
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge branch 'joeljunstrom-local-iterator-for-partial-collections'Rafael Mendonça França2014-07-167-18/+125
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squash and merge #7698 doing some improvements to the original implementation.
| * | | | | | | | | | | | | Add CHANGELOG entry for PartialIteration.Rafael Mendonça França2014-07-161-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #7698.
| * | | | | | | | | | | | | Document the PartialIteration objectRafael Mendonça França2014-07-161-3/+9
| | | | | | | | | | | | | |
| * | | | | | | | | | | | | Build only one PartialIteration object for loopRafael Mendonça França2014-07-162-16/+26
| | | | | | | | | | | | | |
| * | | | | | | | | | | | | No need to have a file to PartialIteration classRafael Mendonça França2014-07-163-23/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is only used on the PartialRenderer.
| * | | | | | | | | | | | | Added PartialIteration class used when rendering collectionsJoel Junström2014-07-167-14/+99
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iteration object is available as the local variable "template_name_iteration" when rendering partials with collections. It gives access to the +size+ of the collection beeing iterated over, the current +index+ and two convinicence methods +first?+ and +last?+ "template_name_counter" variable is kept but is deprecated. [Joel Junström + Lucas Uyezu]
* | | | | | | | | | | | | Remove unused fixturesRafael Mendonça França2014-07-1660-98/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These fixtures are not used in actionpack tests.
* | | | | | | | | | | | | nodoc enum hooks [ci skip]Rafael Mendonça França2014-07-161-2/+2
| | | | | | | | | | | | |
* | | | | | | | | | | | | Don't accept parameters as argument for redirect to [via @homakov]Santiago Pastorino2014-07-162-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #16170
* | | | | | | | | | | | | we intend to keep the `capture` helper for Active Record tests.Yves Senn2014-07-161-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow up to f8f5cdc
* | | | | | | | | | | | | Active Record tests still depend on `capture`. Let's keep it for now.Yves Senn2014-07-162-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to 3121412 /cc @rafaelfranca This will remove deprecation warnings from the PostgreSQL suite: ``` DEPRECATION WARNING: #capture(stream) is deprecated and will be removed in the next release. (called from capture at /Users/senny/Projects/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:89) /Users/senny/Projects/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:89:in `capture' /Users/senny/Projects/rails/activerecord/test/cases/adapters/postgresql/composite_test.rb:73:in `ensure_warning_is_issued' /Users/senny/Projects/rails/activerecord/test/cases/adapters/postgresql/composite_test.rb:48:in `test_column' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest/test.rb:106:in `block (3 levels) in run' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest/test.rb:204:in `capture_exceptions' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest/test.rb:103:in `block (2 levels) in run' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest/test.rb:256:in `time_it' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest/test.rb:102:in `block in run' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:317:in `on_signal' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest/test.rb:276:in `with_info_handler' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest/test.rb:101:in `run' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:759:in `run_one_method' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:293:in `run_one_method' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:287:in `block (2 levels) in run' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:286:in `each' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:286:in `block in run' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:317:in `on_signal' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:306:in `with_info_handler' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:285:in `run' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:149:in `block in __run' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:149:in `map' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:149:in `__run' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:126:in `run' /Users/senny/Projects/rails/.bundle/gems/minitest-5.3.3/lib/minitest.rb:55:in `block in autorun' ```
* | | | | | | | | | | | | Merge pull request #16187 from jone/testing-guide-assertionsYves Senn2014-07-161-2/+13
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update assertion methods in testing guide [ci skip]
| * | | | | | | | | | | | | link minitest assertions documentation.Jonas Baumann2014-07-161-2/+7
| | | | | | | | | | | | | |
| * | | | | | | | | | | | | document assert[_not]_empty, assert[_not]_includes, assert[_not]_predicate ↵Jonas Baumann2014-07-161-0/+6
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in testing guide.
* | | | | | | | | | | | | use foreign key DSL in our tests.Yves Senn2014-07-162-5/+4
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #16138 from sgrif/sg-attribute-set-keyYves Senn2014-07-163-10/+10
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | AttributeSet#include? -> AttributeSet#key?
| * | | | | | | | | | | | | AttributeSet#include? -> AttributeSet#key?Sean Griffin2014-07-113-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/rails/rails/pull/15868/files#r14135210
* | | | | | | | | | | | | | Fix 1.9. uggghhhhhh get it together @tenderlove :bomb:Aaron Patterson2014-07-151-2/+2
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | fix for 1.9 kwargs syntaxAaron Patterson2014-07-151-1/+2
| | | | | | | | | | | | | |