devise-multi_auth 0.0.2 → 0.0.3

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: 5c1c2273883de4342a30a7691f0b9058c9218cac
4
- data.tar.gz: 0f5f945e83ed6704de1cbe8ec817bda29b30be29
3
+ metadata.gz: 2ff584c3f4b354f13dbb722df1b68fa277fb7290
4
+ data.tar.gz: ecd4357db53bb60f0599178c0c23022b149bee17
5
5
  SHA512:
6
- metadata.gz: 907c37ca48b673a45d516dfcee309720fd6f073c6f9643b235005e70e99b91f8ec247544b0584040af789ae57b95432492a88d0cd4a1aeae8ccc35129924e0df
7
- data.tar.gz: bffe368c9c69b318c86f313e9116f21e0ab79d0861bd02e94f51ae7601fcf721a2dfceab97e863e38ae4255d2b1c5fe3b4d6d0ea7a58402fba7660c01d856e5f
6
+ metadata.gz: 2d6bd2163bb04a0595185a5de78ebd1105774a1fd03ccf8df7b55bf4d491ddcc7d0e277c9dc2dc4ad4b69aa90a898ebe8cecd7eee0a511de694ce9b98c6d76ac
7
+ data.tar.gz: 01a27cfc31cc9fd8ab45658b87b4e4ce8d4b57d8fb59777497142f4bd169ca17f260241bccacb9cf787cde7a890ed351d2b84625a5c596ab8c26b4951ae8edcd
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Devise::MultiAuth [![Version](https://badge.fury.io/rb/devise-multi_auth.png)](http://badge.fury.io/rb/devise-multi_auth)
1
+ # Devise::MultiAuth [![Build Status](https://travis-ci.org/jeremyf/devise-multi_auth.png?branch=master)](https://travis-ci.org/jeremyf/devise-multi_auth) [![Version](https://badge.fury.io/rb/devise-multi_auth.png)](http://badge.fury.io/rb/devise-multi_auth)
2
2
 
3
3
  A [Devise](https://github.com/plataformatec/devise) plugin leveraging [omniauth](https://github.com/intridea/omniauth) to
4
4
  expose alternate means for authenticating existing users.
@@ -22,3 +22,7 @@ And then execute:
22
22
  $ bundle
23
23
  $ rails generate devise:multi_auth:install
24
24
  ```
25
+
26
+ ## TODO
27
+
28
+ At present, this [Rails Engine](http://guides.rubyonrails.org/engines.html) does not expose an obvious means for initiating the connecting between an existing account and an omniauth-enabled account (i.e. login via Github).
data/Rakefile CHANGED
@@ -5,7 +5,11 @@ rescue LoadError
5
5
  end
6
6
 
7
7
  APP_RAKEFILE = File.expand_path("../spec/internal/Rakefile", __FILE__)
8
- load 'rails/tasks/engine.rake'
8
+ begin
9
+ load 'rails/tasks/engine.rake'
10
+ rescue LoadError
11
+ puts "Warning: Unable to find #{APP_RAKEFILE}; internal application's tasks will not be loaded."
12
+ end
9
13
 
10
14
  require 'engine_cart/rake_task'
11
15
 
@@ -18,4 +22,6 @@ RSpec::Core::RakeTask.new(:spec)
18
22
  namespace :spec do
19
23
  desc 'Rebuild and run the specs'
20
24
  task :travis => ['engine_cart:clean', 'engine_cart:generate', 'spec']
21
- end
25
+ end
26
+
27
+ task :default => :spec
@@ -1,5 +1,5 @@
1
1
  module Devise
2
2
  module MultiAuth
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -10,11 +10,12 @@ module Devise::MultiAuth
10
10
  end
11
11
 
12
12
  def oauth_client_for(provider_name, config = {})
13
- config_args = Devise.omniauth_configs.fetch(provider_name.to_sym).args.dup
14
- options = config_args.extract_options!
15
- client_id = config_args[0]
16
- secret = config_args[1]
17
- OAuth2::Client.new(client_id, secret, options[:client_options] || {})
13
+ default_args = Devise.omniauth_configs.fetch(provider_name.to_sym).args.dup
14
+ default_options = default_args.extract_options!
15
+ options = config.fetch(:options) { default_options[:client_options] || {} }
16
+ client_id = config.fetch(:client_id) { default_args[0] }
17
+ secret = config.fetch(:secret) { default_args[1] }
18
+ OAuth2::Client.new(client_id, secret, options)
18
19
  end
19
20
 
20
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-multi_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jeremy.n.friesen@gmail.com