bpluser 0.0.19 → 0.0.20

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
  SHA1:
3
- metadata.gz: f5167d7380a5a17ec2c522616b387c0d56321bc8
4
- data.tar.gz: 7ad647948b54a9f126b546587d295ab569680f12
3
+ metadata.gz: 7d9eb4b0d7716bc672c931660dc4afad717b0a1f
4
+ data.tar.gz: 4335705a3f1e957e0160298b606fe9ab124c5c57
5
5
  SHA512:
6
- metadata.gz: bcd7a8723eb698341927164ee157ce8354db8b909b493b1230f2a148052db2071d050465276425ec1a0eb813422604a184fe414ce40d2d019e66c0e51831ffe6
7
- data.tar.gz: 922b50e86f9a6061a12b768a8cc69b95971a43b5c0462161bbfbd902a44cdeea6b2951b91650613e2fc929e44e874d46411e3b6c1e83da543794f977928c4855
6
+ metadata.gz: d27a3b6206ac9e438be9e42605280a4811d486fb4494b9d5b529886106c47ebc0554b022e2e43e46d392bfa9537f3ea9e130ae94ebabc21b4b2ac99415353397
7
+ data.tar.gz: dbc9ac06e1084ffa3f8fdd9629bac0d83a1b29043522eac78354a6e4c66e9ef0b20bdb89469ec41dba887b758709231f2964d41a5514118a6ad94f9be48f12e6
@@ -201,5 +201,9 @@ module Bpluser::User
201
201
  return self.provider != 'digital_stacks_temporary'
202
202
  end
203
203
 
204
+ def email_not_required?
205
+ return self.provider != 'digital_stacks_temporary' and self.provider != 'polaris'
206
+ end
207
+
204
208
  end
205
209
  end
@@ -25,9 +25,9 @@ module Bpluser::Validatable
25
25
  assert_validations_api!(base)
26
26
 
27
27
  base.class_eval do
28
- validates_presence_of :email, if: [:email_required?, :permanent_account?]
28
+ validates_presence_of :email, if: [:email_required?, :email_not_required?]
29
29
  #validates_uniqueness_of :email, allow_blank: true, if: :email_changed?
30
- validates_format_of :email, with: email_regexp, allow_blank: true, if: [:email_changed?, :permanent_account?]
30
+ validates_format_of :email, with: email_regexp, allow_blank: true, if: [:email_changed?, :email_not_required?]
31
31
 
32
32
  validates_presence_of :password, if: :password_required?
33
33
  validates_confirmation_of :password, if: :password_required?
@@ -1,3 +1,3 @@
1
1
  module Bpluser
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bpluser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boston Public Library Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-24 00:00:00.000000000 Z
11
+ date: 2016-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails