Robin Dupret
5ad7f8ab41
Use Ruby 1.9 Hash syntax in railties
2012-10-14 18:26:58 +02:00
kennyj
414008f98e
Fix class_eval without __FILE__ and __LINE__.
2012-07-18 01:16:55 +09:00
Aaron Patterson
b7a4fe18f2
remove duplicate requires of mocha.
...
Mocha is already required by AS::TestCase, so remove the duplicate
requires.
2012-07-03 14:28:29 -07:00
Arun Agrawal
397e47d807
Unused variable warning removed.
2012-05-30 14:46:17 +05:30
Arun Agrawal
05f88024de
More assert_match warnings fixed.
2012-05-30 14:46:08 +05:30
José Valim
6db930cb5b
Remove --http.
2012-03-14 22:30:01 +01:00
Carlos Antonio da Silva
570cc89bad
Generate special controller and functional test templates for http apps
...
The main goal is to not generate the format.html block in scaffold
controller, and to generate a different functional test as we don't rely
on redirects anymore, we should test for http responses.
In addition to that, the :edit action is removed from the http
controller and the edit route is not generated by default, as they
usually do not make sense in this scenario.
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:25 -03:00
Carlos Antonio da Silva
219ff43639
Disable template, helper and assets options when using http_only!
...
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
c825e9a5ea
Create generators http_only! setup and hide some common namespaces for now
...
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
c6ef45d6c4
Add convenience method to hide a generator from the available ones
...
It is usually useful to be able to hide a generator when running rails
generate command. Such generators might be used only to dry up
generators code and shouldn't be available to end users.
2012-02-03 10:18:58 -02:00
Colin MacKenzie IV
5745a5e85e
treat USAGE as an ERB template
2011-11-02 09:00:18 -04:00
Alexey Gaziev
91bbb8e956
Removed tests for rescue branch for Rails 2.x compatibility
2011-06-20 22:29:30 +04:00
Guillermo Iguaran
ce4afa25b4
load_generators_from_railties was removed, remove failing test_load_generators_from_railties
2011-05-24 22:03:10 -05: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
Santiago Pastorino
20897a6c2c
Allow generators nested in more than one level
2011-01-12 21:42:56 -02:00
Prem Sichanugrist
fd1daf9a8e
Make sure that generator's default banner is showing its namespace
...
This will make `rails g rspec:install --help` shows "rails generate rspec:install [options]" and not "rails generate install [options]"
2011-01-01 11:58:09 -08:00
José Valim
7b2f2c8b47
Tidy up generators commits.
2010-11-17 23:32:19 +01:00
Xavier Noria
92669b8320
application generation: --skip-testunit and --skip-activerecord renamed to --skip-test-unit and --skip-active-record respectively
...
Reason is their proper spellings are "Test::Unit" and "Active Record".
Option names and descriptions have been revised, as well as some method
names and minor details here and there.
2010-07-25 22:55:38 +02:00
José Valim
6f0ed7aa52
Update generators test.
2010-05-15 15:21:14 +02:00
José Valim
b61f6f5980
Load generators from both lib/rails/generators and lib/generators. Using the former since it's less obstrusive.
2010-03-23 13:40:41 +01:00
José Valim
b8f7ba2935
Prettify generators description whenever using the default stack [ #4143 status:resolved]
2010-03-12 21:33:39 +01:00
José Valim
5893baa683
Add autoload to generators modules and fix failing test.
2010-02-26 10:44:53 +01:00
Jeremy Kemper
ffc45f3e71
Fix dangling klass reference
2010-02-25 11:01:15 -08:00
Jeremy Kemper
c7f9e8c06c
Fix test on 1.8.8. Broken by inherited hook now running before Class.new block.
2010-02-25 10:46:29 -08:00
José Valim
e6da2f651f
Ensure app does not show up in generators.
2010-01-26 12:23:02 +01:00
José Valim
04063393f9
Give higher priority to rails generators.
2010-01-21 14:11:24 +01:00
José Valim
4ca9765088
Allow railties to specify generators paths.
2010-01-19 19:59:08 +01:00
José Valim
a18dd52d58
Get generators tests running on Ruby 1.9.1
2010-01-19 01:36:06 +01:00
José Valim
a2b76d1dde
Improve generators help.
2010-01-18 16:21:11 +01:00
José Valim
61f77b1dcd
More cleaning up on rails generators load path.
2010-01-18 16:21:11 +01:00
José Valim
e75ea47434
Automatically remove :generators: from namespaces.
2010-01-18 16:21:10 +01:00
José Valim
a2e2e73c5e
Ensure generators can be invoked by their shortcut and remove attr_reader tasks.
2010-01-18 16:21:10 +01:00
José Valim
6716e4bc0c
Use regexp in lookups instead of traversing namespaces. This removes the need of special cases.
2010-01-03 17:14:48 +01:00
José Valim
d0aa0cfbd7
Ensure generator fallbacks work even when a context is given.
...
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
2009-11-23 09:08:48 -08:00
Jeremy Kemper
3ce6a10b67
Contortions to work around brittle naming dependency
2009-11-09 20:10:10 -08:00
Jeremy Kemper
a66449d852
Ruby 1.9.2: work around inherited hook being called before yielding to block
2009-11-09 14:36:49 -08:00
Jeremy Kemper
cb9a1759c0
Fix generators tests that expect a class name
2009-11-05 16:12:02 -08:00
José Valim
e15b5eda2b
Avoid duplicated names on help description and show proper error message if trying to load a Rails 2.x generator.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-11-03 16:32:47 -08:00
José Valim
d226f17507
Ensure that generators can be invoked from any directory.
...
Signed-off-by: Engine Yard <engineyard@Engine-Yards-MacBook-Pro.local>
2009-11-02 18:20:16 -08:00
Joshua Peek
01e04a446c
Use Rails.root in railties tests
2009-10-18 10:53:43 -05:00
Carl Lerche
e1fdc8bba3
Remove config.gem in favor of using the bundler. This makes config/boot.rb obsolete.
...
The bundler library is at: http://github.com/wycats/bundler/ and is a rubygem.
2009-10-16 18:10:52 -07:00
Yehuda Katz + Carl Lerche
f0dd77c6be
Move railties/lib/* into railties/lib/*
2009-09-24 16:11:41 -07:00
José Valim
5f7cfffc53
Use less strict rules in generators lookup, so people can lay their generators wherever they want.
2009-08-10 18:29:20 +02:00
José Valim
5025ae610f
Ensure that not namespaced generators also load RAILS_ROOT/lib/templates files.
2009-07-28 08:51:57 +02:00
José Valim
419ca7a747
Ensure that developers options are overwritten by user options.
2009-07-28 08:48:21 +02:00
José Valim
edda0bfe76
Allow nested and multiple fallbacks for generators.
2009-07-21 12:16:25 +02:00
José Valim
e3d5364e41
Implemented generaators fallbacks.
2009-07-16 00:17:28 +02:00
José Valim
8d47078a49
Added source_paths to rails generators. If a template is added to RAILS_ROOT/lib/templates/base/generator it will be used. For example, to customize edit.html.erb template on scaffold, just add a customized copy at RAILS_ROOT/lib/templates/erb/scaffold.
2009-07-15 22:37:22 +02:00
José Valim
eeb6a0786a
Load generators from user home and show a error message if they can't be loaded.
2009-07-04 20:17:32 +02:00
José Valim
cd388e075c
Search for generators on vendorized plugins and gems.
2009-07-04 20:17:31 +02:00