aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/railties
Commit message (Collapse)AuthorAgeFilesLines
* Fix usage of lambda as a Rack endpointJiri Pospisil2012-12-311-1/+1
| | | | The response body needs to respond_to? :each.
* Fix typo in #7941Jeremy Kemper2012-10-141-1/+1
|
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-143-41/+41
|
* Fix handling SCRIPT_NAME from within mounted engine'sPiotr Sarnacki2012-08-112-15/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you mount your application at a path, for example /myapp, server should set SCRIPT_NAME to /myapp. With such information, rails application knows that it's mounted at /myapp path and it should generate routes relative to that path. Before this patch, rails handled SCRIPT_NAME correctly only for regular apps, but it failed to do it for mounted engines. The solution was to hardcode default_url_options[:script_name], which is not the best answer - it will work only when application is mounted at a fixed path. This patch fixes the situation by respecting original value of SCRIPT_NAME when generating application's routes from engine and the other way round - when you generate engine's routes from application. This is done by using one of 2 pieces of information in env - current SCRIPT_NAME or SCRIPT_NAME for a corresponding router. This is because we have 2 cases to handle: - generating engine's route from application: in this situation SCRIPT_NAME is basically SCRIPT_NAME set by the server and it indicates the place where application is mounted, so we can just pass it as :original_script_name in url_options. :original_script_name is used because if we use :script_name, router will ignore generating prefix for engine - generating application's route from engine: in this situation we already lost information about the SCRIPT_NAME that server used. For example if application is mounted at /myapp and engine is mounted at /blog, at this point SCRIPT_NAME is equal /myapp/blog. Because of that we need to keep reference to /myapp SCRIPT_NAME by binding it to the current router. Later on we can extract it and use when generating url Please note that starting from now you *should not* use default_url_options[:script_name] explicitly if your server already passes correct SCRIPT_NAME to rack env. (closes #6933)
* Added failing test for generating namespaced table_name_prefix in enginesWojciech Wnętrzak2012-07-061-0/+12
|
* Remove unused responsibilities and add a few load definitions to enginesJosé Valim2012-06-291-1/+1
| | | | | | | | Since plugins were removed, we can clean up a few methods in engines. We also use this opportunity to move `load_console`, `load_tasks` and `load_runner` to Rails::Engine. This means that, if someone wants to improve script/rails for engines to support console or runner commands, part of the work is already done.
* expand the tmpdir to the realpath so tests on OS X passAaron Patterson2012-06-191-1/+1
|
* use system tmpdir rather than our ownAaron Patterson2012-06-191-3/+5
|
* stop `to_s`ing method namesAkira Matsuda2012-06-061-3/+1
| | | | Module#methods are Symbols in Ruby >= 1.9
* Add support runner hook.kennyj2012-05-291-0/+16
|
* Fix railties_order when application object is passedPiotr Sarnacki2012-05-271-0/+4
| | | | | | | | | | | | | | | railites_order method, introduced in 40b19e0, had a bug that was causing loading application instance twice in initializers if railties_order already included application instance. So for example railties_order = [Foo::Engine, :main_app, Bar::Engine] would result in such railties array: [MyApp::Application, Foo::Engine, MyAppApplication, Bar::Engine] In order to fix it, we need to check for existence of application in both railties_order and railties arrays.
* Merge pull request #3359 from mrreynolds/datamapper_naming_fixRafael Mendonça França2012-05-191-2/+2
|\ | | | | Fixed DataMapper namings in symbols and constants.
| * Fixed DataMapper namings in symbols and constants.Robert Glaser2011-10-181-2/+2
| |
* | Load all the env files available in config.paths (closes #6335)Piotr Sarnacki2012-05-161-1/+9
| |
* | Merge pull request #5821 from Deradon/fix-engine-tasksPiotr Sarnacki2012-05-031-0/+31
|\ \ | | | | | | Provided fix for calling rake tasks within mountable engines
| * | Provided fix for calling rake tasks within mountable enginesPatrick Helm2012-04-121-0/+31
| | |
* | | railties variable is not required here.Arun Agrawal2012-04-301-1/+0
| | |
* | | Remove default match without specified methodJose and Yehuda2012-04-242-27/+27
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the current router DSL, using the +match+ DSL method will match all verbs for the path to the specified endpoint. In the vast majority of cases, people are currently using +match+ when they actually mean +get+. This introduces security implications. This commit disallows calling +match+ without an HTTP verb constraint by default. To explicitly match all verbs, this commit also adds a :via => :all option to +match+. Closes #5964
* | Environment in engines tests is required on boot_rails, no need to require ↵Piotr Sarnacki2012-03-131-10/+0
| | | | | | | | explicitly
* | Don't need to share engine's tests anymore, plugins are gonePiotr Sarnacki2012-03-132-370/+359
| |
* | Ensure that engine can be mounted at root (#4314)Piotr Sarnacki2012-03-131-0/+54
| | | | | | | | | | | | | | It's already fixed and the fix was actually in journey library, but with #4314 it reappeared second time, so probably this kind of integration test will be good to have to not allow it to sneak in after changes in journey or rails itself.
* | convert railties to use AS::TestCaseAaron Patterson2012-01-053-3/+3
| |
* | Rails::Plugin has goneSantiago Pastorino2012-01-034-252/+0
| |
* | Get rid of more 1.8.x dead codeJosé Valim2011-12-201-4/+0
| |
* | Add suffix for migrations copied from enginesPiotr Sarnacki2011-12-091-6/+6
| |
* | Fix railties tests, identical migrations are not considered when copyingPiotr Sarnacki2011-12-091-0/+2
| |
* | Allow to change engine's loading priority with config.railties_order=Piotr Sarnacki2011-11-231-0/+126
| |
* | Rely on a public contract between railties instead of accessing railtie ↵José Valim2011-11-231-3/+3
| | | | | | | | methods directly.
* | Removing db/seeds.rb is fine. Don't blow up.Jeremy Kemper2011-10-291-1/+7
| |
* | Added test for rake environment in an enginesteve2011-10-181-0/+17
|/
* fixed the failing generators_testDeepak Prasanna2011-09-131-1/+1
|
* Remove failing test which was wrongly introduced.Jon Leighton2011-09-081-5/+0
| | | | | | | | | | | | This test was introduced in pull request #2577. The author of the pull request included the test, which was originally in #2230, at the same time as fixing a separate (but related) bug. However, the author did not include a fix for this test, so when #2577 was merged, a failing test was introduced. So I am removing the failing test for now. If anyone wants to fix the bug, please do so and submit a complete pull request with a test and a fix.
* Merge pull request #2577 from rails-noob/masterSantiago Pastorino2011-09-061-0/+48
|\ | | | | Fix double slash at start of paths when mounting an engine at the root.
| * Fix bug #2579.rails-noob2011-09-061-0/+48
| | | | | | | | Avoids double slash at start of paths when mounting an engine at the root.
* | Remove useless parensSantiago Pastorino2011-09-041-1/+1
| |
* | Warnings removed for "assert_match /" Please doArun Agrawal2011-09-042-6/+6
|/ | | | not add more.!
* Make polymorphic_url calls go through application helpers again.thedarkone2011-07-251-0/+19
| | | | This brings back the ability to overwrite/extend url generating methods in application heleprs.
* Ensure the engine_path is there (it may make CI happy).José Valim2011-07-061-1/+1
|
* Load the generators test helper and properly load it's test caseDamien Mathieu2011-07-031-1/+2
|
* Fix has_migrations? check in Rails::EngineSam Pohlenz2011-07-031-0/+9
|
* Updated test to ensure correct sequence when copying engine/plugin migrations.Brian Quinn2011-06-101-4/+11
|
* Merge pull request #1356 from flippingbits/fix_engine_generatorJosé Valim2011-06-093-11/+126
|\ | | | | Fix engine's generator
| * Prepend bundle exec to get the correct Rake versionStefan Sprenger2011-06-071-3/+3
| |
| * Use RAILS_ISOLATED_ENGINE and fix namespaced generators testsStefan Sprenger2011-06-071-1/+1
| |
| * Use mattr_accessor :namespaceStefan Sprenger2011-06-071-3/+0
| |
| * Use namespace if it's a mountable engineStefan Sprenger2011-06-071-9/+44
| |
| * Added regression testsStefan Sprenger2011-06-071-12/+5
| |
| * Move test/engine/generators_test.rb to test/railties/generators_test.rbStefan Sprenger2011-06-071-0/+90
| |
| * We're using module not class for namespacingStefan Sprenger2011-05-271-8/+8
| |
* | Solve the RAILS_ENV problem in the railties tests in a more generic wayJon Leighton2011-06-065-3/+22
|/