Git Product home page Git Product logo

test_task_spark_solutions's Introduction

Spark Starter Kit

Circle CI Maintainability

This is a starting point for all Spree/Rails related projects at Spark Solutions, it contains:

  • Ruby on Rails
  • Spree Commerce
  • Webpack via Webpacker gem
  • React with Redux

Installation

Install required tools and dependencies

Run setup script

bin/setup

Development

Running rails console

docker-compose run web rails c

Running tests

Before running the test suite remember to fire up docker-compose (if it's not running already):

docker-compose run web bash

And after that you can just use plain normal rspec:

bundle exec rspec

Adding new gems

Update Gemfile and run:

bundle install
docker-compose build

You will need to restart the server if running:

docker-compose restart

Updating gems

bundle update spree
docker-compose build

Conventions

Namespaces

  • Spree - Spree-specific models, controllers, services
  • SparkStarterKit - all custom-made models, controllers, services specifically for SparkStarterKit application

Using Dependencies system

Rather than writing decorators for Services please use dependency injecton.

Spree Decorators

All decorators should use Module.prepend pattern.

  1. Controllers

    Place them in app/controllers/spark_starter_kit/spree/home_controller_decorator.rb, eg.

    module SparkStarterKit
      module Spree
        module HomeControllerDecorator
          # ...
        end
      end
    end
    
    ::Spree::HomeController.prepend(SparkStarterKit::Spree::HomneControllerDecorator)
  2. Models

    Place them in app/models/spark_starter_kit/spree/product_decorator.rb, eg.

    module SparkStarterKit
      module Spree
        module ProductDecorator
          # ...
        end
      end
    end
    
    ::Spree::Product.prepend(SparkStarterKit::Spree::ProductDecorator)

License

Spark Starter Kit is copyright © 2015-2020 Spark Solutions Sp. z o.o.. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About Spark Solutions

Spark Solutions

Spark Starter Kit is maintained and funded by Spark Solutions Sp. z o.o. The names and logos are trademarks of Spark Solutions Sp. z o.o.

We are passionate about open source software. We are available for hire.

test_task_spark_solutions's People

Contributors

adiochocki avatar

Watchers

 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.