aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* * Don't eagerly require Rails' minitest plugin.Kasper Timm Hansen2017-07-101-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making the Rails minitest behave like a standard minitest plugin we're much more likely to not break when people use other minitest plugins. Like minitest-focus and pride. To do this, we need to behave like minitest: require files up front and then perform the plugin behavior via the at_exit hook. This also saves us a fair bit of wrangling with test file loading. Finally, since the environment and warnings options have to be applied as early as possible, and since minitest loads plugins at_exit, they have to be moved to the test command. * Don't expect the root method. It's likely this worked because we eagerly loaded the Rails minitest plugin and that somehow defined a root method on `Rails`. * Assign a backtrace to failed exceptions. Otherwise Minitest pukes when attempting to filter the backtrace (which Rails' backtrace cleaner then removes). Means the exception message test has to be revised too. This is likely caused by the rails minitest plugin now being loaded for these tests and assigning a default backtrace cleaner.
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-023-3/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-013-0/+3
|
* Adds missing minor doc about tools/test.rb [ci skip]Marc Ignacio2017-06-212-1/+3
| | | | ... and minor typo fix
* Prevent a redefinition warning when the real Rails.root appearsMatthew Draper2017-05-261-2/+3
|
* Prevent multiple values being set to `run_via`yuuji.yaginuma2017-02-181-1/+1
| | | | | When executing the test via rake, since `rake` is set for `run_via`, `ruby` should not be set. Related 2cb6c27310452da11b93d729c3b760ce988106e1
* make work bin/test scripts with line filteryuuji.yaginuma2016-12-171-0/+3
| | | | | `Rails::LineFiltering` is not automatically loaded, need to load it explicitly. Ref: 797f1dd, b6f935b
* update bin/test scripts to prevent double runs.Yves Senn2016-11-211-0/+2
| | | | | The test runner was updated to make use of autorun. This caused the `bin/test` scripts to run Minitest twice.
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* fixes remaining RuboCop issues [Vipul A M, Xavier Noria]Xavier Noria2016-09-011-1/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* code gardening: removes redundant selfsXavier Noria2016-08-081-1/+1
| | | | | | | | | A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-26/+26
|
* applies new string literal convention in toolsXavier Noria2016-08-063-19/+19
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Remove requiring load_paths from tools/test.rbPrathamesh Sonpatki2016-03-021-1/+4
| | | | | | | - Instead require and setup Bundler - `tools/test.rb` is used internally from all `bin/test` scripts inside component gems. - Followup of https://github.com/rails/rails/commit/2abcdfd978fdcd491576a237e8c6be04ddaf884d.
* Remove load_paths fileArthur Neves2016-02-271-1/+3
|
* Fix title of README according to Markdown conventionsAaron Ang2016-02-251-2/+2
| | | | | | | | | The first heading in some README's are indicated using a second level heading (`##`), which in my opinion is of incorrect structure. Therefore, in this patch I changed the first heading to a first level heading (`#`) in README's where this incorrect structure occurs. [ci skip]
* [ci skip] line_statistics added to READMESourav Moitra2016-02-141-0/+1
|
* make it possible to customize the executable inside rereun snippets.Yves Senn2015-06-131-0/+2
| | | | | | | | | | | | | | | | | | | In the Rails repository we use a `bin/test` executable to run our tests. However the rerun snippets still included `bin/rails test`: BEFORE: ``` Failed tests: bin/rails test test/cases/adapters/postgresql/schema_test.rb:91 ``` AFTER: ``` Failed tests: bin/test test/cases/adapters/postgresql/schema_test.rb:91 ```
* select the AR adapter through `bin/test`.Yves Senn2015-06-111-2/+0
|
* use our runner (`bin/test`) for framework components.Yves Senn2015-06-111-0/+12
| | | | | | | | | | This adds a script `bin/test` to most Rails framework components. The script uses the rails minitest plugin to augment the runner. See https://github.com/rails/rails/pull/19571 for details about the plugin. I did not yet add `bin/test` for activerecord, activejob and railties. These components rely on specific setup performed in the rake-tasks.
* Use block variable instead of globalschneems2015-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | ```ruby require 'benchmark/ips' Benchmark.ips do |x| x.report("$&") { "foo".sub(/f/) { $&.upcase } } x.report("block var") { "foo".sub(/f/) {|match| match.upcase } } end ``` ``` Calculating ------------------------------------- $& 48.658k i/100ms block var 49.666k i/100ms ------------------------------------------------- $& 873.156k (± 9.3%) i/s - 4.331M block var 969.744k (± 9.2%) i/s - 4.818M ``` It's faster, and gets rid of a few "magic" global variables
* Doc fix [ci skip]Sushruth Sivaramakrishnan2015-03-061-1/+1
|
* minor docs change [ci skip]Rishi Jain2014-11-031-2/+2
|
* line_statistics is not an executableRafael Mendonça França2014-10-132-2/+2
| | | | Also add documentation on it
* Make a note about the internal tools/ dir and what each utility doesJeremy Kemper2014-10-131-0/+8
|
* Do not use deprecated `exists?` methodRafael Mendonça França2014-10-131-1/+1
|
* Document the propose of tools/profileRafael Mendonça França2014-10-131-0/+3
|
* Revert "Merge pull request #17247 from igas/fix-deprecations"Rafael Mendonça França2014-10-131-0/+133
| | | | | | | This reverts commit 997f1575f78bf6a2d12b8665a55807d51fe964df, reversing changes made to f919d5f5ea75f0e56a57643e5a0472367a98625f. See https://github.com/rails/rails/pull/17247#issuecomment-58895078
* remove unused tools/profileIgor Kapkov2014-10-131-133/+0
|
* Encapsulate rake lines from ActiveRecord/ActionPack as CodeTools::LineStatisticsBenjamin Fleischer2014-07-251-0/+41
| | | | [ci skip]
* Fail profiler fast when input is not a ruby fileBenjamin Fleischer2014-07-251-0/+12
| | | | [ci skip]
* Optionally add String extensions for ruby-prof printer optionBenjamin Fleischer2014-07-251-0/+26
| | | | [ci skip]
* Encapsulate tools/profile functionality in CodeTools::ProfilerBenjamin Fleischer2014-07-251-52/+76
| | | | | | Fix bug in path expansion of input filepath [ci skip]
* Correct tools/profile usage exampleBenjamin Fleischer2014-07-251-1/+1
| | | | [ci skip]
* Removing Gem.source_index [ci skip]Arun Agrawal2013-07-131-1/+0
|
* Remove REE GC stats since master is 1.9.3Jeremy Kemper2012-10-261-17/+5
|
* fix Example: Rename tools/profile_requires -> tools/profilerochefort2012-10-061-1/+1
|
* require "rubygems" is obsolete in Ruby 1.9.3Kornelius Kalnbach2012-05-131-1/+0
|
* Remove Active Resource source files from the repositoryPrem Sichanugrist2012-03-131-1/+0
| | | | | | | | | | Dear Active Resource, It's not that I hate you or anything, but you didn't get much attention lately. There're so many alternatives out there, and I think people have made their choice to use them than you. I think it's time for you to have a big rest, peacefully in this Git repository. I will miss you, @sikachu.
* Support an extra profile printer argJeremy Kemper2010-06-241-1/+3
|
* Show GC time and # of runs tooJeremy Kemper2010-06-231-1/+3
|
* Ensure require and load are private - h/t apeirosJeremy Kemper2010-04-241-0/+1
|
* Use call stack printer if availableJeremy Kemper2010-04-041-2/+8
|
* ./tools/console to drop into irb with rails loadedJeremy Kemper2010-03-281-0/+7
|
* Rename tools/profile_requires -> tools/profile since we do both require and ↵Jeremy Kemper2009-05-271-0/+0
| | | | ruby-prof profiling.
* Clean up tools/profile_requires a bitJeremy Kemper2009-05-211-33/+27
|
* Simple examples for require profilingJeremy Kemper2009-05-131-2/+2
|
* Preserve orderingJeremy Kemper2009-05-131-2/+8
|
* Tool for profiling resource usage in each require call.Jeremy Kemper2009-05-071-0/+75
$ ruby -Iactiveresource/lib tools/profile_requires.rb active_resource 91.84 KB 3220 obj 4.0 ms active_resource 83.86 KB 3108 obj 3.3 ms active_support 69.32 KB 2682 obj 2.6 ms active_support/vendor 33.98 KB 651 obj 0.6 ms i18n 94.40 KB 315 obj 4.0 ms 44 KB RSS