aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* do not restart the service, just stop itAaron Patterson2014-07-171-1/+0
|
* only parallelize on forking systemsAaron Patterson2014-07-171-1/+1
|
* Disable some tests on SQLiteRafael Mendonça França2014-07-171-77/+77
| | | | | These tests were passing before because the precision were not using to cast the value. Not it is being used so it would fail on sqlite3
* Prefer if/else for this caseRafael Mendonça França2014-07-171-3/+2
| | | | | One of the branches is using a proc to check if the value respond_to a method so it is better to not do case comparations
* Merge pull request #16188 from marianovalles/fix_rational_to_decimal_type_castRafael Mendonça França2014-07-173-9/+38
|\ | | | | | | Fix rational to decimal on type_cast_from_user
| * Fix decimal_test module and add new test for object responding to to_dMariano Valles2014-07-162-7/+15
| |
| * Fix case statement to use ::Numeric and ::StringMariano Valles2014-07-163-18/+25
| |
| * Change class evaluation for Rationals in cast_valueMariano Valles2014-07-162-5/+7
| |
| * Fix rational to decimal on type_cast_from_userMariano Valles2014-07-162-1/+13
| |
* | [EXPERIMENTAL] run actionpack tests in parallelAaron Patterson2014-07-171-0/+57
| | | | | | | | | | only on forking systems though. Feel free to revert this if it causes problems.
* | `recall` should be `path_parameters`, also make it requiredAaron Patterson2014-07-171-3/+3
| | | | | | | | | | | | | | | | "recall" is a terrible name. This variable contains the parameters that we got from the path (e.g. for "/posts/1" it has :controller => "posts", :id => "1"). Since it contains the parameters we got from the path, "path_parameters" is a better name. We always pass path_parameters to `generate`, so lets make it required.
* | pass the route name to define_url_helperAaron Patterson2014-07-173-23/+26
| | | | | | | | | | this allows us to avoid 2 hash allocations per named helper definition, also we can avoid a `merge` and `delete`.
* | Make restore_attributes publicRafael Mendonça França2014-07-172-10/+20
| | | | | | | | | | | | | | Also make it accept a list of attributes to be changed. This will make possible to restore only a subset of the changed attributes. Closes #16203
* | use a strategy object for generating urls in named helpersAaron Patterson2014-07-172-21/+37
| | | | | | | | | | | | since we know that the route should be a path or fully qualified, we can pass a strategy object that handles generation. This allows us to eliminate an "if only_path" branch when generating urls.
* | helper methods are public, so we can just call themAaron Patterson2014-07-171-4/+4
| | | | | | | | | | also if you want a path from a named helper, you should call helper_path, not helper_url(:only_path => true).
* | docs, `select` and friends with `multiple=true` include a blank string.Yves Senn2014-07-171-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [Jonas Baumann & Yves Senn] The submitted params from a select with `multiple: true` look as follows: ``` {post: {category: [""]}} {post: {category: ["", "Category 1", "Category 2"]}} ``` This is a follow up to #1552.
* | Merge pull request #16198 from eileencodes/remove-need-for-macro-instance-varMatthew Draper2014-07-181-11/+14
|\ \ | | | | | | Remove need for macro instance var
| * | Remove need for macro instance vareileencodes2014-07-171-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | Same as we did for collection, removed the `@macro` instance var and it is now set in each association. Unfortunately it can't be left undefined in AssociationReflection so it has to be set there. For now I am setting it to NotImplementedError since there is no default macro and it changes based on the reflection type.
* | | Merge pull request #16205 from davejachimiak/remove_profile_and_benchmark_pointMatthew Draper2014-07-171-1/+0
|\ \ \ | |/ / |/| | Remove "profile and benchmark" line from command line guide
| * | Remove "profile and benchmark" line from command line guideDave Jachimiak2014-07-171-1/+0
|/ / | | | | | | The profiling and benchmarking commands are no longer built into Rails.
* | Merge pull request #16201 from noinkling/masterGodfrey Chan2014-07-161-5/+5
|\ \ | | | | | | Fix broken list formatting in API docs [ci skip]
| * | Fix broken list formatting [ci skip]noinkling2014-07-171-5/+5
| | |
* | | 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).