aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/code_statistics.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable Start/EndWith and RegexpMatch copsBart de Water2018-07-281-1/+1
| | | | | In cases where the MatchData object is not used, this provides a speed-up: https://github.com/JuanitoFatas/fast-ruby/#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end
* [Railties] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* [Railties] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Make code statistics task handle system tests properlyyuuji.yaginuma2017-04-131-1/+2
| | | | | If it is not added to `TEST_TYPES`, it is not regarded as a test when counting the total count.
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-3/+3
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* applies new string literal convention in railties/libXavier Noria2016-08-061-13/+13
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Require enumerable module when using #sumBenjamin Quorning2016-03-221-0/+1
| | | | | | In https://github.com/rails/rails/commit/dfa48f200cbc5c1ca18457a8cde14642e12af5, a call to `#sum` was added. For that to always work, we need to require the core_ext/enumerable module.
* rake stats dynamically scales nowAkira Matsuda2016-02-041-9/+21
| | | | So it can properly show stats for an app with 1,000,000+ LOC
* Revert "Lines of code can be 100,000+ in a Rails app"Akira Matsuda2016-02-041-4/+4
| | | | | | This reverts commit 293bd95c3e77275193130bc14c986348aae8b0e2. This broke the header :<
* CodeStatistic will now ignore hidden files:Edouard CHIN2016-01-181-1/+1
| | | | - Modify the default regex to not match hidden files
* Allow rake:stats to account for rake tasksKevin Deisz2015-10-191-1/+1
|
* bugfix CodeStatics#calculate_directory_statics when dir has source extensionPablo Vizcay2015-04-091-4/+2
|
* Lines of code can be 100,000+ in a Rails appAkira Matsuda2015-03-011-4/+4
| | | | Actually, our app has 400,000 LOC :boom:
* Drop old test locations from `rake stats`brainopia2015-01-091-3/+1
| | | | | - test/functional - test/unit
* Add test/jobs files in `rake stats`Arun Agrawal2014-11-051-0/+1
|
* Improve `rake stats` for JavaScript and CoffeeScript.Hendy Tanata2013-02-251-46/+22
| | | | Ignore block comments and calculates number of functions.
* Make code statistics rake task handle new test locations properlyGeorge Claghorn2012-12-091-1/+7
| | | | | | | | | | | | | | | As of 2a68f68aead9fd65ecac8062ca8efc15f5bab418: - Unit tests are now in test/models, instead of test/units - Functional tests are now in test/controllers, instead of test/functional - Helper tests are now in test/helpers, instead of test/units/helpers - Mailer tests are now in test/mailers, instead of test/functional Update the rake task for code statistics (`rake stats`) so that it recognizes files in the above locations as tests, and accurately calculates statistics such as "Test LOC" and "Code to Test Ratio." Safely handle Rails apps that still have tests in the old locations.
* Add code statistics for Javascript andArun Agrawal2012-05-311-2/+9
| | | | | | | CoffeeScript files to `rake stats` task Orignal PR was #2270 Thanks to @nfm
* Remove useless conditional.Pete Higgins2012-03-251-7/+1
|
* Used block to make sure file get auto closed after useRahul P. Chaudhari2012-01-301-14/+16
|
* improved code stats calculation, check on multiline comments and rewrite ↵Sergey Parizhskiy2011-11-231-3/+14
| | | | regexps according to a class naming convention
* Use shorter class-level File methods instead of going through File.stat.thedarkone2011-07-251-1/+1
|
* fix indentationVijay Dev2011-05-251-1/+1
|
* Fix typo and add sanity test for code statistics rake task.Emilio Tagua2010-09-241-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Perf: speed up 2 methods in railties.Emilio Tagua2010-09-221-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-4/+4
| | | | 's/[ \t]*$//' -i {} \;)
* Move railties/lib/* into railties/lib/*Yehuda Katz + Carl Lerche2009-09-241-0/+107