cornell_netid 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cornell_netid}
8
- s.version = "1.0.0"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ari Epstein"]
12
- s.date = %q{2009-11-05}
12
+ s.date = %q{2010-01-29}
13
13
  s.description = %q{Toolkit for handling Cornell University Net Ids. Extends the String class with several methods that make it easier to parse net ids.}
14
14
  s.email = %q{aepstein607@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -3,11 +3,9 @@ module CornellNetid::CoreExtensions
3
3
 
4
4
  # Returns an array of strings representing valid netids contained in the
5
5
  # source string. The source string may contain multiple netids or
6
- # netid@cornell.edu addresses separated by any of these characters:
7
- #
8
- # * , ; \ / : whitespace
6
+ # netid@cornell.edu addresses separated by any non-word or numeric character
9
7
  def to_net_ids
10
- ids = self.split(/[\,\;\\\/\s\:]+/)
8
+ ids = self.split(/[^0-9A-Za-z]+/)
11
9
  ids.map! { |part| part.to_net_id }
12
10
  ids.reject! { |part| part.nil? }
13
11
  ids.uniq
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cornell_netid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Epstein
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-05 00:00:00 -05:00
12
+ date: 2010-01-29 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency