spree_social_onr 2.1.3 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. data/LICENSE +26 -0
  2. data/README.md +125 -0
  3. data/app/assets/images/store/facebook_128.png +0 -0
  4. data/app/assets/images/store/facebook_256.png +0 -0
  5. data/app/assets/images/store/facebook_32.png +0 -0
  6. data/app/assets/images/store/facebook_64.png +0 -0
  7. data/app/assets/images/store/github_128.png +0 -0
  8. data/app/assets/images/store/github_256.png +0 -0
  9. data/app/assets/images/store/github_32.png +0 -0
  10. data/app/assets/images/store/github_64.png +0 -0
  11. data/app/assets/images/store/twitter_128.png +0 -0
  12. data/app/assets/images/store/twitter_256.png +0 -0
  13. data/app/assets/images/store/twitter_32.png +0 -0
  14. data/app/assets/images/store/twitter_64.png +0 -0
  15. data/app/assets/javascripts/admin/spree_social.js +1 -0
  16. data/app/assets/javascripts/store/spree_social.js +1 -0
  17. data/app/assets/stylesheets/admin/spree_social.css +3 -0
  18. data/app/assets/stylesheets/store/spree_social.css +3 -0
  19. data/app/controllers/spree/admin/authentication_methods_controller.rb +19 -0
  20. data/app/controllers/spree/omniauth_callbacks_controller.rb +63 -0
  21. data/app/controllers/spree/user_authentications_controller.rb +12 -0
  22. data/app/controllers/spree/user_registrations_controller_decorator.rb +17 -0
  23. data/app/helpers/spree/omniauth_callbacks_helper.rb +6 -0
  24. data/app/models/spree/authentication_method.rb +19 -0
  25. data/app/models/spree/user_authentication.rb +4 -0
  26. data/app/models/spree/user_decorator.rb +16 -0
  27. data/app/overrides/add_authentications_to_account_summary.rb +5 -0
  28. data/app/overrides/admin_configuration_decorator.rb +12 -0
  29. data/app/overrides/user_registrations_decorator.rb +17 -0
  30. data/app/views/spree/admin/authentication_methods/_form.html.erb +27 -0
  31. data/app/views/spree/admin/authentication_methods/edit.html.erb +9 -0
  32. data/app/views/spree/admin/authentication_methods/index.html.erb +38 -0
  33. data/app/views/spree/admin/authentication_methods/new.html.erb +10 -0
  34. data/app/views/spree/admin/shared/_configurations_menu.html.erb +4 -0
  35. data/app/views/spree/shared/_social.html.erb +8 -0
  36. data/app/views/spree/shared/_user_form.html.erb +19 -0
  37. data/app/views/spree/users/_new-customer.html.erb +7 -0
  38. data/app/views/spree/users/_social.html.erb +34 -0
  39. data/config/initializers/devise.rb +6 -0
  40. data/config/locales/en.yml +15 -0
  41. data/config/locales/nl.yml +15 -0
  42. data/config/routes.rb +14 -0
  43. data/db/migrate/20120120163432_create_user_authentications.rb +10 -0
  44. data/db/migrate/20120123163222_create_authentication_methods.rb +13 -0
  45. data/lib/generators/spree_social/install/install_generator.rb +29 -0
  46. data/lib/spree_social.rb +6 -0
  47. data/lib/spree_social/engine.rb +46 -0
  48. data/script/rails +5 -0
  49. data/spec/controllers/spree/omniauth_callbacks_controller_spec.rb +152 -0
  50. data/spec/models/spree/user_decorator_spec.rb +45 -0
  51. data/spec/spec_helper.rb +20 -0
  52. metadata +77 -26
data/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2012 [name of plugin creator]
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
5
+ are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+ * Neither the name Spree nor the names of its contributors may be used to
13
+ endorse or promote products derived from this software without specific
14
+ prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,125 @@
1
+ SpreeSocial
2
+ ===========
3
+
4
+ **NOTE: If you were contributing to the 0.70.x version of this extension, please make sure you are using the 0_70_stable branch, as this branch has recently been forced push to in order to release the 1.0.x extension rewrite.**
5
+
6
+ Core for all social media related functionality for Spree.
7
+ The Spree Social gem handles authorization, account creation and association through social media sources such as Twitter and Facebook.
8
+ This requires the edge source of [Spree](https://github.com/spree/spree).
9
+ This gem is beta at best and should be treated as such.
10
+ Features and code base will change rapidly as this is under active development.
11
+ Use with caution.
12
+
13
+ Setup for Production
14
+ --------------------
15
+ Add this extension to your Gemfile:
16
+
17
+ ```ruby
18
+ gem "spree_social", :git => "git://github.com/spree/spree_social.git"
19
+ ```
20
+
21
+ Then run:
22
+
23
+ ```
24
+ bundle update
25
+ bundle exec rails g spree_social:install
26
+ rake db:migrate
27
+ ```
28
+
29
+ Spree Setup to Utilize OAuth Sources
30
+ ------------------------------------
31
+
32
+ Login as an admin user and navigate to Configuration > Social Authentication Methods
33
+
34
+ Click on the New Authentication Method button to enter the key obtained from their respective source
35
+ (See below for instructions on setting up the various providers)
36
+
37
+ Multiple key entries can now be entered based on the rails environment. This allows for portability and the lack of need to check in your key to your repository. You also have the ability to enable and disable sources. These setting will be reflected on the client UI as well.
38
+
39
+ **You MUST restart your application after configuring or
40
+ updating an authentication method.**
41
+
42
+ Setup the Applications at the Respective Sources
43
+ ------------------------------------------------
44
+
45
+ OAuth Applications @ Facebook, Twitter and / or Github are supported out of the box but you will need to setup applications are each respective site as follows for public use and for development.
46
+
47
+ > All URLs must be in the form of domain.tld you may add a port as well for development
48
+
49
+ ### Facebook
50
+
51
+ [Facebook](http://www.facebook.com/developers/createapp.php): [http://www.facebook.com/developers/createapp.php](http://www.facebook.com/developers/createapp.php)
52
+
53
+ 1. Name the app what you will and agree to the terms.
54
+ 2. Fill out the capcha
55
+ 3. Under the Web Site tab
56
+ 4. Site URL: http://your_computer.local:3000 for development / http://your-site.com for production
57
+ 5. Site domain: your-computer.local / your-site.com respectively
58
+
59
+ ### Twitter
60
+
61
+ [Twitter](http://dev.twitter.com/apps/new): [http://dev.twitter.com/apps/new](http://dev.twitter.com/apps/new)
62
+
63
+ 1. Name and Description must be filled in with something
64
+ 2. Application Website: http://your_computer.local:3000 for development / http://your-site.com for production
65
+ 3. Application Type: Browser
66
+ 4. Callback URL: http://your_computer.local:3000 for development / http://your-site.com for production
67
+ 5. Default Access Type: Read & Write
68
+ 6. Save Application
69
+
70
+ ### Github
71
+
72
+ [Github](http://github.com/account/applications/new): [http://github.com/account/applications/new](http://github.com/account/applications/new)
73
+
74
+ 1. Name The Application
75
+ 2. Main URL: http://your_computer.local:3000 for development / http://your-site.com for production
76
+ 3. Callback URL: http://your_computer.local:3000 for development / http://your-site.com for production
77
+ 4. Click Create
78
+
79
+ > This does not seem to be a listed Github item right now. To View and / or edit your applications goto [http://github.com/account/applications/]([http://github.com/account/applications/])
80
+
81
+ ### Other OAuth sources that a currently supported
82
+
83
+ * Google (OAuth)
84
+
85
+ Setup for Development
86
+ ---------------------
87
+
88
+ ```
89
+ git clone git://github.com/spree/spree
90
+ git clone git://github.com/spree/spree_social
91
+ cd spree
92
+ bundle install
93
+ bundle exec rake sandbox
94
+ ```
95
+
96
+ add this to sandbox/Gemfile:
97
+
98
+ ```ruby
99
+ gem 'spree_social', :path => '../spree_social'
100
+ ```
101
+
102
+ Then run:
103
+
104
+ ```
105
+ bundle update
106
+ rails g spree_social:install
107
+ bundle exec rake db:migrate
108
+ ```
109
+
110
+ Testing
111
+ -------
112
+
113
+ Inside of your cloned spree_social folder, run:
114
+
115
+ ```
116
+ bundle exec rake test_app
117
+ bundle exec rspec spec
118
+ ```
119
+
120
+ Adding your own Auth Source
121
+ ---------------------------
122
+
123
+ > Most auth sources supported by the Omniauth gem can be added. I attempt to keep the popular ones included and tested.
124
+
125
+ Copyright (c) 2012 John Brien Dilts, released under the New BSD License
@@ -0,0 +1 @@
1
+ //= require admin/spree_core
@@ -0,0 +1 @@
1
+ //= require store/spree_core
@@ -0,0 +1,3 @@
1
+ /*
2
+ *= require admin/spree_core
3
+ */
@@ -0,0 +1,3 @@
1
+ /*
2
+ *= require store/spree_core
3
+ */
@@ -0,0 +1,19 @@
1
+ module Spree
2
+ module Admin
3
+ class AuthenticationMethodsController < ResourceController
4
+ create.after :update_oauth_method
5
+ update.after :update_oauth_method
6
+
7
+ private
8
+
9
+ def update_oauth_method
10
+ auth_method = params[:authentication_method]
11
+ if auth_method[:active] == "true" && auth_method[:environment] == ::Rails.env
12
+ Devise.setup do |config|
13
+ config.omniauth auth_method[:provider], auth_method[:api_key], auth_method[:api_secret]
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,63 @@
1
+ class Spree::OmniauthCallbacksController < Devise::OmniauthCallbacksController
2
+ include Spree::Core::CurrentOrder
3
+ include Spree::Core::ControllerHelpers
4
+
5
+ def self.provides_callback_for(*providers)
6
+ providers.each do |provider|
7
+ class_eval %Q{
8
+ def #{provider}
9
+ if request.env["omniauth.error"].present?
10
+ flash[:error] = t("devise.omniauth_callbacks.failure", :kind => auth_hash['provider'], :reason => t(:user_was_not_valid))
11
+ redirect_back_or_default(root_url)
12
+ return
13
+ end
14
+
15
+ authentication = Spree::UserAuthentication.find_by_provider_and_uid(auth_hash['provider'], auth_hash['uid'])
16
+
17
+ if authentication.present?
18
+ flash[:notice] = "Signed in successfully"
19
+ sign_in_and_redirect :user, authentication.user
20
+ elsif current_user
21
+ current_user.user_authentications.create!(:provider => auth_hash['provider'], :uid => auth_hash['uid'])
22
+ flash[:notice] = "Authentication successful."
23
+ redirect_back_or_default(account_url)
24
+ else
25
+ user = Spree::User.find_by_email(auth_hash['info']['email']) || Spree::User.new
26
+ user.apply_omniauth(auth_hash)
27
+ if user.save
28
+ flash[:notice] = "Signed in successfully."
29
+ sign_in_and_redirect :user, user
30
+ else
31
+ session[:omniauth] = auth_hash.except('extra')
32
+ flash[:notice] = t(:one_more_step, :kind => auth_hash['provider'].capitalize)
33
+ redirect_to new_user_registration_url
34
+ end
35
+ end
36
+
37
+ if current_order
38
+ user = current_user if current_user
39
+ current_order.associate_user!(user)
40
+ session[:guest_token] = nil
41
+ end
42
+ end
43
+ }
44
+ end
45
+ end
46
+
47
+ SpreeSocial::OAUTH_PROVIDERS.each do |provider|
48
+ provides_callback_for provider[1].to_sym
49
+ end
50
+
51
+ def failure
52
+ set_flash_message :alert, :failure, :kind => failed_strategy.name.to_s.humanize, :reason => failure_message
53
+ redirect_to spree.login_path
54
+ end
55
+
56
+ def passthru
57
+ render :file => "#{Rails.root}/public/404", :formats => [:html], :status => 404, :layout => false
58
+ end
59
+
60
+ def auth_hash
61
+ request.env["omniauth.auth"]
62
+ end
63
+ end
@@ -0,0 +1,12 @@
1
+ class Spree::UserAuthenticationsController < ApplicationController
2
+ def index
3
+ @authentications = current_user.user_authentications if current_user
4
+ end
5
+
6
+ def destroy
7
+ @authentication = current_user.user_authentications.find(params[:id])
8
+ @authentication.destroy
9
+ flash[:notice] = "Successfully destroyed authentication method."
10
+ redirect_to account_path
11
+ end
12
+ end
@@ -0,0 +1,17 @@
1
+ Spree::UserRegistrationsController.class_eval do
2
+ def create
3
+ super
4
+ session[:omniauth] = nil unless @user.new_record?
5
+ end
6
+
7
+ private
8
+
9
+ def build_resource(*args)
10
+ super
11
+ if session[:omniauth]
12
+ @user.apply_omniauth(session[:omniauth])
13
+ @user.valid?
14
+ @user
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,6 @@
1
+ module Spree
2
+ module OmniauthCallbacksHelper
3
+ include Spree::BaseHelper
4
+ end
5
+ end
6
+
@@ -0,0 +1,19 @@
1
+ class Spree::AuthenticationMethod < ActiveRecord::Base
2
+ attr_accessible :provider, :api_key, :api_secret, :environment, :active
3
+
4
+ def self.active_authentication_methods?
5
+ found = false
6
+ where(:environment => ::Rails.env).each do |method|
7
+ if method.active
8
+ found = true
9
+ end
10
+ end
11
+ return found
12
+ end
13
+
14
+ scope :available_for, lambda { |user|
15
+ sc = where(:environment => ::Rails.env)
16
+ sc = sc.where(["provider NOT IN (?)", user.user_authentications.map(&:provider)]) if user and !user.user_authentications.empty?
17
+ sc
18
+ }
19
+ end
@@ -0,0 +1,4 @@
1
+ class Spree::UserAuthentication < ActiveRecord::Base
2
+ attr_accessible :provider, :uid
3
+ belongs_to :user
4
+ end
@@ -0,0 +1,16 @@
1
+ Spree::User.class_eval do
2
+ has_many :user_authentications, :dependent => :destroy
3
+
4
+ devise :omniauthable
5
+
6
+ def apply_omniauth(omniauth)
7
+ if omniauth['provider'] == "facebook"
8
+ self.email = omniauth['info']['email'] if email.blank?
9
+ end
10
+ user_authentications.build(:provider => omniauth['provider'], :uid => omniauth['uid'])
11
+ end
12
+
13
+ def password_required?
14
+ (user_authentications.empty? || !password.blank?) && super
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ Deface::Override.new(:virtual_path => "spree/users/show",
2
+ :name => "add_socials_to_account_summary",
3
+ :insert_after => "[data-hook='account_my_orders']",
4
+ :partial => 'spree/users/social',
5
+ :disabled => false)
@@ -0,0 +1,12 @@
1
+ Deface::Override.new(:virtual_path => "spree/admin/shared/_configuration_menu",
2
+ :name => "add_social_providers_link_configuration_menu",
3
+ :insert_bottom => "[data-hook='admin_configurations_sidebar_menu']",
4
+ :text => %q{<%= configurations_sidebar_menu_item t("social_authentication_methods"), admin_authentication_methods_path %>},
5
+ :disabled => false)
6
+
7
+ Deface::Override.new(:virtual_path => "spree/admin/configurations/index",
8
+ :name => "add_social_providers_to_configuration_menu",
9
+ :insert_after => "[data-hook='admin_configurations_menu']",
10
+ :partial => "spree/admin/shared/configurations_menu",
11
+ :disabled => false)
12
+
@@ -0,0 +1,17 @@
1
+ Deface::Override.new(:virtual_path => "spree/user_registrations/new",
2
+ :name => "add_socials_to_login_extras",
3
+ :insert_after => "[data-hook='login_extras']",
4
+ :text => %q(<%= render :partial => 'spree/shared/social' unless session[:omniauth] %>),
5
+ :disabled => false)
6
+
7
+ Deface::Override.new(:virtual_path => "spree/user_sessions/new",
8
+ :name => "add_socials_to_login_extras",
9
+ :insert_after => "[data-hook='login_extras']",
10
+ :partial => "spree/shared/social",
11
+ :disabled => false)
12
+
13
+ Deface::Override.new(:virtual_path => "spree/user_registrations/new",
14
+ :name => "remove_new_customer_if_sessionomniauth",
15
+ :replace => "div#new-customer h6",
16
+ :partial => "spree/users/new-customer",
17
+ :disabled => false)
@@ -0,0 +1,27 @@
1
+ <p data-hook="environment">
2
+ <td><%= label_tag nil, t(:environment) %></td>
3
+ <td>
4
+ <%= collection_select(:authentication_method, :environment, Rails.configuration.database_configuration.keys, :to_s, :titleize, {}) %>
5
+ </td>
6
+ </p>
7
+
8
+ <%= auth_form.field_container :provider do %>
9
+ <%= auth_form.label :provider, t(:social_provider) %>
10
+ <%= auth_form.select :provider, SpreeSocial::OAUTH_PROVIDERS, { :include_blank => true } %>
11
+ <% end %>
12
+
13
+ <%= auth_form.field_container :api_key do %>
14
+ <%= auth_form.label :api_key, t(:social_api_key) %><br />
15
+ <%= auth_form.text_field :api_key %>
16
+ <% end %>
17
+
18
+ <%= auth_form.field_container :api_secret do %>
19
+ <%= auth_form.label :api_secret, t(:social_api_secret) %><br />
20
+ <%= auth_form.text_field :api_secret %>
21
+ <% end %>
22
+
23
+ <%= auth_form.field_container :active do %>
24
+ <%= auth_form.label :active, t(:active) %><br />
25
+ <%= auth_form.radio_button :active, :true %><%= t(:yes) %>
26
+ <%= auth_form.radio_button :active, :false %><%= t(:no) %>
27
+ <% end %>
@@ -0,0 +1,9 @@
1
+ <%= render :partial => 'spree/admin/shared/configuration_menu' %>
2
+
3
+ <h1><%= t("edit_social_method") %></h1>
4
+ <%= render 'spree/shared/error_messages', :target => @authentication_method %>
5
+
6
+ <%= form_for(@authentication_method, :url => admin_authentication_method_path(@authentication_method), :method => :put) do |f| %>
7
+ <%= render :partial => "form", :locals => { :auth_form => f } %>
8
+ <p class="form-buttons"><%= button t("edit") %></p>
9
+ <% end %>
@@ -0,0 +1,38 @@
1
+ <%= render :partial => 'spree/admin/shared/configuration_menu' %>
2
+
3
+ <div class='toolbar'>
4
+ <ul class='actions'>
5
+ <li>
6
+ <%= button_link_to t("new_social_method"), new_object_url, :icon => 'add' %>
7
+ </li>
8
+ </ul>
9
+ <br class='clear' />
10
+ </div>
11
+
12
+ <h1><%= t("social_authentication_methods") %></h1>
13
+
14
+ <table class="index">
15
+ <thead data-hook="admin_social_methods_index_headers">
16
+ <th><%= t("social_provider") %></th>
17
+ <th><%= t("social_api_key") %></th>
18
+ <th><%= t("social_api_secret") %></th>
19
+ <th><%= t("environment") %></th>
20
+ <th><%= t("active") %></th>
21
+ <th data-hook="admin_social_methods_index_header_actions">&nbsp;</th>
22
+ </thead>
23
+ <tbody>
24
+ <% @authentication_methods.each do |method|%>
25
+ <tr id="<%= dom_id method %>" data-hook="admin_trackers_index_rows">
26
+ <td><%= method.provider %></td>
27
+ <td><%= method.api_key %></td>
28
+ <td><%= method.api_secret %></td>
29
+ <td><%= method.environment.to_s.titleize %></td>
30
+ <td><%= method.active ? t(:yes) : t(:no) %></td>
31
+ <td>
32
+ <%= link_to_edit method %> &nbsp;
33
+ <%= link_to_delete method %>
34
+ </td>
35
+ </tr>
36
+ <% end %>
37
+ </tbody>
38
+ </table>
@@ -0,0 +1,10 @@
1
+ <%= render :partial => 'spree/admin/shared/configuration_menu' %>
2
+
3
+ <h1><%= t(:new_social_method) %></h1>
4
+
5
+ <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @zone } %>
6
+
7
+ <%= form_for [:admin, @authentication_method] do |auth_form| %>
8
+ <%= render :partial => 'form', :locals => { :auth_form => auth_form } %>
9
+ <%= render :partial => 'spree/admin/shared/new_resource_links' %>
10
+ <% end %>
@@ -0,0 +1,4 @@
1
+ <tr>
2
+ <td><%= link_to t("social_authentication_methods"), admin_authentication_methods_path %></td>
3
+ <td><%= t("social_authentication_methods_description") %></td>
4
+ </tr>
@@ -0,0 +1,8 @@
1
+ <% if (!current_user || !current_user.user_authentications) && Spree::AuthenticationMethod.active_authentication_methods? %>
2
+ <h2><%= t(:sign_in_through_one_of_these_services) %>:</h2>
3
+ <% end %>
4
+
5
+ <% Spree::AuthenticationMethod.available_for(@user).each do |method| %>
6
+ <% img = "store/#{method.provider}_32.png" %>
7
+ <%= link_to(image_tag(img, :size => "32x32", :alt => "#{method.provider}"), "http://#{Spree::Config[:site_url]}/users/auth/#{method.provider}", :title => t(:sign_in_with, :provider => method.provider)) if method.active %>
8
+ <% end %>
@@ -0,0 +1,19 @@
1
+ <p>
2
+ <%= f.label :email, t(:email) %><br />
3
+ <%= f.email_field :email, :class => 'title' %>
4
+ </p>
5
+ <% if @user.password_required? %>
6
+ <div id="password-credentials">
7
+ <p>
8
+ <%= f.label :password, t(:password) %><br />
9
+ <%= f.password_field :password, :class => 'title' %>
10
+ </p>
11
+
12
+ <p>
13
+ <%= f.label :password_confirmation, t(:confirm_password) %><br />
14
+ <%= f.password_field :password_confirmation, :class => 'title' %>
15
+ </p>
16
+ </div>
17
+ <% end %>
18
+
19
+ <div data-hook="signup_below_password_fields"></div>
@@ -0,0 +1,7 @@
1
+ <% if session[:omniauth] %>
2
+ <h6><%=t(:please_confirm_your_email) %></h6>
3
+ <% else %>
4
+ <h6><%= t(:new_customer) %></h6>
5
+ <% end %>
6
+
7
+
@@ -0,0 +1,34 @@
1
+ <% if Spree::AuthenticationMethod.active_authentication_methods? %>
2
+ <% @body_id = 'login' %>
3
+ <div id="existing-customer">
4
+ <table>
5
+ <tr>
6
+ <% if @user.anonymous? %>
7
+ <%= render :partial => 'spree/shared/social_registrations', :locals => {:user => @user, :omniauth => @omniauth} %>
8
+ <% end %>
9
+ </tr>
10
+ </table>
11
+
12
+ <% if @user.user_authentications %>
13
+ <% unless @user.user_authentications.empty? %>
14
+ <p><strong><%= t(:you_have_signed_in_with_these_services) %>:</strong></p>
15
+ <div class="authentications">
16
+ <% for user_authentication in @user.user_authentications %>
17
+ <div class="authentication">
18
+ <%= image_tag "store/#{user_authentication.provider}_32.png", :size => "32x32", :class => "columns" %>
19
+ <div class="provider columns two"><%= user_authentication.provider %></div>
20
+ <div class="uid columns two"><%= user_authentication.uid %></div>
21
+ <%= link_to "X", user_authentication, :confirm => "#{t(:remove_authentication_option_confirmation)}", :method => :delete, :class => "remove" %>
22
+ </div>
23
+ <% end %>
24
+ <div class="clear"></div>
25
+ </div>
26
+ <% end %>
27
+
28
+ <% end %>
29
+ <%= content_tag(:p, content_tag(:strong, t(:add_another_service_to_sign_in_with))) if Spree::AuthenticationMethod.available_for(@user).exists? %>
30
+ <%= render :partial => "spree/shared/social" %>
31
+ </div>
32
+
33
+ <div class="clear"></div>
34
+ <% end %>
@@ -0,0 +1,6 @@
1
+ SpreeSocial::OAUTH_PROVIDERS.each do |provider|
2
+ SpreeSocial.init_provider(provider[1])
3
+ end
4
+
5
+ OmniAuth.config.logger = Logger.new(STDOUT)
6
+ OmniAuth.logger.progname = "omniauth"
@@ -0,0 +1,15 @@
1
+ en:
2
+ add_another_service: "Add another service to sign in with:"
3
+ edit_social_method: "Editing Social Authentication Method"
4
+ new_social_method: "New Authentication Method"
5
+ one_more_step: 'One more step to complete your registration from %{kind}'
6
+ remove_authentication_option_confirmation: "Are you sure you would like to remove this authentication method?"
7
+ sign_into_account: "You can sign into this account using:"
8
+ sign_in_through_service: "Sign in through one of these services:"
9
+ social_api_key: "API Key"
10
+ social_api_secret: "API Secret"
11
+ social_authentication_methods: "Social Authentication Methods"
12
+ social_authentication_methods_description: "Setup OAuth Authentication Methods"
13
+ social_provider: "Social Provider"
14
+ please_confirm_your_email: "Please confirm your email address to continue"
15
+ sign_in_with: "Login with %{provider}"
@@ -0,0 +1,15 @@
1
+ nl:
2
+ add_another_service: 'Nog een log-in dienst toevoegen:'
3
+ edit_social_method: 'Bewerk Social Authenticatie Methodes'
4
+ new_social_method: 'Nieuwe Authenticatie Methode'
5
+ one_more_step: 'Laatste stap om registratie met %{kind} te voltooien'
6
+ remove_authentication_option_confirmation: 'Weet je zeker dat je deze authenticatie methode wilt verwijderen?'
7
+ sign_into_account: 'Je kunt bij deze account inlogen met:'
8
+ sign_in_through_service: 'Log in met een van de volgende diensten:'
9
+ social_api_key: 'API Key'
10
+ social_api_secret: 'API Secret'
11
+ social_authentication_methods: 'Social Authenticatie Methodes'
12
+ social_authentication_methods_description: 'OAuth Authenticatie Methodes Instellen'
13
+ social_provider: 'Social Provider'
14
+ please_confirm_your_email: 'Bevestig je email adres om verder te gaan'
15
+ sign_in_with: 'Login met %{provider}'
@@ -0,0 +1,14 @@
1
+ Spree::Core::Engine.routes.append do
2
+ devise_for :users,
3
+ :class_name => Spree::User,
4
+ :skip => [:unlocks],
5
+ :controllers => { :sessions => 'spree/user_sessions', :omniauth_callbacks => "spree/omniauth_callbacks", :registrations => 'spree/user_registrations' }
6
+ resources :user_authentications
7
+
8
+ match 'account' => 'users#show', :as => 'user_root'
9
+
10
+ namespace :admin do
11
+ resources :authentication_methods
12
+ end
13
+
14
+ end
@@ -0,0 +1,10 @@
1
+ class CreateUserAuthentications < ActiveRecord::Migration
2
+ def change
3
+ create_table :spree_user_authentications do |t|
4
+ t.integer :user_id
5
+ t.string :provider
6
+ t.string :uid
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,13 @@
1
+ class CreateAuthenticationMethods < ActiveRecord::Migration
2
+ def change
3
+ create_table :spree_authentication_methods do |t|
4
+ t.string :environment
5
+ t.string :provider
6
+ t.string :api_key
7
+ t.string :api_secret
8
+ t.boolean :active
9
+
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,29 @@
1
+ module SpreeSocial
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+
5
+ def add_javascripts
6
+ append_file "app/assets/javascripts/store/all.js", "//= require store/spree_social\n"
7
+ append_file "app/assets/javascripts/admin/all.js", "//= require admin/spree_social\n"
8
+ end
9
+
10
+ def add_stylesheets
11
+ inject_into_file "app/assets/stylesheets/store/all.css", " *= require store/spree_social\n", :before => /\*\//, :verbose => true
12
+ inject_into_file "app/assets/stylesheets/admin/all.css", " *= require admin/spree_social\n", :before => /\*\//, :verbose => true
13
+ end
14
+
15
+ def add_migrations
16
+ run 'bundle exec rake railties:install:migrations FROM=spree_social'
17
+ end
18
+
19
+ def run_migrations
20
+ res = ask "Would you like to run the migrations now? [Y/n]"
21
+ if res == "" || res.downcase == "y"
22
+ run 'bundle exec rake db:migrate'
23
+ else
24
+ puts "Skiping rake db:migrate, don't forget to run it!"
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,6 @@
1
+ require 'spree_core'
2
+ require 'spree_auth'
3
+ require 'omniauth-twitter'
4
+ require 'omniauth-facebook'
5
+ require 'omniauth-github'
6
+ require 'spree_social/engine'
@@ -0,0 +1,46 @@
1
+ module SpreeSocial
2
+ OAUTH_PROVIDERS = [
3
+ ["Facebook", "facebook"],
4
+ ["Twitter", "twitter"],
5
+ ["Github", "github"]
6
+ ]
7
+
8
+ class Engine < Rails::Engine
9
+ engine_name 'spree_social'
10
+
11
+ config.autoload_paths += %W(#{config.root}/lib)
12
+
13
+ # use rspec for tests
14
+ config.generators do |g|
15
+ g.test_framework :rspec
16
+ end
17
+
18
+ def self.activate
19
+ Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")) do |c|
20
+ Rails.configuration.cache_classes ? require(c) : load(c)
21
+ end
22
+ end
23
+
24
+ config.to_prepare &method(:activate).to_proc
25
+ end
26
+
27
+ # Setup all OAuth providers
28
+ def self.init_provider(provider)
29
+ return unless ActiveRecord::Base.connection.table_exists?('spree_authentication_methods')
30
+ key, secret = nil
31
+ Spree::AuthenticationMethod.where(:environment => ::Rails.env).each do |auth_method|
32
+ if auth_method.provider == provider
33
+ key = auth_method.api_key
34
+ secret = auth_method.api_secret
35
+ puts("[Spree Social] Loading #{auth_method.provider.capitalize} as authentication source")
36
+ end
37
+ end
38
+ self.setup_key_for(provider.to_sym, key, secret)
39
+ end
40
+
41
+ def self.setup_key_for(provider, key, secret)
42
+ Devise.setup do |config|
43
+ config.omniauth provider, key, secret
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ ENGINE_PATH = File.expand_path('../..', __FILE__)
5
+ load File.expand_path('../../spec/dummy/script/rails', __FILE__)
@@ -0,0 +1,152 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spree::OmniauthCallbacksController do
4
+ let(:user) { Factory(:user) }
5
+ let(:omni_params) { mock("omni", :[] => nil).as_null_object }
6
+ let(:order) { mock_model(Spree::Order, :associate_user => nil) }
7
+
8
+ before(:each) do
9
+ default_url_options[:host] = 'test.host'
10
+ request.env["omniauth.auth"] = omni_params
11
+ controller.stub :sign_in_and_redirect
12
+ controller.stub :redirect_back_or_default
13
+ Spree::User.stub :anonymous! => user
14
+ end
15
+
16
+ shared_examples_for "denied_permissions" do
17
+ before { request.env["omniauth.error"] = "FAIL" }
18
+
19
+ it "should redirect properly" do
20
+ controller.should_receive(:redirect_back_or_default)
21
+ controller.twitter
22
+ end
23
+
24
+ it "should display an error message" do
25
+ controller.twitter
26
+ flash[:error].should_not be_blank
27
+ end
28
+
29
+ it "should not attempt authentication" do
30
+ controller.should_not_receive(:sign_in_and_redirect)
31
+ controller.twitter
32
+ end
33
+ end
34
+
35
+ shared_examples_for "associate_order" do
36
+ before { controller.stub :current_order => order }
37
+
38
+ it "should associate the order with the user" do
39
+ order.should_receive(:associate_user!).with(user)
40
+ controller.twitter
41
+ end
42
+ end
43
+
44
+ shared_examples_for "authenticate_as_user" do
45
+ it "should authenticate as that user" do
46
+ controller.should_receive(:sign_in_and_redirect).with(user, :event => :authentication)
47
+ end
48
+ end
49
+
50
+ context "#callback" do
51
+ context "when user is authenticated" do
52
+ before { controller.stub :current_user => user }
53
+
54
+ it_should_behave_like "denied_permissions"
55
+
56
+ context "when existing user_authentication" do
57
+ let(:user_authentication) { mock("user_authentication", :user => user) }
58
+ before { Spree::UserAuthentication.stub :find_by_provider_and_uid => user_authentication }
59
+
60
+ it "should not need to create the user_authentication" do
61
+ user.user_authentications.should_not_receive(:create!)
62
+ controller.twitter
63
+ end
64
+
65
+ it "should set the flash notice" do
66
+ controller.twitter
67
+ flash[:notice].should_not be_blank
68
+ end
69
+
70
+ it "should authenticate as that user" do
71
+ controller.should_receive(:sign_in_and_redirect)
72
+ controller.twitter
73
+ end
74
+ end
75
+
76
+ context "when no existing user_authentication" do
77
+ before { Spree::UserAuthentication.stub :find_by_provider_and_uid => nil }
78
+
79
+ it "should create a new user_authentication" do
80
+ user.user_authentications.should_receive(:create!)
81
+ controller.twitter
82
+ end
83
+
84
+ it "should set the flash notice" do
85
+ controller.twitter
86
+ flash[:notice].should_not be_blank
87
+ end
88
+
89
+ it "should redirect properly" do
90
+ controller.should_receive(:redirect_back_or_default)
91
+ controller.twitter
92
+ end
93
+
94
+ it_should_behave_like "associate_order"
95
+ end
96
+ end
97
+
98
+ context "when user is not authenticated" do
99
+ before { controller.stub :current_user => nil }
100
+
101
+ it_should_behave_like "denied_permissions"
102
+
103
+ context "when existing user_authentication" do
104
+ let(:user_authentication) { mock("user_authentication", :user => user) }
105
+ before { Spree::UserAuthentication.stub :find_by_provider_and_uid => user_authentication }
106
+
107
+ it "should not need to create the user_authentication" do
108
+ user.user_authentications.should_not_receive(:create!)
109
+ controller.twitter
110
+ end
111
+
112
+ it "should not create a new user account" do
113
+ Spree::User.should_not_receive :new
114
+ controller.twitter
115
+ end
116
+
117
+ it "should authenticate as that user" do
118
+ controller.should_receive(:sign_in_and_redirect).with(:user, user)
119
+ controller.twitter
120
+ end
121
+ end
122
+
123
+ context "when no existing user_authentication" do
124
+ let(:user) { Spree::User.new }
125
+ before do
126
+ Spree::UserAuthentication.stub :find_by_provider_and_uid => nil
127
+ controller.stub(:auth_hash).and_return('provider' => 'facebook', 'info' => {'email' => "spree@gmail.com"}, 'uid' => '123')
128
+ end
129
+
130
+ context "email doesn't belongs to anyone" do
131
+ it "should create a new user" do
132
+ controller.should_receive(:sign_in_and_redirect)
133
+ expect { controller.twitter }.to change(Spree::User, :count).by(1)
134
+ end
135
+ end
136
+
137
+ context 'email belongs to existing user' do
138
+ before { @user = Factory(:user, :email => "spree@gmail.com") }
139
+
140
+ it "should not create new user" do
141
+ expect { controller.twitter }.to_not change(Spree::User, :count)
142
+ end
143
+
144
+ it "assigns authentication to existing user" do
145
+ expect { controller.twitter }.to change(@user.user_authentications, :count).by(1)
146
+ end
147
+ end
148
+
149
+ end
150
+ end
151
+ end
152
+ end
@@ -0,0 +1,45 @@
1
+ require 'spec_helper'
2
+
3
+ describe Spree::User do
4
+ let(:user) { Factory(:user) }
5
+ let(:omni_params) { {"provider" => "twitter", "uid" => 12345} }
6
+ let(:auths) { mock "auths" }
7
+
8
+ context "#apply_omniauth" do
9
+ before { user.stub :user_authentications => auths }
10
+
11
+ it "should build an associated auth source" do
12
+ auths.should_receive(:build)
13
+ user.apply_omniauth(omni_params)
14
+ end
15
+ end
16
+
17
+ context "#password_required?" do
18
+ before { user.password = nil }
19
+
20
+ context "user authentications is empty" do
21
+ it "should be true" do
22
+ user.password_required?.should be_true
23
+ end
24
+ end
25
+
26
+ context "user authentications is not empty" do
27
+ before do
28
+ user.stub :user_authentications => auths
29
+ auths.stub(:empty?).and_return(false)
30
+ end
31
+
32
+ it "should be false" do
33
+ user.password_required?.should be_false
34
+ end
35
+ end
36
+
37
+ context "when the password has been set" do
38
+ before { user.password = "foobar" }
39
+
40
+ it "should be true" do
41
+ user.password_required?.should be_true
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,20 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
+ require 'rspec/rails'
5
+
6
+ # Requires supporting ruby files with custom matchers and macros, etc,
7
+ # in spec/support/ and its subdirectories.
8
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
9
+
10
+ # Requires factories defined in spree_core
11
+ require 'spree/core/testing_support/factories'
12
+
13
+ RSpec.configure do |config|
14
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
15
+ # examples within a transaction, remove the following line or assign false
16
+ # instead of true.
17
+ config.use_transactional_fixtures = true
18
+
19
+ config.include Spree::Core::Engine.routes.url_helpers, :type => :controller
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_social_onr
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-08-14 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
16
- requirement: &2161836140 !ruby/object:Gem::Requirement
16
+ requirement: &2161835120 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2161836140
24
+ version_requirements: *2161835120
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: spree_auth
27
- requirement: &2161835680 !ruby/object:Gem::Requirement
27
+ requirement: &2161834660 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.1.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2161835680
35
+ version_requirements: *2161834660
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: omniauth
38
- requirement: &2161835300 !ruby/object:Gem::Requirement
38
+ requirement: &2161834280 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2161835300
46
+ version_requirements: *2161834280
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: oa-core
49
- requirement: &2161834840 !ruby/object:Gem::Requirement
49
+ requirement: &2161833820 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2161834840
57
+ version_requirements: *2161833820
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: omniauth-twitter
60
- requirement: &2161834420 !ruby/object:Gem::Requirement
60
+ requirement: &2161833400 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *2161834420
68
+ version_requirements: *2161833400
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: omniauth-facebook
71
- requirement: &2161834000 !ruby/object:Gem::Requirement
71
+ requirement: &2161832980 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *2161834000
79
+ version_requirements: *2161832980
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: omniauth-github
82
- requirement: &2161833580 !ruby/object:Gem::Requirement
82
+ requirement: &2160279720 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *2161833580
90
+ version_requirements: *2160279720
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: capybara
93
- requirement: &2161833080 !ruby/object:Gem::Requirement
93
+ requirement: &2160542760 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - =
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 1.0.1
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *2161833080
101
+ version_requirements: *2160542760
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: factory_girl
104
- requirement: &2161832660 !ruby/object:Gem::Requirement
104
+ requirement: &2160845680 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *2161832660
112
+ version_requirements: *2160845680
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: ffaker
115
- requirement: &2161832200 !ruby/object:Gem::Requirement
115
+ requirement: &2160888400 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *2161832200
123
+ version_requirements: *2160888400
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: rspec-rails
126
- requirement: &2161831700 !ruby/object:Gem::Requirement
126
+ requirement: &2161128120 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '2.7'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *2161831700
134
+ version_requirements: *2161128120
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: sqlite3
137
- requirement: &2160446760 !ruby/object:Gem::Requirement
137
+ requirement: &2161196880 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,13 +142,64 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *2160446760
145
+ version_requirements: *2161196880
146
146
  description:
147
147
  email: john@spreecommerce.com
148
148
  executables: []
149
149
  extensions: []
150
150
  extra_rdoc_files: []
151
- files: []
151
+ files:
152
+ - README.md
153
+ - LICENSE
154
+ - lib/generators/spree_social/install/install_generator.rb
155
+ - lib/spree_social/engine.rb
156
+ - lib/spree_social.rb
157
+ - app/assets/images/store/facebook_128.png
158
+ - app/assets/images/store/facebook_256.png
159
+ - app/assets/images/store/facebook_32.png
160
+ - app/assets/images/store/facebook_64.png
161
+ - app/assets/images/store/github_128.png
162
+ - app/assets/images/store/github_256.png
163
+ - app/assets/images/store/github_32.png
164
+ - app/assets/images/store/github_64.png
165
+ - app/assets/images/store/twitter_128.png
166
+ - app/assets/images/store/twitter_256.png
167
+ - app/assets/images/store/twitter_32.png
168
+ - app/assets/images/store/twitter_64.png
169
+ - app/assets/javascripts/admin/spree_social.js
170
+ - app/assets/javascripts/store/spree_social.js
171
+ - app/assets/stylesheets/admin/spree_social.css
172
+ - app/assets/stylesheets/store/spree_social.css
173
+ - app/controllers/spree/admin/authentication_methods_controller.rb
174
+ - app/controllers/spree/omniauth_callbacks_controller.rb
175
+ - app/controllers/spree/user_authentications_controller.rb
176
+ - app/controllers/spree/user_registrations_controller_decorator.rb
177
+ - app/helpers/spree/omniauth_callbacks_helper.rb
178
+ - app/models/spree/authentication_method.rb
179
+ - app/models/spree/user_authentication.rb
180
+ - app/models/spree/user_decorator.rb
181
+ - app/overrides/add_authentications_to_account_summary.rb
182
+ - app/overrides/admin_configuration_decorator.rb
183
+ - app/overrides/user_registrations_decorator.rb
184
+ - app/views/spree/admin/authentication_methods/_form.html.erb
185
+ - app/views/spree/admin/authentication_methods/edit.html.erb
186
+ - app/views/spree/admin/authentication_methods/index.html.erb
187
+ - app/views/spree/admin/authentication_methods/new.html.erb
188
+ - app/views/spree/admin/shared/_configurations_menu.html.erb
189
+ - app/views/spree/shared/_social.html.erb
190
+ - app/views/spree/shared/_user_form.html.erb
191
+ - app/views/spree/users/_new-customer.html.erb
192
+ - app/views/spree/users/_social.html.erb
193
+ - db/migrate/20120120163432_create_user_authentications.rb
194
+ - db/migrate/20120123163222_create_authentication_methods.rb
195
+ - config/initializers/devise.rb
196
+ - config/locales/en.yml
197
+ - config/locales/nl.yml
198
+ - config/routes.rb
199
+ - script/rails
200
+ - spec/controllers/spree/omniauth_callbacks_controller_spec.rb
201
+ - spec/models/spree/user_decorator_spec.rb
202
+ - spec/spec_helper.rb
152
203
  homepage: http://www.spreecommerce.com
153
204
  licenses: []
154
205
  post_install_message: