bypass 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/bypass/filter.rb +1 -1
- data/lib/bypass/version.rb +1 -1
- data/test/bypass/html_filter_test.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2ZhMzg2MTM3ZjEwMDkzM2RmZDhmMDdjYTdhNWUyNTgzM2E0ZDljYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDg3NGIwZGM4MzZjMDJiMjJhNmU0MGYzMWVhNmJmYmJlNWVjY2EyZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGFkODc2NDNjODQzN2IzNTM4MDM0ZmY1NzM5OGQyODc3NDA3M2UzZTU1NjQw
|
10
|
+
ZTNiMmYwOTE2MDY3NTg3MGRiMmUxYTgxNDFhMjVkNjQ4ZTllMGYyZTI2NGQ5
|
11
|
+
YmU5ODQ2YzNjMzBmZjUxMTMwMzUxM2QyNWQ4MjY3ZDEwYzIxMzk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODYyMDZiODQ3ZjZhOGQxNmIyZGJkNGVmMzBjNWE1NDdhZTU2N2FjODAxODI2
|
14
|
+
ZjE1MTI2NGY0ODc2ZmM1NTc1NmQ2NTk3NDhjMDU3NDE0ZThlOTlkMjMwNjU2
|
15
|
+
YTM1MjNjM2I5NzFiYjgxZWJjZjUzNjA3YmUzNWEyNTMzMGNkNmU=
|
data/lib/bypass/filter.rb
CHANGED
data/lib/bypass/version.rb
CHANGED
@@ -23,6 +23,17 @@ class Bypass::HTMLFilterTest < Test::Unit::TestCase
|
|
23
23
|
filter.replace { "foo" }
|
24
24
|
assert_equal text, filter.content
|
25
25
|
end
|
26
|
+
|
27
|
+
should "strip whitespace around URLs" do
|
28
|
+
text = "<a href=\"http://example.com \">Example</a>"
|
29
|
+
filter = Bypass::HTMLFilter.new(text)
|
30
|
+
filter.replace do |url|
|
31
|
+
url.append_to_query_values(:foo => "bar")
|
32
|
+
url
|
33
|
+
end
|
34
|
+
expected = "<a href=\"http://example.com?foo=bar\">Example</a>"
|
35
|
+
assert_equal expected, filter.content
|
36
|
+
end
|
26
37
|
end
|
27
38
|
|
28
39
|
context "#auto_link" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bypass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derrick Reimer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|