Commit Graph

77 Commits

Author SHA1 Message Date
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
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
Santiago Pastorino
4faa041845 Rename secret_token_key to secret_key_base 2012-11-03 14:57:54 -02:00
Santiago Pastorino
60609bb50d Sign cookies using key deriver 2012-11-03 14:57:53 -02:00
Robin Dupret
5ad7f8ab41 Use Ruby 1.9 Hash syntax in railties 2012-10-14 18:26:58 +02:00
Guillermo Iguaran
4b608c009e config.activerecord.whitelist_attributes isn't used anymore, remove reference from abstract_unit 2012-09-16 23:58:20 -05:00
Piotr Sarnacki
62fa173bd9 Don't use Gemfile in test application in railties
Option to run `bundle install` after generating new appplication was
added recently to rails. Since introduction, it contained a subtle bug
that caused it to use `Gemfile` from current directory (if it exists)
rather than from generated directory. This also accidentaly caused
railties tests to work without any problems - after generating test app
it just used `Gemfile` from the repository, rather than the one in
generated app. After fixing the bug mentioned above, this of course
broke. The easiest way to bypass that is to not generate a `Gemfile` for
test application - with such setup Bundler will just use first available
`Gemfile` in one of the parent directories.
2012-08-31 20:52:29 +02:00
Carlos Antonio da Silva
b85894e854 Set eager load option in "make_basic_app" for railties tests
Avoid output with config option not set when running some tests.
2012-08-21 17:36:00 -03:00
José Valim
e6747d87f3 Allow users to choose when to eager_load the application or not.
Previously, the eager load behavior was mostly coupled to
config.cache_classes, however this was suboptimal since in
some environments a developer may want to cache classes but
not necessarily load them all on boot (for example, test env).

This pull request also promotes the use of config.eager_load
set to true by default in production. In the majority of the
cases, this is the behavior you want since it will copy most
of your app into memory on boot (which was also the previous
behavior).

Finally, this fix a long standing Rails bug where it was
impossible to access a model in a rake task when Rails was
set as thread safe.
2012-08-21 14:46:12 -03:00
Jon Leighton
09d2671cb6 remove some artifacts of dependent_restrict_raises that I missed 2012-08-10 18:12:26 +01:00
José Valim
0470ddcf03 Remove unnecessary Railties structure now that plugins are gone 2012-06-29 15:43:16 +02:00
Aaron Patterson
265f13495f run railties tests in parallel, default to 2 cores 2012-06-19 17:08:23 -07:00
Aaron Patterson
7b6efb9cda join any extra args to the tmp path 2012-06-19 16:27:54 -07:00
Aaron Patterson
c445f0d61f expand the tmpdir to the realpath so tests on OS X pass 2012-06-19 15:41:52 -07:00
Aaron Patterson
7896f35be3 use system tmpdir rather than our own 2012-06-19 14:41:31 -07:00
Santiago Pastorino
36dd1857dc Remove useless load path modifications 2012-05-11 19:00:35 -03:00
Carlos Antonio da Silva
af024f4b1e Remove Declarative module extending, it is already part of AS::TestCase
Removes method redefined warning.
2012-04-28 12:46:05 -03:00
Yehuda Katz
adff4a706a Initial queue implementation 2012-04-26 21:38:27 -07:00
Jose and Yehuda
56cdc81c08 Remove default match without specified method
In the current router DSL, using the +match+ DSL
method will match all verbs for the path to the
specified endpoint.

In the vast majority of cases, people are
currently using +match+ when they actually mean
+get+. This introduces security implications.

This commit disallows calling +match+ without
an HTTP verb constraint by default. To explicitly
match all verbs, this commit also adds a
:via => :all option to +match+.

Closes #5964
2012-04-24 22:52:26 -05:00
Carlos Antonio da Silva
2963ee6b4b Fix scaffold controller template, ensure rake scaffold test pass by default 2012-03-14 14:47:20 -03:00
Prem Sichanugrist
f1637bf2bb Remove Active Resource source files from the repository
Dear Active Resource,

It's not that I hate you or anything, but you didn't get much attention lately. There're so many alternatives out there, and I think people have made their choice to use them than you. I think it's time for you to have a big rest, peacefully in this Git repository.

I will miss you,

@sikachu.
2012-03-13 14:55:44 -04:00
Rafael Mendonça França
5afb2f7b40 Only add the whitelist_attributes option if ActiveRecord is present 2012-03-04 21:02:28 -03:00
Rafael Mendonça França
e778e22812 Remove the dependent_restrict_raises configuration if activerecord is
not preset
2012-02-01 17:03:23 -02:00
Aaron Patterson
b15d2c0708 require minitest rather than test/unit 2012-01-06 15:50:47 -08:00
Aaron Patterson
8f309e3105 convert railties to use AS::TestCase 2012-01-05 17:30:17 -08:00
Santiago Pastorino
dad7fdc573 Rails::Plugin has gone 2012-01-03 10:39:08 -02:00
José Valim
eb367afeed rake assets:precompile loads the application but does not initialize it.
To the app developer, this means configuration add in
config/initializers/* will not be executed.

Plugins developers need to special case their initializers that are
meant to be run in the assets group by adding :group => :assets.

Conflicts:

	railties/CHANGELOG
	railties/test/application/assets_test.rb
2011-09-24 03:17:23 +02:00
José Valim
e9db21743b Use the proper executable on tests. 2011-09-12 10:53:20 -07:00
José Valim
5a26b88645 Create an :assets group in the Gemfile.
This group is required by default only on development and test
(you can change it on config/application.rb).

`rake assets:precompile` will automatically add the assets group
to Rails.groups (and consequently Bundler.require) and should work
transparently.
2011-06-21 11:24:06 -03:00
José Valim
eb8c0a7b1a Merge pull request #1356 from flippingbits/fix_engine_generator
Fix engine's generator
2011-06-09 00:01:00 -07:00
Stefan Sprenger
246c367570 Use RAILS_ISOLATED_ENGINE and fix namespaced generators tests 2011-06-07 12:16:05 +02:00
Stefan Sprenger
64f337eeb0 Don't create full Rails application if RAILS_ISOLATION_COMMAND equals engine 2011-06-07 11:26:38 +02:00
Jon Leighton
afe1911228 Fix another CIfail 🔥 Deleting RAILS_ENV from ENV doesn't produce the desired result if RACK_ENV is still defined. And in any case it's better to be explicit here, so just set RALS_ENV=development. 2011-06-06 17:57:02 +01:00
Jon Leighton
62570e8626 Solve the RAILS_ENV problem in the railties tests in a more generic way 2011-06-06 13:54:05 +01:00
José Valim
c944cab6ce Require rubygems (chill out, just for rails internal tests). 2011-05-23 10:28:00 +02:00
Arun Agrawal
1ffc3063b7 No more need rubygems here. 2011-05-22 02:02:56 +05:30
José Valim
8e5ff7d0a7 Add some very simple docs. 2011-04-15 18:43:21 +02:00
Emilio Tagua
5098302fa1 Simplify remove_from_config. 2010-11-19 19:09:00 -03:00
Emilio Tagua
375aaa9db1 Enable IdentityMap when generating new apps. 2010-11-19 19:09:00 -03:00
José Valim
609849a0f1 Fix a routing test. Reorganize middleware tests. 2010-10-02 17:42:36 +02:00
Piotr Sarnacki
e3d38e7da2 Fix running engine_test in isolation
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-19 17:10:43 +02: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
a210aff210 Add delete to middleware stack proxy. 2010-06-07 23:17:23 +02:00
José Valim
c9132c149c Refactor tests by moving all middleware tests to the same place. 2010-04-26 09:04:04 +02:00
Felipe Rodrigues
a64bfc3c8e moved rails binary to rails gem, so rubygems can find specific versions of rails [#4382 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-04-12 19:56:38 -07:00
José Valim
6690d66292 Rename config.cookie_secret to config.secret_token and pass it as configuration in request.env. This is another step forward removing global configuration. 2010-04-05 12:00:24 +02:00
Carlhuda
e311622e7b Deprecated ActionController::Base.session_options= and ActionController::Base.session_store= in favor of a config.session_store method (which takes params) and a config.cookie_secret variable, which is used in various secret scenarios. The old AC::Base options will continue to work with deprecation warnings. 2010-03-04 16:05:52 -08:00
Carlhuda
9795bf0e74 Fix Sam Ruby's tests and deprecation warnings 2010-03-04 12:12:04 -08:00
Carlhuda
24ab5665b2 Revert "Fix test load paths for those not using bundler"
This reverts commit eec2d301d4ce9df9c71c1a5aa63053eb970b6818.

This commit broke tests. You cannot have a file called "bundler" on the load path.
2010-02-23 17:31:17 -08:00
Joshua Peek
eec2d301d4 Fix test load paths for those not using bundler 2010-02-15 10:20:11 -06:00