Commit Graph

9002 Commits

Author SHA1 Message Date
Guillermo Iguaran
94bebde8a7 Bump sass-rails and coffee-rails to 4.0.0.beta1 in Gemfile 2013-02-25 16:40:35 -05:00
robertomiranda
ed6d8f0ac6 Remove sprockets-rails from the Gemfile generator 2013-02-25 15:32:00 -05:00
David Heinemeier Hansson
c0bc9ce38c Preparing for 4.0.0.beta1 release 2013-02-25 08:31:50 -06:00
Guillermo Iguaran
ebe9590def Revert "Use sass compressor as the default CSS compressor"
This reverts commit 3eef1c7c5d0c4538efb9e061b6fe68011f0352b1.
The css compressor should be set in sass-rails plugin. Check
339529f9f6
for the fix.
2013-02-25 09:20:22 -05:00
Rafael Mendonça França
3eef1c7c5d Use sass compressor as the default CSS compressor
With the new sprockets-rails we need to explicitly set the CSS
compressor.

See https://github.com/rails/sprockets-rails#changes-from-rails-3x
2013-02-25 10:19:02 -03:00
Hendy Tanata
82e345dd7a Improve rake stats for JavaScript and CoffeeScript.
Ignore block comments and calculates number of functions.
2013-02-25 21:08:11 +08:00
Rafael Mendonça França
bce6cbdeab Merge pull request #9401 from sikachu/master-remove-builder-option
Remove `--builder` option from `rails` command
2013-02-24 11:35:05 -08:00
Prem Sichanugrist
2da5ea1c9f Remove --builder option from rails command
Ability to use a custom builder by passing `--builder` (or `-b`) has
been removed. Consider using application template instead. See this
guide for more detail:
http://guides.rubyonrails.org/rails_application_templates.html
2013-02-24 14:31:08 -05:00
Xavier Noria
d65376fce4 Merge pull request #9400 from senny/remove_auto_explain_threshold_in_seconds
remove config.auto_explain_threshold_in_seconds
2013-02-24 11:16:35 -08:00
Yves Senn
d3688e02ca remove AR auto-explain (config.auto_explain_threshold_in_seconds)
We discussed that the auto explain feature is rarely used.
This PR removes only the automatic explain. You can still display
the explain output for any given relation using `ActiveRecord::Relation#explain`.

As a side-effect this should also fix the connection problem during
asset compilation (#9385). The auto explain initializer in the `ActiveRecord::Railtie`
forced a connection.
2013-02-24 20:01:04 +01:00
Guillermo Iguaran
40111c5c8a Use sprockets-rails 2.0.0.rc3 in new apps 2013-02-24 13:31:29 -05:00
Yves Senn
6bd1cae459 Revert "move config.assets.precompile into config/application.rb"
This reverts commit 304f4d4c25ccabdbf97d37dd7a92a54d0b63a9c9.

As it turns out everything should behave as it did and we don't
need to move this configuration option.
2013-02-24 18:01:43 +01:00
Sam Ruby
549ced9c10 guides/rails_guides moved up and out of the railties directory 2013-02-23 16:06:05 -05:00
Steve Klabnik
c5a9c02e01 Fix backwards compatibility with Rails 3 apps.
When we removed script/rails and introduced bin/rails, we accidentally
introduced a regression. If you install Rails 4 as a gem, then try to do
something in a Rails 3 application:

    $ rails g

This will throw the 'please type rails new foo' message rather than the
proper generator documentation message. This is because older apps don't
have bin/rails.

Therefore, we now *prefer* bin/rails, but still search for script/rails,
and exec the one we find.
2013-02-22 14:30:21 -05:00
iwiznia
7b6f2a0f24 Update railties/lib/rails/application/configuration.rb
Better comment for database_configuration method
2013-02-21 16:41:26 +01:00
iwiznia
d0dfe16ccc Update railties/lib/rails/application/configuration.rb
Changed comment that referenced the property #database_configuration_file, now it's paths["config/database"]
2013-02-21 16:11:28 +01:00
Yves Senn
2dffe37ce4 remove uncommented railties boot_test.rb 2013-02-21 10:22:12 +01:00
Rafael Mendonça França
b85f63bbd0 Merge pull request #9341 from senny/move_precompiled_asset_config_to_application
move config.assets.precompile into config/application.rb
2013-02-20 08:18:08 -08:00
Yves Senn
304f4d4c25 move config.assets.precompile into config/application.rb 2013-02-20 15:53:37 +01:00
Terence Lee
b1de1892bc update changelog 2013-02-21 01:25:05 +11:00
Terence Lee
e3f5d023ff run the load_structure test in the test environment 2013-02-21 01:25:05 +11:00
Terence Lee
44298c39e4 test DATABASE_URL without database.yml around 2013-02-21 01:25:05 +11:00
Terence Lee
4bdaf95b82 standardize database_configuration to a hash
make connection_url_to_hash a class method

This als prevents loading database.yml if it doesn't exist
but DATABASE_URL does
2013-02-21 01:25:05 +11:00
Akira Matsuda
c2c203c852 Better not use tab chars in the generator template 2013-02-20 09:48:12 +09:00
Carlos Antonio da Silva
a700917272 Fix rake routes output in railties test 2013-02-19 09:21:03 -03:00
Andrew White
212ef5278b Remove config.autoload_paths from config/application.rb
Most application developers shouldn't be adding paths to
`config.autoload_paths` as it won't be eagerly loaded so
remove it from the generated config/application.rb file.

If a developer does want to autoload from paths outside of the app
directory then they should add the path to `config.eager_load_paths`
as these paths are also autoloaded as well.
2013-02-19 07:53:13 +00:00
Andrew White
a8bf12979e Don't unhook autoloading in production
Whilst autoloading is known to be not threadsafe, leaving it in place
is a softer solution than failing hard when an application is deployed.

Many older applications will have paths added to `autoload_paths` and
ideally these should be eagerly loaded to be threadsafe. However one
of these paths is quite often lib which could lead to unintended
consequences due to the 'junk drawer' nature of this directory.

Developers should refrain from adding paths to `autoload_paths` or
`eager_load_paths` and use custom folders inside app for code that
needs to be eagerly loaded and use `require` or `require_dependency`
to explicitly load code from other locations.
2013-02-19 07:28:11 +00:00
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
Xavier Noria
40a10270c1 editorial tweaks 2013-02-19 01:34:17 +01:00
Steve Klabnik
f4f0264b45 Use strip_heredoc in the tests as well.
Thanks @sikachu. 😅
2013-02-18 16:26:25 -08:00
Steve Klabnik
d3b836ac4a Add message when you have no routes defined.
Print a message in both `rake routes` and at GET "/rails/info/routes"
that lets you know you have no routes defined, as well as linking to the
Rails Guide on the topic.
2013-02-18 16:09:37 -08:00
Akira Matsuda
57b0ae8011 Gist URLs are now namespaced
see: https://github.com/blog/1406-namespaced-gists
2013-02-18 23:59:48 +09: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
Carlos Antonio da Silva
7765ee0e47 Add changelog entry for #9177 [ci skip]
Add test:all and test:all:db rake tests to speed up full test runs.
2013-02-11 11:25:13 -02: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
Akira Matsuda
517cfbe110 --no-rc in the railties tests
so that the tester's local .railsrc file does not affect the test results
2013-02-01 22:10:45 +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