Piotr Sarnacki
489b279fc4
Don't be verbose while creating dummy application in plugin new generator
2010-11-02 17:14:52 +01:00
Piotr Sarnacki
013fc0a418
No need to require 'app_base', it's required in app_generator
2010-11-02 17:14:51 +01:00
Piotr Sarnacki
46fdb3197d
Pass more options to test/dummy in 'plugin new' generator
2010-11-02 17:14:51 +01:00
Piotr Sarnacki
671d1469c6
Add --full option to 'plugin new' generator, which generates rails engine
2010-11-02 17:14:51 +01:00
Piotr Sarnacki
fdbd9df21e
No need for say_step in 'plugin new' generator
2010-11-02 17:14:51 +01:00
Piotr Sarnacki
d995953869
DRY up app generator and plugin new generator. Moved shared options to AppBase generator
2010-11-02 17:14:51 +01:00
Piotr Sarnacki
68295bc693
Remove integration tests and ActionModel/ActiveRecord calls from 'rake plugin new' generator, it shouldn't be available as default option
2010-11-02 17:14:51 +01:00
Piotr Sarnacki
ac8f9276f5
We don't need gem tasks, we have a gemspec
2010-11-02 17:14:51 +01:00
Piotr Sarnacki
48fef64cb5
Builder should not be responsible for running store_application_definition method
2010-11-02 17:14:50 +01:00
Piotr Sarnacki
ae1debd442
Make tests for app and plugin generators more DRY
2010-11-02 17:14:50 +01:00
Piotr Sarnacki
b36fa51a3f
Allow easy overriding of test framework in 'rake plugin new' generator, using PluginBuilder
2010-11-02 17:14:50 +01:00
Piotr Sarnacki
e51e9e2db0
Add --dev and --edge options to rails plugin new
2010-11-02 17:14:50 +01:00
Piotr Sarnacki
5c8b48ab4b
Added USAGE for rails plugin new
2010-11-02 17:14:50 +01:00
Piotr Sarnacki
bbf02ffea4
That method is already declared at AppBase
2010-11-02 17:14:50 +01:00
Piotr Sarnacki
bcd414fd10
Add support for templates for rails plugin new
2010-11-02 17:14:50 +01:00
Piotr Sarnacki
b8a0fabe18
Ensure that options for plugin new generator are not passed to application generator
2010-11-02 17:14:49 +01:00
Piotr Sarnacki
b37938eff7
Refactored AppGenerator and PluginNewGenerator to inherit from AppBase.
2010-11-02 17:14:49 +01:00
Piotr Sarnacki
cfcea1d53a
Added 'rails plugin new' generator which generates gem plugin skeleton.
...
This command is based on enginex gem by José Valim. It generates gem structure
and ads dummy application into test/dummy. This can be used to start developing
any kind of extension for rails 3.
2010-11-02 17:14:49 +01:00
Neeraj Singh
ea14396c45
replace if ! with unless
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-17 12:26:32 -02:00
Santiago Pastorino
66f805a969
JQuery updated to 1.4.3
...
Check out http://blog.jquery.com/2010/10/16/jquery-143-released/ for
information on what's new.
2010-10-16 12:30:34 -02:00
Santiago Pastorino
4bfe30ca2f
delete from :number until the end
2010-10-15 21:09:32 -02:00
Piotr Sarnacki
b0157f8d04
Removed duplicated method find_root_with_flag
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-15 13:17:36 -02:00
Xavier Noria
21ff8849bb
in regexps, the dot in a character class is not a metacharacter
2010-10-15 16:31:00 +02:00
José Valim
c7aea81a39
Comment internal railties tasks.
2010-10-14 08:37:03 +02:00
Piotr Sarnacki
11558a11fe
Use railtie_name to correctly get name from plugins
2010-10-14 07:46:12 +02:00
Piotr Sarnacki
72545da091
Remove task for creating symlinks for railties
2010-10-14 07:46:12 +02:00
Piotr Sarnacki
a2c52f1004
Update documentation for new tasks
2010-10-14 07:46:12 +02:00
Piotr Sarnacki
43215de208
Add task foo:install (where foo is plugin) as a shortcutinstall:migrations and foo:install:assets
2010-10-14 07:46:12 +02:00
Piotr Sarnacki
959f8576f2
Added foo:install:assets task that copies assets from plugins public directory to application's public directory
...
This is the most simple and naive approach: just copy every files from engine to app.
The only exception is when file has changed, in that case developer will be
asked if he wants to rename the field.
There is no need to make this task more sophisticated as 3.1 will be shipped
with better assets handling and it will be the default way to handle things.
2010-10-14 07:46:12 +02:00
Piotr Sarnacki
f07cbec865
Do not treat information about skipped migrations as WARNINGs but as a NOTEs, also puts to stdin
2010-10-14 07:46:12 +02:00
siong1987
708e09448b
-j parameter added to rails new command.
...
Now you can start your apps with jquery with rails new myapp -j jquery, the default is still prototype
[#5613 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-11 19:47:53 -02:00
Xavier Noria
21a92b8d01
Merge branch 'master' of git://github.com/lifo/docrails
2010-10-11 12:06:21 +02:00
José Valim
a8b1780410
Updated DOCS for engines and added a couple TODOs. Also, commented internal railties rake tasks description.
2010-10-11 10:29:31 +02:00
Utkarsh Kukreti
7d08116222
Fix typo 'configation' [ #5575 state:resolved]
2010-10-11 12:12:36 +11:00
José Valim
621df2a1ec
Merge remote branch 'drogus/engines'
2010-10-10 14:57:19 +02:00
David Calavera
ab2f2b22a6
prevent rake test to run the test suite three times when ENV['TEST'] is set [ #3572 state:resolved]
...
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-10-10 12:22:40 +02:00
Piotr Sarnacki
a9bf91ea56
Add 'foo:install:migrations' task to copy migrations from foo engine
2010-10-09 22:31:26 +02:00
Piotr Sarnacki
b417cfbf01
Load rake tasks defined in superclasses in context of railties
2010-10-09 21:32:34 +02: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
Juan Maiz
b439c14516
Fixing two minor errors in Rails::Generators::Actions initializer method comments
...
[#5771 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-08 19:19:17 -02:00
Santiago Pastorino
e9793c60b6
Makes this code a bit more clear
2010-10-08 15:15:12 -02:00
Ryan Bigg
5826c17307
Remove the final initializers since initializers += will return it anyway. [ #3892 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-08 15:15:08 -02:00
Piotr Sarnacki
08f4713dba
Refactored routes reloading to use RouteSet#append instead keeping block in Engine
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-08 18:23:25 +02:00
Vesa Vänskä
c3c6f58ffb
Fixed rake task description typo
2010-10-08 15:14:10 +08:00
Ryan Bigg
1e63a05d28
Add "a" to make it better English
...
[#3796 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-07 11:40:57 -02:00
Xavier Noria
db520042b3
Merge branch 'master' of git://github.com/lifo/docrails
2010-10-06 23:16:13 +02:00
Thomas McDonald
3ca6988b78
Fixed typo in engine documentation
2010-10-06 22:11:03 +01:00
Rafael Mendonça França
a0552d653b
Fixes typo
2010-10-06 12:55:16 -03: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
wycats
d40ca9cce2
Some initial docs
2010-10-06 03:06:12 -07:00
wycats
0904e82568
Delegate everything to the generator
2010-10-06 02:58:49 -07:00
wycats
848eb0d777
Revert "Clean up the builder abstraction in AppGenerator."
...
The phrase "clean up" misrepresents the fact that this removes
a feature that ships with Rails 3.0.
This reverts commit 6774e12afa0f29442aa612ddf6e51d5a1b7a4356.
2010-10-06 02:53:00 -07:00
José Valim
6774e12afa
Clean up the builder abstraction in AppGenerator.
...
This commit may be reverted once documentation and a proper way to handle actions are added.
2010-10-06 11:13:57 +02:00
José Valim
4a4ff148ff
Use RbConfig instead of Config for 1.9.3 compatibility.
2010-10-05 09:48:32 +02:00
José Valim
848e48ec9c
Link to rack from github for this while.
2010-10-04 18:08:03 +02:00
Piotr Sarnacki
adfd43a4da
Add documentation on app_generators
2010-10-03 23:32:03 +02:00
José Valim
74dd8a3681
Move ETag and ConditionalGet logic from AD::Response to the middleware stack.
2010-10-03 21:25:22 +02:00
José Valim
49cc01002e
Be more explicit about what is deprecated.
2010-10-02 09:40:54 -07:00
José Valim
04cbabb0a0
Deprecate generators in Railties. You should use app_generators instead.
2010-10-02 18:38:23 +02:00
José Valim
7b0c592e38
reload_routes! is part of the public API and should not be removed.
2010-10-02 17:45:26 +02:00
Xavier Noria
542ddd8c89
brings csrf_meta_tags back to the generated layout
...
After more discussion, it has be agreed that this kind
of changes within reasonable margins are OK for 3.1.
That is, it is fine to change a little bit the generators
even if that means examples in existing books won't be
exact. (Note that the singular csrf_meta_tag exists as an
alias and thus those outdated examples will run, same for
existing applications.)
2010-10-02 00:10:32 +02:00
Neeraj Singh
33733d5d1d
no need to check for nil
2010-09-30 23:59:09 +08:00
José Valim
6b248f6ea5
Add more information to comments.
2010-09-30 10:33:31 +02:00
Piotr Sarnacki
9f569c60ad
Try to guess application's directory while trying to run the server, but only if config.ru is not present in current dir
2010-09-30 10:27:55 +02:00
Piotr Sarnacki
3049e645e5
Moved Rails::RoutesReloader to Rails::Application::RoutesReloader
2010-09-30 09:47:06 +02:00
Piotr Sarnacki
6648babded
Allow running generators for Engine with usage of other application.
...
After that commit, developers can set ENGINE_PATH in ENGINE/scripts/rails
file and load application's ./script/rails (most of the time it will be
dummy application used for testing). When running ./script/rails g it will
use application to boot up, but then it will use Engine's root and
configuration for generators.
2010-09-30 09:47:06 +02:00
Piotr Sarnacki
f851352318
Added config.app_generators to allow configuring application's generators from railties.
...
With config.generators becomes a way to configure generators
for current instance only. For example:
module Blog
class Engine < Rails::Engine
config.generators do |g|
g.orm :active_record
end
config.app_generators do |g|
g.test_framework :rspec
end
end
end
such definition sets :active_record as orm for engine and :rspec
as test_framework for application. The values set with app_generators
can be overwritten in application using config.generators as you would
normally do:
module MyApp
class Application < Rails::Application
config.generators do |g|
g.test_framework :test_unit
end
end
end
2010-09-30 09:47:06 +02:00
Piotr Sarnacki
57aa79e6be
Move routes_reloader to a class: RoutesReloader
2010-09-30 09:47:06 +02:00
Piotr Sarnacki
ec5d846ac6
Properly reload routes defined in class definition
...
Sometimes it's easier to define routes inside Engine or
Application class definition (e.g. one file applications). The
problem with such case is that if there is a plugin that
has config/routes.rb file, it will trigger routes reload on application.
Since routes definition for application is not in config/routes.rb
file routes_reloader will fail to reload application's routes
properly. With this commit you can pass routes definition as a block
to routes method, which will allow to properly reload it:
class MyApp::Application < Rails::Application
routes do
resources :users
end
end
2010-09-30 09:47:05 +02:00
Piotr Sarnacki
74598fe7e9
Do not overwrite _railtie method on namespace while creating isolated engine or application.
...
In order to run Engine as standalone application, you will need
Rails::Application instance in the same namespace that engine
one. It's very important to leave _railtie bound to whatever
used "namespace" method first.
2010-09-30 09:47:05 +02:00
Santiago Pastorino
006cef7107
Add gem 'arel' from git commented out as an example of how to Bundle egde Rails with Arel edge
...
[#5723 state:committed]
2010-09-29 00:14:48 -03:00
Carlos Antonio da Silva
7fc1edd790
Remove deprecated stuff in ActionController
...
This removes all deprecated classes in ActionController related to
Routing, Abstract Request/Response and Integration/IntegrationTest.
All tests and docs were changed to ActionDispatch instead of ActionController.
2010-09-26 02:13:45 +08:00
Piotr Sarnacki
0134c5cc94
Refactor a few methods connected with namespacing in Rails::Generators::NamedBase
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 17:28:10 +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
José Valim
e6d503bcfb
Update abort message (ht: tilsammans).
2010-09-25 11:01:43 +02:00
Piotr Sarnacki
135d6164c5
Rails.application is set anyway, we don't need to set it manually, this was purpose of different behavior in tests and in application
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 10:46:22 +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
bac0826b1f
Refactor namespaced generators to use module_namespacing block helper
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-24 21:02:30 +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
Emilio Tagua
63039b9c33
Fix typo and add sanity test for code statistics rake task.
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-24 15:51:29 +02:00
Fred Wu
51e8435e34
Ensures the app generator generates the correct @app_name. [ #5434 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-24 13:10:26 +02:00
David Chelimsky
672ce11d68
only abort in test_help in production env
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-24 12:52:38 +02:00
Emilio Tagua
8cfc6012f4
Perf: speed up 2 methods in railties.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-22 18:08:03 -03:00
Piotr Sarnacki
07411ca490
List all of isolated engine changes
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-20 23:55:27 +02:00
Piotr Sarnacki
dfac9b1404
Strengthen documantation on engine's migrations and seed data
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-20 10:41:12 +02:00
Piotr Sarnacki
d475de7e25
Add helper for loading seed data for engine and application
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-20 10:41:05 +02:00
Thiago Pradi
800bab79b3
Updating error message on ruby_version_check.rb
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-19 22:32:23 -07:00
rohit
fd53bc85e7
Send 'rails runner' help message to stdout instead of stderr.
...
[#5661 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-19 16:45:29 -07:00
David Trasbo
e808224652
Remove existing migration when using 'rails generate model' with --force [ #5526 state:committed]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-18 21:22:29 +02:00
Krekoten' Marjan
d4fa120671
Move capture to Kernel. [ #5641 state:resolved]
2010-09-18 20:49:36 +02:00
rohit
76266a8184
Fix output of 'rails runner --help' [ #4249 state:open]
2010-09-18 20:49:33 +02:00
Carl Lerche
117daba18a
Update Rails' built in routes to use RouteSet#append
2010-09-17 12:27:48 -07:00
Sparky
eeb3246991
Only add Rack::Cache to the middleware stack if config.action_controller.perform_caching is set.
2010-09-15 12:58:49 -07:00
Xavier Noria
dd6efe98b6
Merge remote branch 'docrails/master'
2010-09-14 20:07:29 +02:00
rohit
b59a8d42c3
Application settings are specified in application.rb and not environment.rb
2010-09-14 10:07:34 +05:30
Xavier Noria
0207bc7cc9
get csrf_meta_tag back to the generated layout in deference to existing printed material, chomp also the generated HTML to be faithful to the output before the refactor
2010-09-14 01:35:44 +02:00
wycats
254ab7d916
First pass at Rack::Cache
2010-09-13 16:06:03 -07:00
Xavier Noria
a87b92db7b
revises implementation and documentation of csrf_meta_tags, and aliases csrf_meta_tag to it for backwards compatibilty
2010-09-11 11:05:00 +02:00
Piotr Sarnacki
497b6af881
Set default asset_path only for engine
2010-09-10 17:20:16 +02:00
ISHIKAWA Takayuki
816ea74c8e
revision of typo: crytographically [ #5566 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-07 11:03:37 -03:00
Piotr Sarnacki
32157a2dd2
Add documentation on serving assets from engine strategies
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-06 17:09:31 +02:00
Piotr Sarnacki
24d2d6726e
Added task for creating symlinks to engines' public directories
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-06 14:38:36 +02:00
Carlos Antonio da Silva
7204bb0feb
Remove deprecation warnings in railties
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-06 13:38:12 +02:00
Piotr Sarnacki
e6b93fa6db
Removed deprecated router API from railties
2010-09-05 13:44:37 +02:00
José Valim
f9c21ce658
Remove more deprecated behavior from plugins.
2010-09-04 01:11:22 +02:00
José Valim
6f194bb3a9
Small tidy up on Rails::Engine.
2010-09-04 00:52:07 +02:00
Piotr Sarnacki
9af189ac8f
I've changed that test along the way, it should actually stay without changes
2010-09-03 22:59:16 +02:00
Piotr Sarnacki
6c906bf591
Use default_scope in isolated Engines to not force user to scope his routes
2010-09-03 22:59:15 +02:00
Piotr Sarnacki
b43b686b02
engines_blank_point should always be the last initializer in Engine
2010-09-03 22:59:15 +02:00
Piotr Sarnacki
a5e509d6b1
We should avoid creating additional initializers when we can, adding them makes boot process slower
2010-09-03 22:59:15 +02:00
Piotr Sarnacki
34cd8a68b1
Add some more docs on polymorphic_url with routes proxy
2010-09-03 22:59:14 +02:00
Piotr Sarnacki
e35c2043b1
Include all helpers from non-namespaced engines
2010-09-03 22:59:13 +02:00
Piotr Sarnacki
8284fd3855
Get rid of static_paths method and instead configure paths for ActionDispatch::Static in initializers
2010-09-03 22:59:12 +02:00
Piotr Sarnacki
434139f89f
Documented mounted helpers
2010-09-03 22:59:12 +02:00
Piotr Sarnacki
1a161c75ed
Document engine_name
2010-09-03 22:59:11 +02:00
Piotr Sarnacki
2e4e1e7d0c
Added documentation for namespaced Engine
2010-09-03 22:59:11 +02:00
Piotr Sarnacki
db8a864e69
Add table_name_prefix to Engine's namespace automatically
2010-09-03 22:59:11 +02:00
Piotr Sarnacki
a7c6fe4c2a
Rename isolated_engine_for to namespace
2010-09-03 22:59:11 +02:00
Piotr Sarnacki
c7664d112f
Include application's helpers and router helpers by default, but include engine's ones for controllers inside isolated namespace
2010-09-03 22:59:10 +02:00
Piotr Sarnacki
937f41919c
Engine's assets are now served with ActionDispatch::Static
2010-09-03 22:59:09 +02:00
Piotr Sarnacki
5b6553ebb5
Set asset_path to engine_name by default
2010-09-03 22:59:09 +02:00
Piotr Sarnacki
559979b984
Always convert railtie_name to string
2010-09-03 22:59:09 +02:00
Piotr Sarnacki
2068b8cb6a
Added tests for railtie_name and aliased it in engine as engine_name
2010-09-03 22:59:09 +02:00
Piotr Sarnacki
bfccbc6df9
Add Rails::Railtie.railtie_name method to allow setting custom name for railtie
2010-09-03 22:59:08 +02:00
Piotr Sarnacki
b52dfc6726
Added Rails.application.config.paths.db.migrate to remove hardcoded db/migrate paths
2010-09-03 22:59:08 +02:00
Piotr Sarnacki
a132229d7b
Added ability to set asset_path for engines
2010-09-03 22:59:08 +02:00
Piotr Sarnacki
abeb0ff2cc
Ensure that Rails.application.initialize! is called only once
2010-09-03 22:59:07 +02:00
Piotr Sarnacki
153df92f9f
Added documentation on endpoint, middeware stack and routes for Engine
2010-09-03 22:59:07 +02:00
Piotr Sarnacki
eedbf87d15
New way of generating urls for Application from Engine.
...
It's based specifying application's script_name with:
Rails.application.default_url_options = {:script_name => "/foo"}
default_url_options method is delegated to routes. If router
used to generate url differs from the router passed via env
it always overwrites :script_name with this value.
2010-09-03 22:59:05 +02:00
Piotr Sarnacki
177a4bd5b7
Fix url generation for mounted Engine
...
I added integration tests for generating urls in Engine and application
and tweaked Engines to fully cooparate with new router's behavior:
* Rails.application now sets ORIGINAL_SCRIPT_NAME
* Rails.application also sets its routes as env['action_dispatch.parent_routes']
* Engine implements responds_to? class method to respond to all the
instance methods, like #routes
2010-09-03 22:59:05 +02:00
Piotr Sarnacki
628b94fbc8
Pass routes via env['action_dispatch.routes'], it's needed by routes to determine if it should generate prefix for mounted apps
2010-09-03 22:59:05 +02:00
Piotr Sarnacki
32a5b49911
Move singleton pattern to Railtie and remove Engine::Configurable and Application::Configurable in favor of unified Railtie::Configurable
2010-09-03 22:59:05 +02:00
Piotr Sarnacki
939d4255e6
Removed most of deprecated stuff from Application and Engine
2010-09-03 22:59:04 +02:00
Piotr Sarnacki
7cccfed594
Allow Engines loading its own environment file from config/environments
2010-09-03 22:59:04 +02:00
Piotr Sarnacki
15f95b98ac
Ensure that plugins are not loaded twice
2010-09-03 22:59:04 +02:00
Piotr Sarnacki
efe9555cd7
We don't need to add railties initlaizers in Application as there is already done in Engine and it's called with super
2010-09-03 22:59:04 +02:00
Piotr Sarnacki
3939d6bb51
Removed ActionDispatch::Static, but left empty MiddlewareStack to unify app method between Engine and Application
2010-09-03 22:59:04 +02:00
Piotr Sarnacki
092b148b21
Engine can now serve files with ActionDispatch::Static
2010-09-03 22:59:04 +02:00
Piotr Sarnacki
c989d1a87d
Engine sets routes as default rack endpoint if no endpoint was given
2010-09-03 22:59:04 +02:00
Piotr Sarnacki
b5975a4a30
Delegate non existing class methods to instance for Engine
2010-09-03 22:59:03 +02:00
Piotr Sarnacki
7c8f73d1bd
Added TODO for evaling init.rb in context of Engine
2010-09-03 22:59:03 +02:00
Piotr Sarnacki
675f3ead41
Gather initializers from railties in engines to get rid of additional looping through initializers
2010-09-03 22:59:03 +02:00
Piotr Sarnacki
c787bfdf93
Engine can now load its own plugins
2010-09-03 22:59:03 +02:00
Piotr Sarnacki
ad6be08762
Made Engine valid rack app with its own middleware stack
2010-09-03 22:59:03 +02:00
rohit
d2fc5e2f65
Output a friendly message when no type given for GeneratedAttribute [ #5461 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-02 12:59:21 +02:00
José Valim
48bf667a8b
Ensure routes are loaded only after the initialization process finishes, ensuring all configuration options were applied.
2010-09-02 12:54:21 +02:00
Akira Matsuda
4d9b2da5f3
"rails console t" must not load "production" but "test"
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-02 11:50:31 +02:00
David Heinemeier Hansson
af03462b24
Dont need to spell out the dependency
2010-09-01 19:09:35 -05:00
David Heinemeier Hansson
278bc76ba6
Have sections for both Ruby 1.8.7 and 1.9.2 for the debugger since they use different gems
2010-09-01 17:39:06 -05:00
Xavier Noria
3805d01c9b
resolves merge conflict
2010-08-31 00:24:05 +02:00
Bryan Helmkamp
880f202591
Update README to match Rails 3 generated directory structure
2010-08-30 06:27:57 -04:00
Akira Matsuda
db24aab624
The command for creating the sessions table has changed
2010-08-30 16:02:11 +09:00
José Valim
800695ad4c
Remove constants deprecation.
2010-08-29 20:48:32 -03:00
Sam Ruby
600cf8bebc
Make rake routes gracefully handle routes with no name
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-08-29 14:38:29 -03:00
José Valim
82b700a89d
Ensure we are not calling length on nil.
2010-08-28 22:54:42 -03:00
Fred Wu
83f4507cf1
Fixed the session name generated by the app_generator. Also refactored the corresponding test suites to be cleaner. [ #5434 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-28 17:54:53 -03:00
Andrew White
5c2b6c55a0
Read the route name directly from the route instead of looking it up in the named routes hash
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-08-27 17:05:14 -07:00
Xavier Noria
df367adba1
adds a comment in cli.rb so that it is clear that exec_script_rails! performs an exec call
2010-08-27 23:27:29 +02:00
Jeremy Kemper
f98694b624
Ruby 1.9: be sure to explicitly reference toplevel constants within BasicObject deprecation proxies
2010-08-26 23:17:03 -07:00
Łukasz Strzałkowski
1ac20839a7
Fixed broken test suite - there was problem with namespacing in DeprecatedConstant class
2010-08-26 23:15:42 -07:00
wycats
8baba5f13e
Fix a subtle bug involving RAILS_ROOT
2010-08-26 23:15:31 -07:00
wycats
dbb547a056
Fix up constant deprecation to be less dependent on load order
2010-08-26 23:11:52 -07:00
Andrew White
0b9357d401
Remove rails info route from rake routes output [ #5452 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-25 07:22:20 -03:00
José Valim
edba51cf33
Hide internal apps from rake routes [ #5443 state:resolved]
2010-08-24 13:22:48 -03:00
David Heinemeier Hansson
21b1f29720
Master is now targeting 3.1.0.beta
2010-08-23 21:44:57 -05:00
David Heinemeier Hansson
0d657132b0
mysql db defaults to mysql2 gem
2010-08-23 21:41:16 -05:00
David Heinemeier Hansson
eb873f7133
Prefer the mysql2 gem for MySQL database.ymls
2010-08-23 21:19:53 -05:00
Santiago Pastorino
bb75c33754
Config is deprecated on 1.8.8 and 1.9.3 use RbConfig
2010-08-23 23:10:36 -03:00
Xavier Noria
3538dc0d7a
removes words moved in previous edit of the generator generator USAGE
2010-08-23 09:44:56 +02:00
Xavier Noria
28c8d17d28
adds USAGE to the generator generator USAGE (not sure this meta thing is any good at 8:12 AM with little coffee)
2010-08-23 09:40:27 +02:00
Raphomet
7a090b0216
Trifling typos
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-08-21 19:20:42 -03:00
Neeraj Singh
2a4eb69ff4
fixing typo
2010-08-17 21:29:37 -04:00
Xavier Noria
d14e2987b5
the (public) routing DSL does not accept symbols for get|post|put|delete|match
2010-08-17 02:37:28 +02:00
wycats
aaec007292
Make sure apps upgrading from 2.3 get defaulted to UTF-8 (ht: parndt)
2010-08-15 16:31:24 -07:00
José Valim
ada8c66ba0
Improve routes task code and print the application as :to => RackApp. [ #5338 state:resolved]
2010-08-15 16:36:12 -03:00
Mark Turner
99f3997520
make rake routes print the name of a Rack endpoint app [ #5338 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-15 16:22:57 -03:00
Santiago Pastorino
b451de0d6d
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 04:12:33 -03:00
Santiago Pastorino
919888503d
Moves local_request? to require.local?
...
[#5361 state:committed]
2010-08-13 17:35:52 -03:00
Nick Sieger
f5c5cdd4ae
Missed one spot for --skip-active-record, which means that new Gemfile isn't set up right
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-08-11 00:42:45 -03:00
wycats
6767946374
Improve best_standards_support to use only IE=Edge in development mode
2010-08-09 11:48:31 -07:00
Xavier Noria
3cbe111439
Merge remote branch 'docrails/master'
2010-08-05 01:15:57 +02:00
Xavier Noria
d191db76e0
standarizes the use of the article "an" for "SQL" and "SQLite"
2010-08-05 01:09:09 +02:00
José Valim
7e2399a42f
Revert "Put lib back on the autoload path"
...
This was causing engines/gems to eager load everything in lib. Another fix is comming soon.
This reverts commit 02a5842cd09bd75de4c2fdb6b474c6c0ff163ebf.
2010-08-04 14:13:50 +02:00
Simone Carletti
7745f716a1
Fixed Railtie Rdoc examples not properly formatted [ #4918 state:resolved]
...
Signed-off-by: Simone Carletti <weppos@weppos.net>
2010-08-04 13:27:14 +02:00
wycats
02a5842cd0
Put lib back on the autoload path
2010-08-03 14:57:55 -07:00
Curtis Cablegram
e1142dfcae
Refactor log-tailer to depend on File#eof? rather than File#mtime
...
[#5220 state:resolved]
Eliminate 1 instance variable and 1 local variable.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-03 10:50:25 +02:00
Curtis Cablegram
1466f312ba
Change log-tailer to properly track multi-byte characters.
...
When end-of-line is represented within a file as "\r\n",
it is represented in memory as a single "\n". This patch eliminates
the discrepancy between size on disk and size in memory.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-03 10:50:21 +02:00
José Valim
558ee6e95c
Handle edge cases in the previous patch.
2010-08-02 16:40:02 +02:00
Fred Wu
cdad483dff
Improved how AppGenerator generates the application name. It now detects the current app name whenever possible. This means that renaming the residing directory will not effect the app name generated by AppGenerator.
...
[#5225 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-02 16:30:20 +02:00
Santiago Pastorino
e6331b1e97
Makes rails destroy scaffold don't duplicate routes.draw do |map| |map| when using the deprecated syntax
...
[#5263 state:committed]
2010-08-02 10:55:09 -03:00
Prashant P. Shah
3b44b52fb0
Corrected the rake test:units and test:functionals description [ #5251 state:committed]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-08-01 22:17:15 -03:00
Johan Lundström
96f8325116
DHH forgot to remove JS, CSS in generated index.html [ #5261 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-07-31 20:38:12 -03:00
Xavier Noria
05e0fa9cfb
the main page of the API generated by the doc:rails task is README
2010-07-30 21:50:53 +02:00
Steve Agalloco
b823e50a54
fix for rails app generator when using --pretend option
...
[#5245 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-07-30 11:55:07 -03:00
Santiago Pastorino
e68e88e3ad
This version is going to be outdated when new nokogiri versions are released
2010-07-29 23:46:25 -03:00
Xavier Noria
755af49755
edit pass to apply API guideline wrt the use of "# =>" in example code
2010-07-30 02:30:04 +02:00
wycats
123eb25fd1
Add a header that tells Internet Explorer (all versions) to use the best available standards support. This ensures that IE doesn't go into quirks mode because it has been blacklisted by too many users pressing the incompatible button. It also tells IE to use the ChromeFrame renderer, if the user has installed the plugin.
...
This guarantees that the best available standards support will be used on the client.
2010-07-27 19:25:07 -07:00
rohit
5d3e8ee2bd
Fix app generator so that it uses the right app_name during rails:update rake task. [ #5207 state:committed]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-27 11:34:59 +02:00
Chad Fowler
b6f9932561
fix bad logic in determining if in rails app subdir
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2010-07-26 16:40:46 -05:00
David Heinemeier Hansson
d283ca34a9
Fix deprecation message on info screen
2010-07-26 16:35:27 -05:00
David Heinemeier Hansson
856fc4bbc3
Prep for RC
2010-07-26 12:53:25 -05:00
Santiago Pastorino
514624e53c
Fixes usage message when running rails without --dev on a cloned rails repo
2010-07-26 12:51:48 -03:00
Xavier Noria
6aa1253588
Merge remote branch 'docrails/master'
2010-07-26 00:23:57 +02:00
Santiago Pastorino
b0b9bf3204
Object#returning removed
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-25 23:30:27 +02: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
Jack Dempsey
9a9fb12623
Fix small middlewares typo
2010-07-24 15:28:45 -04:00
Santiago Pastorino
d16c5cc99b
Change some missing README -> README.rdoc
2010-07-22 01:47:06 +08:00
Santiago Pastorino
e107c208f0
Make config.generators accept string namespaces, you can do now config.generators.test_framework 'rspec' for instance
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-21 17:17:23 +02:00
Santiago Pastorino
79d6f314c6
We are doing the same in this conditions
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-21 17:17:22 +02:00
Santiago Pastorino
6ce761c8d9
This example is better for guides and gem/plugins docs
2010-07-20 13:08:03 -07:00
José Valim
fa98eca75b
Add console hook to force ActiveRecord::Base to be loaded when console starts avoiding reference loops.
2010-07-18 11:02:07 +02:00
José Valim
c6e2058637
Add skip_eager_load!, skip_autoload! and friends to path objects.
2010-07-17 09:55:11 +02:00
Xavier Noria
ef165b355d
minor pass to generated code in application.rb related to :defaults
2010-07-16 21:54:13 +02:00
Santiago Pastorino
114fa4d431
Adds application.js when app is generated with -J and clear javascript_expansions[:defaults]
2010-07-17 01:59:51 +08:00
Santiago Pastorino
041e47b326
Explain how to change javascript default files
2010-07-17 01:59:50 +08:00
Andrew Kaspick
684fb5e7d5
upgrade prototype to be compatible with rails.js [ #5109 state:committed]
...
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-07-14 12:47:27 +02:00
Benjamin Quorning
7e075e6247
Fixed many references to the old config/environment.rb and Rails::Initializer
2010-07-13 13:00:21 +02:00
Xavier Noria
c9ae2c11eb
application.rb: revises the comment for autoload_paths so that is assumes less from the user, and unifies punctuation
2010-07-09 19:09:47 +02:00
Sudara
e848ab527c
Allow a PID file to be specified to rails server [ #5031 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-08 22:35:02 +02:00
Akira Matsuda
bf5d154567
Print proper "Usage:" messages for "rails plugin" command
...
* suppress outputting "Unknown command:" when no command were specified
* output the "Usage:" message when no plugin names were given
[#5043 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-07-07 16:20:56 -07:00
Akira Matsuda
ff44cc2844
whitespace
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-07-07 16:20:51 -07:00
Xavier Noria
64c75d6618
Merge remote branch 'docrails/master'
2010-07-07 12:58:46 +02:00
Mark Hayes
db0530e4ba
Fixed typo in Rails::Generators::Base [ #5051 state:resolved]
2010-07-06 14:52:20 +05:30
Madjo DIAPENA
3cb5375832
ARGV.empty? is useless. If ARGV is empty, ARGV.first != "new" will always be true
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-04 18:49:28 +02:00
José Valim
0189fb76e3
reload_routes! was still referencing old Rails::Application.
2010-07-02 08:13:52 +02:00
José Valim
53b34e8476
Avoid calls to Rails::Application since this is not the official API.
...
Your application should *always* reference your application const (as Blog::Application) and Rails.application should be used just internally.
2010-07-01 18:43:44 +02:00
Jaime Iniesta
d167cfd62b
Fixes README for generated apps with Rails 3 (rails *new* myapp, and Welcome aboard text)
2010-07-01 17:34:35 +05:30
José Valim
0253bf425e
Change :notification to :notify (ht: m4n)
2010-06-29 14:07:54 -07:00
wycats
d4c7d3fd94
Create a deprecation behavior that triggers a notification for deprecation notices, and make the behaviors independent of the environment names.
...
* In Rails 2.3 apps being upgraded, you will need to add the deprecation
configuration to each of your environments. Failing to do so will
result in the same behavior as Rails 2.3, but with an outputted warning
to provide information on how to set up the setting.
* New Rails 3 applications generate the setting
* The notification style will send deprecation notices using
ActiveSupport::Notifications. Third-party tools can listen in to
these notifications to provide a streamlined view of the
deprecation notices occurring in your app.
* The payload in the notification is the deprecation warning itself
as well as the callstack from the point that triggered the
notification.
2010-06-29 12:20:15 -07:00
José Valim
b5b42af33f
Make the sentinel flag for route a bit more robust.
2010-06-28 17:09:09 +02:00
José Valim
e4f9132f6a
Do not trigger the old mapper to avoid deprecation messages.
2010-06-28 15:36:52 +02:00
Jeremy Kemper
f61d923d28
Update to latest rails.js
...
[#4411 state:resolved]
2010-06-27 16:42:30 -07: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
wycats
ccc8eba4dc
Change the generated Gemfile to resolve, via documentation, the issue of rspec generators being unavailable in development mode
2010-06-25 12:19:22 -07:00
David Heinemeier Hansson
6682cce038
Dont reload the environment, just not needed bro
2010-06-24 17:38:46 -05:00
Prem Sichanugrist
67ee6c38b9
Remove the --singeleton option from scaffold generator.
...
It turned out to be that scaffold for singeleton resource will always depend on another model, and it's not possible at the moment to make the application tests pass after generate the singeleton scafold. So, it would be better to remove it for now and probably provide another generator, such as singeleton_scaffold, in which also require the depended model name.
[#4863 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-24 20:17:59 +02:00
José Valim
6788db824a
Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [ #4816 state:resolved]
2010-06-24 13:23:43 +02:00
José Valim
e061a12a15
Remove run_initializers from class methods.
2010-06-24 11:40:22 +02:00
Jeremy Kemper
5eb3b4d9a7
Fix initializable tests
2010-06-24 02:16:59 -07:00
Jeremy Kemper
9f7874ac41
Move Collection responsibility from application to initializable
2010-06-24 02:13:08 -07:00
Jeremy Kemper
cdb8609c64
Speed up boot by tsorting as infrequently as possible
2010-06-24 02:04:00 -07:00
Xavier Noria
6f83a5036d
renames load_(once_)paths to autoload_(once_)paths in dependencies and config
2010-06-24 00:17:28 +02:00
Mohammed Siddick.E
7008911222
Patch for Namespace problem in Scaffold. [ #4763 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-23 09:30:55 +02:00
Trevor Turk
64987d6711
Note that 'rails server' allows specifying mongrel, thin, etc [ #4845 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-22 21:13:12 +02:00
rohit
40bf76165c
Rails Runner now sets $0 and $PROGRAM_NAME to name of file being run [ #2244 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-22 15:20:29 +02:00
Jeff Kreeftmeijer
ead72b319f
Changed ruby /path/to/rails myapp --dev
to ruby /path/to/rails new myapp --dev
in the "Thor is not avalable" message. [ #4915 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-21 11:10:25 +02:00
Xavier Noria
b311dbb0ba
Revert "files in the lib directory are no longer autoloaded"
...
This patch is not consistent since it leaves similar
directories in load_paths, needs more thought.
This reverts commit b5fe014fdcc285f3bcb8779c4f7cfbc5a820856f.
2010-06-21 01:46:24 +02:00
José Valim
f81666698b
Alias app to build_middleware_stack for clarity.
2010-06-21 01:08:50 +02:00