Commit Graph

3970 Commits

Author SHA1 Message Date
Andrew White
9d9b22f47a Revert "Deprecate the eager_load_paths configuration"
Because of the possibility of lib being unintentionally eager loaded
it's been agreed that we'll leave autoload paths and eager load paths
separate for Rails 4.0.

This reverts commit 0757b3388ffe4f44b60de950d40e18ef05055931.

Conflicts:
	railties/CHANGELOG.md
2013-02-19 07:22:37 +00:00
wangjohn
b4c99ea0a4 Added extra comment when a migration already exists of the same name.
User should know that he can overwrite the previous migration. This
comes in handy especially when generating models which were previously
created then removed.
2013-02-15 08:29:16 -05:00
Jeremy Kemper
a0380e808d Prefer Ruby 2.0; require 1.9.3+ 2013-02-09 17:41:07 -07:00
Rahul P. Chaudhari
afdb84a1fe Added notice message for destroy method in scaffold 2013-02-10 01:19:02 +05:30
Ryunosuke SATO
3b7b887ac1 Fix article for generator name
Use 'some' instead of 'a/an'.
2013-02-07 01:41:02 +09:00
Ryan Davis
0e006373e0 Added test:all and test:all:db tasks to speed up full test runs.
Speed up depends on the number of test phases (N) you have for your
app, but it is roughly a 1/N improvement. In my app, it goes from
15.51s to 5.56s.

Inspired by http://ngauthier.com/2012/02/quick-tests-with-bash.html

Reviewed by @tenderlove
2013-02-04 14:50:04 -08:00
Guillermo Iguaran
cb48bbeb00 Merge pull request #9175 from robertomiranda/add--rc-desc
Add --rc description on the command line
2013-02-04 13:30:15 -08:00
robertomiranda
3a5b38bc3d Add --rc description on the command line 2013-02-04 16:25:44 -05:00
robertomiranda
51030364ec Use --rc= instead of --rc 2013-02-04 16:05:38 -05:00
robertomiranda
9e18ce7f93 Add --no-rc description on the command line 2013-02-02 09:57:07 -05:00
Guillermo Iguaran
784ed154c3 Refactor --rc option 2013-02-02 00:36:43 -05:00
Amparo Luna
5f1dc8e3b7 Add --rc option to support the load of a custom rc file 2013-02-01 23:17:41 -05:00
Akira Matsuda
9d2187efb7 Prefer File.read over File.open.read 2013-02-01 22:11:40 +09:00
Amparo Luna
a1e1af9b21 Add --no-rc option to skip the loading of railsrc file 2013-01-31 19:30:47 -05:00
Guillermo Iguaran
3bccd12373 Remove BestStandardsSupport middleware 2013-01-29 14:20:58 -05:00
Rafael Mendonça França
9826823e66 Merge pull request #8303 from jeremywrowe/master
Fixes improper database name when creating a new rails app with a '.'

Conflicts:
	railties/CHANGELOG.md
2013-01-25 10:21:48 -02:00
Andrew White
0757b3388f Deprecate the eager_load_paths configuration
Since the default in Rails 4.0 is to run in 'threadsafe' mode we need
to eager load all of the paths in `autoload_paths` so we alias
`eager_load_paths` to it. This may have unintended consequences if
you have added 'lib' to `autoload_paths` such as loading unneeded
code or code intended only for development and/or test environments.
If this applies to your application you should thoroughly check what
is being eager loaded.
2013-01-24 23:54:41 +00:00
Carlos Antonio da Silva
6fcdcfe1e5 Revert "Merge pull request #7873 from steveklabnik/update_initializer"
This reverts commit 43e14f8ff203c21646f733d35bdde4e68da70a3b, reversing
changes made to bb17a0f085aba40a1952612f6c98b2a5804a1152.

Conflicts:
	railties/lib/rails/generators/rails/app/templates/config/application.rb
	railties/lib/rails/generators/rails/app/templates/config/initializers/locale.rb

Reason: setting the Time.zone in an after_initialize block can become a
problem for people upgrading, since it's not going to be available when
config/initializers run, and people might be relying on it.

An example that I noticed was with the Chronic gem, for date/time parsing.
It requires us to configure the time class to be Time.zone, and doing
that in an initializer no longer worked with these changes, so reverting
is the safer path for now.
2013-01-22 09:31:31 -02:00
Ryunosuke SATO
94df6d864d Remove unnecessary require
`require 'rubygems'` is already required in Ruby 1.9 or later.
2013-01-22 18:44:25 +09:00
Rafael Mendonça França
19bd2f2279 Merge pull request #8557 from timraymond/add_back_engines_and_deprecate
Adding Back Rails::Engine::Railties#engines

Conflicts:
	railties/CHANGELOG.md
2013-01-22 00:00:20 -02:00
Akira Matsuda
02902e00ab use tap with block parameter 2013-01-18 17:12:47 +09:00
Matt Bridges
08ac4b9672 clear specific logs when using rake log:clear 2013-01-16 17:12:32 -06:00
Jeremy W. Rowe
c45980fe6e Fixes improper database name when a '.' is included while creating a new rails
application. EG: `rails new something.awesome.com`
Conflicts:
	railties/CHANGELOG.md
2013-01-16 15:12:31 -06:00
Brian D. Burns
5a9b3b7a74 allow :dirs option for .enumerate
Allows custom rake tasks to be defined using:

  SourceAnnotationExtractor.enumerate 'TODO|FIXME', dirs: %w(app lib), tag: true
2013-01-15 14:14:05 -05:00
Brian D. Burns
7fff04f4e8 use case statement 2013-01-15 13:47:12 -05:00
Carlos Antonio da Silva
2549a3b088 Deprecate Rails::Generators::ActiveModel#update_attributes
Deprecate #update_attributes in favor of `#update`.

ORMs that implement `Generators::ActiveModel#update_attributes` should change
to `#update`. Scaffold controller generators should change calls like:

    @orm_instance.update_attributes(...)

to:

    @orm_instance.update(...)

This goes along with the addition of `ActiveRecord::Base#update`,
introduced in cb2bd4aa619d9329c42aaf6d9f8eacc616ce53f4.
2013-01-12 10:52:13 -02:00
Rafael Mendonça França
563ebedba3 Merge pull request #8887 from rwz/controller-scaffold-codestyle
Controller scaffold codestyle
2013-01-10 19:29:45 -08:00
Pavel Pravosud
cca17296de More consistent quotes in scaffold generator 2013-01-11 10:26:39 +07:00
Pavel Pravosud
d643cbe7f8 Changed if ! to unless 2013-01-11 10:20:43 +07:00
Pavel Pravosud
7c8321cfd8 Specified jbuilder version 2013-01-11 10:14:15 +07:00
David Heinemeier Hansson
3bfd99defb Include jbuilder by default and rely on its scaffold generator to show json API. The default scaffold will now just create HTML if the user actively opts out of jbuilder 2013-01-10 20:21:22 +01:00
Yves Senn
ce8e3d3072 remove performance tests from the default stack 2013-01-10 17:09:06 +01:00
Yves Senn
3e1ed7818b extract PerformanceTest into rails-performance_tests gem 2013-01-10 17:09:06 +01:00
Aaron Patterson
ffa9540fd3 fire a notification when the request stops / starts 2013-01-09 15:34:58 -08:00
Aaron Patterson
23b69c95ac extract logger and development checks to methods 2013-01-09 15:34:58 -08:00
Matt Bridges
68ad9e3906 use multiline do-end blocks and rearrange definition for clarity 2013-01-09 09:53:29 -06:00
Xavier Noria
6b126e2383 mv README README.rdoc as app template file 2013-01-08 22:49:11 +01:00
Vijay Dev
f049016cd3 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	guides/source/getting_started.md
2013-01-09 01:04:15 +05:30
Ryunosuke SATO
c7f6081d75 Use absolute path
It is semantically correct than relative path.
2013-01-08 19:44:34 +09:00
Guillermo Iguaran
3e71f5759a Don't configure Turn output, we aren't using it since 3.2.0 2013-01-07 23:51:57 -05:00
Guillermo Iguaran
4200614b2a Merge pull request #8801 from ktheory/dont_require_turn
Don't require 'turn' from rails/test_help
2013-01-07 20:19:21 -08:00
Carlos Antonio da Silva
b4ac65aa38 Initialize instance variable to remove warning
actions.rb:34: warning: instance variable @in_group not initialized
2013-01-07 22:51:17 -02:00
Xavier Noria
6cf47c533d new README generated for new apps 2013-01-08 00:50:56 +01:00
Xavier Noria
553b6958dc doc/README_FOR_APP is no longer generated 2013-01-08 00:50:56 +01:00
Carlos Antonio da Silva
ded5f5b261 Revert some warning removals related to Ruby 2.0
These warnings were actually a bug in Ruby 2.0, the accessors should not
be raising such warnings, they are only meant for ivars.

-

Revert "fix warnings in Ruby 2.0"

This reverts commit 26702a6d3461f4a1c75165030b96886514ecb877.

-

Revert "Merge pull request #8282 from arunagw/warning_removed_for_ruby2"

This reverts commit f63d6544e45e78cda29c0c56fbdf3d9e1f405340, reversing
changes made to 3a890681fad8218305585036abed6d7463a44e41.
2013-01-07 19:46:14 -02:00
Aaron Suggs
bc95767b14 Don't require 'turn' from rails/test_help
If 'turn' is in the Gemfile with `:require => nil`, Rails should
respect that.

This supports the case where 'turn' may or may not be required
depending on different developers' preference or environment. E.g., you
require turn for local testing, but not on your CI server by putting
this in `test/test_helper.rb`:

    require 'turn' if ENV['TURN']
2013-01-07 14:51:38 -05:00
David Heinemeier Hansson
e63e280bed Use similar comment style 2013-01-07 10:13:47 +01:00
Jeremy Kemper
009873aec8 Introduce ./bin for your app's executables: bin/bundle, bin/rails, bin/rake. Executable scripts are versioned code like the rest of your app. To generate a stub for a bundled gem: 'bundle binstubs unicorn' and 'git add bin/unicorn' 2013-01-06 21:41:36 -07:00
Yehuda Katz
d6c732ffd1 Merge pull request #8263 from senny/refactor_plugin_new_generator
refactor the naming within plugin new generator
2013-01-06 10:57:51 -08:00
Carlos Antonio da Silva
15971c3d51 Rescue from LoadError when trying to load the debugger gem for console
Avoid swallowing all exceptions that might happen when requiring
debugger, just catch a LoadError if it cannot be loaded.

Check for more background:
28fd867c9b (commitcomment-2386952)
2013-01-06 11:27:36 -02:00