filters 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,15 @@
1
1
 
2
+ === 1.1.1 / 2009-11-23
3
+
4
+ * Fix email addresses regex according to RFC
5
+
6
+ === 1.1.0 / 2009-11-23
7
+
8
+ * Added bang! versions of all filters for mutative use
9
+ * Added autoloading of filters
10
+ * Changed; using ::URI.regexp for uri filter
11
+ * Fixed; all filters are non-mutative by default
12
+
2
13
  === 1.0.1 / 2009-10-23
3
14
 
4
15
  * Fixed mini markup language headings
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{filters}
5
- s.version = "1.1.0"
5
+ s.version = "1.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["TJ Holowaychuk"]
@@ -5,8 +5,7 @@ class Filter
5
5
  #--
6
6
  # Constants
7
7
  #++
8
-
9
- EMAIL = /[\w\-\.]+@(?:(?:[\w\-]+\.)+)[a-z]{2,4}\b/
8
+ EMAIL = /[\w!#$\%'*-\/=?^_`{|}~.]+@(?:(?:[\w\-]+\.)+)[a-z]{2,4}\b/
10
9
 
11
10
  ##
12
11
  # Convert emails to anchor tags.
@@ -1,4 +1,4 @@
1
1
 
2
2
  class Filter
3
- VERSION = '1.1.0'
3
+ VERSION = '1.1.1'
4
4
  end
@@ -29,4 +29,10 @@ describe Filter::Email do
29
29
  it "should return the string untouched when no emails are present" do
30
30
  Filter::Email('foo bar').should == 'foo bar'
31
31
  end
32
+
33
+ it "should accept valid email addresse" do
34
+ string = 'This is valid: hello.k+t-ty{!}@example.com (see rfc 3696)'
35
+ Filter::Email(string).
36
+ should == 'This is valid: <a href="mailto:hello.k+t-ty{!}@example.com">hello.k+t-ty{!}@example.com</a> (see rfc 3696)'
37
+ end
32
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filters
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk