Commit Graph

10444 Commits

Author SHA1 Message Date
dtaniwaki
c91e1cca43 Added test for link_to_unless to make sure the result consistency. 2013-06-16 22:28:49 -04:00
dtaniwaki
a84c40e19a Escape the string even when the condition of link_to_unless is not satisfied. 2013-06-16 22:28:40 -04:00
Rafael Mendonça França
2d2f35ddf2 Add CHANGELOG entry for #10969
[ci skip]
2013-06-16 21:37:46 -03:00
David Celis
8fc3427646 Use a case insensitive URI Regexp for #asset_path
Context: https://gist.github.com/radar/5793814

The `URI_REGEXP` that various AssetUrl helpers use is currently case
sensitive when checking for a URI scheme. This means if you try to pass
a URL like `HTTP://www.example.com/path/to/image.jpg`, you end up with
a bogus asset path: `/assets/HTTP://www.example.com/path/to/image.jpg`.

URLs are case insensitive, so this regexp should be as well.

Signed-off-by: David Celis <me@davidcel.is>
2013-06-16 16:57:49 -07:00
Vasiliy Ermolovich
782cee5377 collection tags accept html attributes as the last element of collection 2013-06-16 17:58:34 +03:00
Alex Peattie
a89bdc04ba Update the HTML boolean attributes per the HTML 5.1 spec
- Add attributes `allowfullscreen`, `default`, `inert`, `sortable`,
`truespeed`, `typemustmatch`.
- Fix attribute `seamless` (previously misspelled `seemless`).
- Use `assert_dom_equal` instead of `assert_equal` in test.
2013-06-14 23:47:21 +01:00
Guillermo Iguaran
934369f529 Don't set X-UA-Compatible header by default
We are setting this header to chrome=1 for Chrome Frame and this will be
retired soon. Check http://blog.chromium.org/2013/06/retiring-chrome-frame.html for
details
2013-06-13 14:56:02 -05:00
Carlos Antonio da Silva
820f674e92 Merge pull request #10923 from arunagw/warning_removed_minitest
Warning removed for Minitest
2013-06-12 05:39:09 -07:00
Paweł Gościcki
12bee89c31 Grammar nazi at work [ci skip] 2013-06-12 14:12:21 +02:00
Arun Agrawal
260b234740 Warning removed for Minitest 2013-06-12 13:20:43 +02:00
diatmpravin
a3025975ec fixed typo in action_view template 2013-06-08 20:40:36 +05:30
David Heinemeier Hansson
95296f1a7a Merge pull request #10841 from latortuga/fix-underscore-dependency-tracking
Fix mismatching variable names when using an underscore
2013-06-04 12:45:15 -07:00
Drew Ulmer
2a576dd257 Fix mismatching variable names when using an underscore
The ERBTracker template digest helper class was using a regex to match
render calls and it was incorrectly not matching against variables with
underscores in the name. This caused it to use the wrong regex match data
to populate the template dependency. Because underscore is a valid
character for a variable, this fixes the ERBTracker to match it properly.
2013-06-04 14:39:50 -05:00
Rafael Mendonça França
bc8f802623 Merge pull request #10839 from gsamokovarov/clean-normalize_encoded_paths
Refactor ActionDispatch::Http::Parameters#normalize_encode_params
2013-06-04 12:23:07 -07:00
Rafael Mendonça França
733115dad2 Merge pull request #10838 from gsamokovarov/routing-autoload_under
DRY-up ActionDispatch::Routing autoloads
2013-06-04 12:21:16 -07:00
Genadi Samokovarov
998d03fddb Refactor ActionDispatch::Http::Parameters#normalize_encode_params 2013-06-04 13:42:40 +03:00
Genadi Samokovarov
e4fd22639f Dry-up ActionDispatch::Routing autoloads 2013-06-04 12:12:52 +03:00
Arun Agrawal
a84a08ecea No need to load 'rake/packagetask' as it's already
in 'rubygems/package_task'
2013-06-02 20:41:21 +02:00
kennyj
bc5314a102 Raise ArgumentError to fix Rails 4.1 deprecation warn message. 2013-06-02 00:39:11 +09:00
kennyj
74f2b41ce0 Remove Mime::Type#verify_request? and Mime::Type.browser_generated_types were deprecated. 2013-06-02 00:07:58 +09:00
kennyj
d3e8c149cb Remove ActionView::Template#mime_type was deprecated. 2013-06-01 23:22:12 +09:00
kennyj
d8c6f52d3b Remove ActionController::RecordIdentifier was deprecated. 2013-06-01 23:22:12 +09:00
kennyj
dabb9d1c83 Remove action_controller/vendor/html-scanner.rb was deprecated. 2013-06-01 23:22:12 +09:00
kennyj
cb8348b56f Remove :confirm and :disable_with options from ActionView::Helpers::FormTagHelper were deprecated. 2013-06-01 23:22:01 +09:00
kennyj
825f4df23c Remove link_to_function / button_to_function from ActionView::Helpers::JavascriptHelper were deprecated. 2013-06-01 23:17:27 +09:00
kennyj
8b80d72327 Remove :confirm and :disable_with options for ActionView::Helpers::UrlHelper#link_to and #button_to were deprecated. 2013-06-01 23:17:16 +09:00
Steve Klabnik
8603bc06ad Add propery docs to ActionDispatch::Response [ci skip]
After some discussion on Twitter with @skud, the documentation on ActionDispatch::Response is
a bit sparse. This class is useful when you're writing tests, as often you want to assert various
things about the response that's coming back. Better docs would make this easier for people new
to testing in Rails.

I only added some descriptions for various properties that were defined, and mostly just a sentence
or two. Most of these things are familliar if you're working with HTTP, but some words is better
than no words at all.

Hopefully further commits will fix up things that aren't just documentation.
2013-05-30 20:34:53 -07:00
Rafael Mendonça França
47f4d8d513 Merge pull request #10803 from gsamokovarov/extract-deep-munge
Extract ActionDispatch::Request#deep_munge
2013-05-30 12:21:17 -07:00
Genadi Samokovarov
5438f6866e Extract ActionDispatch::Request#deep_munge
ActionDispatch::Request#deep_munge was introduced as a private method,
but was turned into a public one for the use of
ActionDispatch::ParamsParser.

I have extracted it into ActionDispatch::Request::Utils, so it does not
get mixed up with the Request public methods.
2013-05-30 21:26:37 +03:00
Yves Senn
88e8e951a2 RoutesInspector deals with routes using regexp as :controller option 2013-05-30 08:39:57 +02:00
Arun Agrawal
5eaa30e47c Running isolated tests
These stopped running don't know when. 
But these should be running now.
2013-05-28 19:59:55 +02:00
Rafael Mendonça França
73c6ca87a3 Require only minitest.
minitest/autorun required minitest/spec and we are avoiding to require
it.
2013-05-22 13:51:01 -03:00
Rafael Mendonça França
c86cdd1130 Merge pull request #10667 from rubys/minitest-autorun
Eliminate minitest warnings
2013-05-22 09:45:46 -07:00
José Valim
378ea96905 Add has_named_route? to the mapper API 2013-05-20 20:46:04 +02:00
Sam Ruby
e8dd88ac81 Eliminate minitest warnings
9a57c520ce (L15R8)
2013-05-17 13:02:29 -04:00
schneems
ba0695f48a Fix named routing regression from 3.2.13
When named route that is nested is used in 3.2.13

Example `routes.rb`:

```
resources :nested do
  resources :builder, :controller => 'nested/builder'
end
```

In 3.2.12 and 3.2.12 this named route would work:

```
nested_builder_path(:last_step, :nested_id => "foo")
```

Generating a url that looks like `/nested/foo/builder/last_step`. This PR fixes the regression when building urls via the optimized helper. Any explicit keys set in the options are removed from the list of implicitly mapped keys.

Not sure if this is exactly how the original version worked, but this fixes this use case regression.
2013-05-16 18:42:15 -03:00
Aaron Patterson
9fef7c8dc9 Merge pull request #10527 from zenspider/squishy_minitest5
Squishy minitest5
2013-05-16 13:41:54 -07:00
Rafael Mendonça França
c9d75e0814 Revert "Integration tests support the OPTIONS http method"
This reverts commit ad46884af567d6f8d6d8d777f372c39e81a560ba.

Conflicts:
	actionpack/CHANGELOG.md
	actionpack/lib/action_dispatch/testing/integration.rb
	actionpack/test/controller/integration_test.rb

Reason: It will conflict with a lot of test cases. Better to call
`process` directly since this is a very uncommon HTTP method.

Fixes #10638.
2013-05-16 14:41:36 -03:00
Rafael Mendonça França
4eb16e7a06 Merge pull request #10636 from seanwalbran/fix-asset-host-proc-returning-nil
fix rails4 regression with asset_host Proc returning nil
2013-05-16 09:42:41 -07:00
Rafael Mendonça França
6a4ff5cc09 Revert "Add the options method to action_controller testcase."
This reverts commit 0303c2325fab253adf5e4a0b738cb469c048f008.

Conflicts:
	actionpack/lib/action_controller/test_case.rb

REASON: It will conflict with a lot of test cases. Better to call
`process` directly since this is a very uncommon HTTP method.

Fixes #10638.
2013-05-16 11:10:59 -03:00
Aaron Patterson
9db6e63bfb Merge pull request #10591 from acapilleri/cond_callback_test
add test for skip_before_filter with condition
2013-05-15 17:45:50 -07:00
Sean Walbran
122ac9fd46 restore ability to return nil from asset_host proc, add test 2013-05-15 09:07:46 -05:00
Aaron Patterson
ba55276434 deprecating string based terminators 2013-05-14 16:03:09 -07:00
Aaron Patterson
4c628e48a5 inspect the filter when displaying error messages 2013-05-14 14:13:32 -07:00
Aaron Patterson
8ece52f731 use public api for testing rather than grabbing instance variables 2013-05-14 14:11:03 -07:00
Angelo capilleri
8da819eef5 add test for skip_before_filter with condition 2013-05-13 16:10:53 +02:00
Arun Agrawal
d63e44c461 Fixing build broken by this change
c43ca06ca091fc09e2c86bb051ac92b648f12b64
2013-05-13 12:19:25 +02:00
Julian Vargas
c43ca06ca0 Code cleanup for ActionDispatch::Flash#call
The nested `if` was replaced by using `presence` which takes account for
the given hash when it is `nil` or when it is empty. The `else` was
removed because what it was doing was to assign to `env[KEY]` the
value it already had.
2013-05-12 16:33:45 -05:00
Erik Michaels-Ober
ce4456fde6 Replace multi_json with json 2013-05-11 21:43:48 -07:00
Carlos Antonio da Silva
04d27153fc Merge pull request #10543 from vipulnsward/to_sort
Can you improve the commit message a little bit? It's good to describe why the change is happening.
2013-05-10 05:58:52 -07:00