google_auth 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/app/controllers/sessions_controller.rb +1 -1
- data/google_auth.gemspec +1 -0
- data/lib/google_auth/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e98e72cd844407f209ce61c0ededf601cff25216
|
4
|
+
data.tar.gz: 78a4bf0fb1aedfa9b95a4b000c8e2f54d596947c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66ae17cde968043f6c7004b9a51ca7d47a6f57d8c29d39bc256cd19e1d5c353401f8fe9a531552d356caa641ba207c8b19bc051b0edb6e8a29ec1a236e90d584
|
7
|
+
data.tar.gz: 40a2f9feefbc4504e7becc22e6e7e30be4d1b018f6f1942bb04d738b8dfd9663fa1f4f08408e3ef617d9c313bdad0f905a07b1ac10556514f3d377a7a8775754
|
data/README.md
CHANGED
@@ -5,6 +5,10 @@
|
|
5
5
|
GoogleAuth is a very, very trivial convenience wrapper around `omniauth-google-apps` that
|
6
6
|
makes a lot of assumptions, and requires much less setup.
|
7
7
|
|
8
|
+
## Version
|
9
|
+
|
10
|
+
Version 0.1.0 is Rails 4.x compatible. For Rails 3.x projects use version 0.0.4
|
11
|
+
|
8
12
|
## How
|
9
13
|
|
10
14
|
#### 1. Your user model must have the string fields `name`, `email`, and `uid`.
|
@@ -8,7 +8,7 @@ class SessionsController < ApplicationController
|
|
8
8
|
|
9
9
|
def create
|
10
10
|
if auth = request.env['omniauth.auth']
|
11
|
-
user = GoogleAuth.user_class.
|
11
|
+
user = GoogleAuth.user_class.find_or_initialize_by(email: auth['info']['email'])
|
12
12
|
user.uid = auth['uid']
|
13
13
|
user.name = auth['info']['name']
|
14
14
|
user.save!
|
data/google_auth.gemspec
CHANGED
data/lib/google_auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burke Libbey
|
@@ -10,6 +10,20 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: omniauth-google-apps
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|