GithubHelp home page GithubHelp logo

pjero / spree-refinery-authentication Goto Github PK

View Code? Open in Web Editor NEW

This project forked from refinerycms-contrib/spree-refinery-authentication

0.0 2.0 0.0 39 KB

This gem is a Refinery CMS and Spree E-commerce connector.

License: MIT License

Ruby 97.84% HTML 2.16%

spree-refinery-authentication's Introduction

Spree Refinery CMS Authentication

Build Status Code Climate Test Coverage

This gem is a Refinery CMS and Spree E-commerce connector.

Key features

  • It provides tabs in Refinery CMS and Spree menus to easily switch between both backends
  • Shares admin sessions and user abilities between Refinery CMS and Spree.

Compatibility

Installation

Create a new Rails 4.2.x application:

gem install rails -v 4.2.3
gem install bundler

Add Spree and those gems to your Gemfile:

gem 'refinerycms', github: 'refinery/refinerycms', branch: 'master'
gem 'quiet_assets', :group => :development

# Add support for searching inside Refinery's admin interface.
gem 'refinerycms-acts-as-indexed', ['~> 2.0', '>= 2.0.0']

# Add support for Refinery's custom fork of the visual editor WYMeditor.
gem 'refinerycms-wymeditor', ['~> 1.0', '>= 1.0.6']

gem 'spree', github: 'spree/spree', branch: '3-0-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'
gem 'spree-refinerycms-authentication', github: 'bricesanchez/spree-refinery-authentication', branch: '3-0-stable'

Note: DON'T install the gem refinerycms-authentication-devise. The authentication will be provided by Spree and included in the gem spree_auth_devise.

Run bundler, then install Spree

bundle
rails g spree:install

Change the Spree.user_class in the initializer config/initializer/spree.rb

Spree.user_class = "Spree::User"

Run the migrations

rake db:migrate

Then, put those lines in config/routes.rb to use RefineryCMS and Spree together and remove routes conflicts

root :to => "refinery/pages#home"
mount Spree::Core::Engine, :at => '/shop'
mount Refinery::Core::Engine, at: '/'

Note: If you try to mount both engines at => '/', Refinery will try to display a page even if you request a Spree page. Every page load will be slow.

Create a Spree admin user

bundle exec rake spree_auth:admin:create

All done! Now start your application

rails server

You should now be able to access Refinery admin at http://localhost:3000/refinery and Spree admin at http://localhost:3000/shop/admin.

spree-refinery-authentication's People

Contributors

bricesanchez avatar amacneil avatar parndt avatar dominiclovell avatar pjero avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.