Commit Graph

1962 Commits

Author SHA1 Message Date
Rafael Mendonça França
9027ce9f7e Merge pull request #10175 from vipulnsward/initialize_fix
initialize instead of assert to fix warning
2013-04-11 09:20:54 -07:00
Vipul A M
8134c26640 initialize instead of assert to fix warning 2013-04-11 21:26:36 +05:30
Xavier Noria
2e3f5191f0 fixes app_rails_loader_test.rb in Mac OS X 2013-04-11 15:22:59 +02:00
Xavier Noria
f64ba8782e fixes remaining lowercase "rails" 2013-04-11 13:28:57 +02:00
Xavier Noria
85de183071 application loader refactor and test suite complete rewrite 2013-04-11 13:19:16 +02:00
Prathamesh Sonpatki
22e5ab31b5 Searching for rails executable correctly
* Current logic of finding Rails executable in parent directory is
   not returning full path of executable if it is found in one of the
   parent directories
 * To compensate for this, we have to call exec_app_rails recursively
   until the executable is found or we cant do 'chdir' anymore
 * This solution finds the correct executable path from parent
   directory(s) recursively
2013-04-10 20:52:33 +05:30
Andrew White
17a886b275 Add failing test case for #9654 2013-04-10 08:11:43 +01:00
Aaron Patterson
cc0c392c77 add integration test for shorthand rake tests 2013-04-05 17:12:23 -07:00
Aaron Patterson
2e0e5bb1e4 rake test app/model/foo.rb and rake test models/foo works 2013-04-05 17:06:36 -07:00
Aaron Patterson
88cf64a669 extract test info from the command line and set up the test task 2013-04-05 16:38:37 -07:00
Aaron Patterson
7f698da887 add a class for splitting up rake commands 2013-04-05 16:31:19 -07:00
Aaron Patterson
c7a148f389 removing rails test, updating docs to show how to use rake test 2013-04-05 15:44:41 -07:00
Aaron Patterson
01034d3be0 Merge branch 'master' into railstest
* master: (44 commits)
  Improve the changelog entry [ci skip]
  Fix explicit names on multiple file fields
  Correctly parse bigint defaults in PostgreSQL
  Move changelog to the top [ci skip]
  Fix indent and remove extra white spaces
  Fix scope chaining + STI
  failing test for #9869
  Improve `belongs_to touch: true` timestamp test
  Sort modules in alphabetical order.
  Avoid an attempt to fetch old record when id was not present in touch callback
  Use the correct pk field from the reflected class to find the old record
  Refactor mail_to to not generate intermediate hashes when adding href
  Ensure mail_to helper does not modify the given html options hash
  Use inspect when writing the foreign key from the reflection
  Use a space after the comment sign when showing the result of commands
  Exclude template files for rdoc API [ci skip]
  template should have generic name
  use | to have more intent revealing code
  Revert "Merge pull request #10034 from benofsky/fix_skipping_object_callback_filters"
  stop depending on callbacks
  ...

Conflicts:
	railties/test/application/rake_test.rb
2013-04-05 14:48:49 -07:00
Aaron Patterson
c037659294 do not blow away the test database on every run 2013-04-05 14:22:29 -07:00
Vipul A M
113e39625b fix private attribute warning 2013-04-04 23:23:46 +05:30
Vipul A M
dcc75b05d4 fix warnings in railties test 2013-04-04 10:21:43 +05:30
Vipul A M
2282964de7 Fix some railties test warnings 2013-04-03 23:25:46 +05:30
Aaron Patterson
125cbc3fdf test no longer makes sense after requiring all test files 2013-04-03 12:16:19 -04:00
Aaron Patterson
328814b000 switch the testing tests to use rake 2013-04-03 12:16:19 -04:00
Aaron Patterson
29f973c92c Revert "Update Rake tasks to call rails test instead"
This reverts commit b51673fbd9563bd3ffa22e22255ca1cef80cfb6d.
2013-04-03 12:16:19 -04:00
Aaron Patterson
62a080309b apps that depend on active record should load fixtures 2013-04-03 12:16:18 -04:00
Trevor Turk
2edf657a64 Remove comments about removing LegacyKeyGenerator in 4.1 2013-04-03 08:28:37 -05:00
Trevor Turk
7c7a427344 Rename DummyKeyGenerator -> LegacyKeyGenerator 2013-04-02 18:41:57 -05:00
Jessica Lynn Suttles
c959798571 Fix tests from rails.png removal.
I'm giving @jlsuttles credit on this commit because she gave me the idea
and the actual converted image in 952289aabfb.
2013-04-02 14:27:38 -07:00
Santiago Pastorino
f9d23b3848 Merge pull request #9978 from trevorturk/cookie-store-auto-upgrade
Cookie-base session store auto-upgrade
2013-04-01 08:10:34 -07:00
Vipul A M
c0be6c9811 cleanup railties test; fix typos 2013-03-31 20:50:21 +05:30
Xavier Noria
f01b7570c5 be lazy loading SDoc 2013-03-30 11:34:35 +01:00
Trevor Turk
274a3aa64c Allow transparent upgrading of legacy signed cookies to encrypted cookies; Automatically configure cookie-based sessions to use the best cookie jar given the app's config 2013-03-28 14:38:36 -05:00
Prathamesh Sonpatki
c6605c5af3 Fix typo 2013-03-28 23:51:54 +05:30
David Chapman
231b1096b9 s/and and run/and runs/
Fixing some typos/grammar.
2013-03-26 13:04:52 -05:00
Prathamesh Sonpatki
5546081c4f Fixed typo in railties/test 2013-03-25 20:47:26 +05:30
Prathamesh Sonpatki
6a499cd97f Controller name pluralized 2013-03-25 14:40:31 +05:30
Jeremy Kemper
3b2a241946 Fix jquery-as-default test to account for switch from gem to github source in #9904 2013-03-25 00:01:38 -07:00
Gabe Kopley
940da7d9cb Put coffee-rails in top-level of generated Gemfile
v3 of pull request based on additional feedback from @jeremy
2013-03-24 22:31:48 -07:00
Vipul A M
a8df5bdc5d Fix some typos 2013-03-24 19:05:41 +05:30
Guillermo Iguaran
1f1adb835a Fix test: ActiveSupport.version is returning now a Gem::Version instead of a String 2013-03-24 00:41:13 -05:00
Rafael Mendonça França
e600384515 Merge pull request #8501 from charliesome/version-to-s
Add #to_s method to VERSION modules
2013-03-23 18:51:16 -07:00
Jon Leighton
c91789c76b Don't kill the console
Use the "quit" command instead. This seems to prevents some weirdness on
OS X. See #9761.
2013-03-22 14:43:49 +00:00
Jon Leighton
7748d64a76 Send SIGTERM, not SIGQUIT.
SIGTERM is the correct signal for a graceful exit.

This will hopefully resolve #9761.
2013-03-22 12:04:29 +00:00
Charlie Somerville
f0e6ab59f6 remove references to *::VERSION, replace with *.version 2013-03-21 19:56:07 +11:00
Kevin Glowacz
2e5f49dcbf Don't generate a scaffold.css if no-assets 2013-03-20 15:24:45 -05:00
Steve Klabnik
1a9055073d Revert "make new rails apps log to STDOUT"
This reverts commit b7d9d6e2cd5082d269dafbc0316e2107febe1451.

Per discussion with @jeremy and @rubys on Campfire.
2013-03-15 10:38:00 -07:00
Terence Lee
b7d9d6e2cd make new rails apps log to STDOUT 2013-03-15 10:05:10 -07:00
Sam Ruby
3008994d1e Add support for generate scaffold password:digest
* adds password_digest attribute to the migration
* adds has_secure_password to the model
* adds password and password_confirmation password_fields to _form.html
* omits password entirely from index.html and show.html
* adds password and password_confirmation to the controller
* adds unencrypted password and password_confirmation to the controller test
* adds encrypted password_digest to the fixture
2013-03-13 16:06:33 -04:00
Carlos Antonio da Silva
816e7d1449 Replace assert_(no_)match args from regexps to strings to remove warnings
Using regexps as arguments without parentheses end up raising:

    warning: ambiguous first argument; put parentheses or even spaces
2013-03-11 15:54:43 -03:00
Prem Sichanugrist
773425420f Make sure that the test case is run under test env
* Unset $RAILS_ENV that got set by abstract_unit to trigger the default.
* split out environment setting since Ruby 1.9.3 doesn't support inline
  ENV setting.
2013-03-11 14:31:27 -04:00
Prem Sichanugrist
1f8953382f Fix test failure introduced in 3ed41e57
I forgot to run the test suit after changing the task name. 💣
2013-03-11 11:58:36 -04:00
Rafael Mendonça França
90a97156e4 Merge pull request #9080 from sikachu/master-rails-test
Add `rails test` command to run the test suite
2013-03-11 08:15:54 -07:00
Vipul A M
647a9abb02 Cleanup tests for unused variables 2013-03-11 16:03:10 +05:30
Prem Sichanugrist
3ed41e579e Make sure that rails test load test in test env 2013-03-09 17:38:39 -05:00
Prem Sichanugrist
b51673fbd9 Update Rake tasks to call rails test instead
Also, print out deprecation warning for other rake tasks except
`rake test` and `rake` (default)
2013-03-09 17:38:39 -05:00
Dalibor Nasevic
df85dfa6fa Improve wording for rails test command 2013-03-09 16:03:55 -05:00
Prem Sichanugrist
1a0c58b298 Load fixtures only when running suites, or -f
* `rails test -f` will run the test suites with all fixtures loaded
* New application will now generated without `fixtures :all` line
  enabled by default.
2013-03-09 16:03:55 -05:00
Prem Sichanugrist
176b57c543 Add support for MiniTest flags in TestRunner
Any flags that got set will be passed through to MiniTest::Unit.runner,
such as `-n`, `-s-, and `-v`.
2013-03-09 16:03:55 -05:00
Prem Sichanugrist and Chris Toomey
b4df25366a Add rails test command to run the test suite
To run the whole test suite:

    $ rails test

To run the test file(s):

    $ rails test test/unit/foo_test.rb [test/unit/bar_test.rb ...]

To run the test suite

    $ rails test [models,helpers,units,controllers,mailers,...]

For more information, see `rails test --help`.

This command will eventually replacing `rake test:*`, and `rake test`
command will actually invoking `rails test` instead.
2013-03-09 16:03:54 -05:00
Jon Leighton
9ae81be072 Fix race condition in test
This should fix travis. For real this time! This is the one!

The readpartial(100) meant that an earlier assert_stdout could chomp up
the output that a later assert_stdout wants, meaning that the later
assertion fails.

Reading only 1 byte at a time ensure that we don't read any more than is
necessary to verify the assertion.
2013-03-09 20:32:01 +00:00
Jon Leighton
72be5bb557 Bump up timeouts
This should fix travis.

Also ensuring that we don't try to kill when pid is nil.
2013-03-09 17:52:32 +00:00
Carlos Antonio da Silva
11dd15a5c2 Fix failing test regarding console change to fix sandboxing
Introduced in be3e10cd26bc8ec29c6474d03a08a8e733108e7d.
2013-03-08 21:48:28 -03:00
Jon Leighton
e5fc096bea The console --sandbox transaction should not be joinable
Thanks @neerajdotname for noticing this bug.
2013-03-08 15:10:46 +00:00
Jon Leighton
be3e10cd26 Fix rails console --sandbox
I've also added a proper acceptance test which reproduced the issue.

Closes #9513, #9515.
2013-03-08 13:58:56 +00:00
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
Mykola Kyryk
4fa6088b42 This commit fixes issue #8628
Allow environment name to start with a substring of the default
environment names.
For example: tes, pro, prod, dev, devel, etc.

Fixing identation.

Adding test for Rails::Console.parse_arguments method.

Fix issue 8628 for Rails::DBConsole.
2013-01-04 17:05:49 +02:00
Rafael Mendonça França
39374aa925 Set the default timezone after the initialization since the configuration
now lives in the application initializers.

Fix #8711
2013-01-04 00:25:08 -03:00
Tim Raymond
48d5a33269 Adding Back Rails::Engine::Railties#engines
Removing it breaks functionality with gems such as Thinking Sphinx.
This restores it with a deprecation warning. Closes #8551
2013-01-03 14:00:32 -05:00
Guillermo Iguaran
cb2bd4aa61 Merge pull request #8705 from amparo-luna/change_update_attributes_to_update
Rename update_attributes method to update
2013-01-03 09:09:59 -08:00
Amparo Luna + Guillermo Iguaran
0433d79724 Updating default application templates to use update instead of update_attributes 2013-01-03 12:04:25 -05:00
Akira Matsuda
1030b7b2d6 test PATCH method for update action in generated scaffold controller test rather than PUT 2013-01-03 20:21:18 +09:00
Andre Arko
75dcdbc84e Restore original remote_ip algorithm.
Proxy servers add X-Forwarded-For headers, resulting in a list of IPs. We
remove trusted IP values, and then take the last given value, assuming that
it is the most likely to be the correct, unfaked value. See [1] for a very
thorough discussion of why that is the best option we have at the moment.

[1]: http://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/

Fixes #7979
2013-01-02 15:26:27 -08:00
Santiago Pastorino
cf2dcf4e9f Merge pull request #8666 from mekishizufu/fix_lambdas
Fix usage of lambda as a Rack endpoint
2012-12-31 09:09:11 -08:00
Rafael Mendonça França
5da4d5142a Add active_support/testing/autorun
minitest/autorun load minitest/spec polluting the global namespace with
the DSL that we don't want on Rails
2012-12-31 13:57:24 -03:00
Rafael Mendonça França
eb4930e3c7 Inherit from MiniTest::Unit::TestCase instead of MiniTest::Spec 2012-12-31 13:57:23 -03:00
Jiri Pospisil
dbacb95a21 Fix usage of lambda as a Rack endpoint
The response body needs to respond_to? :each.
2012-12-31 17:46:19 +01:00
Jeremy Kemper
1e9d6e7b56 Revert "Install binstubs by default"
This reverts commit f34c27a452418d8aa17f92bb0fd7ae97b5f7e252.

We'll be taking a different tack on this with new `bundle binstubs <gem>` support.
2012-12-28 14:23:01 -07:00
Jeremy Kemper
a79300a0d8 Revert "Detect rbenv and update the shebang"
This reverts commit 7173c4f931c9026bd3bc0b644d93dae744433f09.
This reverts commit a562f9fa09967eba26dff1c3bc8aa85b6f0a72ff.
2012-12-28 14:21:24 -07:00
Rafael Mendonça França
899cae25ec Consistent use of single and double quotes 2012-12-26 12:23:39 -03:00
Yves Senn
edae4777ad quote column names in generated fixture files 2012-12-26 16:17:47 +01:00
Carlos Antonio da Silva
7ab469c839 Merge pull request #8588 from marcandre/fix_reversible
Fix Migration#reversible by not using `transaction`.
2012-12-23 08:16:07 -08:00
Marc-Andre Lafortune
a4932d6a63 Fixes for PR [#8267]
* Fix Migration#reversible by not using `transaction`.

* Adapt mysql adapter to updated api for remove_column

* Update test after aedcd683684d08eaf30623a4b48ce31a31426372
2012-12-22 20:40:42 -05:00
Yehuda Katz
a562f9fa09 Forgot to check in railties fixture for binstubs 2012-12-22 12:18:35 -08:00
Yehuda Katz
cb025f850c Add --no-html to scaffold generator 2012-12-22 12:18:13 -08:00
Yehuda Katz
7173c4f931 Detect rbenv and update the shebang 2012-12-22 11:13:10 -08:00
Yehuda Katz
f34c27a452 Install binstubs by default 2012-12-22 10:57:50 -08:00
Jeremy Kemper
f9da785d0b Move background jobs to the 'jobs' branch until fully baked. Not shipping with Rails 4.0. 2012-12-21 16:29:47 -08:00
Andy Lindeman
6b692ee37c Correctly shows RAILS_ENV=development even when ENV['RAILS_ENV'] is not set (e.g., in Pow)
* Fixes #8025
2012-12-21 17:41:39 -05:00
Marc-Andre Lafortune
aedcd68368 Migration generators use change even for destructive methods [#8267] 2012-12-21 13:54:52 -05:00
Marc-Andre Lafortune
29ed612bd9 Simple replacement of variable name for consistency 2012-12-21 13:54:50 -05:00
Carlos Antonio da Silva
ebef8e944a Revert "Add test to deprecation of Path#children"
This reverts commit 29b1dc273e1ad6b9e13bf48fe3f12047850f9554.

Conflicts:
	railties/test/application/paths_test.rb

Reason: since 7f96e4317e1354852e9600becb16662de3c17691 was reverted,
Path#children is no longer deprecated.
2012-12-19 09:37:19 -02:00
Francesco Rodriguez
411e499677 update concerned tests 2012-12-18 17:25:16 -05:00
Rafael Mendonça França
7f96e4317e Revert "Merge pull request #7587 from elia/fix-too-eager-loading"
This reverts commit 3663057518eb9acf9b1e72f47dcb07038e6b7368.

REASON: This caused a regression that add app folder in the eager load
path. See #8146 for more information.

Conflicts:
	railties/CHANGELOG.md
2012-12-18 16:05:30 -03:00
schneems
8a59b87374 HTML formatting to Rails::InfoController#routes
This PR adds formatting and meta-data to the display of the internal routes. Users can now toggle between showing helpers with the `_path` or _`url` suffix. 

There are multiple ways to achieve this, this method uses partials for formatting and meta-data. The partials can be re-used when rendering `routing_error.erb`, though that will need to be in a separate PR.

![](http://f.cl.ly/items/3A2p3c1T1t2f2X2R2K2S/Screen%20Shot%202012-12-12%20at%202.28.01%20PM.png)


ATP Railties
2012-12-17 12:41:54 -06:00
Steve Klabnik
a8864aafe9 Revert "Fix failing test in railties"
This reverts commit 6bdc04624dcc0f45aab93af42d00224f67da36d5.

This has been reverted because 8554537e48
2012-12-14 15:51:12 -05:00
Andrew White
01d3a36bfe Clear url helper methods when routes are reloaded
Remove all the old url helper methods when clear! is called on the
route set because it's possible that some routes have been removed.
2012-12-14 13:22:36 +00:00
Carlos Antonio da Silva
6bdc04624d Fix failing test in railties
Related to the HTML route inspector changes:
ae68fc3864e99ab43c18fd12577744e1583f6b64
2012-12-14 09:38:31 -02:00
Arun Agrawal
601cc60a1b Fixed test names for generated_attribute_test.rb 2012-12-13 10:29:07 +05:30
Santiago Pastorino
603e7f7ea5 Merge pull request #8468 from schneems/schneems/rack-index-page
Use Rails to Render Default Index Page
2012-12-10 19:49:10 -08:00
Rafael Mendonça França
8dac9768b1 Make sure that no extra spaces are created with a non-polymorphic
attributes
2012-12-10 23:16:48 -03:00
schneems
baea5d69be Use Rails to Render Default Index Page
This is an alternative implementation to #7771 thanks to the advice of @spastorino

Rails is a dynamic framework that serves a static index.html by default. One of my first questions ever on IRC was solved by simply deleting my public/index.html file. This file is a source of confusion when starting as it over-rides any set "root" in the routes yet it itself is not listed in the routes. By making the page dynamic by default we can eliminate this confusion.

This PR moves the static index page to an internal controller/route/view similar to `rails/info`. When someone starts a rails server, if no root is defined, this route will take over and the "dynamic" index page from rails/welcome_controller will be rendered. These routes are only added in development. If a developer defines a root in their routes, it automatically takes precedence over this route and will be rendered, with no deleting of files required. 

In addition to removing this source of confusion for new devs, we can now use Rails view helpers to build and render this page. While not the primary intent, the added value of "dogfooding" should not be under-estimated.

The prior PR #7771 had push-back since it introduced developer facing files. This PR solves all of the same problems, but does not have any new developer facing files (it actually removes one). 

cc/ @wsouto, @dickeyxxx, @tyre, @ryanb, @josevalim, @maxim, @subdigital, @steveklabnik

ATP Railties and Actionpack.
2012-12-10 16:15:04 -08:00
Rafael Mendonça França
190f638d39 Ensure the scaffold tests will pass when using references attributes 2012-12-10 00:35:03 -03:00
Rafael Mendonça França
95ccbd847d Add GeneratedAttribute#column_name to get the name of the column in the
database
2012-12-10 00:01:41 -03:00
Rafael Mendonça França
b05b77be9c Deal with polymorphic attributes correctly in the generators 2012-12-10 00:01:41 -03:00
Rafael Mendonça França
4a487f94b9 Make references and belongs_to attributes to generate the _id column in
fixtures
2012-12-10 00:01:40 -03:00