José Valim
9e6e648732
Fix routes with :controller segment when namespaced [ #5034 state:resolved]
2010-07-02 19:13:00 +02:00
Piotr Sarnacki
f7ba614c2d
Unify routes naming by renaming router to routes
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-02 01:51:03 +02:00
José Valim
6d04fa6dc4
Deprecate the old router DSL. Since it is still used intensively across ActionPack test suite, patches that translates Rails internal tests to the new router DSL are welcome (note though that a few tests shouldn't be translated since they are testing exactly the old mapper API, like the ones in actionpack/test/controller/resource_test.rb and actionpack/test/controller/routing_test.rb)
2010-06-28 12:23:41 +02:00
Santiago Pastorino
824da60ae8
Move Rails module to abstract_unit to make test in isolation work
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-28 01:26:07 +02:00
Michael Lovitt
ebee77a28a
Fixed that an ArgumentError is thrown when request.session_options[:id] is read in the following scenario: when the cookie store is used, and the session contains a serialized object of an unloaded class, and no session data accesses have occurred yet. Pushed the stale_session_check responsibility out of the SessionHash and down into the session store, closer to where the deserialization actually occurs. Added some test coverage for this case and others related to deserialization of unloaded types.
...
[#4938 ]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-27 22:39:06 +02:00
Neeraj Singh
db23a95a61
cache_sweeper yields blank output
...
[#3914 state:open]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-08 23:20:04 +02:00
José Valim
25f7c030e4
Simplify cookie_store by simply relying on cookies.signed.
2010-05-18 02:05:20 +02:00
wycats
80b60671f7
Revert "Moved encoding work in progress to a feature branch."
...
This reverts commit ade756fe42423033bae8e5aea8f58782f7a6c517.
2010-05-17 19:41:54 +04:00
Jeremy Kemper
ade756fe42
Moved encoding work in progress to a feature branch.
...
This reverts commits af0d1a88157942c6e6398dbf73891cff1e152405 and 64d109e3539ad600f58536d3ecabd2f87b67fd1c.
2010-05-16 13:55:29 -07:00
wycats
64d109e353
Significantly improved internal encoding heuristics and support.
...
* Default Encoding.default_internal to UTF-8
* Eliminated the use of file-wide magic comments to coerce code evaluated inside the file
* Read templates as BINARY, use default_external or template-wide magic comments
inside the Template to set the initial encoding
* This means that template handlers in Ruby 1.9 will receive Strings encoded
in default_internal (UTF-8 by default)
* Create a better Exception for encoding issues, and use it when the template
source has bytes that are not compatible with the specified encoding
* Allow template handlers to opt-into handling BINARY. If they do so, they
need to do some of their own manual encoding work
* Added a "Configuration Gotchas" section to the intro Rails Guide instructing
users to use UTF-8 for everything
* Use config.encoding= in Ruby 1.8, and raise if a value that is an invalid
$KCODE value is used
Also:
* Fixed a few tests that were assert() rather than assert_equal() and
were caught by Minitest requiring a String for the message
* Fixed a test where an assert_select was misformed, also caught by
Minitest being more restrictive
* Fixed a test where a Rack response was returning a String rather
than an Enumerable
2010-05-16 22:44:43 +04:00
David Chelimsky
91125f9927
move FixtureResolver to a file that is accessible outside Rails' own tests
...
[#4522 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-02 22:45:54 +02:00
Santiago Pastorino
ed0ca5db9e
Add a test for assert_recognizes on ActionDispatch::IntegrationTest [ #4390 state:committed]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-24 15:43:12 -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
wycats
3eb97531b8
Refactored url_for in AV to have its own instances of the helpers instead of proxying back to the controller. This potentially allows for more standalone usage of AV. It also kicked up a lot of dust in the tests, which were mocking out controllers to get this behavior. By moving it to the view, it made a lot of the tests more standalone (a win)
2010-04-03 02:44:02 -07:00
Joshua Peek
cdf8c35ffd
Consistent routing language
2010-03-30 14:05:42 -05:00
wycats
e1c030edd8
Fixed a bunch of tests that failed in 1.9 because they assumed that a Rack response was a String.
2010-03-19 18:46:29 -07:00
Carlhuda
947f86c699
Modify assert_template to use instrumentation
2010-03-17 14:29:18 -07:00
wycats
39d6f9e112
Make many parts of Rails lazy. In order to facilitate this,
...
add lazy_load_hooks.rb, which allows us to declare code that
should be run at some later time. For instance, this allows
us to defer requiring ActiveRecord::Base at boot time purely
to apply configuration. Instead, we register a hook that should
apply configuration once ActiveRecord::Base is loaded.
With these changes, brings down total boot time of a
new app to 300ms in production and 400ms in dev.
TODO: rename base_hook
2010-03-07 06:24:30 -08: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
Carl Lerche
1f0f05b10c
Move the original config method onto AbstractController
2010-03-03 21:24:27 -08:00
Carlhuda
b160663bd1
Start refactoring the method of configuring ActionView
2010-03-03 21:24:01 -08:00
Carlhuda
d78e3fe73f
Fix failing Action Pack tests
2010-03-02 14:41:12 -08:00
Joshua Peek
cbefcc88b3
add activesupport and activemodel load paths to actionpack tests
2010-02-28 18:25:02 -06:00
Joshua Peek
7317d9ef4c
Remove implicit controller namespacing from new dsl
2010-02-28 16:39:01 -06:00
Carlhuda
050831803a
If IntegrationSession is initialized with an objects that responds to #routes, automatically extend the URL helpers from the RouteSet onto it
2010-02-26 17:18:45 -08:00
Carlhuda
be0bf10a3c
Upon further reflection, we realized that SharedTestRoutes is not really a hack, but is instead a standin (in the Rails tests) for Rails.application.routes.
...
* In a real application, action_controller/railties.rb does AC::Base.include(app.routes.url_helpers)
* ActionController itself does not know about Rails.application, but instead can have named routes for any router
* SharedTestRoutes are created in abstract_unit to stand in for Rails.application.routes, and is used in
internal functional tests
2010-02-26 16:06:54 -08:00
Carlhuda
74df7795a8
Relatively speaking, it's not actually that bad...
2010-02-26 15:58:24 -08:00
Carlhuda
3bad24c85d
Remove traces of SharedTestRoutes from user code; leave it as a standin for Rails.application.routes in Rails internal tests
2010-02-26 15:44:22 -08:00
Carlhuda
5797575bac
Stop setting UrlFor using SharedTestHelpers
2010-02-26 15:40:36 -08:00
Carlhuda
98f77e0827
Rename named_url_helpers to url_helpers and url_helpers to url_for
2010-02-26 15:04:50 -08:00
Carlhuda
226dfc2681
WIP: Remove the global router
2010-02-25 17:53:00 -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
Martin Schürrer
6bc24d40d5
Use ActionDispatch::Routing everywhere
2010-02-21 13:43:51 -08:00
Joshua Peek
eec2d301d4
Fix test load paths for those not using bundler
2010-02-15 10:20:11 -06:00
Carl Lerche
9f01dff9c2
Get rails tests running on bundler 0.9
2010-01-31 19:13:43 -08:00
Joshua Peek
d2d4acf027
Cookies middleware
2010-01-16 17:22:27 -06:00
Joshua Peek
ead93c5be5
Move Flash into middleware
2010-01-15 14:55:13 -06:00
Joshua Peek
3eaf525213
Make HEAD method masquerade as GET so requests are routed correctly
2010-01-15 12:38:50 -06:00
José Valim
da5978c223
Add subscriber for ActionPack and move all logging inside it.
2010-01-13 01:19:23 +01:00
Joshua Peek
3f28e0bda6
Trash string coercion rack hacks
2010-01-04 19:46:21 -06:00
Joshua Peek
2601a16ede
Autoload AS test case
2010-01-04 16:22:46 -06:00
Joshua Peek
cf83a6f16b
Autoload AC and AV test case classes
2010-01-04 16:22:46 -06:00
José Valim
6fbe9ef2ff
Use namespaces in notifications.
2010-01-03 20:39:42 +01:00
José Valim
75ba102a80
Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened.
2009-12-26 20:28:53 +01:00
Joshua Peek
7ee5843c3c
Fully expand relative rails framework paths and make sure we aren't
...
adding any to the load path more than once.
2009-12-16 11:56:51 -06:00
Joshua Peek
ee395fe626
TestProcess belongs in AD
2009-12-12 18:09:44 -06:00
Joshua Peek
2be5e088d2
Use new routing dsl in tests
2009-12-08 16:52:26 -06:00
Joshua Peek
15ab3a98a1
Find all controllers in memory to use for routing
2009-11-23 20:20:50 -06:00
Joshua Peek
11e798ae0f
Avoid adding component lib/ to load path multiple times
2009-11-09 23:28:36 -06:00
Joshua Peek
23229d5ad4
Remove preflight lib check during AP tests. Bundler resolves this issue
2009-11-09 22:59:30 -06:00