aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/paths.rb
Commit message (Collapse)AuthorAgeFilesLines
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Raise when using a bad symlinkschneems2017-03-141-1/+8
| | | | | | | | | | | | | There was a case where a dev made a symlink that worked on some machines and not on others. The issue manifested itself on a machine with `RAILS_ENV=staging` as the had their `config/environments/staging.rb` symlinked to another config file. The behavior was very hard to track down. Current behavior: If you use a bad symlink in a file, you get no warnings or failures or anything. If you have a bad symlink it just ignores the file as if it didn't exist (`File.exist?` returns false for a bad symlink). Patch behavior: With this patch when a file is not present we check if a symlink exists. If it does, that indicates there is a bad symlink and we should raise ``` File "config/environments/staging.rb" is a symlink that does not point to a valid file ```
* Small grammar fixes in `Rails::Paths`Jon Moss2016-12-201-2/+2
| | | | [ci skip]
* removed `@current` as it is not usedphoet2016-11-301-1/+0
|
* [ci skip] Fixed commas according to Oxford comma in rdoc and guidesAndrey Molchanov2016-09-171-1/+1
|
* applies new string literal convention in railties/libXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Tiny documentation fixes [ci skip]Robin Dupret2015-08-161-4/+2
| | | | | | * Add missing `def` and remove useless `do` keywords. * Move `:nodoc:` in front of the methods' definition so that methods under these ones are correctly visible on the API.
* Reload I18n locales in developmentKir Shatrov2015-08-101-0/+10
|
* fix typo [ci-skip]Robert Krzyzanowski2015-02-251-1/+1
|
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-5/+5
|
* Fix Rails::Paths::Path.unshift interfaceIgor Kapkov2014-11-121-2/+2
|
* Replace map.flatten with flat_map in railtiesErik Michaels-Ober2014-03-041-1/+1
|
* Fix rdoc markup [ci skip]Carlos Antonio da Silva2014-01-061-1/+1
| | | | Wrapping symbols with + does not work, we must use <tt> instead.
* Improve font of some code in API documentation [ci skip]Chun-wei Kuo2013-12-261-1/+1
| | | | | * Add "<tt>" or "+" to improve font of some code and filenames in API documentation * Does not contain wording changes
* clean up some warnings on trunk rubyAaron Patterson2013-10-311-1/+1
|
* this should be private, no other instances of Root should call itAaron Patterson2013-10-221-1/+1
|
* do not search through the keys array twiceAaron Patterson2013-10-221-2/+3
|
* use the provided block to filter listsAaron Patterson2013-10-221-11/+5
|
* stop using `send` so that method privacy is respected and we get a smallAaron Patterson2013-10-221-7/+7
| | | | perf increase
* Revert "Deprecate the `eager_load_paths` configuration"Andrew White2013-02-191-32/+12
| | | | | | | | | | | Because of the possibility of lib being unintentionally eager loaded it's been agreed that we'll leave autoload paths and eager load paths separate for Rails 4.0. This reverts commit 0757b3388ffe4f44b60de950d40e18ef05055931. Conflicts: railties/CHANGELOG.md
* Deprecate the `eager_load_paths` configurationAndrew White2013-01-241-12/+32
| | | | | | | | | | Since the default in Rails 4.0 is to run in 'threadsafe' mode we need to eager load all of the paths in `autoload_paths` so we alias `eager_load_paths` to it. This may have unintended consequences if you have added 'lib' to `autoload_paths` such as loading unneeded code or code intended only for development and/or test environments. If this applies to your application you should thoroughly check what is being eager loaded.
* use multiline do-end blocks and rearrange definition for clarityMatt Bridges2013-01-091-5/+5
|
* replace #flatten with Array()Gosha Arinich2013-01-021-2/+2
|
* Revert "Merge pull request #7587 from elia/fix-too-eager-loading"Rafael Mendonça França2012-12-181-12/+6
| | | | | | | | | | This reverts commit 3663057518eb9acf9b1e72f47dcb07038e6b7368. REASON: This caused a regression that add app folder in the eager load path. See #8146 for more information. Conflicts: railties/CHANGELOG.md
* Merge pull request #7587 from elia/fix-too-eager-loadingRafael Mendonça França2012-10-291-6/+12
| | | | | | Should not eager_load app/assets Conflicts: railties/CHANGELOG.md
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-3/+3
|
* Remove unneeded attr_readerRafael Mendonça França2012-10-071-1/+0
|
* Revert "Use flat_map { } instead of map {}.flatten"Santiago Pastorino2012-10-051-1/+1
| | | | | | | | | | | This reverts commit abf8de85519141496a6773310964ec03f6106f3f. We should take a deeper look to those cases flat_map doesn't do deep flattening. irb(main):002:0> [[[1,3], [1,2]]].map{|i| i}.flatten => [1, 3, 1, 2] irb(main):003:0> [[[1,3], [1,2]]].flat_map{|i| i} => [[1, 3], [1, 2]]
* Use flat_map { } instead of map {}.flattenSantiago Pastorino2012-10-051-1/+1
|
* Merge pull request #6910 from mulder/fix_path_globJosé Valim2012-07-011-1/+2
|\ | | | | Persist glob when replacing a path
| * Persist glob when replacing a pathNicholas Mulder2012-06-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Rails::Paths::Root's []= is used to replace a path it should persist the previous path's glob. Without passing the glob along we get gnarly bugs when trying to wire up things like engines. module FooEngine class Engine < ::Rails::Engine isolate_namespace FooEngine config.paths['config/initializers'] = "lib/foo_engine/initializers" end end ## Example of behaviour before this commit. # # Before the initializer override: >> FooEngine::Engine.config.paths["config/initializers"].glob => "**/*.rb" # After the initializer override: >> FooEngine::Engine.config.paths["config/initializers"].glob => nil ## Example of behaviour after this commit. # # Before the initializer override: >> FooEngine::Engine.config.paths["config/initializers"].glob => "**/*.rb" # After the initializer override: >> FooEngine::Engine.config.paths["config/initializers"].glob => "**/*.rb"
* | Revert "Allow loading external route files from the router"José Valim2012-06-291-9/+1
|/ | | | | | | | | | | | | | This reverts commit 6acebb38bc0637bc05c19d87f8767f16ce79189b. Usage of this feature did not reveal any improvement in existing apps. Conflicts: actionpack/lib/action_dispatch/routing/mapper.rb guides/source/routing.textile railties/lib/rails/engine.rb railties/lib/rails/paths.rb railties/test/paths_test.rb
* removing more pathnameismsAaron Patterson2012-05-231-3/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-04-281-1/+1
|\
| * Use <tt>Foo::Bar</tt> instead of +Foo::Bar+Mark Rushakof2012-04-271-1/+1
| | | | | | | | | | | | | | | | The latter doesn't render as code in HTML output. Regex used in Rubymine to locate the latter form: (\+)(:*\w+:(?::|\w)+)(\+)
* | Allow loading external route files from the routerJose and Yehuda2012-04-251-1/+11
|/ | | | | | | | | This feature enables the ability to load an external routes file from the router via: draw :filename External routes files go in +config/routes+. This feature works in both engines and applications.
* warning removed: `&' interpreted as argument prefixArun Agrawal2012-03-311-1/+1
|
* Define Paths::Root#[]= in terms of #add.Ben Woosley2012-03-291-2/+1
|
* Drop Paths::Root initializer check of #path as it isn't checked in the ↵Ben Woosley2012-03-291-1/+0
| | | | #path= or anywhere else
* Drop unnecessary require in Rails::PathsBen Woosley2012-03-291-2/+0
|
* favor composition over inheritanceAaron Patterson2012-03-261-5/+20
|
* favor composition over inheritanceAaron Patterson2012-03-261-7/+29
|
* still need to ensure the path is a directoryAaron Patterson2012-03-261-1/+1
|
* eliminating a branch we do not need. thanks @jeremyAaron Patterson2012-03-261-30/+3
|
* stop using *args in order to simplify our constructorAaron Patterson2012-03-261-5/+4
|
* Don't depend on ivars. Thanks @fesplugasAaron Patterson2012-03-261-1/+1
|
* chdir before globbing so that we don't need to escape directory names.Aaron Patterson2012-03-231-1/+30
| | | | fixes #5521
* use File.directory? as Dir.exists? is only 1.9.2+Aaron Patterson2011-08-011-2/+2
|