crowdint_auth 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # CrowdintAuth
2
2
 
3
+ [![Build Status](https://secure.travis-ci.org/crowdint/crowdint_auth.png)](http://travis-ci.org/crowdint/crowdint_auth)
4
+
3
5
  Adds the configuration to use Devise with our Crowd Interactive
4
6
  Google Apps account for authentication.
5
7
 
@@ -19,10 +21,11 @@ Run
19
21
 
20
22
  Devise model needs the following extra fields:
21
23
 
22
- class AddColumnsToRankitUsers < ActiveRecord::Migration
24
+ class AddColumnsToUsers < ActiveRecord::Migration
23
25
  def change
24
- add_column :rankit_users, :provider, :string
25
- add_column :users, :uid, :string
26
+ add_column :users, :provider, :string
27
+ add_column :users, :uid, :string
28
+ end
26
29
  end
27
30
 
28
31
  ## Routes
@@ -44,11 +47,12 @@ will probably look something like:
44
47
 
45
48
  ### If your user class is named differently
46
49
 
47
- Create your own omniauths controller:
50
+ Create your own omniauth callbacks controller that inherits from
51
+ `CrowdintAuth::OmniauthCallbacksController`:
48
52
 
49
53
  class Users::OmniauthCallbacksController < CrowdintAuth::OmniauthCallbacksController
50
54
  def user_class
51
- OtherClassName
55
+ OtherClass
52
56
  end
53
57
  end
54
58
 
@@ -2,4 +2,6 @@ require 'devise'
2
2
  Devise.setup do |config|
3
3
  config.omniauth :google_apps, :domain => 'crowdint.com',
4
4
  :strategy => OmniAuth::Strategies::GoogleApps
5
+
6
+ config.warden { |manager| manager.failure_app = CrowdintAuth::Devise::FailureApp }
5
7
  end
@@ -0,0 +1,9 @@
1
+ module CrowdintAuth
2
+ module Devise
3
+ class FailureApp < ::Devise::FailureApp
4
+ def redirect_url
5
+ google_apps_sign_in_path
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module CrowdintAuth
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/crowdint_auth.rb CHANGED
@@ -3,4 +3,5 @@ require "devise"
3
3
  require "omniauth-google-apps"
4
4
 
5
5
  module CrowdintAuth
6
+ autoload :Devise, 'crowdint_auth/devise/failure_app'
6
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crowdint_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-06 00:00:00.000000000 Z
12
+ date: 2012-10-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -89,6 +89,7 @@ files:
89
89
  - app/views/layouts/crowdint_auth/application.html.erb
90
90
  - config/initializers/devise.rb
91
91
  - config/routes.rb
92
+ - lib/crowdint_auth/devise/failure_app.rb
92
93
  - lib/crowdint_auth/engine.rb
93
94
  - lib/crowdint_auth/version.rb
94
95
  - lib/crowdint_auth.rb
@@ -110,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
111
  version: '0'
111
112
  segments:
112
113
  - 0
113
- hash: -2420540728232221423
114
+ hash: -461388547835600055
114
115
  required_rubygems_version: !ruby/object:Gem::Requirement
115
116
  none: false
116
117
  requirements:
@@ -119,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
120
  version: '0'
120
121
  segments:
121
122
  - 0
122
- hash: -2420540728232221423
123
+ hash: -461388547835600055
123
124
  requirements: []
124
125
  rubyforge_project:
125
126
  rubygems_version: 1.8.23