Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix spec suite to run post gem rename

  • Loading branch information...
commit 1792b018be5413ec757d1b1ad9d4684bc48c65f7 1 parent 6f65bac
@andrewvc andrewvc authored
View
6 Rakefile
@@ -9,9 +9,9 @@ task :default => 'test:run'
task 'gem:release' => 'test:run'
task "parser" do
- sh "kpeg -s -o lib/email-address-validator/rfc822-parser.rb -f grammars/rfc822.kpeg"
- sh "kpeg -s -o lib/email-address-validator/rfc2822-parser.rb -f grammars/rfc2822.kpeg"
- sh "kpeg -s -o lib/email-address-validator/domain-parser.rb -f grammars/domain.kpeg"
+ sh "kpeg -s -o lib/email_address_validator/rfc822-parser.rb -f grammars/rfc822.kpeg"
+ sh "kpeg -s -o lib/email_address_validator/rfc2822-parser.rb -f grammars/rfc2822.kpeg"
+ sh "kpeg -s -o lib/email_address_validator/domain-parser.rb -f grammars/domain.kpeg"
end
Bones {
View
4 grammars/rfc2822.kpeg
@@ -106,10 +106,10 @@ addr-spec = local-part "@" domain
local-part = dot-atom | quoted-string | obs-local-part
domain = < dot-atom >
- &{ @validate_domain ? RFC822::DomainParser.new(text).parse : true }
+ &{ @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true }
| domain-literal
| < obs-domain >
- &{ @validate_domain ? RFC822::DomainParser.new(text).parse : true }
+ &{ @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true }
domain-literal = CFWS? "[" (FWS? dcontent)* FWS? "]" CFWS?
View
2  grammars/rfc822.kpeg
@@ -65,7 +65,7 @@ local_part = word ocms ("." ocms word)*
domain = domain_literal
| < sub_domain ocms ("." ocms sub_domain)* >
- &{ @validate_domain ? RFC822::DomainParser.new(text).parse : true }
+ &{ @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true }
sub_domain = domain_ref | domain_literal
View
8 lib/email_address_validator/rfc2822-parser.rb
@@ -1553,7 +1553,7 @@ def _local_hyphen_part
return _tmp
end
- # domain = (< dot-atom > &{ @validate_domain ? RFC822::DomainParser.new(text).parse : true } | domain-literal | < obs-domain > &{ @validate_domain ? RFC822::DomainParser.new(text).parse : true })
+ # domain = (< dot-atom > &{ @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true } | domain-literal | < obs-domain > &{ @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true })
def _domain
_save = self.pos
@@ -1571,7 +1571,7 @@ def _domain
break
end
_save2 = self.pos
- _tmp = begin; @validate_domain ? RFC822::DomainParser.new(text).parse : true ; end
+ _tmp = begin; @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true ; end
self.pos = _save2
unless _tmp
self.pos = _save1
@@ -1597,7 +1597,7 @@ def _domain
break
end
_save4 = self.pos
- _tmp = begin; @validate_domain ? RFC822::DomainParser.new(text).parse : true ; end
+ _tmp = begin; @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true ; end
self.pos = _save4
unless _tmp
self.pos = _save3
@@ -2521,7 +2521,7 @@ def _only_addr_spec
Rules[:_address_hyphen_list] = rule_info("address-list", "(address (\",\" address)* | obs-addr-list)")
Rules[:_addr_hyphen_spec] = rule_info("addr-spec", "local-part \"@\" domain")
Rules[:_local_hyphen_part] = rule_info("local-part", "(dot-atom | quoted-string | obs-local-part)")
- Rules[:_domain] = rule_info("domain", "(< dot-atom > &{ @validate_domain ? RFC822::DomainParser.new(text).parse : true } | domain-literal | < obs-domain > &{ @validate_domain ? RFC822::DomainParser.new(text).parse : true })")
+ Rules[:_domain] = rule_info("domain", "(< dot-atom > &{ @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true } | domain-literal | < obs-domain > &{ @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true })")
Rules[:_domain_hyphen_literal] = rule_info("domain-literal", "CFWS? \"[\" (FWS? dcontent)* FWS? \"]\" CFWS?")
Rules[:_dcontent] = rule_info("dcontent", "(dtext | quoted-pair)")
Rules[:_dtext] = rule_info("dtext", "(NO-WS-CTL | d_btw(33,90) | d_btw(94,126))")
View
6 lib/email_address_validator/rfc822-parser.rb
@@ -1133,7 +1133,7 @@ def _local_part
return _tmp
end
- # domain = (domain_literal | < sub_domain ocms ("." ocms sub_domain)* > &{ @validate_domain ? RFC822::DomainParser.new(text).parse : true })
+ # domain = (domain_literal | < sub_domain ocms ("." ocms sub_domain)* > &{ @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true })
def _domain
_save = self.pos
@@ -1196,7 +1196,7 @@ def _domain
break
end
_save5 = self.pos
- _tmp = begin; @validate_domain ? RFC822::DomainParser.new(text).parse : true ; end
+ _tmp = begin; @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true ; end
self.pos = _save5
unless _tmp
self.pos = _save1
@@ -1318,7 +1318,7 @@ def _only_addr_spec
Rules[:_route] = rule_info("route", "(AT ocms domain)+ \":\"")
Rules[:_addr_spec] = rule_info("addr_spec", "local_part ocms \"@\" ocms domain")
Rules[:_local_part] = rule_info("local_part", "word ocms (\".\" ocms word)*")
- Rules[:_domain] = rule_info("domain", "(domain_literal | < sub_domain ocms (\".\" ocms sub_domain)* > &{ @validate_domain ? RFC822::DomainParser.new(text).parse : true })")
+ Rules[:_domain] = rule_info("domain", "(domain_literal | < sub_domain ocms (\".\" ocms sub_domain)* > &{ @validate_domain ? EmailAddressValidator::DomainParser.new(text).parse : true })")
Rules[:_sub_domain] = rule_info("sub_domain", "(domain_ref | domain_literal)")
Rules[:_domain_ref] = rule_info("domain_ref", "atom")
Rules[:_root] = rule_info("root", "valid !.")
Please sign in to comment.
Something went wrong with that request. Please try again.