Commit Graph

754 Commits

Author SHA1 Message Date
José Valim
2b0c602bc3 Remove usafe of respond_to in ActionView tests 2014-08-17 13:20:22 -04:00
schneems
4d47220d7c Perf optimization for url_for called w/ Hash
Benchmarking the existing code:

```ruby
{ :only_path => options[:host].nil? }.merge!(options.symbolize_keys)) 
```

Against optimized code, that does not require a new hash or a merge:

```ruby
options = options.symbolize_keys
options[:only_path] = options[:host].nil? unless options.key?(:only_path)
options
```

We see a statistically significant performance gain:

![](https://www.dropbox.com/s/onocpc0zfw4kjxl/Screenshot%202014-08-14%2012.45.30.png?dl=1)

Updated to not mutate incoming parameters
2014-08-14 12:46:06 -05:00
Jeremy Kemper
dfc3f88311 Merge pull request #16438 from agrobbin/input-placeholder-i18n
Add I18n support for `:placeholder` HTML option is passed to form fields
2014-08-14 06:46:17 -07:00
Akira Matsuda
1a299b6ca6 Missing ActiveSupport require for calling String#first 2014-08-14 01:06:34 +09:00
Akira Matsuda
bc116a55ca AM, AP, AV, and AMo tests are already order_independent! 2014-08-13 21:25:10 +09:00
Alex Robbin
8b02832500 add I18n support for :placeholder HTML option is passed to form fields 2014-08-12 23:11:43 -04:00
Rafael Mendonça França
a2400308ea Merge branch 'master' into loofah
Conflicts:
	actionpack/CHANGELOG.md
	actionpack/test/controller/integration_test.rb
	actionview/CHANGELOG.md
2014-08-12 11:10:42 -03:00
Rafael Mendonça França
e81f3c210e Nobody sucks so nobody should call this awful method name 2014-08-12 10:51:41 -03:00
Akira Matsuda
6ffb29d24e users_dont_suck_but_only_we_suck_and_only_our_tests_are_order_dependent!
Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes
everyone's tests order dependent, which should never be done by the framework.
2014-08-12 19:37:04 +09:00
Hendy Tanata
71c7fd1013 Uppercase HTML in docs.
[skip ci]
2014-08-08 14:27:05 -07:00
Akira Matsuda
3dfcae6afa defined? should actually work in current implementation
So this trick is not needed to be documented anymore.
2014-08-07 01:59:58 +09:00
Bogdan Gusiev
7a0c2ba48b Fixed #select form builder helper to support block with html output 2014-08-05 17:23:00 +03:00
Carlos Antonio da Silva
29a6a17a11 Properly assert for the expected messages
The message passed to Minitest's assert_raise is used as output in case
the assertion fails, but we can test against the exact message by using
the actual exception object that is returned from the assert_raise call.
2014-07-30 23:41:19 -03:00
Aaron Patterson
20a277c9a2 don't access named routes internals
just ask whether or not the route is defined
2014-07-30 15:27:20 -07:00
@schneems and @sgrif
2bbcca004c Deprecate *_path methods in mailers
Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead.

Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR.

Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead.

The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`.

Paired @sgrif & @schneems
2014-07-30 12:01:45 -05:00
Yves Senn
aade0a0412 docs, cleanup mixed indents within form_options_helper.rb RDoc.
[ci skip]

This fixes the broken code block rendering and indents the examples
within the parameter list.
2014-07-29 14:57:48 +02:00
David Heinemeier Hansson
da1b8a786c Fix that render layout should also be picked up by the template dependency tracker, but only half-ways. You can add that layout option on the same render call, and both templates should be added to the dependency tree. But thats going to require a more serious rework of the tracker. Please do help fix this part of it too. For now, render layout needs to be on its own line. 2014-07-25 16:37:18 -07:00
Rafael Mendonça França
08754f12e6 Merge branch 'rm-remove-mocha'
Conflicts:
	actionpack/test/abstract_unit.rb
2014-07-19 18:17:13 -03:00
Rafael Mendonça França
fd6aaaa0c3 Stop requiring mocha automatically
We are planning to remove mocha from our test suite because of
performance problems. To make this possible we should stop require mocha
on ActionSupport::TestCase.

This should not affect applications since users still need to add mocha
to Gemfile and this already load mocha.

Added FIXME notes to place that still need mocha removal
2014-07-19 17:35:12 -03:00
Eugene Gilburg
afc928445d adding missing test for text area value before type cast 2014-07-19 12:06:36 -07:00
Eugene Gilburg
080c2ba0ca adding missing test coverage 2014-07-18 21:08:11 -07:00
Eugene Gilburg
348de3a06e marking private methods which dont work if called on their own anyways 2014-07-18 20:54:30 -07:00
Eugene Gilburg
38117adfe3 small refactors to actionview renderers 2014-07-18 20:54:03 -07:00
Guo Xiang Tan
ee35b79d4c Prefer to pass block when logging.
The Logger by default includes a guard which checks for the
logging level. By removing the custom logging guards, we can decouple
the logging guard from the logging action to be done.

This also follows the good practice listed on http://guides.rubyonrails.org/debugging_rails_applications.html#impact-of-logs-on-performance.
2014-07-18 15:04:43 +08:00
Yves Senn
246f07c751 docs, select and friends with multiple=true include a blank string.
[Jonas Baumann & Yves Senn]

The submitted params from a select with `multiple: true` look as follows:

```
{post: {category: [""]}}

{post: {category: ["", "Category 1", "Category 2"]}}
```

This is a follow up to #1552.
2014-07-17 17:28:58 +02:00
Godfrey Chan
b062d5d967 Merge pull request #16201 from noinkling/master
Fix broken list formatting in API docs [ci skip]
2014-07-16 22:58:15 -07:00
Aaron Patterson
c6a97b8d4d subclass Rails::Engine 2014-07-16 21:48:26 -07:00
noinkling
f5d79d7650 Fix broken list formatting [ci skip] 2014-07-17 15:24:52 +12:00
Rafael Mendonça França
9bbb3ca306 Use &= instead of select with include?
The performance is almost the same with both implementations but this is
clear.

Before this patch:

Calculating -------------------------------------
  small erb template      1452 i/100ms
-------------------------------------------------
  small erb template    17462.1 (±13.3%) i/s -      85668 in   5.031395s
.Calculating -------------------------------------
small erb template with 1 partial
                           887 i/100ms
-------------------------------------------------
small erb template with 1 partial
                         8899.6 (±18.8%) i/s -      42576 in   5.009453s
.Calculating -------------------------------------
small erb template with 2 partials
                           666 i/100ms
-------------------------------------------------
small erb template with 2 partials
                         6821.5 (±8.8%) i/s -      33966 in   5.020791s

After the patch:

Calculating -------------------------------------
  small erb template      1479 i/100ms
-------------------------------------------------
  small erb template    15956.6 (±7.6%) i/s -      79866 in   5.036001s
.Calculating -------------------------------------
small erb template with 1 partial
                           841 i/100ms
-------------------------------------------------
small erb template with 1 partial
                         9242.2 (±6.9%) i/s -      46255 in   5.029497s
.Calculating -------------------------------------
small erb template with 2 partials
                           615 i/100ms
-------------------------------------------------
small erb template with 2 partials
                         6524.7 (±6.8%) i/s -      32595 in   5.020456s

You can find the benchmark code at
https://gist.github.com/rafaelfranca/dee31120cfdb1ddc3b56
2014-07-16 16:42:53 -03:00
Rafael Mendonça França
b5fbcc5d52 Merge pull request #15917 from luke-gru/actionview_perf
remove Set.new from DetailsKey::get, impacts rendering overhead
2014-07-16 16:14:42 -03:00
Rafael Mendonça França
d4df7ce7b3 Fix typo on the variable name 2014-07-16 14:59:55 -03:00
Rafael Mendonça França
03d77504be Add CHANGELOG entry for PartialIteration.
Closes #7698.
2014-07-16 14:54:23 -03:00
Rafael Mendonça França
7dc0f3fc8d Document the PartialIteration object 2014-07-16 14:54:23 -03:00
Rafael Mendonça França
9290fc5ce2 Build only one PartialIteration object for loop 2014-07-16 14:54:22 -03:00
Rafael Mendonça França
9830ebbeaf No need to have a file to PartialIteration class
This class is only used on the PartialRenderer.
2014-07-16 14:50:51 -03:00
Joel Junström
1f5b360466 Added PartialIteration class used when rendering collections
The iteration object is available as the local variable
"template_name_iteration" when rendering partials with collections.

It gives access to the +size+ of the collection beeing iterated over,
the current +index+ and two convinicence methods +first?+ and +last?+

"template_name_counter" variable is kept but is deprecated.

[Joel Junström + Lucas Uyezu]
2014-07-16 14:50:51 -03:00
Rafael Mendonça França
045d717316 Use the plugin API to the getter and setters
To avoid having to redefine these methods on the deprecated plugin we
should be using the sanitizer_vendor API.
2014-07-15 20:19:59 -03:00
Rafael Mendonça França
82e478836f Use regexp instead exact match for atom test
There are two xml namespaces in the response body and the xhtml
namespace is not registered in the root node. This create an invalid XML
and nokogiri can't navigate using xpath on that node.
2014-07-15 14:42:36 -03:00
Rafael Mendonça França
f5426315d9 All these tests are passing now 2014-07-15 13:59:10 -03:00
Rafael Mendonça França
a8c667e8f1 Defining the right dependencies 2014-07-15 13:40:22 -03:00
Rafael Mendonça França
158a6dfcd2 We don't need loofah for the assertions
We can just use nokogiri
2014-07-15 13:40:21 -03:00
Rafael Mendonça França
126a15e0fe Include the selector assertions on the test case
We don't need to require users to include this module on
ActionMailer::TestCase
2014-07-15 13:40:18 -03:00
Rafael Mendonça França
04e7ea3e92 Merge pull request #16175 from skorks/log_digestor_as_debug
Log digest as :debug instead of :info
2014-07-15 11:12:27 -03:00
Andrew White
c3f4d6c8fe Merge pull request #16161 from jpawlyn/master
Fix empty host for an asset url when asset_host proc returns nil
2014-07-15 09:32:01 +01:00
Jolyon Pawlyn
d005777469 Return an absolute instead of relative path from an asset url in the case of the asset_host proc returning nil 2014-07-15 08:32:55 +01:00
Alan Skorkin
d92ade339c Log digest as :debug instead of :info 2014-07-15 14:18:32 +10:00
Santosh Wadghule
dfee0327b5 Fix typos like a html to an html and 'an mail' to 'an email'. [ci skip] 2014-07-14 00:14:47 +05:30
Matthew Draper
4248785262 Assert the nature of the original exception
Just so it's clearer what's going on in the following assertion.

/cc #11993 @robin850
2014-07-12 18:54:17 +09:30
Guillermo Iguaran
e454a3d994 Merge pull request #11993 from razielgn/actionview-use-name-to-inspect-error
Use NameError#name to assert raised error.
2014-07-11 16:41:19 -04:00
Godfrey Chan
00aae7cb38 Synced 4.2 release notes with the latest commits.
Also reordered some of the items to put newer ones on top (same order as
CHANGELOGs), which makes it easier to diff while we are still working on it.
2014-07-11 02:16:57 -07:00
Godfrey Chan
e22e1c0b28 Fixed borken tests in AV caused by 013c74d 2014-07-10 17:10:20 -07:00
Rafael Mendonça França
3229eda00c Merge pull request #11218 from kaspth/loofah-integration
Loofah-integration

Conflicts:
	actionpack/CHANGELOG.md
	actionview/CHANGELOG.md
2014-07-10 16:52:00 -03:00
Carlos Antonio da Silva
05fde24e1e Include missing module in tag_helper
Since 6857415187810f1289068a448268264d0cf0844f we are using #safe_join to
join the content when an Array is given, so we must include the dependent
module here to make sure it's available when this module is used alone.

This was making Simple Form tests to fail with current master due to the
missing dependency.
2014-07-09 18:47:35 -03:00
Zachary Scott
2f716694f2 Change back occurrences of SQLite(3) to sqlite3 when referring to the
adapter, fixed from #16057 [ci skip]
2014-07-06 11:47:16 -07:00
Akshay Vishnoi
ddad32978d [ci skip] /sqlite/i --> SQLite 2014-07-06 15:23:12 +05:30
Akshay Vishnoi
3ac3760c69 [ci skip] /javascript/ -> JavaScript - cover whole app 2014-07-04 03:00:09 +05:30
Godfrey Chan
f2fc31473f Add CHANGELOG for c803b90 2014-07-02 15:55:28 -07:00
John F. Douthat
41de23ec03 Fix escape_once double-escaping hex-encoded entities
(This is a manual merge of #9102)
2014-07-02 15:54:47 -07:00
Rafael Mendonça França
41a7c443a6 Add CHANGELOG entry for #15214
Closes #15214
2014-06-30 17:42:56 -03:00
Rafael Mendonça França
2546610920 Use if/else
Since we are using both branches of the code is preferable to use
if/else over the early return.
2014-06-30 17:41:50 -03:00
Todd Bealmear
ac44345da3 Add String support for min/max attributes on DatetimeField 2014-06-30 17:39:50 -03:00
Robin Dupret
9ca0f8da2a Tiny documentation fixes [ci skip] 2014-06-29 20:15:28 +02:00
Max Kramer
4e1dc11283 Rename options param of #time_ago_in_words to match API change
Rename `include_seconds_or_options` to `options` to match 6b9356a (which removed the deprecation introduced by #6077).  This has no functional impact because the parameter is passed directly through, but makes it clearer that the parameter no longer supports a boolean as input.
2014-06-28 14:30:16 -04:00
Luke Gruber
4955c04eb6 remove Set.new from DetailsKey::get, impacts rendering overhead performance
Using ruby-prof, I noticed that Set#add had the largest 'self time'
percentage (5% of the overall time spent rendering) when
benchmarking the rendering of a small cached ERB template that was 3
lines long. It turns out it was from this line. I don't believe the
Set is necessary, either. Removing this line increases the rendering
ips using Benchmark::ips accordingly.
2014-06-25 23:18:33 -04:00
Amiel Martin
6b0e834a19 Use #model_name on instances instead of classes
This allows rails code to be more confdent when asking for a model name, instead of having to ask for the class.

Rails core discussion here: https://groups.google.com/forum/#!topic/rubyonrails-core/ThSaXw9y1F8
2014-06-24 17:20:24 -07:00
Gareth Rees
124f88eaa2 Deal with regex match groups in excerpt
Original implementation has bugs if the regex contains a match group.

Example:

    excerpt('This is a beautiful? morning', /\b(beau\w*)\b/i, :radius => 5)
    Expected: "...is a beautiful? mor..."
    Actual: "...is a beautifulbeaut..."

The original phrase was being converted to a regex and returning the text
either side of the phrase as expected:

    'This is a beautiful? morning'.split(/beautiful/i, 2)
    # => ["This is a ", "? morning"]

When we have a match with groups the match is returned in the array.

Quoting the ruby docs: "If pattern is a Regexp, str is divided where the
pattern matches. [...] If pattern contains groups, the respective matches will
be returned in the array as well."

    'This is a beautiful? morning'.split(/\b(beau\w*)\b/iu, 2)
    # => ["This is a ", "beautiful", "? morning"]

If we assume we want to split on the first match – this fix makes that
assumption – we can pass the already assigned `phrase` variable as the place
to split (because we already know that a match exists from line 168).

Originally spotted by Louise Crow (@crowbot) at
https://github.com/mysociety/alaveteli/pull/1557
2014-06-24 17:01:40 +01:00
Rafael Mendonça França
0e09875a67 Merge pull request #15732 from kuldeepaggarwal/correct-assets-ouput
[ci skip] correct output for asset_helper methods
2014-06-23 14:41:40 -03:00
Rafael Mendonça França
d4ca0a44c7 Merge pull request #15450 from aditya-kapoor/remove-nbsp-debug
remove unnecessary gsub for space in ActionView::Helpers#debug
2014-06-19 16:43:47 -03:00
Lucas Mazza
9f27e1076a 'TextHelper#highlight' now accepts a block to highlight the matched words.
The helper will yield each matched word, and you can use this instead of the
':highlighter' option for more complex replacing logic:

  highlight('My email is me@work.com', EMAIL_REGEXP) { |m| mail_to(m) }
  # => 'My email is <a href="mailto:me@work.com">me@work.com</a>'
2014-06-19 15:22:23 -03:00
Jan Szumiec
490f25034d highlight() now accepts regular expressions as well. 2014-06-19 14:53:18 -03:00
Jan Szumiec
2b617783ad excerpt() now accepts regular expression instances as phrases. 2014-06-19 14:44:59 -03:00
Yves Senn
dccf6da66b Merge pull request #15709 from zuhao/refactor_actionview_compiled_templates_test
Move cleanup into teardown, delete obsolete code.
2014-06-18 08:39:13 +02:00
Aditya Kapoor
7ddaf10fcb [ci skip] /javascript/ ~> JavaScript 2014-06-17 02:07:07 +05:30
Timm
6cb6290f5d Make output_buffers used in tests be utf-8 encoded. Fixing unknown encoding ASCII-8BIT test errors. 2014-06-16 21:04:25 +02:00
Timm
cdf2f28fc8 Change date helper tests to expect attributes with double quoted strings. 2014-06-16 21:04:25 +02:00
Timm
01ff0f311e Fix invalid css selectors in form_collections_helper_test.rb. 2014-06-16 21:04:25 +02:00
Timm
bcd71b4c9a Don't splat arguments to allowed tags or attributes. 2014-06-16 21:04:24 +02:00
Timm
e438c090ae Change sanitizer_vendor to just be a method and reword documentation. 2014-06-16 21:04:24 +02:00
Timm
d4cd7e2a44 Revert some stuff to use the new sanitizers. 2014-06-16 21:04:24 +02:00
Timm
33019a321c Remove html-scanner and its tests. 2014-06-16 21:04:23 +02:00
Timm
017ddc6e24 Remove deprecation notice. 2014-06-16 21:04:23 +02:00
Timm
427f3f90d4 Add a layer of indirection making sanitizers pluggable. 2014-06-16 21:04:23 +02:00
Timm
5d3a29229b Delegate allowed tags and attributes setting to HTML::WhiteListSanitizer. 2014-06-16 21:04:22 +02:00
Timm
7587632b93 Changed configuration documentation to no longer state it replaces a Set. 2014-06-16 21:04:22 +02:00
Timm
13da2788f3 Deprecate configurations and use allowed_tags and allowed_attributes on WhiteListSanitizer. 2014-06-16 21:04:22 +02:00
Timm
dd48b0aadc Migrated test away from escaped quotes. 2014-06-16 21:04:22 +02:00
Timm
2a7f13ebf8 Made deprecation messages in sanitize_helper more clear. 2014-06-16 21:04:21 +02:00
Timm
0926fa5001 Updated CHANGELOG message to include info about rails-html-sanitizer. 2014-06-16 21:04:21 +02:00
Timm
51c1986183 Updated CHANGELOG message about rails-dom-testing. 2014-06-16 21:04:20 +02:00
Timm
38620e1bed Completed integration of rails-html-sanitizer in SanitizeHelper. Deprecated protocol_separator accessors and bad_tags=. 2014-06-16 21:04:20 +02:00
Timm
50347b15fe Updated html-scanner deprecation message. 2014-06-16 21:04:20 +02:00
Timm
83f1563ee6 Support for changes in SelectorAssertions. 2014-06-16 21:04:19 +02:00
Timm
648f7481e4 Fixed deprecated selector in form_collections_helper_test.rb with from catch_invalid_selector. Sweet. 2014-06-16 21:04:19 +02:00
Timm
82e0705bdf Removed sanitizers- and scrubbers_test.rb. They are in rails-html-sanitizer. 2014-06-16 21:04:19 +02:00
Timm
93f2cd8645 Included DomAssertions in url_helper- and atom_feed_helper_test.rb. 2014-06-16 21:04:18 +02:00
Timm
72ce9a49cb Removed assert_select test file, since it has been moved to rails-dom-testing. 2014-06-16 21:04:18 +02:00
Timm
5dc57db4b5 Required rails-dom-testing in test_case.rb 2014-06-16 21:04:18 +02:00
Timm
c287572d21 Removed ActionView::Assertions. Getting ready to exchange with Rails::Dom::Testing::Assertions. 2014-06-16 21:04:17 +02:00
Timm
2e8132444f Changed ActiveSupport::Derprecation.silence to assert_deprecated. 2014-06-16 21:04:16 +02:00
Timm
68e08fe8c9 Silenced deprecation warnings in the tests. Documentation uses present tense. Changed deprecation message to not use you. Also returning from rescue block in catch_invalid_selector to abort reraising the exception. 2014-06-16 21:04:16 +02:00
Timm
9ef95a7019 Added deprecation warning for invalid selectors and skipping assertions. 2014-06-16 21:04:16 +02:00
Timm
af05b01505 Added tests for TargetScrubber. 2014-06-16 21:04:15 +02:00
Timm
15382e9793 Rounded out PermitScrubber tests. Extracted helper methods to a ScrubberTest class. 2014-06-16 21:04:15 +02:00
Timm
b4cfb59f42 Moved some tests to scrubbers_test.rb. Added better testing of accessor validation. 2014-06-16 21:04:15 +02:00
Timm
facc4f3c0a Added some test coverage for PermitScrubber. 2014-06-16 21:04:14 +02:00
Timm
ddc24fda90 Changed PermitScrubber's direction to bottom up to align better with Loofah's strip scrubber. 2014-06-16 21:04:14 +02:00
Timm
7f9106d5d9 Now only requiring Loofah in the places where it is needed. 2014-06-16 21:04:14 +02:00
Timm
19406dad7d Minor rewording in TargetScrubber documentation. 2014-06-16 21:04:14 +02:00
Timm
240ac66705 Updated Action View changelog entries with more information about the changes in the API. Removed mention of mentor (at his request). 2014-06-16 21:04:13 +02:00
Timm
dd19557551 Stylistic improvements in ActionView::Assertions::DomAssertions. 2014-06-16 21:04:13 +02:00
Timm
0a0d151bb8 Now returning html if html is blank? in FullSanitizer and WhiteListSanitizer. This means it'll return false if called with false, however that is not a valid use case. 2014-06-16 21:04:13 +02:00
Timm
5430487d85 Stylistic improvements. Some light documentation for remove_xpaths. 2014-06-16 21:04:13 +02:00
Timm
170f414928 Removed require's for html-scanner. 2014-06-16 21:04:12 +02:00
Timm
229092ffee Changed test expectation from '<<' to '' with string to sanitize '<<<bad html>' in sanitizers_test. 2014-06-16 21:04:12 +02:00
Timm
cb865e1a7b Removed dom_assertion method since it created bugs. 2014-06-16 21:04:12 +02:00
Timm
01e6e1d491 Fixed uninitialized constant ActionView::HTML error entered after recent git rebase. 2014-06-16 21:04:12 +02:00
Timm
2563c2cec3 Removed a bunch of duplicated tests in SanitizeHelperTest. 2014-06-16 21:04:11 +02:00
Timm
7f7a1b5d6b Removed unnecessary documentation in DomAssertions. 2014-06-16 21:04:11 +02:00
Timm
97d20b1417 Removed case statement in equal_children? used child.element? instead. 2014-06-16 21:04:11 +02:00
Timm
905d2bc605 Reworked some internal documentation for equal_attribute_nodes?. 2014-06-16 21:04:11 +02:00
Timm
d6067e8193 Changed attributes_are_equal? to equal_attribute_nodes? which takes attribute_nodes instead of nodes. 2014-06-16 21:04:10 +02:00
Timm
73c690d4fd Removed html_strings variable, no splat operator needed. 2014-06-16 21:04:10 +02:00
Timm
bab54e4e52 Changed back to =~ or == comparison in HTMLSelector filter. 2014-06-16 21:04:10 +02:00
Timm
62171784fe Simplified the removal of xpaths in remove_xpaths. Added more tests for remove_xpaths. 2014-06-16 21:04:10 +02:00
Timm
c1a7864930 Fixed: added apostrophe to possessive noun. 2014-06-16 21:04:09 +02:00
Timm
5169b00330 Extracted: create Regexp from match_with and use =~ to compare instead of checking .is_a? Regexp every time through the loop. 2014-06-16 21:04:09 +02:00
Timm
e600b3a341 Changed conditional check in filter. Removed weird comments. 2014-06-16 21:04:09 +02:00
Timm
4b55c0aa2e Moved: initial assignment of @selector_is_second_argument is now in initialize. 2014-06-16 21:04:09 +02:00
Timm
cabef1415a Changed: using duck typing instead of requiring subclasses of Node and NodeSet. 2014-06-16 21:04:08 +02:00
Timm
65ed2b6371 Renamed: HTMLSelector css_selector to selector. 2014-06-16 21:04:08 +02:00
Timm
9a536bc195 Removed unnecessary lines from HTMLSelector initialize. 2014-06-16 21:04:08 +02:00
Timm
ce4396b366 Changed: put selector extraction into selector_from, which is renamed to extract_selector. 2014-06-16 21:04:08 +02:00
Timm
20615ec7e6 Changed: HTMLSelector comparisons renamed to equality_tests. 2014-06-16 21:04:08 +02:00
Timm
71aaddbd14 Changed: removed @selected and @page variables from HTMLSelector since one method used them. Passed the values directly to there instead. 2014-06-16 21:04:07 +02:00
Timm
75789d5326 Changed: return early from compare_doms if the two doms don't have the same number of children. 2014-06-16 21:04:07 +02:00
Timm
1825edccf2 Renamed: remove_xpaths tests no longer prefixed with sanitizer. 2014-06-16 21:04:07 +02:00
Timm
97c5e6fa02 Changed: remove_xpaths called with String returns String, while called with Loofah fragment returns Loofah fragment. Added tests for this. 2014-06-16 21:04:07 +02:00
Timm
9a3a59eaae Fixed: spelling mistake in SanitizeHelperTest. 2014-06-16 21:04:06 +02:00
Timm
9dac1e8b8f Removed duplication in assert_dom_equal and assert_dom_not_equal. 2014-06-16 21:04:06 +02:00
Timm
86c6f5b1d9 Changed wording of missing selector argument exception message in css_select. 2014-06-16 21:04:06 +02:00
Timm
bffa6469b7 Reworked root and selector conditional assignment in css_select. 2014-06-16 21:04:06 +02:00
Timm
5a14dbf521 Added related Nokogiri issue link to tests that fail with unknown encoding ASCII-8BIT. 2014-06-16 21:04:05 +02:00
Timm
63e0fa7d8f Moved Action Pack changelog message to Action View. Clarified Dom and Selector assertions changes in there. 2014-06-16 21:04:05 +02:00
Timm
53f25ae348 Removed :nodoc: from PermitScrubber. 2014-06-16 21:04:05 +02:00
Timm
d6a6d42e7e Reworked documentation for PermitScrubber and TargetScrubber. 2014-06-16 21:04:05 +02:00
Timm
349230e823 Fixed: spelling error. 2014-06-16 21:04:04 +02:00
Timm
b13d22bff5 Initialized tags and attributes to nil. 2014-06-16 21:04:04 +02:00
Timm
39df4028a2 Refactored scrub to keep_node? instead of scrub_node calling it. Also added ability to stop traversing by returning STOP from scrub_node. 2014-06-16 21:04:04 +02:00
Timm
557806f402 Changed PermitScrubber to be even more extensible. Updated TargetScrubber to be compliant. Updated documentation for PermitScrubber and TargetScrubber for clarity. 2014-06-16 21:04:04 +02:00
Timm
ea57c7cc85 Changed PermitScrubbers documentation to list override points for subclasses. Renamed should_remove_attributes? to should_scrub_attributes?. 2014-06-16 21:04:03 +02:00