challah 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00571904e7b531ba71d930963040ee5f0f86d7c5
4
- data.tar.gz: 79b6eb4368053e6bd913a5253462d9524e6285f2
3
+ metadata.gz: 29cfdb5f413c9729944833d2f5c369dd76eebb36
4
+ data.tar.gz: 38a2fc66da2cb2faefd8991f044e3ff1edc8e0f9
5
5
  SHA512:
6
- metadata.gz: 2d7a2712be87c28d145d6e6eaccdc42bd8ced60b5991243d0319317c8bd59de517a0a7c7c0354ab5db83c48c19f9c4c7cd0e38cbb300869f672a7daa2ed5cb45
7
- data.tar.gz: d228fe2deab5d073f60d5c231481bf2a1d25d0b1f84ec593fc9c0982cfbabb66551f5bc6efc4a00c1663da1592532f3ba1b652e0c84179e1a23d93eba3e26006
6
+ metadata.gz: 1735d252c154e8b4d2085f4921cf6d6f23d7f3dfd0a7ac44258690529f793aef08986b6392e4ff3279d232b8bd80fd011b63865d5822959ef28543fddf3e736e
7
+ data.tar.gz: d1fbfbfe1b107afc12e4f28a657b058fa82e3b9272fd09568261eb567f2cf2792fe8c29efe1a6b4a9e8a76843b15386c40d64621dffe618daa436d08b15d0b5a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Challah 1.2.6
2
+
3
+ * Normalize email address before writing to database [PR #13](https://github.com/jdtornow/challah/pull/13) @thewatts
4
+
1
5
  ## Challah 1.2.5
2
6
 
3
7
  * Modified audit tracker for Rails 4.2 `ActiveRecord::AttributeSet`
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Challah
2
2
 
3
- [![Build Status](https://secure.travis-ci.org/jdtornow/challah.png)](http://travis-ci.org/jdtornow/challah) [![Code Climate](https://codeclimate.com/github/jdtornow/challah.png)](https://codeclimate.com/github/jdtornow/challah) [![Dependency Status](https://gemnasium.com/jdtornow/challah.png?travis)](https://gemnasium.com/jdtornow/challah) [![Gem Version](https://badge.fury.io/rb/challah.png)](http://badge.fury.io/rb/challah)
3
+ [![Build Status](https://travis-ci.org/jdtornow/challah.svg?branch=master)](https://travis-ci.org/jdtornow/challah) [![Code Climate](https://codeclimate.com/github/jdtornow/challah.png)](https://codeclimate.com/github/jdtornow/challah) [![Dependency Status](https://gemnasium.com/jdtornow/challah.png?travis)](https://gemnasium.com/jdtornow/challah) [![Gem Version](https://badge.fury.io/rb/challah.png)](http://badge.fury.io/rb/challah)
4
4
 
5
5
  Challah (pronounced HAH-lah) is a simple Rails authentication gem that provides users a way to authenticate with your app. Most of the functionality within the gem lives within a Rails engine and tries to stay out of the way of your app.
6
6
 
@@ -8,6 +8,7 @@ module Challah
8
8
  attr_reader :password_updated
9
9
 
10
10
  before_save :ensure_user_tokens
11
+ before_validation :normalize_user_email
11
12
  end
12
13
 
13
14
  # Returns true if this user is active, and should be able to log in. If
@@ -69,5 +70,10 @@ module Challah
69
70
  end
70
71
  end
71
72
 
73
+ # Downcase email and strip if of whitespace
74
+ # Ex: " HELLO@example.com " => "hello@example.com"
75
+ def normalize_user_email
76
+ self.email = self.email.to_s.downcase.strip
77
+ end
72
78
  end
73
- end
79
+ end
@@ -1,3 +1,3 @@
1
1
  module Challah
2
- VERSION = "1.2.5" unless defined?(::Challah::VERSION)
2
+ VERSION = "1.2.6" unless defined?(::Challah::VERSION)
3
3
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: challah
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Tornow
8
8
  - Phillip Ridlen
9
+ - Nathaniel Watts
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2015-01-07 00:00:00.000000000 Z
13
+ date: 2015-01-29 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: highline
@@ -113,6 +114,7 @@ description: A simple gem for authorization and session management in Rails.
113
114
  email:
114
115
  - john@johntornow.com
115
116
  - p@rdln.net
117
+ - reg@nathanielwatts.com
116
118
  executables: []
117
119
  extensions: []
118
120
  extra_rdoc_files: []