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

29 commits

Author SHA1 Message Date
Rafael Mendonça França
ccecab3ba9 Remove observers and sweepers
They was extracted from a plugin.

See https://github.com/rails/rails-observers

[Rafael Mendonça França + Steve Klabnik]
2012-11-28 22:46:49 -02:00
Carlos Antonio da Silva
8df46eac76 Refactor generators tests to include test helpers in the parent class 2012-11-27 00:07:48 -02:00
Carlos Antonio da Silva
1fef1bedbc Remove some line breaks between array items that make the assert file tests harder to read 2012-11-04 19:22:05 -02:00
Robin Dupret
5ad7f8ab41 Use Ruby 1.9 Hash syntax in railties 2012-10-14 18:26:58 +02:00
Mike Moore
2a68f68aea Update test locations
Change the default test locations to avoid confusion around the common
testing terms "unit" and "functional".
Add new rake tasks for the new locations, while maintaining backwards
compatibility with the old rake tasks.

New testing locations are as follows:

    app/models -> test/models (was test/units)
    app/helpers -> test/helpers (was test/units/helpers)
    app/controllers -> test/controllers (was test/functional)
    app/mailers -> test/mailers (was test/functional)
2012-10-09 17:53:56 -06:00
Jeremy Walker
a3117335cc Fixed generated whitespace in routes when using namespaced resource. 2012-09-29 16:39:27 +01:00
Wojciech Wnętrzak
8fe9b43b30 Fixed generating namespaced table_name_prefix in engines 2012-07-06 21:22:53 +02:00
Fred Wu
686966a186 Fixed the application_controller require_dependency path generated by the app generator 2012-06-06 19:02:11 +10:00
Piotr Sarnacki
29d17d3ab6 Use require_dependency in generated controllers
Using require in development mode will prevent required files from
reloading, even if they're changed. In order to keep namespaced
application_controller reloadable, we need to use require_dependency
instead of require.
2012-05-22 01:40:51 -07:00
Piotr Sarnacki
7c95be54b4 Fix generators to help with ambiguous ApplicationController issue
In development mode, dependencies are loaded dynamically at runtime,
using `const_missing`. Because of that, when one of the constants is
already loaded and `const_missing` is not triggered, user can end up
with unexpected results.

Given such file in an Engine:

```ruby
module Blog
  class PostsController < ApplicationController
  end
end
```

If you load it first, before loading any application files, it will
correctly load `Blog::ApplicationController`, because second line will
hit `const_missing`. However if you load `ApplicationController` first,
the constant will be loaded already, `const_missing` hook will not be
fired and in result `PostsController` will inherit from
`ApplicationController` instead of `Blog::ApplicationController`.

Since it can't be fixed in `AS::Dependencies`, the easiest fix is to
just explicitly load application controller.

closes #6413
2012-05-20 16:28:02 -07:00
Carlos Antonio da Silva
573448f011 Remove warning in namespaced generator test 2012-05-19 09:17:11 -03:00
Piotr Sarnacki
bd838c0e74 Fix railties tests
Minitest uses different signature for assert_no_match, so we have to
swap arguments.
2012-05-19 04:53:35 -07:00
Alexey Vakhov
5decf8352d Namedspaced generator indent method test refactoring 2012-04-26 18:16:00 +04:00
José Valim
33d80919ff Merge pull request #5902 from avakhov/generator-no-indent-blank-lines
Don't indent blank lines in named base generators
2012-04-25 06:15:12 -07:00
Alexey Vakhov
6ac9e493fb Don't indent blank lines in named base generators 2012-04-25 12:01:33 +04:00
Alexey Vakhov
93bcb0c268 Remove lonely number sign 2012-04-25 11:51:33 +04:00
José Valim
51095be1b0 Get rid of more 1.8.x dead code 2011-12-20 17:59:26 +01:00
Stefan Sprenger
246c367570 Use RAILS_ISOLATED_ENGINE and fix namespaced generators tests 2011-06-07 12:16:05 +02:00
tomhuda
74ade51eee Move SCSS generators and default templates from Rails to the Sass Railtie (d435726312601edb3ba6f97b34f562221f72c1f8).
* Sass gem registers a compressor
* Sass gem registers generators for assets and scaffold
* Create a default stylesheet_engine ("css") for apps that remove the Sass gem
2011-05-24 16:04:28 -07:00
Akira Matsuda
cce461511b be sure to parenthesize the arguments when the first one is a RegExp literal
this fixes: "warning: ambiguous first argument; put parentheses or even spaces"
because: you need this to tell the parser that you're not calling :/ method (division)
details (Japanese!): http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/42445?42370-43277
2011-05-18 23:20:19 +09:00
Arun Agrawal
546db693fb Fixed failing tests for namespaced_generators_test. in 1.9.2 2011-05-14 14:06:06 +05:30
José Valim
60547391c9 Fix more generator tests. 2011-04-17 22:08:21 +02:00
Piotr Sarnacki
d0d30e767d Fix scaffold generator to be aware of namespace in isolated engine 2010-11-03 20:48:40 +01:00
Piotr Sarnacki
5d5eb2b18d Rename namespace method to isolate_namespace.
This change caused by confusion caused by calling engine
"namespaced". Stuff inside engine can be namespaced for every
engine. This method is not actually namespacing anything, it's
isolating engine within the given namespace.
2010-10-09 21:32:34 +02:00
Piotr Sarnacki
51c7660e08 Add namespacing to mailer generator
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 17:28:10 +02:00
Piotr Sarnacki
7acf64a81b Add namespacing for observer generator
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 17:28:10 +02:00
Piotr Sarnacki
49c3ad7f77 Add namespace for test_unit generators
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 17:28:10 +02:00
Piotr Sarnacki
00aa13bc0e Generators fix: properly check if module should be created when creating a namespaced model
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 10:46:22 +02:00
Piotr Sarnacki
e83634081a Generators are not aware of namespace of isolated engines and applications
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-24 21:02:24 +02:00