Commit Graph

1802 Commits

Author SHA1 Message Date
José Valim
9ee6f3cc8e Bring config.allow_concurrency back
Since the Rack::Lock still exists in development,
let's provide a way to disable it explicitly.
2013-03-03 13:20:44 -07:00
José Valim
dd5a80dc3d Remove hard coded references to Active Record in railties 2013-03-02 13:52:32 -07:00
Sammy Larbi
20e041579f Support creating a table migration generator
Sometimes you want to create a table without an associated model and
test, which is also not a join table. With this commit, you can now
do that.

Example:

    rails g migration create_posts title:string
or
    rails g migration CreatePosts title:string

This commit also moves the template the model generator uses for the
migration to the migration templates folder, as it seems a more
sensible place for it now that it is shared code.
2013-03-01 06:13:30 -06:00
José Valim
dc53fe9240 Ensure plugins generated with plugin new can boot the dummy application 2013-02-28 12:09:04 -07: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
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
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
Yves Senn
2dffe37ce4 remove uncommented railties boot_test.rb 2013-02-21 10:22:12 +01: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
Carlos Antonio da Silva
a700917272 Fix rake routes output in railties test 2013-02-19 09:21:03 -03: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
Rahul P. Chaudhari
afdb84a1fe Added notice message for destroy method in scaffold 2013-02-10 01:19:02 +05:30
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
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
b45c63b8c0 Revert "Set the default timezone after the initialization since the configuration"
This reverts commit 39374aa925a7d670b039c0c0c9aa9f4aef19466b.
2013-01-22 09:29:20 -02: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
Piotr Sarnacki
445f14e975 Fix asset_path in mounted engine
Historically serving assets from a mountable engine could be achieved by
running ActionDispatch::Static as a part of engine middleware stack or
to copy assets prefixed with an engine name. After introduction of
assets pipeline this is not needed as all of the assets are served or
compiled into main application's assets.

This commit removes the obsolete line making asset_path always generate
paths relative to the root or config.relative_url_root if it's set.

(closes #8119)
2013-01-21 21:21:39 +01:00
Rafael Mendonça França
57126ee5e3 Restore and adapt the implementation reverted at
cc1c3c5be0

Now instead of raise, we log by default in development and test
2013-01-19 15:32:27 -02:00
Akira Matsuda
8b0e52556e script => bin 2013-01-18 17:12:47 +09: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
Nick Reed
dcb05f264a Account for ignored cookie set by turbolinks 2013-01-14 22:12:31 -06:00
Rafael Mendonça França
50454559f8 Add regression test to #8907 2013-01-14 00:20:32 -02:00
Pavel Pravosud
cca17296de More consistent quotes in scaffold generator 2013-01-11 10:26:39 +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
David Heinemeier Hansson
cc1c3c5be0 Revert "unpermitted params" exception -- it's just not going to work. See the discussion on https://github.com/rails/strong_parameters/pull/75. 2013-01-08 16:17:30 +01:00
Carlos Antonio da Silva
a0730e0027 Fix readme tests
Related to the change introduced in 6cf47c533d7d6784d34fc31406a335555e0c32b8.
2013-01-07 22:31:15 -02:00
Xavier Noria
553b6958dc doc/README_FOR_APP is no longer generated 2013-01-08 00:50:56 +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
Rafael Mendonça França
23714ec33f Move config.filter_parameters to you own initializer file
This is very rarely changed and does not deserve to be in application.rb
2013-01-05 15:50:53 -03:00
Rafael Mendonça França
89979ca8ff Assert config.filter_parameters should be able to be set in a initializer 2013-01-05 15:05:28 -03:00
Rafael Mendonça França
4017f6c7e6 Make sure assets is disable when --skip-sprockets is used 2013-01-05 14:00:43 -03:00
David Heinemeier Hansson
201f8d7753 config.assets.enabled is now true by default 2013-01-05 17:56:53 +01:00
Carlos Antonio da Silva
7a34e0b1bd Remove warning "ambiguous first argument" 2013-01-05 09:45:34 -02:00
Rafael Mendonça França
1401f96492 Rename the configuration to raise_on_unpermitted_parameters
Also changed the exception to UnpermittedParameters
2013-01-05 06:39:51 -03:00
Rafael Mendonça França
58f52677e8 Ensure that raise_on_unexpected_params configuration will work 2013-01-05 06:23:28 -03:00
Rafael Mendonça França
fab7c53585 Merge pull request #8633 from mykola-kyryk/issue_8628
Allow environment name to start with a substring of the default
environment names.

Fixes #8628
2013-01-04 14:03:24 -08:00
Akira Matsuda
ab3cf010ad fix failing test broken in 15fb7889c5566ddade1d8f74f49bbbc1c0be6057 2013-01-05 05:44:03 +09:00