osu_person 0.1.0 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55c98b37673df08d5247b9da14f3168fc5c68f1cec43830c1be52744256dcd1c
4
- data.tar.gz: 863dbb3f877a9faff06edd9a5bd4d172822de92adbfd17bc6e4f28375b0cd3bb
3
+ metadata.gz: 9a29a8f449005a66774e3e4ec2ff2fbaf2c3f53b4768410cc80a919b74aedb62
4
+ data.tar.gz: 350f78ed70af1bb151eb3a58ce68ba094776fa9bbecc9ce302e488daca5232fe
5
5
  SHA512:
6
- metadata.gz: 885f7f9fe12e24ac1a147f3704c47374d4d4ac1fa5e921e85ecb5b87dd854d5e7ed435601ff6913327768f0a25b00bc5326561da8a340c8b0abfccc76d3c7a27
7
- data.tar.gz: eecccd229857062b7e645ea67d6376387d3ed122867432a48f6ba15233801b9e78a0ca0b8500f4a83a25c7c57ffb6c22ed1efecb59f22e04f0b6a32bbf351041
6
+ metadata.gz: d9d966a6b62f950db348011a135c329ecacbd40b087c277aa034572abe8febb55481e57826d32cf416cea8738706e8006686b3b31184fcabcaaad33a1223ccae
7
+ data.tar.gz: c22fc1515b79df74334615ecf4a3da8493041450e4dbb26b1da48d5f1fc4445ae823791ffa2dd6c0487a040d1a6990af4c9fee6830b4f98f6418d85774959999
data/.gitignore CHANGED
@@ -9,3 +9,5 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ osu_person-*.gem
data/.rubocop.yml CHANGED
@@ -2,3 +2,6 @@ AllCops:
2
2
  Exclude:
3
3
  - '*.gemspec'
4
4
  - 'spec/**/*'
5
+ Metrics/LineLength:
6
+ Exclude:
7
+ - lib/osu/email.rb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- osu_person (0.1.0)
4
+ osu_person (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/osu/email.rb CHANGED
@@ -14,9 +14,7 @@ module OSU
14
14
  attr_reader :email
15
15
 
16
16
  def initialize(email)
17
- unless self.class.valid?(email)
18
- raise InvalidEmailError, 'Email must resemble name.#@osu.edu'
19
- end
17
+ raise InvalidEmailError, email unless self.class.valid?(email)
20
18
 
21
19
  @email = email.downcase
22
20
  end
@@ -25,6 +23,13 @@ module OSU
25
23
  VALID_EMAIL.match(email)['name_n']
26
24
  end
27
25
 
28
- class InvalidEmailError < ArgumentError; end
26
+ # Raised when a string is an invalid email
27
+ class InvalidEmailError < ArgumentError
28
+ def initialize(email)
29
+ super(
30
+ "#{email} is not a valid OSU email. It must resemble name\.\#\@osu.edu"
31
+ )
32
+ end
33
+ end
29
34
  end
30
35
  end
@@ -1,5 +1,5 @@
1
1
  module OSU
2
2
  module Person
3
- VERSION = '0.1.0'.freeze
3
+ VERSION = '0.2.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osu_person
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurt Mueller