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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4622e8055845c9abf398d8f958906428dde30e44
4
- data.tar.gz: 8ae7fa3fa6b99850410b81ad41044b46dd080051
3
+ metadata.gz: e98e72cd844407f209ce61c0ededf601cff25216
4
+ data.tar.gz: 78a4bf0fb1aedfa9b95a4b000c8e2f54d596947c
5
5
  SHA512:
6
- metadata.gz: 7d521c40e32ec53b810a7b4a2158b0f1adc19708fecfccaec69140ca001609d5308a28e6d226700fa2a4a4d40b3d1b35e548baa5fa8e89d5756637d40de31c07
7
- data.tar.gz: 39c2734db44734a35e6a4f2f7add58e0105ce50f164baadc6fe9574013b0c275cb329295709c2e86447d9b4410ca39e8a9f0f1d58054b5d277bb938c3d6354fd
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.find_or_initialize_by_email(auth['info']['email'])
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!
@@ -16,5 +16,6 @@ Gem::Specification.new do |s|
16
16
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
17
  s.require_paths = ["lib"]
18
18
 
19
+ s.add_dependency 'activerecord', '~> 4.0'
19
20
  s.add_runtime_dependency 'omniauth-google-apps'
20
21
  end
@@ -1,3 +1,3 @@
1
1
  module GoogleAuth
2
- VERSION = "0.0.4"
2
+ VERSION = "0.1.0"
3
3
  end
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
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