rfc-822 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source "http://rubygems.org"
2
+
3
+ group :test do
4
+ gem "rspec"
5
+ end
6
+
7
+
@@ -0,0 +1,18 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ diff-lcs (1.1.2)
5
+ rspec (2.3.0)
6
+ rspec-core (~> 2.3.0)
7
+ rspec-expectations (~> 2.3.0)
8
+ rspec-mocks (~> 2.3.0)
9
+ rspec-core (2.3.0)
10
+ rspec-expectations (2.3.0)
11
+ diff-lcs (~> 1.1.2)
12
+ rspec-mocks (2.3.0)
13
+
14
+ PLATFORMS
15
+ ruby
16
+
17
+ DEPENDENCIES
18
+ rspec
data/Rakefile CHANGED
@@ -1,15 +1,14 @@
1
1
  require 'rubygems'
2
- require 'spec/rake/spectask'
3
- require 'spec/version'
2
+ require 'rake'
3
+ require 'rspec/mocks/version'
4
+ require 'rspec/core/rake_task'
5
+
6
+
7
+ RSpec::Core::RakeTask.new(:spec)
4
8
 
5
9
  desc 'Default: run specs.'
6
10
  task :default => :spec
7
11
 
8
- Spec::Rake::SpecTask.new do |t|
9
- t.spec_files = FileList['spec/**/*_spec.rb']
10
- t.spec_opts = ['--colour', '--format', 'profile', '--timeout', '20']
11
- end
12
-
13
12
  begin
14
13
  require 'jeweler'
15
14
  Jeweler::Tasks.new do |gemspec|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.3.0
@@ -4,18 +4,14 @@ require 'uri'
4
4
  module RFC822
5
5
 
6
6
  module Patterns
7
-
7
+
8
8
  def self.compile(string)
9
9
  Regexp.new string, nil, 'n'
10
10
  end
11
11
 
12
- QTEXT = compile "[^\\x0d\\x22\\x5c\\x80-\\xff]"
13
- DTEXT = compile "[^\\x0d\\x5b-\\x5d\\x80-\\xff]"
14
-
15
- ATOM_CORE = compile "[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+"
16
- ATOM_EDGE = compile "[^\\x00-\\x20\\x22\\x28\\x29\\x2c-\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]"
17
- ATOM = compile "(?:#{ATOM_EDGE}{1,2}|#{ATOM_EDGE}#{ATOM_CORE}#{ATOM_EDGE})"
12
+ ATOM = compile "[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+"
18
13
 
14
+ QTEXT = compile "[^\\x0d\\x22\\x5c\\x80-\\xff]"
19
15
  QPAIR = compile "\\x5c[\\x00-\\x7f]"
20
16
  QSTRING = compile "\\x22(?:#{QTEXT}|#{QPAIR})*\\x22"
21
17
 
@@ -23,7 +19,7 @@ module RFC822
23
19
 
24
20
  LOCAL_PT = compile "#{WORD}(?:\\x2e#{WORD})*"
25
21
  ADDRESS = compile "#{LOCAL_PT}\\x40#{URI::REGEXP::PATTERN::HOSTNAME}"
26
-
22
+
27
23
  end
28
24
 
29
25
  MXRecord = Struct.new(:priority, :host)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rfc-822}
8
- s.version = "0.2.3"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dimitrij Denissenko"]
12
- s.date = %q{2010-08-04}
12
+ s.date = %q{2010-12-13}
13
13
  s.description = %q{RFC822 compatible email validation and MX record check}
14
14
  s.email = %q{dimitrij@blacksquaremedia.com}
15
15
  s.extra_rdoc_files = [
@@ -18,6 +18,8 @@ Gem::Specification.new do |s|
18
18
  ]
19
19
  s.files = [
20
20
  ".gitignore",
21
+ "Gemfile",
22
+ "Gemfile.lock",
21
23
  "LICENSE",
22
24
  "README.textile",
23
25
  "Rakefile",
@@ -1,4 +1,4 @@
1
1
  $: << File.dirname(__FILE__) + '/../lib'
2
2
  require 'rubygems'
3
- require 'spec'
3
+ require 'rspec'
4
4
  require 'rfc822'
@@ -19,6 +19,7 @@ describe RFC822 do
19
19
  "slashed/user@home.com".should match(RFC822::EMAIL)
20
20
  "plussed+user@home.com".should match(RFC822::EMAIL)
21
21
  "{wrapped}user@home.com".should match(RFC822::EMAIL)
22
+ "end-dashed-@home.com".should match(RFC822::EMAIL)
22
23
  end
23
24
 
24
25
  it 'should not match non-RFC822 compliant addresses' do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfc-822
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
9
8
  - 3
10
- version: 0.2.3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dimitrij Denissenko
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-04 00:00:00 +01:00
18
+ date: 2010-12-13 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -30,6 +30,8 @@ extra_rdoc_files:
30
30
  - README.textile
31
31
  files:
32
32
  - .gitignore
33
+ - Gemfile
34
+ - Gemfile.lock
33
35
  - LICENSE
34
36
  - README.textile
35
37
  - Rakefile