rfc822 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/LICENSE +1 -1
  2. data/README.rdoc +4 -0
  3. data/Rakefile +2 -2
  4. data/lib/rfc822.rb +3 -3
  5. metadata +6 -7
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2010 Marcin Lewandowski
1
+ Copyright 2010-2014 Marcin Lewandowski, Artur Trzop
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -74,6 +74,10 @@ You can either clone the git repository or download a tarball or zip file.
74
74
  Once you have the source, you can unpack it and use from wherever you downloaded.
75
75
 
76
76
  = ChangeLog
77
+ === 0.1.5
78
+
79
+ * Fixed bug that caused to change encoding of string passed to the methods (thanks to Artur Trzop)
80
+
77
81
  === 0.1.4
78
82
 
79
83
  * Fixed regression introduced in 0.1.3 that caused EMAIL_REGEXP_WHOLE to stop working properly.
data/Rakefile CHANGED
@@ -3,8 +3,8 @@
3
3
  require 'jeweler'
4
4
  Jeweler::Tasks.new do |s|
5
5
  s.name = "rfc822"
6
- s.version = '0.1.4'
7
- s.authors = ["Marcin Lewandowski"]
6
+ s.version = '0.1.5'
7
+ s.authors = ["Marcin Lewandowski", "Artur Trzop"]
8
8
  s.email = ["marcin@saepia.net"]
9
9
  s.summary = %q{This is a simple gem for Ruby that simplifies validating email addresses.}
10
10
  s.description = %q{This is a simple gem for Ruby that simplifies validating email addresses. It provides clean methods like String#is_email? and provides you valid RFC2822 regexp for more complex tasks. See the website for more information.}
@@ -20,7 +20,7 @@ end
20
20
  class String
21
21
  def is_email?
22
22
  if RUBY_VERSION >= "1.9"
23
- (self.force_encoding("BINARY") =~ RFC822::EMAIL_REGEXP_WHOLE) != nil
23
+ (self.dup.force_encoding("BINARY") =~ RFC822::EMAIL_REGEXP_WHOLE) != nil
24
24
  else
25
25
  (self =~ RFC822::EMAIL_REGEXP_WHOLE) != nil
26
26
  end
@@ -28,7 +28,7 @@ class String
28
28
 
29
29
  def contains_email?
30
30
  if RUBY_VERSION >= "1.9"
31
- (self.force_encoding("BINARY") =~ RFC822::EMAIL_REGEXP_PART) != nil
31
+ (self.dup.force_encoding("BINARY") =~ RFC822::EMAIL_REGEXP_PART) != nil
32
32
  else
33
33
  (self =~ RFC822::EMAIL_REGEXP_PART) != nil
34
34
  end
@@ -36,7 +36,7 @@ class String
36
36
 
37
37
  def scan_for_emails
38
38
  if RUBY_VERSION >= "1.9"
39
- self.force_encoding("BINARY").scan(RFC822::EMAIL_REGEXP_PART)
39
+ self.dup.force_encoding("BINARY").scan(RFC822::EMAIL_REGEXP_PART)
40
40
  else
41
41
  self.scan(RFC822::EMAIL_REGEXP_PART)
42
42
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfc822
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Marcin Lewandowski
9
+ - Artur Trzop
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-04-12 00:00:00.000000000 Z
13
+ date: 2014-03-18 00:00:00.000000000 Z
13
14
  dependencies: []
14
15
  description: This is a simple gem for Ruby that simplifies validating email addresses.
15
16
  It provides clean methods like String#is_email? and provides you valid RFC2822 regexp
@@ -18,12 +19,10 @@ email:
18
19
  - marcin@saepia.net
19
20
  executables: []
20
21
  extensions: []
21
- extra_rdoc_files:
22
- - LICENSE
23
- - README.rdoc
22
+ extra_rdoc_files: []
24
23
  files:
25
- - LICENSE
26
24
  - README.rdoc
25
+ - LICENSE
27
26
  - Rakefile
28
27
  - lib/rfc822.rb
29
28
  homepage: http://github.com/saepia/rfc822
@@ -46,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
45
  version: '0'
47
46
  requirements: []
48
47
  rubyforge_project:
49
- rubygems_version: 1.8.25
48
+ rubygems_version: 1.8.23
50
49
  signing_key:
51
50
  specification_version: 3
52
51
  summary: This is a simple gem for Ruby that simplifies validating email addresses.