solidus_social 1.0.0 → 1.4.0
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.
- checksums.yaml +5 -5
- data/.circleci/config.yml +35 -0
- data/.gem_release.yml +5 -0
- data/.gitignore +6 -8
- data/.rspec +3 -3
- data/.rubocop.yml +3 -7
- data/.rubocop_todo.yml +42 -0
- data/CHANGELOG.md +34 -4
- data/Gemfile +23 -0
- data/{LICENSE.md → LICENSE} +2 -2
- data/README.md +133 -78
- data/Rakefile +4 -13
- data/app/controllers/spree/admin/authentication_methods_controller.rb +2 -12
- data/app/controllers/spree/omniauth_callbacks_controller.rb +46 -42
- data/app/controllers/spree/user_authentications_controller.rb +3 -1
- data/app/core/spree/permission_sets/authentication_method_display.rb +11 -0
- data/app/core/spree/permission_sets/authentication_method_management.rb +11 -0
- data/app/decorators/controllers/solidus_social/spree/user_registrations_controller_decorator.rb +27 -0
- data/app/decorators/models/solidus_social/spree/user_decorator.rb +28 -0
- data/app/helpers/spree/omniauth_callbacks_helper.rb +2 -0
- data/app/models/spree/authentication_method.rb +8 -2
- data/app/models/spree/social_configuration.rb +3 -0
- data/app/models/spree/user_authentication.rb +3 -1
- data/app/overrides/add_authentications_to_account_summary.rb +2 -0
- data/app/overrides/admin_configuration_decorator.rb +9 -2
- data/app/overrides/user_registrations_decorator.rb +2 -0
- data/app/views/spree/admin/authentication_methods/_form.html.erb +6 -22
- data/app/views/spree/admin/authentication_methods/edit.html.erb +5 -3
- data/app/views/spree/admin/authentication_methods/index.html.erb +22 -18
- data/app/views/spree/admin/authentication_methods/new.html.erb +5 -3
- data/app/views/spree/shared/_social.html.erb +5 -5
- data/app/views/spree/shared/_user_form.html.erb +3 -3
- data/app/views/spree/users/_new-customer.html.erb +2 -2
- data/app/views/spree/users/_social.html.erb +24 -22
- data/bin/console +17 -0
- data/bin/rails +15 -4
- data/bin/rake +7 -0
- data/bin/sandbox +72 -0
- data/bin/setup +8 -0
- data/config/locales/en.yml +1 -0
- data/config/locales/es-MX.yml +8 -4
- data/config/locales/es.yml +30 -0
- data/config/locales/it.yml +26 -0
- data/config/routes.rb +7 -5
- data/db/migrate/20120120163432_create_user_authentications.rb +3 -1
- data/db/migrate/20120123163222_create_authentication_methods.rb +3 -1
- data/lib/generators/solidus_social/install/install_generator.rb +13 -5
- data/lib/generators/solidus_social/install/templates/config/initializers/solidus_social.rb +50 -0
- data/lib/solidus_social.rb +24 -8
- data/lib/solidus_social/engine.rb +29 -55
- data/lib/solidus_social/facebook_omniauth_strategy_ext.rb +25 -0
- data/lib/solidus_social/factories.rb +4 -0
- data/lib/solidus_social/version.rb +3 -16
- data/solidus_social.gemspec +43 -46
- data/spec/controllers/spree/omniauth_callbacks_controller_spec.rb +42 -9
- data/spec/features/spree/admin/authentication_methods_configuration_spec.rb +21 -27
- data/spec/features/spree/sign_in_spec.rb +27 -19
- data/spec/lib/solidus_social/engine_spec.rb +9 -0
- data/spec/lib/solidus_social_speec.rb +25 -0
- data/spec/lib/spree/social_config_spec.rb +11 -0
- data/spec/models/spree/authentication_method_spec.rb +19 -0
- data/spec/models/spree/social_configuration_spec.rb +6 -0
- data/spec/models/spree/user_decorator_spec.rb +25 -2
- data/spec/spec_helper.rb +17 -29
- data/spec/support/omniauth.rb +4 -0
- metadata +71 -198
- data/.hound.yml +0 -26
- data/.travis.yml +0 -19
- data/Guardfile +0 -10
- data/app/assets/javascripts/spree/backend/solidus_social.js +0 -1
- data/app/assets/javascripts/spree/frontend/solidus_social.js +0 -1
- data/app/assets/stylesheets/spree/backend/solidus_social.css +0 -3
- data/app/controllers/spree/user_registrations_controller_decorator.rb +0 -15
- data/app/models/spree/user_decorator.rb +0 -16
- data/app/views/spree/admin/shared/_configurations_menu.html.erb +0 -4
- data/config/initializers/devise.rb +0 -13
- data/spec/lib/spree_social/engine_spec.rb +0 -16
- data/spec/support/capybara.rb +0 -18
- data/spec/support/database_cleaner.rb +0 -24
- data/spec/support/devise.rb +0 -3
- data/spec/support/factory_girl.rb +0 -7
- data/spec/support/spree.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a86b6cfe4109e24c01c128b99b42a23c5387001a642acbdb4ae78d0efbf5e108
|
4
|
+
data.tar.gz: 116bca0155aa00db87caac0c00a59bbc2139729e2addd378d7159641ba424613
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d37b9986abcee5ddd8dd82c003f92b5a497ccbe36c619268f20fc390db9375dd88a05a4536942418afc4193e147fd82028b136d4578cd8888157daa4ea5ce7c
|
7
|
+
data.tar.gz: 737587a8380670d75146924a52a3794bf628679e6b1701129b10f88fbace10259920b5654b9108f7ba0859a739f529d2c5249afc5e91941cd6016b7ccfc6708b
|
@@ -0,0 +1,35 @@
|
|
1
|
+
version: 2.1
|
2
|
+
|
3
|
+
orbs:
|
4
|
+
# Always take the latest version of the orb, this allows us to
|
5
|
+
# run specs against Solidus supported versions only without the need
|
6
|
+
# to change this configuration every time a Solidus version is released
|
7
|
+
# or goes EOL.
|
8
|
+
solidusio_extensions: solidusio/extensions@volatile
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
run-specs-with-postgres:
|
12
|
+
executor: solidusio_extensions/postgres
|
13
|
+
steps:
|
14
|
+
- solidusio_extensions/run-tests
|
15
|
+
run-specs-with-mysql:
|
16
|
+
executor: solidusio_extensions/mysql
|
17
|
+
steps:
|
18
|
+
- solidusio_extensions/run-tests
|
19
|
+
|
20
|
+
workflows:
|
21
|
+
"Run specs on supported Solidus versions":
|
22
|
+
jobs:
|
23
|
+
- run-specs-with-postgres
|
24
|
+
- run-specs-with-mysql
|
25
|
+
"Weekly run specs against master":
|
26
|
+
triggers:
|
27
|
+
- schedule:
|
28
|
+
cron: "0 0 * * 4" # every Thursday
|
29
|
+
filters:
|
30
|
+
branches:
|
31
|
+
only:
|
32
|
+
- master
|
33
|
+
jobs:
|
34
|
+
- run-specs-with-postgres
|
35
|
+
- run-specs-with-mysql
|
data/.gem_release.yml
ADDED
data/.gitignore
CHANGED
@@ -1,18 +1,16 @@
|
|
1
|
+
*.gem
|
1
2
|
\#*
|
2
3
|
*~
|
3
4
|
.#*
|
4
5
|
.DS_Store
|
5
6
|
.idea
|
6
7
|
.project
|
8
|
+
.sass-cache
|
9
|
+
coverage
|
10
|
+
Gemfile.lock
|
7
11
|
tmp
|
8
12
|
nbproject
|
13
|
+
pkg
|
9
14
|
*.swp
|
10
15
|
spec/dummy
|
11
|
-
.
|
12
|
-
.bundle
|
13
|
-
Gemfile.lock
|
14
|
-
coverage
|
15
|
-
.ruby-version
|
16
|
-
.ruby-gemset
|
17
|
-
.node-version
|
18
|
-
.phantom-version
|
16
|
+
spec/examples.txt
|
data/.rspec
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
--
|
2
|
-
|
3
|
-
|
1
|
+
--color
|
2
|
+
--format documentation
|
3
|
+
--require spec_helper
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
Metrics/LineLength:
|
2
|
+
Enabled: true
|
3
|
+
Max: 160
|
4
|
+
|
5
|
+
Rails/FilePath:
|
6
|
+
Enabled: false
|
7
|
+
|
8
|
+
RSpec/AnyInstance:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
RSpec/ContextWording:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
RSpec/DescribeClass:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
RSpec/InstanceVariable:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
RSpec/MessageSpies:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
RSpec/MultipleExpectations:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
RSpec/NamedSubject:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
RSpec/NestedGroups:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Style/NestedParenthesizedCalls:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
RSpec/VerifiedDoubles:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
Style/ClassAndModuleChildren:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
Style/GuardClause:
|
42
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,35 @@
|
|
1
|
-
##
|
1
|
+
## Unreleased
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
## v1.3.0
|
4
|
+
|
5
|
+
- Migrated factories from FactoryGirl to FactoryBot
|
6
|
+
- Add support for Solidus 2.4+
|
7
|
+
- Reduced compatible versions of `solidus_core` to 2.x
|
8
|
+
- Removed the deprecated `icon:` argument from admin buttons
|
9
|
+
- Fixed an issue when using Safari to authenticate
|
10
|
+
- `Spree::UserRegistrationsController` and `Spree.user_class` are now decorated by
|
11
|
+
prepending modules in the `SolidusSocial::Spree` namespace instead of using `class_eval`
|
12
|
+
- Development of the extension is not relying on `solidus_dev_support` and CircleCI
|
13
|
+
- Moved the Facebook strategy patch to it's own prepended module
|
14
|
+
|
15
|
+
## v1.2.0
|
16
|
+
|
17
|
+
- Switched to using the install generator to import the solidus social
|
18
|
+
initializer into apps. **Please run `bin/rails generate solidus_social:install`
|
19
|
+
in order to upgrade.**
|
20
|
+
- Removed the `SolidusSocial::OAUTH_PROVIDERS` constant in favour of
|
21
|
+
the `Spree::AuthenticationMethod.providers_options` class
|
22
|
+
method. This is populated using the `Spree::SocialConfig#providers` Hash.
|
23
|
+
- Added support for Rails 5.1.
|
24
|
+
- Added Italian translations
|
25
|
+
|
26
|
+
## v1.1.0
|
27
|
+
|
28
|
+
- Added support for Solidus 2/Rails 5
|
29
|
+
- Bugfixes
|
30
|
+
|
31
|
+
## v1.0.0
|
32
|
+
|
33
|
+
- Renamed SpreeSocial to SolidusSocial
|
34
|
+
- Relaxed versions to support solidus 1.0+
|
35
|
+
- Port of https://github.com/DynamoMTL/spree_social's solidus branch
|
data/Gemfile
CHANGED
@@ -1,7 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
4
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
2
5
|
|
3
6
|
branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
|
4
7
|
gem 'solidus', github: 'solidusio/solidus', branch: branch
|
8
|
+
|
9
|
+
# Needed to help Bundler figure out how to resolve dependencies,
|
10
|
+
# otherwise it takes forever to resolve them.
|
11
|
+
# See https://github.com/bundler/bundler/issues/6677
|
12
|
+
gem 'rails', '>0.a'
|
13
|
+
|
14
|
+
# Provides basic authentication functionality for testing parts of your engine
|
5
15
|
gem 'solidus_auth_devise'
|
6
16
|
|
17
|
+
case ENV['DB']
|
18
|
+
when 'mysql'
|
19
|
+
gem 'mysql2'
|
20
|
+
when 'postgresql'
|
21
|
+
gem 'pg'
|
22
|
+
else
|
23
|
+
gem 'sqlite3'
|
24
|
+
end
|
25
|
+
|
7
26
|
gemspec
|
27
|
+
|
28
|
+
# Use a local Gemfile to include development dependencies that might not be
|
29
|
+
# relevant for the project or for other contributors, e.g.: `gem 'pry-debug'`.
|
30
|
+
send :eval_gemfile, 'Gemfile-local' if File.exist? 'Gemfile-local'
|
data/{LICENSE.md → LICENSE}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2014 John Dyer and other contributors
|
1
|
+
Copyright (c) 2014-2020 John Dyer and other contributors
|
2
2
|
All rights reserved.
|
3
3
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification,
|
@@ -9,7 +9,7 @@ are permitted provided that the following conditions are met:
|
|
9
9
|
* Redistributions in binary form must reproduce the above copyright notice,
|
10
10
|
this list of conditions and the following disclaimer in the documentation
|
11
11
|
and/or other materials provided with the distribution.
|
12
|
-
* Neither the name
|
12
|
+
* Neither the name Solidus nor the names of its contributors may be used to
|
13
13
|
endorse or promote products derived from this software without specific
|
14
14
|
prior written permission.
|
15
15
|
|
data/README.md
CHANGED
@@ -1,137 +1,188 @@
|
|
1
|
-
|
1
|
+
SolidusSocial
|
2
|
+
=============
|
2
3
|
|
3
|
-
[](https://circleci.com/gh/solidusio-contrib/solidus_social)
|
4
5
|
[](https://codeclimate.com/github/solidusio-contrib/solidus_social)
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
Features and code base will change rapidly as this is under active development.
|
10
|
-
Use with caution.
|
7
|
+
Social login support for Solidus. Solidus Social handles authorization, account
|
8
|
+
creation and association through third-party services. Currently Twitter,
|
9
|
+
Facebook, Github, Google OAuth2, and Amazon are available out of the box.
|
11
10
|
|
12
|
-
|
11
|
+
Installation
|
12
|
+
------------
|
13
13
|
|
14
|
-
|
14
|
+
Add solidus_social to your Gemfile:
|
15
15
|
|
16
|
-
Add this extension to your `Gemfile`:
|
17
16
|
```ruby
|
18
17
|
gem 'solidus_social'
|
19
18
|
```
|
20
19
|
|
21
|
-
|
22
|
-
```sh
|
23
|
-
$ bundle && bundle exec rails g solidus_social:install
|
24
|
-
$ bundle exec rake db:migrate
|
25
|
-
```
|
26
|
-
|
27
|
-
Preference(optional): By default url will be '/users/auth/:provider'. If you wish to modify the url to: '/member/auth/:provider', '/profile/auth/:provider', or '/auth/:provider' then you can do this accordingly in your **config/initializers/spree.rb** file as described below -
|
20
|
+
Bundle your dependencies and run the installation generator:
|
28
21
|
|
29
|
-
```
|
30
|
-
|
31
|
-
|
32
|
-
|
22
|
+
```shell
|
23
|
+
bundle
|
24
|
+
bundle exec rails g solidus_social:install
|
25
|
+
bundle exec rails db:migrate
|
33
26
|
```
|
34
27
|
|
35
|
-
|
28
|
+
This will install a new initializer `config/initializers/solidus_social.rb` into
|
29
|
+
your project that allows you to setup the services you want configured for your app.
|
36
30
|
|
37
|
-
|
31
|
+
Optional: By default the login path will be '/users/auth/:provider'. If you
|
32
|
+
want something else, configure it in `config/initializers/solidus_social.rb`.
|
38
33
|
|
39
|
-
Login as an admin user and navigate to Configuration > Social Authentication Methods
|
40
34
|
|
41
|
-
|
35
|
+
Using OAuth Sources
|
36
|
+
-------------------
|
42
37
|
|
43
|
-
|
38
|
+
Login as an admin user and navigate to Configuration > Social Authentication Methods
|
44
39
|
|
45
|
-
|
46
|
-
|
47
|
-
```ruby
|
48
|
-
# Ensure our environment is bootstrapped with a facebook connect app
|
49
|
-
if ActiveRecord::Base.connection.table_exists? 'spree_authentication_methods'
|
50
|
-
Spree::AuthenticationMethod.where(environment: Rails.env, provider: 'facebook').first_or_create do |auth_method|
|
51
|
-
auth_method.api_key = ENV['FACEBOOK_APP_ID']
|
52
|
-
auth_method.api_secret = ENV['FACEBOOK_APP_SECRET']
|
53
|
-
auth_method.active = true
|
54
|
-
end
|
55
|
-
end
|
56
|
-
```
|
40
|
+
Click "New Authentication Method" and choose one of your configured providers.
|
57
41
|
|
58
42
|
**You MUST restart your application after configuring or updating an authentication method.**
|
59
43
|
|
60
|
-
|
61
|
-
|
62
|
-
## Setup the Applications at the Respective Sources
|
44
|
+
Registering Your Application
|
45
|
+
----------------------------
|
63
46
|
|
64
|
-
|
47
|
+
Facebook, Twitter, Github, Google OAuth2, and Amazon are supported out of the
|
48
|
+
box but, you will need to register your application with each of the sites you
|
49
|
+
want to use.
|
65
50
|
|
66
|
-
|
51
|
+
When setting up development applications, keep in mind that most services do
|
52
|
+
not support `localhost` for your URL/domain. You will need to us a regular
|
53
|
+
domain (i.e. `domain.tld`, `hostname.local`) or an IP addresses (`127.0.0.1`).
|
54
|
+
Make sure you specifity the right IP address.
|
67
55
|
|
68
56
|
### Facebook
|
69
57
|
|
70
58
|
[Facebook / Developers / Apps][2]
|
71
59
|
|
72
|
-
1. Name the app
|
73
|
-
2. Fill out the capcha
|
74
|
-
3. Under the Web Site tab
|
75
|
-
|
76
|
-
|
60
|
+
1. Name the app and agree to the terms.
|
61
|
+
2. Fill out the capcha.
|
62
|
+
3. Under the "Web Site" tab enter:
|
63
|
+
- Site URL: `http://yourhostname.local:3000` for development and
|
64
|
+
`http://your-site.com` for production
|
65
|
+
- Site domain: `yourhostname.local` and `your-site.com` respectively
|
77
66
|
|
78
67
|
### Twitter
|
79
68
|
|
80
69
|
[Twitter / Application Management / Create an application][3]
|
81
70
|
|
82
|
-
1.
|
83
|
-
2.
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
71
|
+
1. Fill in the name and description.
|
72
|
+
2. Fill in the rest of the details:
|
73
|
+
- Application Website: `http://yourhostname.local:3000` for development and
|
74
|
+
`http://your-site.com` for production
|
75
|
+
- Application Type: "Browser"
|
76
|
+
- Callback URL: `http://yourhostname.local:3000` for development and
|
77
|
+
`http://your-site.com` for production
|
78
|
+
- Default Access Type: "Read & Write"
|
79
|
+
6. Save the application.
|
88
80
|
|
89
81
|
### Github
|
90
82
|
|
91
83
|
[Github / Applications / Register a new OAuth application][4]
|
92
84
|
|
93
|
-
1. Name
|
94
|
-
2.
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
85
|
+
1. Name the application.
|
86
|
+
2. Fill in the details
|
87
|
+
- Main URL: `http://yourhostname.local:3000` for development and
|
88
|
+
`http://your-site.com` for production
|
89
|
+
- Callback URL: `http://yourhostname.local:3000` for development and
|
90
|
+
`http://your-site.com` for production
|
91
|
+
4. Click Create.
|
99
92
|
|
100
93
|
### Amazon
|
101
94
|
|
102
95
|
[Amazon / App Console / Register a new OAuth application][10]
|
103
96
|
|
104
|
-
1. Register New Application
|
105
|
-
2. Name the Application, provide description and URL for Privacy Policy
|
106
|
-
3. Click Save
|
107
|
-
4. Add Your site under Web Settings > Allowed Return URLs (example:
|
97
|
+
1. Register New Application.
|
98
|
+
2. Name the Application, provide description and URL for Privacy Policy.
|
99
|
+
3. Click Save.
|
100
|
+
4. Add Your site under Web Settings > Allowed Return URLs (example:
|
101
|
+
`http://localhost:3000/users/auth/amazon/callback`)
|
108
102
|
|
109
103
|
> The app console is available at [https://login.amazon.com/manageApps](https://login.amazon.com/manageApps)
|
110
104
|
|
111
|
-
###
|
105
|
+
### Google OAuth2
|
106
|
+
[Google / APIs / Credentials/ Create Credential](https://console.developers.google.com/)
|
107
|
+
|
108
|
+
1. In the APIs and Services dashboard, visit 'Credentials' on the side, then select 'Create Credentials' and 'Oauth client ID'.
|
109
|
+
2. Name the Application, select "Web Application" as a type.
|
110
|
+
3. Under "Authorized redirect URIs", add your site (example:
|
111
|
+
`http://localhost:3000/users/auth/google_oauth2/callback`)
|
112
|
+
|
113
|
+
> More info: [https://developers.google.com/identity/protocols/OAuth2](https://developers.google.com/identity/protocols/OAuth2)
|
114
|
+
|
115
|
+
### Other OAuth Providers
|
112
116
|
|
113
|
-
|
117
|
+
Other OAuth providers are supported, given that there is an [OmniAuth
|
118
|
+
strategy][12] for them. (If there isn't, you can [write one][13].)
|
114
119
|
|
115
|
-
|
120
|
+
#### LinkedIn Example
|
116
121
|
|
117
|
-
|
122
|
+
1. Add `gem "omniauth-linkedin"` to your Gemfile and run `bundle install`.
|
123
|
+
2. In `config/initializers/solidus_social.rb` add and initialize a new provider
|
124
|
+
for SolidusSocial:
|
118
125
|
|
119
|
-
|
120
|
-
2. In an initializer file, e.g. `config/initializers/devise.rb`, add and init a new provider for SolidusSocial:
|
126
|
+
```ruby
|
121
127
|
|
122
|
-
|
123
|
-
|
128
|
+
config.providers = {
|
129
|
+
# The configuration key has to match your omniauth strategy.
|
130
|
+
linkedin: {
|
131
|
+
api_key: ENV['LINKEDIN_API_KEY'],
|
132
|
+
api_secret: ENV['LINKEDIN_API_SECRET'],
|
133
|
+
},
|
134
|
+
# More providers here
|
135
|
+
```
|
136
|
+
3. Activate your provider as usual.
|
137
|
+
4. Do **one** of the following:
|
124
138
|
|
125
|
-
|
126
|
-
|
139
|
+
- Override the `spree/users/social` view to render OAuth links to display
|
140
|
+
your LinkedIn link.
|
141
|
+
- Include in your CSS a definition for `.icon-spree-linkedin-circled` and an
|
142
|
+
embedded icon font for LinkedIn from [Fontello][14] (the way existing
|
143
|
+
icons for Facebook, Twitter, etc are implemented). You can also override
|
144
|
+
CSS classes for other providers, `.icon-spree-<provider>-circled`, to use
|
145
|
+
different font icons or classic background images, without having to
|
146
|
+
override views.
|
127
147
|
|
128
|
-
|
148
|
+
Documentation
|
149
|
+
-------------
|
129
150
|
|
130
|
-
|
151
|
+
API documentation is available [on RubyDoc.info][15].
|
152
|
+
|
153
|
+
Contributing
|
154
|
+
------------
|
131
155
|
|
132
156
|
See corresponding [guidelines][11].
|
133
157
|
|
134
|
-
|
158
|
+
Testing
|
159
|
+
-------
|
160
|
+
|
161
|
+
First bundle your dependencies, then run `rake`. `rake` will default to building the dummy app if it does not exist, then it will run specs, and [Rubocop](https://github.com/bbatsov/rubocop) static code analysis. The dummy app can be regenerated by using `rake test_app`.
|
162
|
+
|
163
|
+
```shell
|
164
|
+
bundle
|
165
|
+
bin/rake
|
166
|
+
```
|
167
|
+
|
168
|
+
When testing your application's integration with this extension you may use its factories.
|
169
|
+
Simply add this require statement to your spec_helper:
|
170
|
+
|
171
|
+
```ruby
|
172
|
+
require 'solidus_social/factories'
|
173
|
+
```
|
174
|
+
|
175
|
+
Releasing
|
176
|
+
---------
|
177
|
+
|
178
|
+
Your new extension version can be released using `gem-release` like this:
|
179
|
+
|
180
|
+
```shell
|
181
|
+
bundle exec gem bump -v VERSION --tag --push --remote upstream && gem release
|
182
|
+
```
|
183
|
+
|
184
|
+
License
|
185
|
+
-------
|
135
186
|
|
136
187
|
Copyright (c) 2014 [John Dyer][7] and [contributors][8], released under the [New BSD License][9]
|
137
188
|
|
@@ -143,6 +194,10 @@ Copyright (c) 2014 [John Dyer][7] and [contributors][8], released under the [New
|
|
143
194
|
[6]: https://github.com/solidusio-contrib/solidus_social/issues
|
144
195
|
[7]: https://github.com/LBRapid
|
145
196
|
[8]: https://github.com/solidusio-contrib/solidus_social/graphs/contributors
|
146
|
-
[9]: https://github.com/solidusio-contrib/solidus_social/blob/master/LICENSE
|
197
|
+
[9]: https://github.com/solidusio-contrib/solidus_social/blob/master/LICENSE
|
147
198
|
[10]: https://login.amazon.com/manageApps
|
148
199
|
[11]: https://github.com/solidusio-contrib/solidus_social/blob/master/CONTRIBUTING.md
|
200
|
+
[12]: https://github.com/intridea/omniauth/wiki/List-of-Strategies
|
201
|
+
[13]: https://github.com/intridea/omniauth/wiki/Strategy-Contribution-Guide
|
202
|
+
[14]: http://fontello.com/
|
203
|
+
[15]: http://www.rubydoc.info/github/solidusio-contrib/solidus_social/
|