1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

26 commits

Author SHA1 Message Date
Carlos Antonio da Silva
83302a4c13 Fix failing test related to persist glob when replacing a path
Introduced in pull request #6910, merged in 2ee3fa1a48
2012-07-01 13:56:11 -03:00
José Valim
2ee3fa1a48 Merge pull request #6910 from mulder/fix_path_glob
Persist glob when replacing a path
2012-07-01 02:54:33 -07:00
Nicholas Mulder
0f4d005501 Persist glob when replacing a path
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"
2012-06-30 16:59:07 -04:00
José Valim
5e7d6bba79 Revert "Allow loading external route files from the router"
This reverts commit 6acebb38bc.

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
2012-06-29 17:44:10 +02:00
Waseem Ahmad
baa336364d Fixes build 4008.1
This fixex build 4008.1[1] because of the changes made in

4001835db0

[1] http://travis-ci.org/#!/rails/rails/jobs/1429671
2012-05-25 09:49:34 +05:30
Jose and Yehuda
6acebb38bc Allow loading external route files from the router
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.
2012-04-25 16:07:17 -05:00
Ben Woosley
f7a39c848a Drop Paths::Root initializer check of #path as it isn't checked in the #path= or anywhere else 2012-03-29 02:53:25 -07:00
Aaron Patterson
4946107925 favor composition over inheritance 2012-03-26 17:25:44 -07:00
Guillermo Iguaran
ce350de56e Removing Deprecated Path API tests 2011-05-24 23:03:01 -05:00
José Valim
d649bf158b Provide a cleaner syntax for paths configuration that does not rely on method_missing. 2010-10-06 17:20:15 +02:00
José Valim
c6e2058637 Add skip_eager_load!, skip_autoload! and friends to path objects. 2010-07-17 09:55:11 +02:00
José Valim
9b19a6f16c A few changes were done in this commit:
* Added :autoload to engines path API and redefine usage to be in sync with 6f83a5036d8a9c3f8ed7;
* Do not autoload code in *lib* for applications (now you need to explicitly require them). This makes an application behave closer to an engine (code in lib is still autoloaded for plugins);
* Always autoload code in app/ for engines and plugins. This makes engines behave closer to an application and should allow us to get rid of the unloadable hack required when controllers inside engines inherit from ApplicationController;
2010-06-28 01:22:32 +02:00
José Valim
2fde9d774b Solve some pendencies. 2010-01-24 09:32:54 +01:00
José Valim
b17e358e3d Move configuration to subfolders. 2010-01-23 22:30:17 +01:00
José Valim
924fa084e8 First steps into making Plugin < Engine. 2010-01-23 17:13:25 +01:00
José Valim
4ae7936727 Got tests working once again. 2010-01-22 16:24:44 +01:00
Joshua Peek
426348b484 Update routes.rb template to use App name 2009-12-21 20:15:27 -06:00
Yehuda Katz + Carl Lerche
d56984c016 Make rails configuration's path object's root lazy 2009-10-14 11:18:45 -07:00
Yehuda Katz + Carl Lerche
9a42e06dd8 Reapply Rails::Application::Path tweaks
Reapplies: a4bdc00fec
             3c1dab7225
2009-07-06 10:22:42 -07:00
Pratik Naik
3c1dab7225 Revert "Modify the Rails::Application::Path object to allow for more concise path definition."
This reverts commit 913bb2f4c2.

Reason : The server does not start
2009-07-03 12:23:57 +01:00
Yehuda Katz + Carl Lerche
913bb2f4c2 Modify the Rails::Application::Path object to allow for more concise path definition. 2009-07-02 15:47:11 -07:00
Carl Lerche
132e6d0063 Add #concat to Rails::Application::Path 2009-06-30 13:55:11 -07:00
Yehuda Katz + Carl Lerche
188a892c5a Starting to replace scattered path configuration settings with the path object 2009-06-26 17:32:05 -07:00
Yehuda Katz + Carl Lerche
4153c6b720 Finished a first stab at the Rails application path object. 2009-06-26 15:37:52 -07:00
Yehuda Katz + Carl Lerche
b0774281ef Update paths to support an explicit root and multiple paths per category 2009-06-26 15:37:52 -07:00
Yehuda Katz + Carl Lerche
728e3b4047 Simple initial Paths impl 2009-06-26 15:37:52 -07:00